diff --git a/Directory.Build.props b/Directory.Build.props index cdb60af6..e5044df3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 1.2.0 + 1.3.0 netstandard2.0 11 true diff --git a/SpaceWarp/API/Assets/AssetManager.cs b/SpaceWarp/API/Assets/AssetManager.cs index d16aec25..efc50150 100644 --- a/SpaceWarp/API/Assets/AssetManager.cs +++ b/SpaceWarp/API/Assets/AssetManager.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using SpaceWarp.API.Lua; using UnityEngine; using Logger = BepInEx.Logging.Logger; namespace SpaceWarp.API.Assets; +[SpaceWarpLuaAPI("Assets")] public static class AssetManager { private static readonly Dictionary AllAssets = new(); @@ -133,4 +135,54 @@ public static bool TryGetAsset(string path, out T asset) where T : UnityObjec return true; } + + /// + /// Gets an asset from the specified asset path + /// + /// an asset path, format: {mod_id}/{asset_bundle}/{asset_path} + /// + public static UnityObject GetAsset(string path) + { + path = path.ToLower(); + var subPaths = path.Split('/', '\\'); + if (subPaths.Length < 3) + { + throw new ArgumentException( + "Invalid path, asset paths must follow to following structure: {mod_id}/{asset_bundle}/{asset_path}"); + } + + if (!AllAssets.TryGetValue(path, out var value)) + { + throw new IndexOutOfRangeException($"Unable to find asset at path \"{path}\""); + } + + return value; + } + + /// + /// Tries to get an asset from the specified asset path + /// + /// an asset path, format: {mod_id}/{asset_bundle}/{asset_name} + /// the asset output + /// Whether or not the asset exists and is loaded + public static bool TryGetAsset(string path, out UnityObject asset) + { + path = path.ToLower(); + asset = null; + var subPaths = path.Split('/', '\\'); + + if (subPaths.Length < 3) + { + return false; + } + + if (!AllAssets.TryGetValue(path, out var value)) + { + return false; + } + + asset = value; + + return true; + } } \ No newline at end of file diff --git a/SpaceWarp/API/Game/Vehicle.cs b/SpaceWarp/API/Game/Vehicle.cs index ba6635a9..78966006 100644 --- a/SpaceWarp/API/Game/Vehicle.cs +++ b/SpaceWarp/API/Game/Vehicle.cs @@ -1,8 +1,10 @@ using KSP.Game; using KSP.Sim.impl; +using SpaceWarp.API.Lua; namespace SpaceWarp.API.Game; +[SpaceWarpLuaAPI("Vehicle")] public static class Vehicle { public static VesselVehicle ActiveVesselVehicle => GameManager.Instance.Game.ViewController._activeVesselVehicle; diff --git a/SpaceWarp/API/Loading/Loading.cs b/SpaceWarp/API/Loading/Loading.cs index 04ea4a57..638d3bbe 100644 --- a/SpaceWarp/API/Loading/Loading.cs +++ b/SpaceWarp/API/Loading/Loading.cs @@ -6,12 +6,20 @@ using SpaceWarp.API.Assets; using SpaceWarp.API.Mods; using SpaceWarp.API.Mods.JSON; +using SpaceWarp.InternalUtilities; using SpaceWarp.Patching.LoadingActions; namespace SpaceWarp.API.Loading; public static class Loading { + internal static List> DescriptorLoadingActionGenerators = + new(); + + internal static List> + FallbackDescriptorLoadingActionGenerators = + new(); + internal static List> LoadingActionGenerators = new(); internal static List GeneralLoadingActions = new(); @@ -29,15 +37,31 @@ public static void AddAssetLoadingAction(string subfolder, string name, extensions.Length == 0 ? CreateAssetLoadingActionWithoutExtension(subfolder, importFunction) : CreateAssetLoadingActionWithExtensions(subfolder, importFunction, extensions)); + FallbackDescriptorLoadingActionGenerators.Add(d => new DescriptorLoadingAction(name, + extensions.Length == 0 + ? CreateAssetLoadingActionWithoutExtensionDescriptor(subfolder, importFunction) + : CreateAssetLoadingActionWithExtensionsDescriptor(subfolder, importFunction, extensions), d)); } + /// /// Registers a per mod loading action /// /// The name of the action /// The action + [Obsolete("Use AddDescriptorLoadingAction instead")] public static void AddModLoadingAction(string name, Action action) { - LoadingActionGenerators.Add(p => new ModLoadingAction(name,action,p)); + LoadingActionGenerators.Add(p => new ModLoadingAction(name, action, p)); + } + + /// + /// Registers a per mod loading action (but more general) + /// + /// The name of the action + /// The action + public static void AddDescriptorLoadingAction(string name, Action action) + { + DescriptorLoadingActionGenerators.Add(p => new DescriptorLoadingAction(name, action, p)); } /// @@ -56,13 +80,15 @@ public static void AddGeneralLoadingAction(FlowAction action) /// The addressables label to hook into /// The action to be done on each addressables asset /// The type of asset that this action is done upon - public static void AddAddressablesLoadingAction(string name, string label, Action action) where T : UnityObject + public static void AddAddressablesLoadingAction(string name, string label, Action action) + where T : UnityObject { AddGeneralLoadingAction(new AddressableAction(name, label, action)); } - private static Action CreateAssetLoadingActionWithExtensions(string subfolder, Func> importFunction, string[] extensions) + private static Action CreateAssetLoadingActionWithExtensions(string subfolder, + Func> importFunction, string[] extensions) { return plugin => { @@ -87,7 +113,37 @@ private static Action CreateAssetLoadingActionWithExtension }; } - private static void LoadSingleAsset(Func> importFunction, string path, string file, BaseSpaceWarpPlugin plugin) + private static Action CreateAssetLoadingActionWithExtensionsDescriptor(string subfolder, + Func> importFunction, string[] extensions) + { + return plugin => + { + var path = Path.Combine(plugin.Folder.FullName, "assets", subfolder); + if (!Directory.Exists(path)) return; + var directoryInfo = new DirectoryInfo(path); + foreach (var extension in extensions) + { + foreach (var file in directoryInfo.EnumerateFiles($"*.{extension}", SearchOption.AllDirectories) + .Select(fileInfo => fileInfo.FullName)) + { + try + { + LoadSingleAsset(importFunction, path, file, plugin); + } + catch (Exception e) + { + if (plugin.Plugin != null) + plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(plugin.SWInfo.Name + ": " + e); + } + } + } + }; + } + + private static void LoadSingleAsset(Func> importFunction, + string path, string file, BaseSpaceWarpPlugin plugin) { var assetPathList = PathHelpers.GetRelativePath(path, file) .Split(Path.DirectorySeparatorChar); @@ -108,7 +164,30 @@ private static void LoadSingleAsset(Func CreateAssetLoadingActionWithoutExtension(string subfolder, Func> importFunction) + private static void LoadSingleAsset(Func> importFunction, + string path, string file, SpaceWarpPluginDescriptor plugin) + { + var assetPathList = PathHelpers.GetRelativePath(path, file) + .Split(Path.DirectorySeparatorChar); + var assetPath = ""; + for (var i = 0; i < assetPathList.Length; i++) + { + assetPath += assetPathList[i].ToLower(); + if (i != assetPathList.Length - 1) + { + assetPath += "/"; + } + } + + var assets = importFunction(assetPath, file); + foreach (var asset in assets) + { + AssetManager.RegisterSingleAsset(plugin.Guid, asset.name, asset.asset); + } + } + + private static Action CreateAssetLoadingActionWithoutExtension(string subfolder, + Func> importFunction) { return plugin => { @@ -117,7 +196,8 @@ private static Action CreateAssetLoadingActionWithoutExtens var directoryInfo = new DirectoryInfo(path); foreach (var file in directoryInfo.EnumerateFiles("*", SearchOption.AllDirectories) .Select(fileInfo => fileInfo.FullName)) - {try + { + try { LoadSingleAsset(importFunction, path, file, plugin); } @@ -128,4 +208,30 @@ private static Action CreateAssetLoadingActionWithoutExtens } }; } + + private static Action CreateAssetLoadingActionWithoutExtensionDescriptor( + string subfolder, Func> importFunction) + { + return plugin => + { + var path = Path.Combine(plugin.Folder.FullName, "assets", subfolder); + if (!Directory.Exists(path)) return; + var directoryInfo = new DirectoryInfo(path); + foreach (var file in directoryInfo.EnumerateFiles("*", SearchOption.AllDirectories) + .Select(fileInfo => fileInfo.FullName)) + { + try + { + LoadSingleAsset(importFunction, path, file, plugin); + } + catch (Exception e) + { + if (plugin.Plugin != null) + plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(plugin.SWInfo.Name + ": " + e); + } + } + }; + } } \ No newline at end of file diff --git a/SpaceWarp/API/Lua/AppBarInterop.cs b/SpaceWarp/API/Lua/AppBarInterop.cs new file mode 100644 index 00000000..dd1344c2 --- /dev/null +++ b/SpaceWarp/API/Lua/AppBarInterop.cs @@ -0,0 +1,106 @@ +using System; +using JetBrains.Annotations; +using MoonSharp.Interpreter; +using SpaceWarp.API.Assets; +using SpaceWarp.API.UI.Appbar; +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable MemberCanBePrivate.Global + +// ReSharper disable UnusedMember.Global +namespace SpaceWarp.API.Lua; + +[SpaceWarpLuaAPI("AppBar")] +// ReSharper disable once UnusedType.Global +public static class AppBarInterop +{ + public static Sprite GetSprite(string texturePath, int width = 0, int height = 0) + { + return GetSprite(AssetManager.GetAsset(texturePath)); + } + + public static Sprite GetSprite(Texture2D texture, int width = 0, int height = 0) + { + if (width == 0) + { + width = texture.width; + } + + if (height == 0) + { + height = texture.height; + } + + return Sprite.Create(texture, new Rect(0, 0, width, height), new Vector2(0.5f, 0.5f)); + } + + public static void RegisterAppButton(bool oab, bool inFlight, string name, string ID, Sprite icon, + Closure toggleCallback, [CanBeNull] DynValue self = null) + { + Action callback; + if (self != null) + { + callback = b => toggleCallback.Call(self, b); + } + else + { + callback = b => toggleCallback.Call(b); + } + + if (oab) + { + Appbar.RegisterAppButton(name, ID, icon, callback); + } + + if (inFlight) + { + Appbar.RegisterOABAppButton(name, ID, icon, callback); + } + } + + public static void RegisterAppButton(bool oab, bool inFlight, string name, string ID, string texturePath, + Closure toggleCallback, [CanBeNull] DynValue self = null) => + RegisterAppButton(oab, inFlight, name, ID, GetSprite(texturePath), toggleCallback, self); + + public static void RegisterAppWindow(bool oab, bool inFlight, string name, string ID, Sprite icon, VisualElement window, Closure toggleCallback, [CanBeNull] DynValue self = null) + { + + Action callback; + if (self != null) + { + callback = b => + { + window.visible = b; + toggleCallback.Call(self, b); + }; + } + else + { + callback = b => + { + window.visible = b; + toggleCallback.Call(b); + }; + } + + if (oab) + { + Appbar.RegisterAppButton(name, ID, icon, callback); + } + + if (inFlight) + { + Appbar.RegisterOABAppButton(name, ID, icon, callback); + } + } + + public static void RegisterAppWindow(bool oab, bool inFlight, string name, string ID, string texturePath, VisualElement window, + Closure toggleCallback, [CanBeNull] DynValue self = null) => + RegisterAppWindow(oab, inFlight, name, ID, GetSprite(texturePath), window, toggleCallback, self); + + public static void SetAppButtonIndicator(string id, bool b) + { + Appbar.SetAppBarButtonIndicator(id, b); + } +} \ No newline at end of file diff --git a/SpaceWarp/API/Lua/LuaMod.cs b/SpaceWarp/API/Lua/LuaMod.cs new file mode 100644 index 00000000..583a46c8 --- /dev/null +++ b/SpaceWarp/API/Lua/LuaMod.cs @@ -0,0 +1,170 @@ + +using System; +using BepInEx.Logging; +using KSP.Game; +using MoonSharp.Interpreter; +using UnityEngine; +using Logger = BepInEx.Logging.Logger; + +namespace SpaceWarp.API.Lua; + + + +[MoonSharpUserData] +public class LuaMod : KerbalMonoBehaviour +{ + public Table ModTable; + // TODO: Add more than just this to the behaviour but for now + + #region Message Definitions + // Start + private Closure _start = null; + + // Update Functions + private Closure _update = null; + private Closure _fixedUpdate = null; + private Closure _lateUpdate = null; + + // Enable/Disable + private Closure _onEnable = null; + private Closure _onDisable = null; + + // Destruction + private Closure _onDestroy = null; + + // Reset + private Closure _reset = null; + #endregion + + public ManualLogSource Logger; + + // First a pass through to the wrapped table + public DynValue this[DynValue idx] + { + get => ModTable.Get(idx); + set => ModTable[idx] = value; + } + + private void TryCallMethod(Closure closure, params object[] args) + { + try + { + closure.Call(args); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + #region Message Handlers + + private void TryRegister(string name, out Closure method) + { + if (ModTable.Get(name) != null && ModTable.Get(name).Type == DataType.Function) + { + method = ModTable.Get(name).Function; + return; + } + method = null; + } + + public void Awake() + { + if (ModTable.Get("Awake") != null && ModTable.Get("Awake").Type == DataType.Function) + { + var awakeFunction = ModTable.Get("Awake").Function; + TryCallMethod(awakeFunction); + } + + TryRegister(nameof(Start),out _start); + + TryRegister(nameof(Update), out _update); + + TryRegister(nameof(LateUpdate), out _lateUpdate); + + TryRegister(nameof(FixedUpdate), out _fixedUpdate); + + TryRegister(nameof(OnEnable), out _onEnable); + + TryRegister(nameof(OnDisable), out _onDisable); + + TryRegister(nameof(OnDestroy), out _onDestroy); + + TryRegister(nameof(Reset), out _reset); + + } + + // Start + public void Start() + { + if (_start != null) + { + TryCallMethod(_start, this); + } + } + + // Update Functions + + public void Update() + { + if (_update != null) + { + TryCallMethod(_update, this); + } + } + + public void FixedUpdate() + { + if (_fixedUpdate != null) + { + TryCallMethod(_fixedUpdate, this); + } + } + + public void LateUpdate() + { + if (_lateUpdate != null) + { + TryCallMethod(_lateUpdate, this); + } + } + + // Enable/Disable + + public void OnEnable() + { + if (_onEnable != null) + { + TryCallMethod(_onEnable, this); + } + } + + public void OnDisable() + { + if (_onDisable != null) + { + TryCallMethod(_onDisable, this); + } + } + + // Destruction + + public void OnDestroy() + { + if (_onDestroy != null) + { + TryCallMethod(_onDestroy, this); + } + } + + // Reset + public void Reset() + { + if (_reset != null) + { + TryCallMethod(_reset, this); + } + } + + #endregion +} \ No newline at end of file diff --git a/SpaceWarp/API/Lua/SpaceWarpInterop.cs b/SpaceWarp/API/Lua/SpaceWarpInterop.cs new file mode 100644 index 00000000..03856d33 --- /dev/null +++ b/SpaceWarp/API/Lua/SpaceWarpInterop.cs @@ -0,0 +1,35 @@ +using System; +using BepInEx.Bootstrap; +using JetBrains.Annotations; +using KSP.UI.Flight; +using MoonSharp.Interpreter; +using SpaceWarp.API.Assets; +using SpaceWarp.API.UI.Appbar; +using SpaceWarp.Backend.UI.Appbar; +using SpaceWarp.InternalUtilities; +using UnityEngine; +using UnityEngine.UIElements; +using Logger = BepInEx.Logging.Logger; +// ReSharper disable UnusedMember.Global + +namespace SpaceWarp.API.Lua; + +[SpaceWarpLuaAPI("SpaceWarp")] +// ReSharper disable once UnusedType.Global +public static class SpaceWarpInterop +{ + public static LuaMod RegisterMod(string name, Table modTable) + { + GameObject go = new GameObject(name); + go.Persist(); + go.transform.SetParent(Chainloader.ManagerObject.transform); + go.SetActive(false); + var mod = go.AddComponent(); + mod.Logger = Logger.CreateLogSource(name); + mod.ModTable = modTable; + go.SetActive(true); + return mod; + } + + +} \ No newline at end of file diff --git a/SpaceWarp/API/Lua/SpaceWarpLuaAPIAttribute.cs b/SpaceWarp/API/Lua/SpaceWarpLuaAPIAttribute.cs new file mode 100644 index 00000000..3d3f27b9 --- /dev/null +++ b/SpaceWarp/API/Lua/SpaceWarpLuaAPIAttribute.cs @@ -0,0 +1,13 @@ +using System; + +namespace SpaceWarp.API.Lua; + +[AttributeUsage(AttributeTargets.Class)] +public class SpaceWarpLuaAPIAttribute : Attribute +{ + public string LuaName; + public SpaceWarpLuaAPIAttribute(string luaName) + { + LuaName = luaName; + } +} \ No newline at end of file diff --git a/SpaceWarp/API/Lua/UI/LuaUITK.cs b/SpaceWarp/API/Lua/UI/LuaUITK.cs new file mode 100644 index 00000000..da8104d0 --- /dev/null +++ b/SpaceWarp/API/Lua/UI/LuaUITK.cs @@ -0,0 +1,354 @@ +using JetBrains.Annotations; +using MoonSharp.Interpreter; +using SpaceWarp.API.Assets; +using UnityEngine.UIElements; +using UitkForKsp2.API; + +// ReSharper disable MemberCanBePrivate.Global + +namespace SpaceWarp.API.Lua.UI; + +// ReSharper disable UnusedMember.Global +[SpaceWarpLuaAPI("UI")] +// ReSharper disable once UnusedType.Global +public static class LuaUITK +{ + #region Creation + public static UIDocument Window(LuaMod mod, string id, string documentPath) + { + return Window(mod, id, AssetManager.GetAsset(documentPath)); + } + + public static UIDocument Window(LuaMod mod, string id, VisualTreeAsset uxml) + { + var parent = mod.transform; + return UitkForKsp2.API.Window.CreateFromUxml(uxml, id, parent, true); + } + + public static UIDocument Window(LuaMod mod, string id) + { + var parent = mod.transform; + return UitkForKsp2.API.Window.Create(out _, id, parent, true); + } + + #region Element Creation + + public static VisualElement VisualElement() + { + return new VisualElement(); + } + + public static ScrollView ScrollView() + { + return new ScrollView(); + } + + public static ListView ListView() + { + return new ListView(); + } + + public static Toggle Toggle(string text = "") + { + return new Toggle + { + text=text + }; +} + + public static Label Label(string text = "") + { + return new Label + { + text = text + }; + } + + public static Button Button(string text = "") + { + return new Button + { + text = text + }; + } + + public static Scroller Scroller() + { + return new Scroller(); + } + + public static TextField TextField(string text = "") + { + return new TextField + { + text = text + }; + } + + public static Foldout Foldout() + { + return new Foldout(); + } + + public static Slider Slider(float value = 0.0f, float minValue = 0.0f, float maxValue = 1.0f) + { + return new Slider + { + lowValue = minValue, + highValue = maxValue, + value = value + }; + } + + public static SliderInt SliderInt(int value = 0, int minValue = 0, int maxValue = 100) + { + return new SliderInt + { + lowValue = minValue, + highValue = maxValue, + value = value + }; + } + + public static MinMaxSlider MinMaxSlider(float minValue = 0.0f, float maxValue = 1.0f, float minLimit = 0.0f, float maxLimit = 1.0f) + { + return new MinMaxSlider + { + minValue = minValue, + maxValue = maxValue, + lowLimit = minLimit, + highLimit = maxLimit + }; + } + + #endregion + + #endregion + + #region Callbacks + public static void AddCallback(Button button, Closure callback, [CanBeNull] DynValue self = null) + { + if (self != null) + { + button.clicked += () => callback.Call(self); + } + else + { + button.clicked += () => callback.Call(); + } + } + + + /// + /// Registers a value changed callback from lua + /// The lua functions parameters should be like function(self?,previous,new) + /// + /// + /// + /// + /// + public static void RegisterValueChangedCallback(INotifyValueChanged element, Closure callback, + [CanBeNull] DynValue self = null) + { + if (self != null) + { + element.RegisterValueChangedCallback(evt => callback.Call(self, evt.previousValue, evt.newValue)); + } + else + { + element.RegisterValueChangedCallback(evt => callback.Call(evt.previousValue, evt.newValue)); + } + } + + private static void RegisterGenericCallback(VisualElement element, Closure callback, DynValue self, + bool trickleDown = false) where T : EventBase, new() + { + if (self != null) + { + element.RegisterCallback(evt => callback.Call(self, evt), + trickleDown ? TrickleDown.TrickleDown : TrickleDown.NoTrickleDown); + } + else + { + element.RegisterCallback(evt => callback.Call(evt), + trickleDown ? TrickleDown.TrickleDown : TrickleDown.NoTrickleDown); + } + } + + + #region Capture Events + + public static void RegisterMouseCaptureCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseCaptureOutCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => + RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerCaptureCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerCaptureOutCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => + RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Change Events + + public static void RegisterChangeBoolCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback>(element, callback, self, trickleDown); + + public static void RegisterChangeIntCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback>(element, callback, self, trickleDown); + + public static void RegisterChangeFloatCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback>(element, callback, self, trickleDown); + + public static void RegisterChangeStringCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback>(element, callback, self, trickleDown); + + #endregion + + #region Click Events + + public static void RegisterClickCallback(VisualElement element, Closure callback, [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Focus Events + + public static void RegisterFocusOutCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterFocusInCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterBlurCallback(VisualElement element, Closure callback, [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterFocusCallback(VisualElement element, Closure callback, [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Input Events + + public static void RegisterInputCallback(VisualElement element, Closure callback, [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Layout Events + + public static void RegisterGeometryChangedCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => + RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Mouse Events + + public static void RegisterMouseDownCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseUpCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseMoveCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterWheelCallback(VisualElement element, Closure callback, [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseEnterWindowCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => + RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseLeaveWindowCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => + RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseEnterCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseLeaveCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseOverCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterMouseOutCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + #endregion + + #region Pointer Events + + public static void RegisterPointerDownCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerUpCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerMoveCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerEnterCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerLeaveCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerOverCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + + public static void RegisterPointerOutCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + #endregion + + #region Panel Events + + public static void RegisterAttachToPanelCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + public static void RegisterDetachFromPanelCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + #endregion + + #region Tooltip Events + public static void RegisterTooltipCallback(VisualElement element, Closure callback, + [CanBeNull] DynValue self = null, + bool trickleDown = false) => RegisterGenericCallback(element, callback, self, trickleDown); + #endregion + #endregion +} \ No newline at end of file diff --git a/SpaceWarp/API/Mods/JSON/ModInfo.cs b/SpaceWarp/API/Mods/JSON/ModInfo.cs index 3c1c2f75..0787d772 100644 --- a/SpaceWarp/API/Mods/JSON/ModInfo.cs +++ b/SpaceWarp/API/Mods/JSON/ModInfo.cs @@ -18,16 +18,10 @@ public string ModID { get { - if (Spec >= SpecVersion.V1_2) + if (Spec == SpecVersion.V1_2) { throw new DeprecatedSwinfoPropertyException(nameof(ModID), SpecVersion.V1_2); } - - SpaceWarpManager.Logger.LogWarning( - "The swinfo.json \"mod_id\" property is deprecated and will be removed in a future version. " + - "Instead of ModID, use PluginClass.Info.Metadata.GUID in your code." - ); - return _modID; } internal set => _modID = value; diff --git a/SpaceWarp/API/Mods/JSON/SpecVersion.cs b/SpaceWarp/API/Mods/JSON/SpecVersion.cs index bad25500..3d64594c 100644 --- a/SpaceWarp/API/Mods/JSON/SpecVersion.cs +++ b/SpaceWarp/API/Mods/JSON/SpecVersion.cs @@ -28,6 +28,13 @@ public sealed record SpecVersion /// public static SpecVersion V1_2 { get; } = new(1, 2); + /// + /// Specification version 1.3 (SpaceWarp 1.3.x), adds back the ModID field, but enforces that it is the same as the BepInEx plugin GUID if there is a BepInEx plugin attached to the swinfo + /// Which w/ version 1.3 there does not have to be a plugin + /// Also enforces that all dependencies use BepInEx GUID, and that they are loaded + /// + public static SpecVersion V1_3 { get; } = new(1, 3); + // ReSharper restore InconsistentNaming /// diff --git a/SpaceWarp/API/Mods/PluginList.cs b/SpaceWarp/API/Mods/PluginList.cs index 4228dc9a..be666afe 100644 --- a/SpaceWarp/API/Mods/PluginList.cs +++ b/SpaceWarp/API/Mods/PluginList.cs @@ -3,6 +3,7 @@ using BepInEx; using BepInEx.Bootstrap; using SpaceWarp.API.Mods.JSON; +using SpaceWarpPatcher; // ReSharper disable UnusedMember.Global // ReSharper disable UnusedType.Global @@ -17,6 +18,10 @@ namespace SpaceWarp.API.Mods; /// public static class PluginList { + /// + /// Set if the plugin list is different in any way since last run (version differences, new mods, mods removed, mods disabled, description differences, any different in any swinfo file and the disabled mod list) + /// + public static bool ModListChangedSinceLastRun => ChainloaderPatch.ModListChangedSinceLastRun; /// /// Contains information about all currently loaded plugins. The key is the BepInEx GUID of the plugin. /// @@ -64,31 +69,32 @@ public static int CompareVersion(string guid, Version version) /// of the plugin or null if not found public static ModInfo TryGetSwinfo(string guid) { - var swModInfo = SpaceWarpManager.SpaceWarpPlugins - .FirstOrDefault(item => item.Info.Metadata.GUID == guid); + var swModInfo = SpaceWarpManager.AllPlugins + .FirstOrDefault(item => item.Guid == guid); if (swModInfo != null) { - return swModInfo.SpaceWarpMetadata; + return swModInfo.SWInfo; } - - var nonSwModInfo = SpaceWarpManager.NonSpaceWarpInfos - .Where(item => item.Item1.Info.Metadata.GUID == guid) - .Select(item => item.Item2) - .FirstOrDefault(); - - if (nonSwModInfo != null) - { - return nonSwModInfo; - } - - var disabledModInfo = SpaceWarpManager.DisabledInfoPlugins - .Where(item => item.Item1.Metadata.GUID == guid) - .Select(item => item.Item2) + + var disabledModInfo = SpaceWarpManager.DisabledPlugins + .Where(item => item.Guid == guid) + .Select(item => item.SWInfo) .FirstOrDefault(); return disabledModInfo; } + /// + /// Retrieves the of the specified plugin. Returns null if the specified plugin guid doesn't + /// have an associated . + /// + /// GUID of the plugin + /// of the plugin or null if not found + public static SpaceWarpPluginDescriptor TryGetDescriptor(string guid) + { + return SpaceWarpManager.AllPlugins + .FirstOrDefault(item => item.Guid == guid); + } /// /// Retrieves the instance of the specified plugin class. diff --git a/SpaceWarp/API/Mods/SpaceWarpPluginDescriptor.cs b/SpaceWarp/API/Mods/SpaceWarpPluginDescriptor.cs new file mode 100644 index 00000000..a42c248d --- /dev/null +++ b/SpaceWarp/API/Mods/SpaceWarpPluginDescriptor.cs @@ -0,0 +1,26 @@ +using System.IO; +using BepInEx.Configuration; +using JetBrains.Annotations; +using SpaceWarp.API.Mods.JSON; + +namespace SpaceWarp.API.Mods; + +public class SpaceWarpPluginDescriptor +{ + public SpaceWarpPluginDescriptor([CanBeNull] BaseSpaceWarpPlugin plugin, string guid, string name, ModInfo swInfo, DirectoryInfo folder, [CanBeNull] ConfigFile configFile = null) + { + Plugin = plugin; + Guid = guid; + Name = name; + SWInfo = swInfo; + Folder = folder; + ConfigFile = configFile; + } + + [CanBeNull] public BaseSpaceWarpPlugin Plugin; + public readonly string Guid; + public readonly string Name; + public readonly ModInfo SWInfo; + public readonly DirectoryInfo Folder; + [CanBeNull] public readonly ConfigFile ConfigFile; +} \ No newline at end of file diff --git a/SpaceWarp/API/Parts/Colors.cs b/SpaceWarp/API/Parts/Colors.cs index f0a71955..8af37cbb 100644 --- a/SpaceWarp/API/Parts/Colors.cs +++ b/SpaceWarp/API/Parts/Colors.cs @@ -1,10 +1,12 @@ using System; using System.Collections.Generic; using BepInEx.Logging; +using SpaceWarp.API.Lua; using SpaceWarp.Patching; namespace SpaceWarp.API.Parts; +[SpaceWarpLuaAPI("Colors")] public static class Colors { /// diff --git a/SpaceWarp/API/UI/Appbar/Appbar.cs b/SpaceWarp/API/UI/Appbar/Appbar.cs index ea3c2a67..8a1e5819 100644 --- a/SpaceWarp/API/UI/Appbar/Appbar.cs +++ b/SpaceWarp/API/UI/Appbar/Appbar.cs @@ -3,6 +3,7 @@ using BepInEx.Bootstrap; using KSP.UI.Binding; using SpaceWarp.Backend.UI.Appbar; +using SpaceWarp.InternalUtilities; using UnityEngine; namespace SpaceWarp.API.UI.Appbar; diff --git a/SpaceWarp/API/UI/Appbar/AppbarMenu.cs b/SpaceWarp/API/UI/Appbar/AppbarMenu.cs index 7ed16299..d271e617 100644 --- a/SpaceWarp/API/UI/Appbar/AppbarMenu.cs +++ b/SpaceWarp/API/UI/Appbar/AppbarMenu.cs @@ -1,3 +1,4 @@ +using System; using KSP.Game; using KSP.Sim.impl; using UnityEngine; @@ -5,6 +6,7 @@ namespace SpaceWarp.API.UI.Appbar; +[Obsolete("Spacewarps support for IMGUI will not be getting updates, please use UITK instead")] public abstract class AppbarMenu : KerbalBehavior { [FormerlySerializedAs("Title")] public string title; diff --git a/SpaceWarp/API/UI/Settings/ModsPropertyDrawers.cs b/SpaceWarp/API/UI/Settings/ModsPropertyDrawers.cs new file mode 100644 index 00000000..a7f69cda --- /dev/null +++ b/SpaceWarp/API/UI/Settings/ModsPropertyDrawers.cs @@ -0,0 +1,430 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Reflection; +using BepInEx.Configuration; +using I2.Loc; +using KSP; +using KSP.Api.CoreTypes; +using KSP.UI; +using KSP.UI.Binding; +using SpaceWarp.Backend.UI.Settings; +using SpaceWarp.InternalUtilities; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace SpaceWarp.API.UI.Settings; + +public static class ModsPropertyDrawers +{ + private static Dictionary> AllPropertyDrawers = new(); + + public static void AddDrawer(Func drawerGenerator) => + AllPropertyDrawers.Add(typeof(T), drawerGenerator); + + public static GameObject Drawer(ConfigEntryBase entry) + { + if (entry.SettingType.IsEnum && !AllPropertyDrawers.ContainsKey(entry.SettingType)) + AllPropertyDrawers.Add(entry.SettingType, GenerateEnumDrawerFor(entry.SettingType)); + if (!AllPropertyDrawers.ContainsKey(entry.SettingType)) + { + try + { + AllPropertyDrawers.Add(entry.SettingType,GenerateGenericDrawerFor(entry.SettingType)); + } + catch + { + //Ignored + } + } + return AllPropertyDrawers.TryGetValue(entry.SettingType, out var func) ? func(entry) : null; + } + + + + internal static GameObject DropdownPrefab; + internal static GameObject RadioPrefab; + internal static GameObject RadioSettingPrefab; + internal static GameObject InputFieldPrefab; + + + private static Func GenerateEnumDrawerFor(Type t) + { + var optionNames = t.GetEnumNames().ToList(); + var optionValues = t.GetEnumValues().Cast().ToList(); + for (var i = 0; i < optionNames.Count; i++) + { + try + { + var memberInfos = t.GetMember(optionNames[i]); + var enumValueInfo = memberInfos.FirstOrDefault(m => m.DeclaringType == t); + var valueAttributes = enumValueInfo.GetCustomAttributes(typeof(DescriptionAttribute), false); + optionNames[i] = ((DescriptionAttribute)valueAttributes[0]).Description; + } + catch + { + // ignored + } + } + + var shouldDropdown = optionNames.Count > 5 || optionNames.Select(x => x.Length).Sum() >= 50; + return entry => + { + if (shouldDropdown) + { + var ddCopy = UnityObject.Instantiate(DropdownPrefab); + var lab = ddCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var dropdown = ddCopy.GetChild("Setting").GetChild("KSP2DropDown"); + var extended = dropdown.GetComponent(); + // Start by clearing the options data + extended.options.Clear(); + foreach (var option in optionNames) + { + extended.options.Add(new TMP_Dropdown.OptionData(option)); + } + + extended.value = optionValues.IndexOf((int)entry.BoxedValue); + extended.onValueChanged.AddListener(idx => { entry.BoxedValue = optionValues[idx]; }); + var sec = ddCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + ddCopy.SetActive(true); + ddCopy.name = entry.Definition.Key; + return ddCopy; + } + else + { + var radioCopy = UnityObject.Instantiate(RadioPrefab); + var lab = radioCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var setting = radioCopy.GetChild("Setting"); + var idx = optionValues.IndexOf((int)entry.BoxedValue); + List allToggles = new(); + for (var i = 0; i < optionNames.Count; i++) + { + var settingCopy = UnityObject.Instantiate(RadioSettingPrefab, setting.transform, true); + var option = settingCopy.GetComponentInChildren(); + option.text = optionNames[i]; + var loc = settingCopy.GetComponentInChildren(); + loc.Term = optionNames[i]; + var toggle = settingCopy.GetComponent(); + toggle.Set(i == idx); + var i1 = i; + toggle.onValueChanged.AddListener(tgl => + { + // This should update automagically + var idx2 = optionValues.IndexOf((int)entry.BoxedValue); + if (i1 == idx2) + { + if (!tgl) + { + toggle.Set(true); + } + + return; + } + + if (!tgl) + { + return; + } + + entry.BoxedValue = optionValues[i1]; + for (var j = 0; j < allToggles.Count; j++) + { + if (j == i1) continue; + if (allToggles[j]) + allToggles[j].Set(false); + } + }); + allToggles.Add(toggle); + toggle.name = optionNames[i]; + settingCopy.SetActive(true); + } + + var sec = radioCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + radioCopy.SetActive(true); + radioCopy.name = entry.Definition.Key; + return radioCopy; + } + }; + } + + + // Should satisfy most needs + private static Func GenerateGenericDrawerFor(Type entrySettingType) + { + var valueListMethod = typeof(ModsPropertyDrawers).GetMethod(nameof(CreateFromAcceptableValueList), + BindingFlags.Static | BindingFlags.NonPublic) + ?.MakeGenericMethod(entrySettingType); + var valueRangeMethod = typeof(ModsPropertyDrawers).GetMethod(nameof(CreateFromAcceptableValueRange), + BindingFlags.Static | BindingFlags.NonPublic) + ?.MakeGenericMethod(entrySettingType); + return entry => + { + var t = entry.Description.AcceptableValues?.GetType(); + if (t?.GetGenericTypeDefinition() == typeof(AcceptableValueList<>) && + t.GenericTypeArguments[0] == entrySettingType) + { + if (valueListMethod != null) + return (GameObject)valueListMethod.Invoke(null, new object[] { entry, entry.Description.AcceptableValues }); + } + + if (t?.GetGenericTypeDefinition() == typeof(AcceptableValueRange<>) && + t.GenericTypeArguments[0] == entrySettingType) + { + if (valueRangeMethod != null) + { + return (GameObject)valueRangeMethod.Invoke(null, new object[] { entry, entry.Description.AcceptableValues }); + } + } + + var inputFieldCopy = UnityObject.Instantiate(InputFieldPrefab); + var lab = inputFieldCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var textField = inputFieldCopy.GetComponentInChildren(); + var textFieldObject = textField.gameObject; + textFieldObject.name = entry.Definition.Key + ": Text Field"; + textField.characterLimit = 256; + textField.readOnly = false; + textField.interactable = true; + textField.text = entry.BoxedValue.ToString(); + textField.onValueChanged.AddListener(str => { entry.BoxedValue = TypeDescriptor.GetConverter(entrySettingType).ConvertFromString(str); }); + var rectTransform = textFieldObject.transform.parent.gameObject.GetComponent(); + rectTransform.anchorMin = new Vector2(0, 2.7f); + rectTransform.anchorMax = new Vector2(0.19f, 2.25f); + var sec = inputFieldCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + inputFieldCopy.SetActive(true); + inputFieldCopy.name = entry.Definition.Key; + return inputFieldCopy; + }; + } + + + private static GameObject CreateBoolConfig(ConfigEntryBase baseEntry) + { + var entry = (ConfigEntry)baseEntry; + var radioCopy = UnityObject.Instantiate(RadioPrefab); + var lab = radioCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var setting = radioCopy.GetChild("Setting"); + var idx = entry.Value ? 0 : 1; + List allToggles = new(); + for (var i = 0; i < 2; i++) + { + var settingCopy = UnityObject.Instantiate(RadioSettingPrefab, setting.transform, true); + var option = settingCopy.GetComponentInChildren(); + option.text = i == 0 ? "Yes" : "No"; + var loc = settingCopy.GetComponentInChildren(); + loc.Term = option.text; + var toggle = settingCopy.GetComponent(); + toggle.Set(i == idx); + var i1 = i; + toggle.onValueChanged.AddListener(tgl => + { + // This should update automagically + var idx2 = entry.Value ? 0 : 1; + if (i1 == idx2) + { + if (!tgl) + { + toggle.Set(true); + } + + return; + } + + if (!tgl) + { + return; + } + + entry.BoxedValue = i1 == 0; + for (var j = 0; j < allToggles.Count; j++) + { + if (j == i1) continue; + if (allToggles[j]) + allToggles[j].Set(false); + } + }); + allToggles.Add(toggle); + settingCopy.SetActive(true); + } + + var sec = radioCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + radioCopy.SetActive(true); + radioCopy.name = entry.Definition.Key; + return radioCopy; + } + + private static GameObject CreateFromAcceptableValueList(ConfigEntry entry, + AcceptableValueList acceptableValues) where T : IEquatable + { + var ddCopy = UnityObject.Instantiate(DropdownPrefab); + var lab = ddCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var dropdown = ddCopy.GetChild("Setting").GetChild("KSP2DropDown"); + var extended = dropdown.GetComponent(); + // Start by clearing the options data + extended.options.Clear(); + foreach (var option in acceptableValues.AcceptableValues) + { + extended.options.Add(new TMP_Dropdown.OptionData(option as string ?? (option is Color color + ? (color.a < 1 ? ColorUtility.ToHtmlStringRGBA(color) : ColorUtility.ToHtmlStringRGB(color)) + : option.ToString()))); + } + + extended.value = acceptableValues.AcceptableValues.IndexOf(entry.Value); + extended.onValueChanged.AddListener(idx => { entry.Value = acceptableValues.AcceptableValues[idx]; }); + var sec = ddCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + ddCopy.SetActive(true); + ddCopy.name = entry.Definition.Key; + return ddCopy; + } + + internal static GameObject SliderPrefab; + + // We should just assume that stuff can be converted to a float for this + private static GameObject CreateFromAcceptableValueRange(ConfigEntry entry, + AcceptableValueRange acceptableValues) where T : IComparable + { + // Now we have to have a "slider" prefab + var slCopy = UnityObject.Instantiate(SliderPrefab); + var lab = slCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var setting = slCopy.GetChild("Setting"); + var slider = setting.GetChild("KSP2SliderLinear").GetComponent(); + var amount = setting.GetChild("Amount display"); + var text = amount.GetComponentInChildren(); + text.text = entry.Value.ToString(); + Func toFloat = x => Convert.ToSingle(x); + // if (!typeof(T).IsIntegral()) + // { + // var convT = TypeDescriptor.GetConverter(typeof(T)) ?? + // throw new ArgumentNullException("TypeDescriptor.GetConverter(typeof(T))"); + // toT = x => (T)convT.ConvertFrom(x); + // } + Func toT = Type.GetTypeCode(typeof(T)) switch + { + TypeCode.Byte => x => (T)(object)Convert.ToByte(x), + TypeCode.SByte => x => (T)(object)Convert.ToSByte(x), + TypeCode.UInt16 => x => (T)(object)Convert.ToUInt16(x), + TypeCode.UInt32 => x => (T)(object)Convert.ToUInt32(x), + TypeCode.UInt64 => x => (T)(object)Convert.ToUInt64(x), + TypeCode.Int16 => x => (T)(object)Convert.ToInt16(x), + TypeCode.Int32 => x => (T)(object)Convert.ToInt32(x), + TypeCode.Int64 => x => (T)(object)Convert.ToInt64(x), + TypeCode.Decimal => x => (T)(object)Convert.ToDecimal(x), + TypeCode.Double => x => (T)(object)Convert.ToDouble(x), + TypeCode.Single => x => (T)(object)x, + _ => x => throw new NotImplementedException(typeof(T).ToString()) + }; + + slider.onValueChanged.AddListener(value => + { + // var trueValue = (acceptableValues.MaxValue-acceptableValues.MinValue) * (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFrom(value) + var trueValue = (toFloat(acceptableValues.MaxValue) - toFloat(acceptableValues.MinValue)) * value + + toFloat(acceptableValues.MinValue); + + entry.Value = toT(trueValue) ?? entry.Value; + if (entry.Value != null) text.text = entry.Value.ToString(); + slider.SetWithoutCallback(toFloat(entry.Value)); + }); + + var sec = slCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + slCopy.SetActive(true); + slCopy.name = entry.Definition.Key; + return slCopy; + } + + private static GameObject CreateStringConfig(ConfigEntryBase entryBase) + { + var entry = (ConfigEntry)entryBase; + if (entry.Description.AcceptableValues is AcceptableValueList str) + { + return CreateFromAcceptableValueList(entry, str); + } + + var inputFieldCopy = UnityObject.Instantiate(InputFieldPrefab); + var lab = inputFieldCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var textField = inputFieldCopy.GetComponentInChildren(); + var textFieldObject = textField.gameObject; + textFieldObject.name = entry.Definition.Key + ": Text Field"; + textField.characterLimit = 256; + textField.readOnly = false; + textField.interactable = true; + textField.text = entry.Value; + textField.onValueChanged.AddListener(str => { entry.Value = str; }); + var rectTransform = textFieldObject.transform.parent.gameObject.GetComponent(); + rectTransform.anchorMin = new Vector2(0, 2.7f); + rectTransform.anchorMax = new Vector2(0.19f, 2.25f); + var sec = inputFieldCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + inputFieldCopy.SetActive(true); + inputFieldCopy.name = entry.Definition.Key; + return inputFieldCopy; + } + + private static GameObject CreateColorConfig(ConfigEntryBase entryBase) + { + var entry = (ConfigEntry)entryBase; + if (entry.Description.AcceptableValues is AcceptableValueList col) + { + return CreateFromAcceptableValueList(entry, col); + } + var inputFieldCopy = UnityObject.Instantiate(InputFieldPrefab); + var lab = inputFieldCopy.GetChild("Label"); + lab.GetComponent().SetTerm(entry.Definition.Key); + lab.GetComponent().text = entry.Definition.Key; + var textField = inputFieldCopy.GetComponentInChildren(); + var textFieldObject = textField.gameObject; + textFieldObject.name = entry.Definition.Key + ": Color Field"; + textField.characterLimit = 256; + textField.readOnly = false; + textField.interactable = true; + textField.text = entry.Value.a < 1 ? ColorUtility.ToHtmlStringRGBA(entry.Value) : ColorUtility.ToHtmlStringRGB(entry.Value); + textField.onValueChanged.AddListener(str => { + if (ColorUtility.TryParseHtmlString(str, out var color)) + { + entry.Value = color; + } + }); + var rectTransform = textFieldObject.transform.parent.gameObject.GetComponent(); + rectTransform.anchorMin = new Vector2(0, 2.7f); + rectTransform.anchorMax = new Vector2(0.19f, 2.25f); + var sec = inputFieldCopy.AddComponent(); + sec.description = entry.Description.Description; + sec.isInputSettingElement = false; + inputFieldCopy.SetActive(true); + inputFieldCopy.name = entry.Definition.Key; + return inputFieldCopy; + } + + internal static void SetupDefaults() + { + AllPropertyDrawers[typeof(bool)] = CreateBoolConfig; + AllPropertyDrawers[typeof(string)] = CreateStringConfig; + AllPropertyDrawers[typeof(Color)] = CreateColorConfig; + } +} \ No newline at end of file diff --git a/SpaceWarp/API/UI/Skins.cs b/SpaceWarp/API/UI/Skins.cs index 59da0818..de45085a 100644 --- a/SpaceWarp/API/UI/Skins.cs +++ b/SpaceWarp/API/UI/Skins.cs @@ -1,9 +1,12 @@ -using UnityEngine; +using System; +using UnityEngine; namespace SpaceWarp.API.UI; // This exposes the SpaceWarp internal skins +[Obsolete("Spacewarps support for IMGUI will not be getting updates, please use UITK instead")] public static class Skins { + [Obsolete("Spacewarps support for IMGUI will not be getting updates, please use UITK instead")] public static GUISkin ConsoleSkin => SpaceWarpManager.Skin; } \ No newline at end of file diff --git a/SpaceWarp/Backend/UI/Appbar/AppbarBackend.cs b/SpaceWarp/Backend/UI/Appbar/AppbarBackend.cs index 3020073d..41aee615 100644 --- a/SpaceWarp/Backend/UI/Appbar/AppbarBackend.cs +++ b/SpaceWarp/Backend/UI/Appbar/AppbarBackend.cs @@ -64,7 +64,7 @@ public static GameObject AddButton(string buttonText, Sprite buttonIcon, string // Say the magic words... var list = GameObject.Find( - "GameManager/Default Game Instance(Clone)/UI Manager(Clone)/Popup Canvas/Container/ButtonBar/BTN-App-Tray/appbar-others-group"); + "GameManager/Default Game Instance(Clone)/UI Manager(Clone)/Scaled Popup Canvas/Container/ButtonBar/BTN-App-Tray/appbar-others-group"); var resourceManger = list != null ? list.GetChild("BTN-Resource-Manager") : null; if (list == null || resourceManger == null) @@ -167,7 +167,7 @@ private static GameObject CreateOABTray() // Set the button icon. var image = oabTrayButton.GetComponent(); - var tex = AssetManager.GetAsset("spacewarp/images/oabTrayButton.png"); + var tex = AssetManager.GetAsset($"{SpaceWarpPlugin.ModGuid}/images/oabTrayButton.png"); tex.filterMode = FilterMode.Point; image.sprite = Sprite.Create(tex, new Rect(0, 0, 32, 32), new Vector2(0.5f, 0.5f)); diff --git a/SpaceWarp/Backend/UI/Settings/CustomSettingsElementDescriptionController.cs b/SpaceWarp/Backend/UI/Settings/CustomSettingsElementDescriptionController.cs new file mode 100644 index 00000000..8ef7bf1e --- /dev/null +++ b/SpaceWarp/Backend/UI/Settings/CustomSettingsElementDescriptionController.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using KSP.Game; +using KSP.UI; +using UnityEngine.EventSystems; +using DG.Tweening; +using DG.Tweening.Core; +using UnityEngine.Serialization; + +namespace SpaceWarp.Backend.UI.Settings; + +public class CustomSettingsElementDescriptionController : + KerbalMonoBehaviour, + IPointerEnterHandler, + IEventSystemHandler, + IPointerExitHandler +{ + + public string description; + public bool isInputSettingElement; + + public List tweenAnimations = new(); + public void Start() => tweenAnimations.AddRange(GetComponents()); + + public void OnPointerEnter(PointerEventData eventData) => OnHover(true); + + public void OnPointerExit(PointerEventData eventData) => OnHover(false); + + + private void OnHover(bool isHovered) + { + if (isHovered) + { + Game.SettingsMenuManager._settingDescription.SetValue(description); + Game.SettingsMenuManager._isKeybindInstructionVisible.SetValue(isInputSettingElement); + HandleAnimation("Hovered"); + } + else + { + Game.SettingsMenuManager.UpdateSettingsDescription(""); + HandleAnimation("Normal"); + } + } + private void HandleAnimation(string triggerType) + { + var all = tweenAnimations.FindAll(da => da.id.Equals(triggerType)); + foreach (var animationComponent in all) + animationComponent.tween.Restart(); + } +} diff --git a/SpaceWarp/AssetHelpers.cs b/SpaceWarp/InternalUtilities/AssetHelpers.cs similarity index 98% rename from SpaceWarp/AssetHelpers.cs rename to SpaceWarp/InternalUtilities/AssetHelpers.cs index 9029c2fd..04c722c6 100644 --- a/SpaceWarp/AssetHelpers.cs +++ b/SpaceWarp/InternalUtilities/AssetHelpers.cs @@ -4,7 +4,7 @@ using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; -namespace SpaceWarp; +namespace SpaceWarp.InternalUtilities; internal static class AssetHelpers { diff --git a/SpaceWarp/InternalExtensions.cs b/SpaceWarp/InternalUtilities/InternalExtensions.cs similarity index 54% rename from SpaceWarp/InternalExtensions.cs rename to SpaceWarp/InternalUtilities/InternalExtensions.cs index 753f26d2..5e0d1d35 100644 --- a/SpaceWarp/InternalExtensions.cs +++ b/SpaceWarp/InternalUtilities/InternalExtensions.cs @@ -1,10 +1,12 @@ +using System; +using System.Collections.Generic; using UnityEngine; -namespace SpaceWarp; +namespace SpaceWarp.InternalUtilities; internal static class InternalExtensions { - public static void Persist(this UnityObject obj) + internal static void Persist(this UnityObject obj) { UnityObject.DontDestroyOnLoad(obj); obj.hideFlags |= HideFlags.HideAndDontSave; diff --git a/SpaceWarp/PathHelpers.cs b/SpaceWarp/InternalUtilities/PathHelpers.cs similarity index 98% rename from SpaceWarp/PathHelpers.cs rename to SpaceWarp/InternalUtilities/PathHelpers.cs index e9cc17b7..7e98f293 100644 --- a/SpaceWarp/PathHelpers.cs +++ b/SpaceWarp/InternalUtilities/PathHelpers.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace SpaceWarp; +namespace SpaceWarp.InternalUtilities; internal static class PathHelpers { diff --git a/SpaceWarp/InternalUtilities/SpaceWarpErrorDescription.cs b/SpaceWarp/InternalUtilities/SpaceWarpErrorDescription.cs new file mode 100644 index 00000000..213d2413 --- /dev/null +++ b/SpaceWarp/InternalUtilities/SpaceWarpErrorDescription.cs @@ -0,0 +1,76 @@ +using System.Collections.Generic; +using SpaceWarp.API.Mods; +using SpaceWarp.Patching; +using SpaceWarp.UI.ModList; +using UnityEngine; +using static UnityEngine.GameObject; + +namespace SpaceWarp.InternalUtilities; + +internal class SpaceWarpErrorDescription +{ + public SpaceWarpPluginDescriptor Plugin; + public bool MissingSwinfo = false; + public bool BadDirectory = false; + public bool BadID = false; + public bool MismatchedVersion = false; + + public List DisabledDependencies = new(); + public List ErroredDependencies = new(); + public List MissingDependencies = new(); + public List UnsupportedDependencies = new(); + public List UnspecifiedDependencies = new(); + + public SpaceWarpErrorDescription(SpaceWarpPluginDescriptor plugin) + { + Plugin = plugin; + // Essentially if we have an errored plugin, we delete the plugin code + if (plugin.Plugin != null) + { + // If and only if this is space warp we don't destroy it + // Then we inform our loading patcher to do space warp specially + if (plugin.Plugin.Info.Metadata.GUID == SpaceWarpPlugin.ModGuid) + { + BootstrapPatch.ForceSpaceWarpLoadDueToError = true; + BootstrapPatch.ErroredSWPluginDescriptor = plugin; + return; + } + Object.Destroy(plugin.Plugin); + } + plugin.Plugin = null; + } + + public void Apply(ModListItemController controller) + { + controller.SetInfo(Plugin); + controller.SetIsErrored(); + if (MissingSwinfo) controller.SetMissingSWInfo(); + if (BadDirectory) controller.SetBadDirectory(); + if (BadID) controller.SetBadID(); + if (MismatchedVersion) controller.SetMismatchedVersion(); + foreach (var disabledDependency in DisabledDependencies) + { + controller.SetIsDependencyDisabled(disabledDependency); + } + + foreach (var erroredDependency in ErroredDependencies) + { + controller.SetIsDependencyErrored(erroredDependency); + } + + foreach (var missingDependency in MissingDependencies) + { + controller.SetIsDependencyMissing(missingDependency); + } + + foreach (var unsupportedDependency in UnsupportedDependencies) + { + controller.SetIsDependencyUnsupported(unsupportedDependency); + } + + foreach (var unspecifiedDependency in UnspecifiedDependencies) + { + controller.SetIsDependencyUnspecified(unspecifiedDependency); + } + } +} \ No newline at end of file diff --git a/SpaceWarp/Patching/BootstrapPatch.cs b/SpaceWarp/Patching/BootstrapPatch.cs index d1e52376..3f142b54 100644 --- a/SpaceWarp/Patching/BootstrapPatch.cs +++ b/SpaceWarp/Patching/BootstrapPatch.cs @@ -1,7 +1,9 @@ +using System.Collections.Generic; using HarmonyLib; using KSP.Game; using MonoMod.Cil; using SpaceWarp.API.Loading; +using SpaceWarp.API.Mods; using SpaceWarp.Patching.LoadingActions; namespace SpaceWarp.Patching; @@ -9,11 +11,14 @@ namespace SpaceWarp.Patching; [HarmonyPatch] internal static class BootstrapPatch { + internal static bool ForceSpaceWarpLoadDueToError = false; + internal static SpaceWarpPluginDescriptor ErroredSWPluginDescriptor; + [HarmonyPrefix] [HarmonyPatch(typeof(GameManager), nameof(GameManager.Awake))] private static void GetSpaceWarpMods() { - SpaceWarpManager.GetSpaceWarpPlugins(); + SpaceWarpManager.GetAllPlugins(); } [HarmonyILManipulator] @@ -31,9 +36,14 @@ private static void PatchInitializationsIL(ILContext ilContext, ILLabel endLabel ilCursor.EmitDelegate(static () => { - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) + if (ForceSpaceWarpLoadDueToError) { - GameManager.Instance.LoadingFlow.AddAction(new PreInitializeModAction(plugin)); + GameManager.Instance.LoadingFlow.AddAction(new PreInitializeModAction(SpaceWarpPlugin.Instance)); + } + foreach (var plugin in SpaceWarpManager.AllPlugins) + { + if (plugin.Plugin != null) + GameManager.Instance.LoadingFlow.AddAction(new PreInitializeModAction(plugin.Plugin)); } }); @@ -42,12 +52,38 @@ private static void PatchInitializationsIL(ILContext ilContext, ILLabel endLabel ilCursor.EmitDelegate(static () => { var flow = GameManager.Instance.LoadingFlow; + IReadOnlyList allPlugins; + if (ForceSpaceWarpLoadDueToError) + { + var l = new List { ErroredSWPluginDescriptor }; + l.AddRange(SpaceWarpManager.AllPlugins); + allPlugins = l; + } + else + { + allPlugins = SpaceWarpManager.AllPlugins; + } - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) + foreach (var plugin in allPlugins) { flow.AddAction(new LoadAddressablesAction(plugin)); flow.AddAction(new LoadLocalizationAction(plugin)); - foreach (var action in Loading.LoadingActionGenerators) + if (plugin.Plugin != null) + { + foreach (var action in Loading.LoadingActionGenerators) + { + flow.AddAction(action(plugin.Plugin)); + } + } + else + { + foreach (var action in Loading.FallbackDescriptorLoadingActionGenerators) + { + flow.AddAction(action(plugin)); + } + } + + foreach (var action in Loading.DescriptorLoadingActionGenerators) { flow.AddAction(action(plugin)); } @@ -58,14 +94,23 @@ private static void PatchInitializationsIL(ILContext ilContext, ILLabel endLabel { flow.AddAction(action); } - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) + + foreach (var plugin in allPlugins) + { + if (plugin.Plugin != null) + flow.AddAction(new InitializeModAction(plugin.Plugin)); + } + + foreach (var plugin in allPlugins) { - flow.AddAction(new InitializeModAction(plugin)); + flow.AddAction(new LoadLuaAction(plugin)); } + - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) + foreach (var plugin in allPlugins) { - flow.AddAction(new PostInitializeModAction(plugin)); + if (plugin.Plugin != null) + flow.AddAction(new PostInitializeModAction(plugin.Plugin)); } }); } diff --git a/SpaceWarp/Patching/ColorsPatch.cs b/SpaceWarp/Patching/ColorsPatch.cs index 9a5a05d7..35c74081 100644 --- a/SpaceWarp/Patching/ColorsPatch.cs +++ b/SpaceWarp/Patching/ColorsPatch.cs @@ -186,11 +186,11 @@ private static bool TryAddUnique(string partName) } - private static void LoadTextures(string modGUID) + private static void LoadTextures(string modGuid) { - LogMessage($">Loading parts from {modGUID}"); + LogMessage($">Loading parts from {modGuid}"); - foreach (var partName in DeclaredParts[modGUID]) + foreach (var partName in DeclaredParts[modGuid]) { LogMessage($"\t>Loading {partName}"); if (!TryAddUnique(partName)) @@ -202,7 +202,7 @@ private static void LoadTextures(string modGUID) var trimmedPartName = TrimPartName(partName); var pathWithoutSuffix = - $"{modGUID.ToLower()}/images/{trimmedPartName.ToLower()}/{trimmedPartName.ToLower()}"; + $"{modGuid.ToLower()}/images/{trimmedPartName.ToLower()}/{trimmedPartName.ToLower()}"; var count = 0; //already has diffuse @@ -289,9 +289,9 @@ internal static void Prefix() nameof(Module_Color.OnInitialize))] internal static void Postfix(Module_Color __instance) { + var partName = __instance.OABPart is not null ? __instance.OABPart.PartName : __instance.part.Name; var trimmedPartName = TrimPartName(partName); - if (DeclaredParts.Count > 0 && _allParts.Contains(trimmedPartName)) { var mat = new Material(_ksp2Opaque); diff --git a/SpaceWarp/Patching/LoadingActions/DescriptorLoadingAction.cs b/SpaceWarp/Patching/LoadingActions/DescriptorLoadingAction.cs new file mode 100644 index 00000000..91bb4ef9 --- /dev/null +++ b/SpaceWarp/Patching/LoadingActions/DescriptorLoadingAction.cs @@ -0,0 +1,36 @@ +using System; +using KSP.Game.Flow; +using SpaceWarp.API.Mods; + +namespace SpaceWarp.Patching.LoadingActions; + +public class DescriptorLoadingAction : FlowAction +{ + private readonly Action _action; + private readonly SpaceWarpPluginDescriptor _plugin; + + + public DescriptorLoadingAction(string actionName, Action action, SpaceWarpPluginDescriptor plugin) : base( + $"{plugin.SWInfo.Name}: {actionName}") + { + _action = action; + _plugin = plugin; + } + + public override void DoAction(Action resolve, Action reject) + { + try + { + _action(_plugin); + resolve(); + } + catch (Exception e) + { + if (_plugin.Plugin != null) + _plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(_plugin.SWInfo.Name + ": " + e); + reject(null); + } + } +} \ No newline at end of file diff --git a/SpaceWarp/Patching/LoadingActions/FunctionalLoadingActions.cs b/SpaceWarp/Patching/LoadingActions/FunctionalLoadingActions.cs new file mode 100644 index 00000000..acfcee4e --- /dev/null +++ b/SpaceWarp/Patching/LoadingActions/FunctionalLoadingActions.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +namespace SpaceWarp.Patching.LoadingActions; + +internal static class FunctionalLoadingActions +{ + internal static List<(string name, UnityObject asset)> AssetBundleLoadingAction(string internalPath, string filename) + { + var assetBundle = AssetBundle.LoadFromFile(filename); + if (assetBundle == null) + { + throw new Exception( + $"Failed to load AssetBundle {internalPath}"); + } + + internalPath = internalPath.Replace(".bundle", ""); + var names = assetBundle.GetAllAssetNames(); + List<(string name, UnityObject asset)> assets = new(); + foreach (var name in names) + { + var assetName = name; + + if (assetName.ToLower().StartsWith("assets/")) + { + assetName = assetName["assets/".Length..]; + } + + if (assetName.ToLower().StartsWith(internalPath + "/")) + { + assetName = assetName[(internalPath.Length + 1)..]; + } + + var path = internalPath + "/" + assetName; + path = path.ToLower(); + var asset = assetBundle.LoadAsset(name); + assets.Add((path, asset)); + } + + return assets; + } + + internal static List<(string name, UnityObject asset)> ImageLoadingAction(string internalPath, string filename) + { + var tex = new Texture2D(2, 2, TextureFormat.ARGB32, false) + { + filterMode = FilterMode.Point + }; + var fileData = File.ReadAllBytes(filename); + tex.LoadImage(fileData); // Will automatically resize + List<(string name, UnityObject asset)> assets = new() { ($"images/{internalPath}", tex) }; + return assets; + } +} \ No newline at end of file diff --git a/SpaceWarp/Patching/LoadingActions/LoadAddressablesAction.cs b/SpaceWarp/Patching/LoadingActions/LoadAddressablesAction.cs index 55298740..6296d500 100644 --- a/SpaceWarp/Patching/LoadingActions/LoadAddressablesAction.cs +++ b/SpaceWarp/Patching/LoadingActions/LoadAddressablesAction.cs @@ -3,16 +3,17 @@ using BepInEx.Logging; using KSP.Game.Flow; using SpaceWarp.API.Mods; +using SpaceWarp.InternalUtilities; namespace SpaceWarp.Patching.LoadingActions; internal sealed class LoadAddressablesAction : FlowAction { private static readonly ManualLogSource Logger = BepInEx.Logging.Logger.CreateLogSource("Addressables Loader"); - private readonly BaseSpaceWarpPlugin _plugin; + private readonly SpaceWarpPluginDescriptor _plugin; - public LoadAddressablesAction(BaseSpaceWarpPlugin plugin) : base( - $"Loading addressables for {plugin.SpaceWarpMetadata.Name}") + public LoadAddressablesAction(SpaceWarpPluginDescriptor plugin) : base( + $"Loading addressables for {plugin.SWInfo.Name}") { _plugin = plugin; } @@ -21,24 +22,27 @@ public override void DoAction(Action resolve, Action reject) { try { - var addressablesPath = Path.Combine(_plugin.PluginFolderPath, "addressables"); - Logger.LogInfo($"Loading addressables for {_plugin.SpaceWarpMetadata.Name}"); + var addressablesPath = Path.Combine(_plugin.Folder.FullName, "addressables"); + Logger.LogInfo($"Loading addressables for {_plugin.SWInfo.Name}"); var catalogPath = Path.Combine(addressablesPath, "catalog.json"); if (File.Exists(catalogPath)) { - Logger.LogInfo($"Found addressables for {_plugin.SpaceWarpMetadata.Name}"); + Logger.LogInfo($"Found addressables for {_plugin.SWInfo.Name}"); AssetHelpers.LoadAddressable(catalogPath); } else { - Logger.LogInfo($"Did not find addressables for {_plugin.SpaceWarpMetadata.Name}"); + Logger.LogInfo($"Did not find addressables for {_plugin.SWInfo.Name}"); } resolve(); } catch (Exception e) { - _plugin.ModLogger.LogError(e.ToString()); + if (_plugin.Plugin != null) + _plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(_plugin.SWInfo.Name + ": " + e); reject(null); } } diff --git a/SpaceWarp/Patching/LoadingActions/LoadLocalizationAction.cs b/SpaceWarp/Patching/LoadingActions/LoadLocalizationAction.cs index 81aecdc9..a2f3e33c 100644 --- a/SpaceWarp/Patching/LoadingActions/LoadLocalizationAction.cs +++ b/SpaceWarp/Patching/LoadingActions/LoadLocalizationAction.cs @@ -2,15 +2,16 @@ using System.IO; using KSP.Game.Flow; using SpaceWarp.API.Mods; +using SpaceWarp.InternalUtilities; namespace SpaceWarp.Patching.LoadingActions; internal sealed class LoadLocalizationAction : FlowAction { - private readonly BaseSpaceWarpPlugin _plugin; + private readonly SpaceWarpPluginDescriptor _plugin; - public LoadLocalizationAction(BaseSpaceWarpPlugin plugin) : base( - $"Loading localizations for plugin {plugin.SpaceWarpMetadata.Name}") + public LoadLocalizationAction(SpaceWarpPluginDescriptor plugin) : base( + $"Loading localizations for plugin {plugin.SWInfo.Name}") { _plugin = plugin; } @@ -19,13 +20,16 @@ public override void DoAction(Action resolve, Action reject) { try { - var localizationsPath = Path.Combine(_plugin.PluginFolderPath, "localizations"); + var localizationsPath = Path.Combine(_plugin.Folder.FullName, "localizations"); AssetHelpers.LoadLocalizationFromFolder(localizationsPath); resolve(); } catch (Exception e) { - _plugin.ModLogger.LogError(e.ToString()); + if (_plugin.Plugin != null) + _plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(_plugin.SWInfo.Name + ": " + e); reject(null); } } diff --git a/SpaceWarp/Patching/LoadingActions/LoadLuaAction.cs b/SpaceWarp/Patching/LoadingActions/LoadLuaAction.cs new file mode 100644 index 00000000..4cc020a1 --- /dev/null +++ b/SpaceWarp/Patching/LoadingActions/LoadLuaAction.cs @@ -0,0 +1,51 @@ +using System; +using System.IO; +using KSP.Game.Flow; +using SpaceWarp.API.Mods; + +namespace SpaceWarp.Patching.LoadingActions; + +internal sealed class LoadLuaAction : FlowAction +{ + private readonly SpaceWarpPluginDescriptor _plugin; + + public LoadLuaAction(SpaceWarpPluginDescriptor plugin) : base( + $"Running lua scripts for {plugin.SWInfo.Name}") + { + _plugin = plugin; + } + + public override void DoAction(Action resolve, Action reject) + { + try + { + // Now we load the lua and run it for this mod + var pluginDirectory = _plugin.Folder; + foreach (var luaFile in pluginDirectory.GetFiles("*.lua", SearchOption.AllDirectories)) + { + try + { + // var compiled = GlobalLuaState.Compile(File.ReadAllText(luaFile.FullName), luaFile.FullName); + // GlobalLuaState.RunScriptAsset(compiled); + SpaceWarpPlugin.Instance.GlobalLuaState.script.DoString(File.ReadAllText(luaFile.FullName)); + } + catch (Exception e) + { + if (_plugin.Plugin != null) + _plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(_plugin.SWInfo.Name + ": " + e); + } + } + resolve(); + } + catch (Exception e) + { + if (_plugin.Plugin != null) + _plugin.Plugin.ModLogger.LogError(e.ToString()); + else + SpaceWarpPlugin.Logger.LogError(_plugin.SWInfo.Name + ": " + e); + reject(null); + } + } +} \ No newline at end of file diff --git a/SpaceWarp/Patching/LoadingActions/ResolvingPatchOrderAction.cs b/SpaceWarp/Patching/LoadingActions/ResolvingPatchOrderAction.cs new file mode 100644 index 00000000..76926cd3 --- /dev/null +++ b/SpaceWarp/Patching/LoadingActions/ResolvingPatchOrderAction.cs @@ -0,0 +1,16 @@ +using System; +using KSP.Game.Flow; + +namespace SpaceWarp.Patching.LoadingActions; + +internal class ResolvingPatchOrderAction : FlowAction +{ + public ResolvingPatchOrderAction(string name) : base(name) + { + } + + public override void DoAction(Action resolve, Action reject) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/SpaceWarp/Patching/MainMenuPatcher.cs b/SpaceWarp/Patching/MainMenuPatcher.cs index eb01a376..40767757 100644 --- a/SpaceWarp/Patching/MainMenuPatcher.cs +++ b/SpaceWarp/Patching/MainMenuPatcher.cs @@ -1,4 +1,5 @@ -using HarmonyLib; +using System; +using HarmonyLib; using I2.Loc; using KSP.Api.CoreTypes; using KSP.Game.StartupFlow; @@ -11,6 +12,7 @@ namespace SpaceWarp.Patching; [HarmonyPatch("Start")] internal class MainMenuPatcher { + internal static event Action MainMenuLoaded; public static void Postfix(LandingHUD __instance) { var menuItemsGroupTransform = __instance.transform.FindChildEx("MenuItemsGroup"); @@ -53,5 +55,6 @@ public static void Postfix(LandingHUD __instance) var localize = newButton.GetComponentInChildren(); localize.SetTerm(localizedMenuButtonToBeAddded.term); } + MainMenuLoaded?.Invoke(); } } \ No newline at end of file diff --git a/SpaceWarp/Patching/SettingsManagerPatcher.cs b/SpaceWarp/Patching/SettingsManagerPatcher.cs new file mode 100644 index 00000000..93864fe9 --- /dev/null +++ b/SpaceWarp/Patching/SettingsManagerPatcher.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using HarmonyLib; +using KSP.UI; + +namespace SpaceWarp.Patching; +[HarmonyPatch] +internal static class SettingsManagerPatcher +{ + internal static List AllExtrasSettingsMenus = new(); + + [HarmonyPostfix] + [HarmonyPatch(typeof(SettingsMenuManager))] + [HarmonyPatch(nameof(SettingsMenuManager.ResetAllSettings))] + internal static void ResetModsMenu() + { + foreach (var menu in AllExtrasSettingsMenus.Where(menu => menu != null)) + { + menu.Revert(); + } + } +} \ No newline at end of file diff --git a/SpaceWarp/SpaceWarp.csproj b/SpaceWarp/SpaceWarp.csproj index 48e1fa1f..28527eab 100644 --- a/SpaceWarp/SpaceWarp.csproj +++ b/SpaceWarp/SpaceWarp.csproj @@ -4,10 +4,6 @@ $(SpaceWarpVersion) - - - - ..\ThirdParty\ConfigurationManager\ConfigurationManager.dll @@ -17,7 +13,7 @@ - + @@ -52,10 +48,7 @@ - - true - lib\$(TargetFramework) - + \ No newline at end of file diff --git a/SpaceWarp/SpaceWarpManager.cs b/SpaceWarp/SpaceWarpManager.cs index 0848f1c6..6999a311 100644 --- a/SpaceWarp/SpaceWarpManager.cs +++ b/SpaceWarp/SpaceWarpManager.cs @@ -4,7 +4,9 @@ using System.Reflection; using BepInEx; using BepInEx.Bootstrap; +using BepInEx.Configuration; using BepInEx.Logging; +using Mono.Cecil; using SpaceWarpPatcher; using Newtonsoft.Json; using SpaceWarp.API.Assets; @@ -12,7 +14,11 @@ using SpaceWarp.API.Mods; using SpaceWarp.API.Mods.JSON; using SpaceWarp.API.UI.Appbar; +using SpaceWarp.API.Versions; using SpaceWarp.Backend.UI.Appbar; +using SpaceWarp.InternalUtilities; +using SpaceWarp.Patching.LoadingActions; +using SpaceWarp.UI.Console; using SpaceWarp.UI.ModList; using UnityEngine; @@ -27,13 +33,18 @@ internal static class SpaceWarpManager internal static ConfigurationManager.ConfigurationManager ConfigurationManager; internal static string SpaceWarpFolder; - internal static IReadOnlyList SpaceWarpPlugins; - internal static IReadOnlyList NonSpaceWarpPlugins; - internal static IReadOnlyList<(BaseUnityPlugin, ModInfo)> NonSpaceWarpInfos; - - internal static IReadOnlyList<(PluginInfo, ModInfo)> DisabledInfoPlugins; - internal static IReadOnlyList DisabledNonInfoPlugins; + // The plugin can be null + internal static IReadOnlyList AllPlugins; + // internal static IReadOnlyList NonSpaceWarpPlugins; + // internal static IReadOnlyList<(BaseUnityPlugin, ModInfo)> NonSpaceWarpInfos; + + // internal static IReadOnlyList<(PluginInfo, ModInfo)> DisabledInfoPlugins; + // internal static IReadOnlyList DisabledNonInfoPlugins; + internal static IReadOnlyList DisabledPlugins; internal static IReadOnlyList<(string, bool)> PluginGuidEnabledStatus; + internal static IReadOnlyList ErroredPlugins; + + internal static readonly Dictionary ModsOutdated = new(); internal static readonly Dictionary ModsUnsupported = new(); @@ -41,202 +52,649 @@ internal static class SpaceWarpManager private static GUISkin _skin; public static ModListController ModListController { get; internal set; } + + public static SpaceWarpConsole SpaceWarpConsole { get; internal set; } - public static GUISkin Skin + + [Obsolete("Spacewarps support for IMGUI will not be getting updates, please use UITK instead")] + internal static GUISkin Skin { get { if (!_skin) { - AssetManager.TryGetAsset("spacewarp/swconsoleui/spacewarpconsole.guiskin", out _skin); + AssetManager.TryGetAsset($"{SpaceWarpPlugin.ModGuid}/swconsoleui/spacewarpconsole.guiskin", out _skin); } return _skin; } } - internal static void GetSpaceWarpPlugins() + internal static ConfigFile FindOrCreateConfigFile(string guid) + { + var path = $"{Paths.ConfigPath}/{guid}.cfg"; + return new ConfigFile(path, true); + } + internal static void GetAllPlugins() { var pluginGuidEnabledStatus = new List<(string, bool)>(); - // obsolete warning for Chainloader.Plugins, is fine since we need ordered list - // to break this we would likely need to upgrade to BIE 6, which isn't happening #pragma warning disable CS0618 var spaceWarpPlugins = Chainloader.Plugins.OfType().ToList(); - SpaceWarpPlugins = spaceWarpPlugins; + var modDescriptors = new List(); + var ignoredGUIDs = new List(); + var allErroredPlugins = new List(); + + GetCodeBasedSpaceWarpPlugins(spaceWarpPlugins, ignoredGUIDs, modDescriptors,allErroredPlugins); + + GetCodeBasedNonSpaceWarpPlugins(spaceWarpPlugins, ignoredGUIDs, modDescriptors,allErroredPlugins); - foreach (var plugin in SpaceWarpPlugins.ToArray()) + var disabledPlugins = new List(); + + GetDisabledPlugins(disabledPlugins); + + GetCodelessSpaceWarpPlugins(ignoredGUIDs, modDescriptors, allErroredPlugins); + + GetBepInExErroredPlugins(ignoredGUIDs,allErroredPlugins,modDescriptors,disabledPlugins); + + ValidateSpec13Dependencies(allErroredPlugins, modDescriptors); + + GetTrueDependencyErrors(allErroredPlugins, modDescriptors, disabledPlugins); + + SetupDisabledPlugins(modDescriptors, allErroredPlugins, disabledPlugins, pluginGuidEnabledStatus); + + AllPlugins = modDescriptors; + DisabledPlugins = disabledPlugins; + PluginGuidEnabledStatus = pluginGuidEnabledStatus; + // Now we must do some funky shit :) + + ErroredPlugins = allErroredPlugins; + } + + private static void SetupDisabledPlugins( + IEnumerable modDescriptors, + IEnumerable allErroredPlugins, + IEnumerable disabledPlugins, + List<(string, bool)> pluginGuidEnabledStatus) + { + pluginGuidEnabledStatus.AddRange(modDescriptors.Select(plugin => (plugin.Guid, true))); + + pluginGuidEnabledStatus.AddRange(allErroredPlugins.Select(plugin => (plugin.Plugin.Guid, true))); + + pluginGuidEnabledStatus.AddRange(disabledPlugins.Select(plugin => (plugin.Guid, false))); + } + + private static void GetTrueDependencyErrors(ICollection allErroredPlugins, + ICollection modDescriptors, ICollection disabledPlugins) + { + foreach (var erroredPlugin in allErroredPlugins) { - var folderPath = Path.GetDirectoryName(plugin.Info.Location); - plugin.PluginFolderPath = folderPath; - if (Path.GetFileName(folderPath) == "plugins") + if (erroredPlugin.MissingDependencies.Count == 0) continue; + for (var i = erroredPlugin.MissingDependencies.Count - 1; i >= 0; i--) { - Logger.LogError( - $"Found Space Warp mod {plugin.Info.Metadata.Name} in the BepInEx/plugins directory. This mod will not be initialized."); - spaceWarpPlugins.Remove(plugin); - continue; + var dep = erroredPlugin.MissingDependencies[i]; + if (modDescriptors.Any(x => x.Guid == dep)) + { + erroredPlugin.UnsupportedDependencies.Add(dep); + erroredPlugin.MissingDependencies.RemoveAt(i); + } else if (allErroredPlugins.Any(x => x.Plugin.Guid == dep)) + { + erroredPlugin.ErroredDependencies.Add(dep); + erroredPlugin.MissingDependencies.RemoveAt(i); + } else if (disabledPlugins.Any(x => x.Guid == dep)) + { + erroredPlugin.DisabledDependencies.Add(dep); + erroredPlugin.MissingDependencies.RemoveAt(i); + } } + } + } - var modInfoPath = Path.Combine(folderPath!, "swinfo.json"); - if (!File.Exists(modInfoPath)) + private static void ValidateSpec13Dependencies(ICollection allErroredPlugins, + IList modDescriptors) + { + for (var i = modDescriptors.Count - 1; i >= 0; i--) + { + var plugin = modDescriptors[i]; + if (AssertSpec13Dependencies(modDescriptors, plugin, out var missingDependencies)) continue; + allErroredPlugins.Add(new SpaceWarpErrorDescription(plugin) { - Logger.LogError( - $"Found Space Warp plugin {plugin.Info.Metadata.Name} without a swinfo.json next to it. This mod will not be initialized."); - spaceWarpPlugins.Remove(plugin); + MissingDependencies = missingDependencies + }); + modDescriptors.RemoveAt(i); + } + } + + private static bool AssertSpec13Dependencies(IList modDescriptors, SpaceWarpPluginDescriptor plugin, + out List missingDependencies) + { + missingDependencies = new List(); + if (plugin.SWInfo.Spec < SpecVersion.V1_3) return true; + foreach (var dep in plugin.SWInfo.Dependencies) + { + var descriptor = modDescriptors.FirstOrDefault(x => x.Guid == dep.ID); + if (descriptor == null) + { + missingDependencies.Add(dep.ID); continue; } - pluginGuidEnabledStatus.Add((plugin.Info.Metadata.GUID, true)); - plugin.SpaceWarpMetadata = JsonConvert.DeserializeObject(File.ReadAllText(modInfoPath)); + if (!VersionUtility.IsSupported(descriptor.SWInfo.Version, dep.Version.Min, dep.Version.Max)) + { + missingDependencies.Add(descriptor.Guid); + } } - var allPlugins = Chainloader.Plugins.ToList(); - List nonSWPlugins = new(); - List<(BaseUnityPlugin, ModInfo)> nonSWInfos = new(); + return missingDependencies.Count == 0; + } + + private static void GetBepInExErroredPlugins(IReadOnlyCollection ignoredGuids, + ICollection errorDescriptions, + IReadOnlyCollection allLoadedPlugins, + IReadOnlyCollection allDisabledPlugins) + { + // Lets do some magic here by copying some code to just get all the plugin types + var allPlugins = TypeLoader.FindPluginTypes(Paths.PluginPath, + Chainloader.ToPluginInfo, + Chainloader.HasBepinPlugins, + "chainloader"); foreach (var plugin in allPlugins) { - if (spaceWarpPlugins.Contains(plugin as BaseSpaceWarpPlugin)) + foreach (var info in plugin.Value) { - continue; + info.Location = plugin.Key; + if (allLoadedPlugins.All(x => x.Guid != info.Metadata.GUID) && + allDisabledPlugins.All(x => x.Guid != info.Metadata.GUID) && + errorDescriptions.All(x => x.Plugin.Guid != info.Metadata.GUID) && + !ignoredGuids.Contains(info.Metadata.GUID)) + { + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(null, + info.Metadata.GUID, + info.Metadata.Name, + BepInExToSWInfo(info), + new DirectoryInfo(Path.GetDirectoryName(info.Location)!))) + { + MissingDependencies = info.Dependencies.Select(x => x.DependencyGUID) + .Where(guid => allLoadedPlugins.All(x => x.Guid != guid)) + .ToList() + }); + } + } + } + } + + private static void GetCodelessSpaceWarpPlugins(List ignoredGUIDs, + List spaceWarpInfos, + ICollection errorDescriptions) + { + var codelessInfos = new List(); + FindAllCodelessSWInfos(codelessInfos); + + var codelessInfosInOrder = + new List(); + // Check for the dependencies on codelessInfos + ResolveCodelessPluginDependencyOrder(ignoredGUIDs, + spaceWarpInfos, + codelessInfosInOrder, + codelessInfos, + errorDescriptions); + spaceWarpInfos.AddRange(codelessInfosInOrder); + } + private static bool CodelessDependencyResolved(SpaceWarpPluginDescriptor descriptor, + ICollection spaceWarpInfos, + IReadOnlyCollection codelessInfosInOrder) + { + foreach (var dependency in descriptor.SWInfo.Dependencies) + { + Logger.LogInfo($"({descriptor.Name}) Attempting to check if dependency is resolved: {dependency.ID}"); + var info = spaceWarpInfos.FirstOrDefault(x => x.Guid == dependency.ID) ?? + codelessInfosInOrder.FirstOrDefault(x => x.Guid == dependency.ID); + if (info == null || !VersionUtility.IsSupported(info.SWInfo.Version, dependency.Version.Min, + dependency.Version.Max)) return false; + } + + return true; + } + private static void ResolveCodelessPluginDependencyOrder(ICollection ignoredGUIDs, + ICollection spaceWarpInfos, + List codelessInfosInOrder, + List codelessInfos, + ICollection errorDescriptions) + { + var changed = true; + while (changed) + { + changed = false; + for (var i = codelessInfos.Count - 1; i >= 0; i--) + { + if (!CodelessDependencyResolved(codelessInfos[i],spaceWarpInfos,codelessInfosInOrder)) continue; + codelessInfosInOrder.Add(codelessInfos[i]); + codelessInfos.RemoveAt(i); + changed = true; } + } - var folderPath = Path.GetDirectoryName(plugin.Info.Location); - var modInfoPath = Path.Combine(folderPath!, "swinfo.json"); - if (File.Exists(modInfoPath)) + if (codelessInfos.Count <= 0) return; + foreach (var info in codelessInfos) + { + Logger.LogError($"Missing dependency for codeless mod: {info.Name}, this mod will not be loaded"); + errorDescriptions.Add(new SpaceWarpErrorDescription(info) { - var info = JsonConvert.DeserializeObject(File.ReadAllText(modInfoPath)); - nonSWInfos.Add((plugin, info)); + MissingDependencies = info.SWInfo.Dependencies.Select(x => x.ID).ToList() + }); + + } + } + + private static void FindAllCodelessSWInfos(ICollection codelessInfos) + { + var pluginPath = new DirectoryInfo(Paths.PluginPath); + foreach (var swinfo in pluginPath.GetFiles("swinfo.json", SearchOption.AllDirectories)) + { + ModInfo swinfoData; + try + { + swinfoData = JsonConvert.DeserializeObject(File.ReadAllText(swinfo.FullName)); } - else + catch { - nonSWPlugins.Add(plugin); + Logger.LogError($"Error reading metadata file: {swinfo.FullName}, this mod will be ignored"); + continue; } - pluginGuidEnabledStatus.Add((plugin.Info.Metadata.GUID, true)); + + if (swinfoData.Spec < SpecVersion.V1_3) + { + Logger.LogWarning( + $"Found swinfo information for: {swinfoData.Name}, but its spec is less than v1.3, if this describes a \"codeless\" mod, it will be ignored"); + continue; + } + + var guid = swinfoData.ModID; + // If we already know about this mod, ignore it + if (Chainloader.PluginInfos.ContainsKey(guid)) continue; + + // Now we can just add it to our plugin list + codelessInfos.Add(new SpaceWarpPluginDescriptor(null, guid, swinfoData.Name, swinfoData, swinfo.Directory, + FindOrCreateConfigFile(guid))); } -#pragma warning restore CS0618 - NonSpaceWarpPlugins = nonSWPlugins; - NonSpaceWarpInfos = nonSWInfos; + } - var disabledInfoPlugins = new List<(PluginInfo, ModInfo)>(); - var disabledNonInfoPlugins = new List(); + private static void GetDisabledPlugins(ICollection disabledPlugins) + { + var allDisabledPlugins = ChainloaderPatch.DisabledPlugins; + foreach (var plugin in allDisabledPlugins) + { + GetSingleDisabledPlugin(disabledPlugins, plugin); + } + } - var disabledPlugins = ChainloaderPatch.DisabledPlugins; - foreach (var plugin in disabledPlugins) + private static void GetSingleDisabledPlugin(ICollection disabledPlugins, PluginInfo plugin) + { + var folderPath = Path.GetDirectoryName(plugin.Location); + var swInfoPath = Path.Combine(folderPath!, "swinfo.json"); + if (Path.GetFileName(folderPath) != "plugins" && File.Exists(swInfoPath)) { - var folderPath = Path.GetDirectoryName(plugin.Location); - var swInfoPath = Path.Combine(folderPath!, "swinfo.json"); - if (Path.GetFileName(folderPath) != "plugins" && File.Exists(swInfoPath)) + try { var swInfo = JsonConvert.DeserializeObject(File.ReadAllText(swInfoPath)); - disabledInfoPlugins.Add((plugin, swInfo)); + disabledPlugins.Add(new SpaceWarpPluginDescriptor(null, + plugin.Metadata.GUID, + plugin.Metadata.Name, + swInfo, + new DirectoryInfo(folderPath))); } - else + catch { - disabledNonInfoPlugins.Add(plugin); + disabledPlugins.Add(GetBepInExDescriptor(plugin)); } - pluginGuidEnabledStatus.Add((plugin.Metadata.GUID, false)); } + else + { + disabledPlugins.Add(GetBepInExDescriptor(plugin)); + } + } - DisabledInfoPlugins = disabledInfoPlugins; - DisabledNonInfoPlugins = disabledNonInfoPlugins; - PluginGuidEnabledStatus = pluginGuidEnabledStatus; + private static void GetCodeBasedNonSpaceWarpPlugins(List spaceWarpPlugins, + ICollection ignoredGUIDs, + ICollection allPlugins, + ICollection errorDescriptions) + { + var allBiePlugins = Chainloader.Plugins.ToList(); + foreach (var plugin in allBiePlugins) + { + GetSingleBepInExOnlyPlugin(spaceWarpPlugins, ignoredGUIDs, allPlugins, errorDescriptions, plugin); + } +#pragma warning restore CS0618 } - public static void Initialize(SpaceWarpPlugin spaceWarpPlugin) + private static void GetSingleBepInExOnlyPlugin(List spaceWarpPlugins, + ICollection ignoredGUIDs, + ICollection allPlugins, + ICollection errorDescriptions, + BaseUnityPlugin plugin) { - Logger = SpaceWarpPlugin.Logger; + if (spaceWarpPlugins.Contains(plugin as BaseSpaceWarpPlugin)) + { + return; + } - SpaceWarpFolder = Path.GetDirectoryName(spaceWarpPlugin.Info.Location); + var folderPath = Path.GetDirectoryName(plugin.Info.Location); + var modInfoPath = Path.Combine(folderPath!, "swinfo.json"); + if (File.Exists(modInfoPath)) + { + if (!TryReadModInfo(ignoredGUIDs, errorDescriptions, plugin, modInfoPath, folderPath, + out var metadata)) return; + if (!AssertSpecificationCompliance(ignoredGUIDs, errorDescriptions, plugin, metadata, folderPath)) + return; + allPlugins.Add(new SpaceWarpPluginDescriptor(null, plugin.Info.Metadata.GUID, plugin.Info.Metadata.Name, + metadata, new DirectoryInfo(Path.GetDirectoryName(plugin.Info.Location)!))); + } + else + { + allPlugins.Add(GetBepInExDescriptor(plugin)); + } + } - AppbarBackend.AppBarInFlightSubscriber.AddListener(Appbar.LoadAllButtons); - AppbarBackend.AppBarOABSubscriber.AddListener(Appbar.LoadOABButtons); + private static SpaceWarpPluginDescriptor GetBepInExDescriptor(BaseUnityPlugin plugin) + { + return new SpaceWarpPluginDescriptor(null, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + BepInExToSWInfo(plugin.Info), + new DirectoryInfo(Path.GetDirectoryName(plugin.Info.Location)!),plugin.Config); + } + + private static SpaceWarpPluginDescriptor GetBepInExDescriptor(PluginInfo info) + { + return new SpaceWarpPluginDescriptor(null, + info.Metadata.GUID, + info.Metadata.Name, + BepInExToSWInfo(info), + new DirectoryInfo(Path.GetDirectoryName(info.Location)!)); } + private static ModInfo BepInExToSWInfo(PluginInfo plugin) + { + var newInfo = new ModInfo + { + Spec = SpecVersion.V1_3, + ModID = plugin.Metadata.GUID, + Name = plugin.Metadata.Name, + Author = "", + Description = "", + Source = "", + Version = plugin.Metadata.Version.ToString(), + Dependencies = plugin.Dependencies.Select(x => new DependencyInfo + { + ID = x.DependencyGUID, + Version = new SupportedVersionsInfo + { + Min = x.MinimumVersion.ToString(), + Max = "*" + } + }).ToList(), + SupportedKsp2Versions = new SupportedVersionsInfo + { + Min = "*", + Max = "*" + }, + VersionCheck = null, + VersionCheckType = VersionCheckType.SwInfo + }; + return newInfo; + } - internal static void CheckKspVersions() + private static void GetCodeBasedSpaceWarpPlugins(List spaceWarpPlugins, + ICollection ignoredGUIDs, + ICollection spaceWarpInfos, + ICollection errorDescriptions) { - var kspVersion = typeof(VersionID).GetField("VERSION_TEXT", BindingFlags.Static | BindingFlags.Public) - ?.GetValue(null) as string; - foreach (var plugin in SpaceWarpPlugins) + foreach (var plugin in spaceWarpPlugins.ToArray()) { - CheckModKspVersion(plugin.Info.Metadata.GUID, plugin.SpaceWarpMetadata, kspVersion); + GetSingleSpaceWarpPlugin(ignoredGUIDs, spaceWarpInfos, errorDescriptions, plugin); } + } + + private static void GetSingleSpaceWarpPlugin(ICollection ignoredGUIDs, ICollection spaceWarpInfos, + ICollection errorDescriptions, BaseSpaceWarpPlugin plugin) + { + var folderPath = Path.GetDirectoryName(plugin.Info.Location); + plugin.PluginFolderPath = folderPath; + if (!AssertFolderPath(ignoredGUIDs, errorDescriptions, plugin, folderPath)) return; - foreach (var info in NonSpaceWarpInfos) + var modInfoPath = Path.Combine(folderPath!, "swinfo.json"); + + if (!AssertModInfoExistence(ignoredGUIDs, errorDescriptions, plugin, modInfoPath, folderPath)) return; + + if (!TryReadModInfo(ignoredGUIDs, errorDescriptions, plugin, modInfoPath, folderPath, out var metadata)) return; + + if (!AssertSpecificationCompliance(ignoredGUIDs, errorDescriptions, plugin, metadata, folderPath)) return; + + plugin.SpaceWarpMetadata = metadata; + var directoryInfo = new FileInfo(modInfoPath).Directory; + spaceWarpInfos.Add(new SpaceWarpPluginDescriptor(plugin, + plugin.Info.Metadata.GUID, + metadata.Name, + metadata, + directoryInfo,plugin.Config)); + } + + private static bool AssertSpecificationCompliance(ICollection ignoredGUIDs, + ICollection errorDescriptions, + BaseUnityPlugin plugin, + ModInfo metadata, + string folderPath) => + metadata.Spec < SpecVersion.V1_3 || + AssertSpecVersion13Compliance(ignoredGUIDs, + errorDescriptions, + plugin, + metadata, + folderPath); + + private static bool AssertSpecVersion13Compliance(ICollection ignoredGUIDs, + ICollection errorDescriptions, + BaseUnityPlugin plugin, + ModInfo metadata, + string folderPath) => + AssertMatchingModID(ignoredGUIDs, errorDescriptions, plugin, metadata, folderPath) && + AssertMatchingVersions(ignoredGUIDs, errorDescriptions, plugin, metadata, folderPath) && + AssertAllDependenciesAreSpecified(errorDescriptions, plugin, metadata, folderPath); + + private static bool AssertAllDependenciesAreSpecified(ICollection errorDescriptions, + BaseUnityPlugin plugin, + ModInfo metadata, + string folderPath) + { + var unspecifiedDeps = new List(); + foreach (var dep in plugin.Info.Dependencies) { - CheckModKspVersion(info.Item1.Info.Metadata.GUID, info.Item2, kspVersion); + AssertDependencyIsSpecified(plugin, dep, metadata, unspecifiedDeps); } - foreach (var info in DisabledInfoPlugins) + if (unspecifiedDeps.Count <= 0) return true; + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(plugin as BaseSpaceWarpPlugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + metadata, + new DirectoryInfo(folderPath))) { - CheckModKspVersion(info.Item1.Metadata.GUID, info.Item2, kspVersion); - } + UnspecifiedDependencies = unspecifiedDeps + }); + return false; + } - private static void CheckModKspVersion(string guid, ModInfo modInfo, string kspVersion) + private static void AssertDependencyIsSpecified(BaseUnityPlugin plugin, + BepInDependency dep, + ModInfo metadata, + ICollection unspecifiedDeps) + { + if (metadata.Dependencies.Any(x => x.ID == dep.DependencyGUID)) return; + Logger.LogError( + $"Found Space Warp Plugin {plugin.Info.Metadata.Name} that has an unspecified swinfo dependency found in its BepInDependencies: {dep.DependencyGUID}"); + unspecifiedDeps.Add(dep.DependencyGUID); + metadata.Dependencies.Add(new DependencyInfo + { + ID = dep.DependencyGUID, + Version = new SupportedVersionsInfo + { + Min = dep.MinimumVersion.ToString(), + Max = "*" + } + }); + } + + private static bool AssertMatchingVersions(ICollection ignoredGUIDs, ICollection errorDescriptions, + BaseUnityPlugin plugin, ModInfo metadata, string folderPath) + { + if (new Version(metadata.Version) == plugin.Info.Metadata.Version) return true; + Logger.LogError( + $"Found Space Warp plugin {plugin.Info.Metadata.Name} that's swinfo version does not match the plugin version, this mod will not be initialized"); + ignoredGUIDs.Add(plugin.Info.Metadata.GUID); + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(plugin as BaseSpaceWarpPlugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + metadata, + new DirectoryInfo(folderPath))) + { + MismatchedVersion = true + }); + return false; + + } + + private static bool AssertMatchingModID(ICollection ignoredGUIDs, ICollection errorDescriptions, + BaseUnityPlugin plugin, ModInfo metadata, string folderPath) + { + var modID = metadata.ModID; + if (modID == plugin.Info.Metadata.GUID) return true; + Logger.LogError( + $"Found Space Warp plugin {plugin.Info.Metadata.Name} that has an swinfo.json w/ spec version >= 1.3 that's ModID is not the same as the plugins GUID, This mod will not be initialized."); + ignoredGUIDs.Add(plugin.Info.Metadata.GUID); + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(plugin as BaseSpaceWarpPlugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + metadata, + new DirectoryInfo(folderPath))) + { + BadID = true + }); + return false; + + } + + private static bool TryReadModInfo(ICollection ignoredGUIDs, ICollection errorDescriptions, BaseUnityPlugin plugin, + string modInfoPath, string folderPath, out ModInfo metadata) { - var unsupported = true; try { - unsupported = !modInfo.SupportedKsp2Versions.IsSupported(kspVersion); + metadata = JsonConvert.DeserializeObject(File.ReadAllText(modInfoPath)); } - catch (Exception e) + catch { - Logger.LogError($"Unable to check KSP version for {guid} due to error {e}"); + Logger.LogError( + $"Error reading metadata for spacewarp plugin {plugin.Info.Metadata.Name}. This mod will not be initialized"); + ignoredGUIDs.Add(plugin.Info.Metadata.GUID); + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor( + plugin as BaseSpaceWarpPlugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + BepInExToSWInfo(plugin.Info), + new DirectoryInfo(folderPath))) + { + MissingSwinfo = true + }); + metadata = null; + return false; } - ModsUnsupported[guid] = unsupported; + return true; } - private static List<(string name, UnityObject asset)> AssetBundleLoadingAction(string internalPath, string filename) + private static bool AssertModInfoExistence(ICollection ignoredGUIDs, ICollection errorDescriptions, + BaseSpaceWarpPlugin plugin, string modInfoPath, string folderPath) { - var assetBundle = AssetBundle.LoadFromFile(filename); - if (assetBundle == null) + if (File.Exists(modInfoPath)) return true; + Logger.LogError( + $"Found Space Warp plugin {plugin.Info.Metadata.Name} without a swinfo.json next to it. This mod will not be initialized."); + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(plugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + BepInExToSWInfo(plugin.Info), + new DirectoryInfo(folderPath))) { - throw new Exception( - $"Failed to load AssetBundle {internalPath}"); - } + MissingSwinfo = true + }); + ignoredGUIDs.Add(plugin.Info.Metadata.GUID); + return false; - internalPath = internalPath.Replace(".bundle", ""); - var names = assetBundle.GetAllAssetNames(); - List<(string name, UnityObject asset)> assets = new(); - foreach (var name in names) + } + + private static bool AssertFolderPath(ICollection ignoredGUIDs, ICollection errorDescriptions, + BaseSpaceWarpPlugin plugin, string folderPath) + { + if (Path.GetFileName(folderPath) != "plugins") return true; + Logger.LogError( + $"Found Space Warp mod {plugin.Info.Metadata.Name} in the BepInEx/plugins directory. This mod will not be initialized."); + errorDescriptions.Add(new SpaceWarpErrorDescription(new SpaceWarpPluginDescriptor(plugin, + plugin.Info.Metadata.GUID, + plugin.Info.Metadata.Name, + BepInExToSWInfo(plugin.Info), + new DirectoryInfo(folderPath))) { - var assetName = name; + BadDirectory = true + }); + ignoredGUIDs.Add(plugin.Info.Metadata.GUID); + return false; - if (assetName.ToLower().StartsWith("assets/")) - { - assetName = assetName["assets/".Length..]; - } + } - if (assetName.ToLower().StartsWith(internalPath + "/")) - { - assetName = assetName[(internalPath.Length + 1)..]; - } + public static void Initialize(SpaceWarpPlugin spaceWarpPlugin) + { + Logger = SpaceWarpPlugin.Logger; + + SpaceWarpFolder = Path.GetDirectoryName(spaceWarpPlugin.Info.Location); + + AppbarBackend.AppBarInFlightSubscriber.AddListener(Appbar.LoadAllButtons); + AppbarBackend.AppBarOABSubscriber.AddListener(Appbar.LoadOABButtons); + } - var path = internalPath + "/" + assetName; - path = path.ToLower(); - var asset = assetBundle.LoadAsset(name); - assets.Add((path, asset)); + + internal static void CheckKspVersions() + { + var kspVersion = typeof(VersionID).GetField("VERSION_TEXT", BindingFlags.Static | BindingFlags.Public) + ?.GetValue(null) as string; + foreach (var plugin in AllPlugins) + { + // CheckModKspVersion(plugin.Info.Metadata.GUID, plugin.SpaceWarpMetadata, kspVersion); + CheckModKspVersion(plugin.Guid, plugin.SWInfo, kspVersion); } - return assets; + foreach (var info in DisabledPlugins) + { + CheckModKspVersion(info.Guid, info.SWInfo, kspVersion); + } } - private static List<(string name, UnityObject asset)> ImageLoadingAction(string internalPath, string filename) + private static void CheckModKspVersion(string guid, ModInfo modInfo, string kspVersion) { - var tex = new Texture2D(2, 2, TextureFormat.ARGB32, false) + var unsupported = true; + try { - filterMode = FilterMode.Point - }; - var fileData = File.ReadAllBytes(filename); - tex.LoadImage(fileData); // Will automatically resize - List<(string name, UnityObject asset)> assets = new() { ($"images/{internalPath}", tex) }; - return assets; + unsupported = !modInfo.SupportedKsp2Versions.IsSupported(kspVersion); + } + catch (Exception e) + { + Logger.LogError($"Unable to check KSP version for {guid} due to error {e}"); + } + + ModsUnsupported[guid] = unsupported; } + + internal static void InitializeSpaceWarpsLoadingActions() { - Loading.AddAssetLoadingAction("bundles", "loading asset bundles", AssetBundleLoadingAction, "bundle"); - Loading.AddAssetLoadingAction("images", "loading images", ImageLoadingAction); + Loading.AddAssetLoadingAction("bundles", "loading asset bundles", FunctionalLoadingActions.AssetBundleLoadingAction, "bundle"); + Loading.AddAssetLoadingAction("images", "loading images", FunctionalLoadingActions.ImageLoadingAction); } } \ No newline at end of file diff --git a/SpaceWarp/SpaceWarpPlugin.cs b/SpaceWarp/SpaceWarpPlugin.cs index a3baaced..1f576947 100644 --- a/SpaceWarp/SpaceWarpPlugin.cs +++ b/SpaceWarp/SpaceWarpPlugin.cs @@ -2,6 +2,8 @@ global using System.Linq; using System; using System.Collections; +using System.ComponentModel; +using System.IO; using System.Reflection; using System.Xml; using BepInEx; @@ -9,17 +11,27 @@ using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; +using KSP; using KSP.Messages; +using KSP.ScriptInterop.impl.moonsharp; +using KSP.Sim.impl.lua; +using MoonSharp.Interpreter; +using MoonSharp.Interpreter.Interop; +using MoonSharp.Interpreter.Interop.RegistrationPolicies; using UitkForKsp2.API; using Newtonsoft.Json; using SpaceWarp.API.Assets; using SpaceWarp.API.Game.Messages; +using SpaceWarp.API.Lua; using SpaceWarp.API.Mods; using SpaceWarp.API.Mods.JSON; using SpaceWarp.API.Versions; +using SpaceWarp.InternalUtilities; using SpaceWarp.UI; -using SpaceWarp.UI.Debug; +using SpaceWarp.UI.Console; using SpaceWarp.UI.ModList; +using SpaceWarp.UI.Settings; +using SpaceWarpPatcher; using UitkForKsp2; using UnityEngine; using UnityEngine.Networking; @@ -32,6 +44,10 @@ namespace SpaceWarp; [BepInPlugin(ModGuid, ModName, ModVer)] public sealed class SpaceWarpPlugin : BaseSpaceWarpPlugin { + + internal static SpaceWarpPlugin Instance; + + public const string ModGuid = "com.github.x606.spacewarp"; public const string ModName = "Space Warp"; public const string ModVer = MyPluginInfo.PLUGIN_VERSION; @@ -40,6 +56,7 @@ public sealed class SpaceWarpPlugin : BaseSpaceWarpPlugin internal ConfigEntry ConfigDebugColor; internal ConfigEntry ConfigDebugMessageLimit; + internal ConfigEntry ConfigErrorColor; private ConfigEntry _configFirstLaunch; internal ConfigEntry ConfigInfoColor; @@ -48,6 +65,10 @@ public sealed class SpaceWarpPlugin : BaseSpaceWarpPlugin internal ConfigEntry ConfigShowTimeStamps; internal ConfigEntry ConfigTimeStampFormat; internal ConfigEntry ConfigWarningColor; + internal ConfigEntry ConfigAutoScrollEnabledColor; + + internal ScriptEnvironment GlobalLuaState; + private string _kspVersion; internal new static ManualLogSource Logger; @@ -55,12 +76,26 @@ public sealed class SpaceWarpPlugin : BaseSpaceWarpPlugin public SpaceWarpPlugin() { Logger = base.Logger; + Instance = this; } public void Awake() { _kspVersion = typeof(VersionID).GetField("VERSION_TEXT", BindingFlags.Static | BindingFlags.Public) ?.GetValue(null) as string; + SetupSpaceWarpConfiguration(); + + BepInEx.Logging.Logger.Listeners.Add(new SpaceWarpConsoleLogListener(this)); + + Harmony.CreateAndPatchAll(typeof(SpaceWarpPlugin).Assembly, ModGuid); + + SpaceWarpManager.InitializeSpaceWarpsLoadingActions(); + + SpaceWarpManager.Initialize(this); + } + + private void SetupSpaceWarpConfiguration() + { ConfigErrorColor = Config.Bind("Debug Console", "Color Error", Color.red, "The color for log messages that have the level: Error/Fatal (bolded)"); ConfigWarningColor = Config.Bind("Debug Console", "Color Warning", Color.yellow, @@ -85,20 +120,40 @@ public void Awake() "Whether or not this is the first launch of space warp, used to show the version checking prompt to the user."); ConfigCheckVersions = Config.Bind("Version Checking", "Check Versions", false, "Whether or not Space Warp should check mod versions using their swinfo.json files"); + } - BepInEx.Logging.Logger.Listeners.Add(new SpaceWarpConsoleLogListener(this)); - Harmony.CreateAndPatchAll(typeof(SpaceWarpPlugin).Assembly, ModGuid); + private void SetupLuaState() + { + // I have been warned and I do not care + UserData.RegistrationPolicy = InteropRegistrationPolicy.Automatic; - SpaceWarpManager.InitializeSpaceWarpsLoadingActions(); + GlobalLuaState = (ScriptEnvironment)Game.ScriptEnvironment; + GlobalLuaState.script.Globals["SWLog"] = Logger; - SpaceWarpManager.Initialize(this); + // Now we loop over every assembly and import static lua classes for methods + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + UserData.RegisterAssembly(assembly); + foreach (var type in assembly.GetTypes()) + { + // Now we can easily create API Objects from a [SpaceWarpLuaAPI] attribute + foreach (var attr in type.GetCustomAttributes()) + { + if (attr is not SpaceWarpLuaAPIAttribute luaAPIAttribute) continue; + // As this seems to be used here + GlobalLuaState.script.Globals[luaAPIAttribute.LuaName] = UserData.CreateStatic(type); + break; + } + } + } } public override void OnInitialized() { base.OnInitialized(); + SetupLuaState(); Game.Messages.Subscribe(typeof(GameStateEnteredMessage), StateChanges.OnGameStateEntered, false, true); Game.Messages.Subscribe(typeof(GameStateLeftMessage), StateChanges.OnGameStateLeft, false, true); @@ -127,48 +182,37 @@ public override void OnInitialized() } } - public void ClearVersions() + public override void OnPostInitialized() { - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) - { - SpaceWarpManager.ModsOutdated[plugin.Info.Metadata.GUID] = false; - } + InitializeSettingsUI(); + } + - foreach (var info in SpaceWarpManager.NonSpaceWarpInfos) - { - SpaceWarpManager.ModsOutdated[info.Item1.Info.Metadata.GUID] = false; - } - foreach (var info in SpaceWarpManager.DisabledInfoPlugins) + public void ClearVersions() + { + foreach (var plugin in SpaceWarpManager.AllPlugins) { - SpaceWarpManager.ModsOutdated[info.Item1.Metadata.GUID] = false; + SpaceWarpManager.ModsOutdated[plugin.Guid] = false; } } public void CheckVersions() { ClearVersions(); - foreach (var plugin in SpaceWarpManager.SpaceWarpPlugins) - { - if (plugin.SpaceWarpMetadata.VersionCheck != null) - { - StartCoroutine(CheckVersion(plugin.Info.Metadata.GUID, plugin.SpaceWarpMetadata)); - } - } - - foreach (var info in SpaceWarpManager.NonSpaceWarpInfos) + foreach (var plugin in SpaceWarpManager.AllPlugins) { - if (info.Item2.VersionCheck != null) + if (plugin.SWInfo.VersionCheck != null) { - StartCoroutine(CheckVersion(info.Item1.Info.Metadata.GUID, info.Item2)); + StartCoroutine(CheckVersion(plugin.Guid, plugin.SWInfo)); } } - foreach (var info in SpaceWarpManager.DisabledInfoPlugins) + foreach (var info in SpaceWarpManager.DisabledPlugins) { - if (info.Item2.VersionCheck != null) + if (info.SWInfo.VersionCheck != null) { - StartCoroutine(CheckVersion(info.Item1.Metadata.GUID, info.Item2)); + StartCoroutine(CheckVersion(info.Guid, info.SWInfo)); } } } @@ -253,15 +297,25 @@ private void InitializeUI() (ConfigurationManager.ConfigurationManager)Chainloader .PluginInfos[ConfigurationManager.ConfigurationManager.GUID].Instance; - var modListUxml = AssetManager.GetAsset($"spacewarp/modlist/modlist.uxml"); + var modListUxml = AssetManager.GetAsset($"{ModGuid}/modlist/modlist.uxml"); var modList = Window.CreateFromUxml(modListUxml, "Space Warp Mod List", transform, true); + + var swConsoleUxml = AssetManager.GetAsset($"{ModGuid}/uitkswconsole/spacewarp.console/ConsoleWindow.uxml"); + var swConsole = Window.CreateFromUxml(swConsoleUxml, "Space Warp Console", transform, true); + SpaceWarpManager.ModListController = modList.gameObject.AddComponent(); modList.gameObject.Persist(); - GameObject consoleUIObject = new("Space Warp Console"); - consoleUIObject.Persist(); - consoleUIObject.transform.SetParent(Chainloader.ManagerObject.transform); - consoleUIObject.AddComponent(); - consoleUIObject.SetActive(true); + SpaceWarpManager.SpaceWarpConsole = swConsole.gameObject.AddComponent(); + swConsole.gameObject.Persist(); + } + + private void InitializeSettingsUI() + { + GameObject settingsController = new("Settings Controller"); + settingsController.Persist(); + settingsController.transform.SetParent(Chainloader.ManagerObject.transform); + settingsController.AddComponent(); + settingsController.SetActive(true); } } \ No newline at end of file diff --git a/SpaceWarp/UI/Console/LogEntry.cs b/SpaceWarp/UI/Console/LogEntry.cs new file mode 100644 index 00000000..0cc6fbcf --- /dev/null +++ b/SpaceWarp/UI/Console/LogEntry.cs @@ -0,0 +1,210 @@ +using System; +using BepInEx.Logging; +using UnityEngine; +using UnityEngine.UIElements; +using static SpaceWarp.UI.Console.SpaceWarpConsoleLogListener; + +namespace SpaceWarp.UI.Console +{ + + internal class LogEntry : BindableElement + { + private const string USSClassName = "spacewarp-logEntry"; + private const string USSLogEntryElementClassName = USSClassName + "-element"; + private const string USSHeaderGrouperClassName = USSClassName + "__headerContent"; + private const string USSTimeDateClassName = USSClassName + "__timeDate"; + private const string USSLogLevelClassName = USSClassName + "__logLevel"; + private const string USSLogSourceClassName = USSClassName + "__logSource"; + private const string USSLogMessageHeaderClassName = USSClassName + "__logMessage"; + + private const string USSMessageGrouperClassName = USSClassName + "__messageContent"; + private const string USSMessageClassName = USSClassName + "__messageLabel"; + + // internal static int MaxHeaderLength = 117; + + private readonly Label _timeDateLabel; + + internal DateTime TimeDate + { + get => _timeDate; + set + { + _timeDate = value; + if (SpaceWarpPlugin.Instance.ConfigShowTimeStamps.Value) + _timeDateLabel.text = value.ToString(SpaceWarpPlugin.Instance.ConfigTimeStampFormat.Value); + else + _timeDateLabel.style.display = DisplayStyle.None; + } + } + private DateTime _timeDate; + + private readonly Label _logLevelLabel; + + internal LogLevel LogLevel + { + get => _logLevel; + private set + { + if (value == _logLevel) return; + _logLevel = value; + _logLevelLabel.text = $"[{_logLevel.ToString()}\t:"; + } + } + private LogLevel _logLevel = LogLevel.All; + + private readonly Label _logSourceLabel; + public ILogSource LogSource + { + get => _logSource; + private set + { + if (value == _logSource) return; + _logSource = value; + _logSourceLabel.text = $"{_logSource.SourceName}]"; + } + } + private ILogSource _logSource; + + private readonly Label _logMessageHeaderLabel; + + private string LogMessageHeader => LogMessage; + private object _logData; + + private readonly Label _logMessageLabel; + + public string LogMessage => LogData.ToString(); + + private object LogData + { + get => _logData; + set + { + _logData = value; + _logMessageLabel.text = $" {LogMessage}"; + _logMessageHeaderLabel.text = LogMessageHeader; + } + } + + private bool Expanded + { + get => _expanded; + set + { + _expanded = value; + if (value) + { + _logMessageLabel.style.display = DisplayStyle.Flex; + } + else + { + _logMessageLabel.style.display = DisplayStyle.None; + } + _logMessageHeaderLabel.text = LogMessageHeader; + } + } + private bool _expanded; + + public Color TextColor + { + get => _textColor; + set + { + _textColor = value; + UpdateLabels(); + } + } + + private void UpdateLabels() + { + //TimeDateLabel.style.color = TextColor; + _logLevelLabel.style.color = TextColor; + _logSourceLabel.style.color = TextColor; + _logMessageHeaderLabel.style.color = TextColor; + _logMessageLabel.style.color = TextColor; + } + + private Color _textColor = Color.white; + + public LogEntry(LogInfo logInfo, bool startCollapsed = true) + { + AddToClassList(USSClassName); + + var headerGrouper = new VisualElement() + { + name = "console-LogEntry-headerGroup" + }; + headerGrouper.AddToClassList(USSHeaderGrouperClassName); + headerGrouper.AddToClassList(USSLogEntryElementClassName); + + hierarchy.Add(headerGrouper); + + _timeDateLabel = new Label() + { + name = "console-LogEntry-timeDate" + }; + + _timeDateLabel.AddToClassList(USSTimeDateClassName); + _timeDateLabel.AddToClassList(USSLogEntryElementClassName); + _logLevelLabel = new Label() + { + name = "console-LogEntry-logLevel" + }; + + _logLevelLabel.AddToClassList(USSLogLevelClassName); + _logLevelLabel.AddToClassList(USSLogEntryElementClassName); + + _logSourceLabel = new Label() + { + name = "console-LogEntry-logSource" + }; + + _logSourceLabel.AddToClassList(USSLogSourceClassName); + _logSourceLabel.AddToClassList(USSLogEntryElementClassName); + + _logMessageHeaderLabel = new Label() + { + name = "console-LogEntry-logMessageHeader" + }; + + _logMessageHeaderLabel.AddToClassList(USSLogMessageHeaderClassName); + _logMessageHeaderLabel.AddToClassList(USSLogEntryElementClassName); + + var messageGrouper = new VisualElement() + { + name = "console-LogEntry-messageGroup" + }; + messageGrouper.AddToClassList(USSMessageGrouperClassName); + messageGrouper.AddToClassList(USSLogEntryElementClassName); + hierarchy.Add(messageGrouper); + + _logMessageLabel = new Label() + { + name = "console-LogEntry-logMessage" + }; + + _logMessageLabel.AddToClassList(USSMessageClassName); + _logMessageLabel.AddToClassList(USSLogEntryElementClassName); + + headerGrouper.hierarchy.Add(_timeDateLabel); + headerGrouper.hierarchy.Add(_logLevelLabel); + headerGrouper.hierarchy.Add(_logSourceLabel); + headerGrouper.hierarchy.Add(_logMessageHeaderLabel); + + messageGrouper.hierarchy.Add(_logMessageLabel); + + TimeDate = logInfo.DateTime; + LogSource = logInfo.Source; + LogLevel = logInfo.Level; + LogData = logInfo.Data; + Expanded = !startCollapsed; + } + + public override void HandleEvent(EventBase evt) + { + if(evt is ClickEvent) + { + Expanded = !Expanded; + } + } + } +} \ No newline at end of file diff --git a/SpaceWarp/UI/Console/SpaceWarpConsole.cs b/SpaceWarp/UI/Console/SpaceWarpConsole.cs new file mode 100644 index 00000000..d2944431 --- /dev/null +++ b/SpaceWarp/UI/Console/SpaceWarpConsole.cs @@ -0,0 +1,301 @@ +using System.Collections; +using BepInEx.Logging; +using KSP.Game; +using UitkForKsp2.API; +using UnityEngine; +using UnityEngine.UIElements; +using static SpaceWarp.UI.Console.SpaceWarpConsoleLogListener; + +namespace SpaceWarp.UI.Console; + +internal sealed class SpaceWarpConsole : KerbalMonoBehaviour +{ + // State + private bool _isLoaded; + private bool _isWindowVisible; + + // UITK Stuff + private VisualElement _container; + + private TextField _consoleSearch; + private string SearchFilter => _consoleSearch.text; + private ScrollView _consoleContent; + + private Toggle _toggleDebug; + private Toggle _toggleMessage; + private Toggle _toggleInfo; + private Toggle _toggleWarning; + private Toggle _toggleError; + private Toggle _toggleAutoScroll; + + + // Debugging + private static ManualLogSource _logger; + + private void Start() + { + foreach (var logMessage in LogMessages) + { + CreateNewLogEntry(logMessage); + } + // Binds the OnNewMessageReceived function to the OnNewMessage event + OnNewLog += CreateNewLogEntry; + } + + + private void OnDestroy() + { + // Unbinds the OnNewMessageReceived function to the OnNewMessage event when destroyed + OnNewLog -= CreateNewLogEntry; + + } + + private void CreateNewLogEntry(LogInfo logInfo) + { + LogEntry entry = new(logInfo) + { + TextColor = GetColorFromLogLevel(logInfo.Level) + }; + _consoleContent.Add(entry); + + //Check if this entry should be currently hidden + CheckFilter(entry); + + //First in first out + if (_consoleContent.contentContainer.childCount > SpaceWarpPlugin.Instance.ConfigDebugMessageLimit.Value) + _consoleContent.contentContainer.RemoveAt(0); + if(_toggleAutoScroll.value) + AutoScrollToBottom(); + } + + + private void Awake() + { + if (_isLoaded) return; + + // Debugging + _logger = SpaceWarpPlugin.Logger; + + // Run the main UITK setup functions + SetupDocument(); + InitializeElements(); + BindFunctions(); + SetDefaults(); + // HUH?? See me after class + UnbindFunctions(); + + _isLoaded = true; + } + + private void Update() + { + if (Input.GetKey(KeyCode.LeftAlt) && Input.GetKeyDown(KeyCode.C)) + { + ToggleWindow(); + } + + if (_isWindowVisible && Input.GetKey(KeyCode.Escape)) + { + HideWindow(); + } + } + + private void SetupDocument() + { + var document = GetComponent(); + if (document.TryGetComponent(out var localization)) + { + localization.Localize(); + } + else + { + document.EnableLocalization(); + } + + _container = document.rootVisualElement; + + StartCoroutine(SetupWindow()); + } + + private IEnumerator SetupWindow() + { + yield return new WaitForFixedUpdate(); + + var root = _container.hierarchy[0]; + root.transform.position = new Vector3( + (Screen.width - root.boundingBox.width) / 2, + (Screen.height - root.boundingBox.height) / 2 + ); + + yield return new WaitForFixedUpdate(); + + _container.style.display = DisplayStyle.None; + } + + private void InitializeElements() + { + _consoleContent = _container.Q("log-entry-content"); + _consoleContent.Clear(); + _consoleSearch = _container.Q("search-text-field"); + _consoleSearch.text = string.Empty; + + // Binding all of the buttons to their respective functions + _container.Q + class A + { + void M(T t) { } + void M(U u) { } + } + ]]> + + + The native compiler interprets this in the same way as it would interpret A{T1, T2}.M(T2) and unambiguously + (i.e. without a warning) binds to A{T, U}.M(U). Since Roslyn does not distinguish between the T's, Roslyn + reports an ambiguity warning and picks the first method. Furthermore, renaming one 'T' will rename all of + them. + + This class represents such an implicitly declared type parameter. The declaring syntax is expected to be + an IdentifierNameSyntax in the type argument list of a QualifiedNameSyntax. + + + + Out params are updated by assignment. If you require thread-safety, pass temps and then + CompareExchange them back into shared memory. + + + + Type that already has custom modifiers. + Same as , but without custom modifiers. + May differ in object/dynamic, tuple element names, or other differences ignored by the runtime. + The assembly containing the signature referring to the destination type. + with custom modifiers copied from . + + + + Given a member, look for other members contained in the same type with signatures that will + not be distinguishable by the runtime. + + + + + Gets the syntax list of custom attributes applied on the symbol. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + NOTE: This method should always be kept as a sealed override. + If you want to override attribute binding logic for a sub-class, then override method. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. + Returns an empty bag if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + Verify the constant value matches the default value from any earlier attribute + (DateTimeConstantAttribute or DecimalConstantAttribute). + If not, report ERR_FieldHasMultipleDistinctConstantValues. + + + + + Represents expression and deconstruction variables declared in a global statement. + + + + + The type syntax, if any, from source. Optional for patterns that can omit an explicit type. + + + + + Can add some diagnostics into . + Returns the type that it actually locks onto (it's possible that it had already locked onto ErrorType). + + + + + Can add some diagnostics into . + Returns the type that it actually locks onto (it's possible that it had already locked onto ErrorType). + + + + + Implemented by symbols that can be targeted by an attribute declaration (i.e. source symbols). + + + + + Returns the owner of attributes that apply to this symbol. + + + Attributes for this symbol might be retrieved from attribute list of another (owning) symbol. + In that case this property returns that owning symbol, otherwise it returns "this". + + + + + Returns a bit set of attribute locations applicable to this symbol. + + + + + Attribute location corresponding to this symbol. + + + Location of an attribute if an explicit location is not specified via attribute target specification syntax. + + + + + Represents implicit, script and submission classes. + + + + + Returns null for a submission class. + This ensures that a submission class does not inherit methods such as ToString or GetHashCode. + + + + + Indexed type parameters are used in place of type parameters for method signatures. There is + a unique mapping from index to a single IndexedTypeParameterSymbol. + + They don't have a containing symbol or locations. + + They do not have constraints, variance, or attributes. + + + + + Create a vector of n dummy type parameters. Always reuses the same type parameter symbol + for the same position. + + + + + + + This symbol is used as the return type of a LambdaSymbol when we are interpreting + lambda's body in order to infer its return type. + + + + + This symbol is used as the return type of a LambdaSymbol when we failed to infer its return type. + + + + + Locations[0] on lambda symbols covers the entire syntax, which is inconvenient but remains for compatibility. + For better diagnostics quality, use the DiagnosticLocation instead, which points to the "delegate" or the "=>". + + + + + Binder that owns the scope for the local function symbol, namely the scope where the + local function is declared. + + + + + The QuickAttributeChecker applies a simple fast heuristic for determining probable + attributes of certain kinds without binding attribute types, just by looking at the final syntax of an + attribute usage. + + + It works by maintaining a dictionary of all possible simple names that might map to the given + attribute. + + + + + Returns the that corresponds to the particular type + passed in. If is + then the name will be checked both as-is as well as with the 'Attribute' suffix. + + + + + Represents a source parameter cloned from another , when they must share attribute data and default constant value. + For example, parameters on a property symbol are cloned to generate parameters on accessors. + Similarly parameters on delegate invoke method are cloned to delegate begin/end invoke methods. + + + + + A source parameter, potentially with a default value, attributes, etc. + + + + + Returns the bound default value syntax from the parameter, if it exists. + Note that this method will only return a non-null value if the + default value was supplied in syntax. If the value is supplied through the DefaultParameterValue + attribute, then ExplicitDefaultValue will be non-null but this method will return null. + However, if ExplicitDefaultValue is null, this method should always return null. + + + + + Symbol to copy bound attributes from, or null if the attributes are not shared among multiple source parameter symbols. + + + Used for parameters of partial implementation. We bind the attributes only on the definition + part and copy them over to the implementation. + + + + + Gets the syntax list of custom attributes that declares attributes for this parameter symbol. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from special early bound well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Binds attributes applied to this parameter. + + + + + Verify the default value matches the default value from any earlier attribute + (DefaultParameterValueAttribute, DateTimeConstantAttribute or DecimalConstantAttribute). + If not, report ERR_ParamDefaultValueDiffersFromAttribute. + + + + + Is the attribute syntax appearing on a parameter of a partial method implementation part? + Since attributes are merged between the parts of a partial, we need to look at the syntax where the + attribute appeared in the source to see if it corresponds to a partial method implementation part. + + + + + + + True if the parameter has default argument syntax. + + + + + True if the parameter is marked by . + + + + + This class represents an event accessor declared in source + (i.e. not one synthesized for a field-like event). + + + The accessors are associated with . + + + + + This class represents an event declared in source with explicit accessors + (i.e. not a field-like event). + + + + + Represents a constant field of an enum. + + + + + Base class for event accessors - synthesized and user defined. + + + + + A delegate field associated with a . + + + SourceFieldSymbol takes care of the initializer (plus "var" in the interactive case). + + + + + This class represents an event declared in source. It may be either + field-like (see ) or property-like (see + ). + + + + + Gets the syntax list of custom attributes applied on the event symbol. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + NOTE: This method should always be kept as a sealed override. + If you want to override attribute binding logic for a sub-class, then override method. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from special early bound well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + This class represents an event declared in source without explicit accessors. + It implicitly has thread safe accessors and an associated field (of the same + name), unless it does not have an initializer and is either extern or inside + an interface, in which case it only has accessors. + + + + + Backing field for field-like event. Will be null if the event + has no initializer and is either extern or inside an interface. + + + + + Return the constant value dependencies. Compute the dependencies + if necessary by evaluating the constant value but only persist the + constant value if there were no dependencies. (If there are dependencies, + the constant value will be re-evaluated after evaluating dependencies.) + + + + + Switch case labels have a constant expression associated with them. + + + + + If the label is a switch case label, returns the associated constant value with + case expression, otherwise returns null. + + + + + Represents a local variable in a method body. + + + + + Might not be a method symbol. + + + + + Binder that owns the scope for the local, the one that returns it in its array. + + + + + Binder that should be used to bind type syntax for the local. + + + + + Make a local variable symbol for an element of a deconstruction, + which can be inferred (if necessary) by binding the enclosing statement. + + + + Binder that owns the scope for the local, the one that returns it in its array. + + + Enclosing binder for the location where the local is declared. + It should be used to bind something at that location. + + + + + + + + + + Make a local variable symbol whose type can be inferred (if necessary) by binding and enclosing construct. + + + + + Make a local variable symbol which can be inferred (if necessary) by binding its initializing expression. + + + + Binder that owns the scope for the local, the one that returns it in its array. + + + + + + + + + Binder that should be used to bind initializer, if different from the . + + + + + + Gets the name of the local variable. + + + + + Gets the locations where the local symbol was originally defined in source. + There should not be local symbols from metadata, and there should be only one local variable declared. + TODO: check if there are multiple same name local variables - error symbol or local symbol? + + + + + Symbol for a local whose type can be inferred by binding its initializer. + + + + + Store the constant value and the corresponding diagnostics together + to avoid having the former set by one thread and the latter set by + another. + + + + + Determine the constant value of this local and the corresponding diagnostics. + Set both to constantTuple in a single operation for thread safety. + + Null for the initial call, non-null if we are in the process of evaluating a constant. + If we already have the bound node for the initial value, pass it in to avoid recomputing it. + + + + Symbol for a foreach iteration variable that can be inferred by binding the + collection element type of the foreach. + + + + + We initialize the base's ScopeBinder with a ForEachLoopBinder, so it is safe + to cast it to that type here. + + + + + There is no forbidden zone for a foreach loop, because the iteration + variable is not in scope in the collection expression. + + + + + Symbol for a deconstruction local that might require type inference. + For instance, local x in var (x, y) = ... or (var x, int y) = .... + + + + + Represents a named type symbol whose members are declared in source. + + + + + Compute the "effective accessibility" of the current class for the purpose of warnings about unused fields. + + + + + Encapsulates information about the non-type members of a (i.e. this) type. + 1) For non-initializers, symbols are created and stored in a list. + 2) For fields and properties/indexers, the symbols are stored in (1) and their initializers are + stored with other initialized fields and properties from the same syntax tree with + the same static-ness. + + + + + Calculates a syntax offset of a syntax position that is contained in a property or field initializer (if it is in fact contained in one). + + + + + For source symbols, there can only be a valid clone method if this is a record, which is a + simple syntax check. This will need to change when we generalize cloning, but it's a good + heuristic for now. + + + + + During early attribute decoding, we consider a safe subset of all members that will not + cause cyclic dependencies. Get all such members for this symbol. + + In particular, this method will return nested types and fields (other than auto-property + backing fields). + + + + + During early attribute decoding, we consider a safe subset of all members that will not + cause cyclic dependencies. Get all such members for this symbol that have a particular name. + + In particular, this method will return nested types and fields (other than auto-property + backing fields). + + + + + The purpose of this function is to assert that the symbol + is actually among the symbols cached by this type symbol in a way that ensures + that any consumer of standard APIs to get to type's members is going to get the same + symbol (same instance) for the member rather than an equivalent, but different instance. + + + + + Fix up a partial method by combining its defining and implementing declarations, updating the array of symbols (by name), + and returning the combined symbol. + + The symbols array containing both the latent and implementing declaration + One of the two declarations + The other declaration + An updated symbols array containing only one method symbol representing the two parts + + + + Report an error if a member (other than a method) exists with the same name + as the property accessor, or if a method exists with the same name and signature. + + + + + Report an error if a member (other than a method) exists with the same name + as the event accessor, or if a method exists with the same name and signature. + + + + + Return the location of the accessor, or if no accessor, the location of the property. + + + + + Return the location of the accessor, or if no accessor, the location of the event. + + + + + Return true if the method parameters match the parameters of the + property accessor, including the value parameter for the setter. + + + + + Return true if the method parameters match the parameters of the + event accessor, including the value parameter. + + + + + Returns true if the overall nullable context is enabled for constructors and initializers. + + Consider static constructor and fields rather than instance constructors and fields. + + + + In some circumstances (e.g. implicit implementation of an interface method by a non-virtual method in a + base type from another assembly) it is necessary for the compiler to generate explicit implementations for + some interface methods. They don't go in the symbol table, but if we are emitting, then we should + generate code for them. + + + + + It's not interesting to report diagnostics on implementation of interface accessors + if the corresponding events or properties are not implemented (i.e. we want to suppress + cascading diagnostics). + Caveat: Indexed property accessors are always interesting. + Caveat: It's also uninteresting if a WinRT event is implemented by a non-WinRT event, + or vice versa. + + + + + Return true if is valid for the return type of an override method when the overridden method's return type is . + + + + + if a diagnostic was added. Otherwise, . + + + + + Returns true if the method signature must match, with respect to scoped for ref safety, + in overrides, interface implementations, or delegate conversions. + + + + + Returns true if a scoped mismatch should be reported as an error rather than a warning. + + + + + Returns true if a diagnostic was added. + + + + + If necessary, report a diagnostic for a hidden abstract member. + + True if a diagnostic was reported. + + + + It is invalid for a type to directly (vs through a base class) implement two interfaces that + unify (i.e. are the same for some substitution of type parameters). + + + CONSIDER: check this while building up InterfacesAndTheirBaseInterfaces (only in the SourceNamedTypeSymbol case). + + + + + Though there is a method that C# considers to be an implementation of the interface method, that + method may not be considered an implementation by the CLR. In particular, implicit implementation + methods that are non-virtual or that have different (usually fewer) custom modifiers than the + interface method, will not be considered CLR overrides. To address this problem, we either make + them virtual (in metadata, not in C#), or we introduce an explicit interface implementation that + delegates to the implicit implementation. + + Returned from FindImplementationForInterfaceMemberWithDiagnostics. + The interface method or property that is being implemented. + + A synthesized forwarding method for the implementation, or information about MethodImpl entry that should be emitted, + or default if neither needed. + + + + + The CLR will only look for an implementation of an interface method in a type that + 1) declares that it implements that interface; or + 2) is a base class of a type that declares that it implements the interface but not + a subtype of a class that declares that it implements the interface. + + For example, + + interface I + class A + class B : A, I + class C : B + class D : C, I + + Suppose the runtime is looking for D's implementation of a member of I. It will look in + D because of (1), will not look in C, will look in B because of (1), and will look in A + because of (2). + + The key point is that it does not look in C, which C# *does*. + + + + + If C# picks a different implementation than the CLR (see IsPossibleImplementationUnderClrRules), then we might + still be okay, but dynamic dispatch might result in C#'s choice getting called anyway. + + + This is based on SymbolPreparer::IsCLRMethodImplSame in the native compiler. + + ACASEY: What the native compiler actually does is compute the C# answer, compute the CLR answer, + and then confirm that they override the same method. What I've done here is check for the situations + where the answers could disagree. I believe the results will be equivalent. If in doubt, a more conservative + check would be implementingMethod.ContainingType.InterfacesAndTheirBaseInterfaces.Contains(@interface). + + + + + Implementers should assume that a lock has been taken on MethodChecksLockObject. + In particular, it should not (generally) be necessary to use CompareExchange to + protect assignments to fields. + + + + + We can usually lock on the syntax reference of this method, but it turns + out that some synthesized methods (e.g. field-like event accessors) also + need to do method checks. This property allows such methods to supply + their own lock objects, so that we don't have to add a new field to every + SourceMethodSymbol. + + + + + Overridden by , + which might return locations of partial methods. + + + + + Checks to see if a body is legal given the current modifiers. + If it is not, a diagnostic is added with the current type. + + + + + Returns true if the method body is an expression, as expressed + by the syntax. False + otherwise. + + + If the method has both block body and an expression body + present, this is not treated as expression-bodied. + + + + + Base class to represent all source method-like symbols. This includes + things like ordinary methods and constructors, and functions + like lambdas and local functions. + + + + + If there are no constraints, returns an empty immutable array. Otherwise, returns an immutable + array of types, indexed by the constrained type parameter in . + + + + + If there are no constraints, returns an empty immutable array. Otherwise, returns an immutable + array of kinds, indexed by the constrained type parameter in . + + + + + A source method that can have attributes, including a member method, accessor, or local function. + + + + + Gets the syntax node used for the in-method binder. + + + + + Symbol to copy bound attributes from, or null if the attributes are not shared among multiple source method symbols. + + + Used for example for event accessors. The "remove" method delegates attribute binding to the "add" method. + The bound attribute data are then applied to both accessors. + + + + + Gets the syntax list of custom attributes that declares attributes for this method symbol. + + + + + Gets the syntax list of custom attributes that declares attributes for return type of this method. + + + + + Returns data decoded from special early bound well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns information retrieved from custom attributes on return type in source, or null if the symbol is not source symbol or there are none. + + + Forces binding and decoding of attributes. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Returns a bag of custom attributes applied on the method return value and data decoded from well-known attributes. Returns null if there are no attributes. + + + Forces binding and decoding of attributes. + + + + + Called when this thread loaded the method's attributes. For method symbols with completion state. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + + + Gets the attributes applied on the return value of this method symbol. + Returns an empty array if there are no attributes. + + + + + Binds attributes applied to this method. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + Represents the primary module of an assembly being built by compiler. + + + + + Owning assembly. + + + + + The declarations corresponding to the source files of this module. + + + + + The name (contains extension) + + + + + This override is essential - it's a base case of the recursive definition. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + NOTE: This method should always be kept as a sealed override. + If you want to override attribute binding logic for a sub-class, then override method. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + A collection of type parameter constraint types, populated when + constraint types for the first type parameter are requested. + + + + + A collection of type parameter constraint kinds, populated when + constraint kinds for the first type parameter are requested. + + + + + Returns the constraint types for the given type parameter. + + + + + Returns the constraint kind for the given type parameter. + + + + + Note, only nullability aspects are merged if possible, other mismatches are treated as failures. + + + + + Note, only nullability aspects are merged if possible, other mismatches are treated as failures. + + + + + Gets all the attribute lists for this named type. If is provided + the attribute lists will only be returned if there is reasonable belief that + the type has one of the attributes specified by on it. + This can avoid going back to syntax if we know the type definitely doesn't have an attribute + on it that could be the one specified by . Pass + to get all attribute declarations. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from special early bound well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + These won't be returned by GetAttributes on source methods, but they + will be returned by GetAttributes on metadata symbols. + + + + + Gets the BaseType of this type. If the base type could not be determined, then + an instance of ErrorType is returned. If this kind of type does not have a base type + (for example, interfaces), null is returned. Also the special class System.Object + always has a BaseType of null. + + + + + Gets the set of interfaces that this type directly implements. This set does not include + interfaces that are base interfaces of directly implemented interfaces. + + + + + Returns true if the type cannot be used as an explicit base class. + + + + + For enum types, gets the underlying type. Returns null on all other + kinds of types. + + + + + For enum types, returns the synthesized instance field used + for generating metadata. Returns null for non-enum types. + + + + + Completion state that tracks whether validation was done/not done/currently in process. + + + + + Completion state that tracks whether validation was done/not done/currently in process. + + + + + Register COR types declared in this namespace, if any, in the COR types cache. + + + + + A collection of type parameter constraint types, populated when + constraint types for the first type parameter is requested. + Initialized in two steps. Hold a copy if accessing during initialization. + + + + + A collection of type parameter constraint kinds, populated when + constraint kinds for the first type parameter is requested. + Initialized in two steps. Hold a copy if accessing during initialization. + + + + + If this symbol represents a partial method definition or implementation part, its other part (if any). + This should be set, if at all, before this symbol appears among the members of its owner. + The implementation part is not listed among the "members" of the enclosing type. + + + + + If this is a partial implementation part returns the definition part and vice versa. + + + + + Returns true if this symbol represents a partial method definition (the part that specifies a signature but no body). + + + + + Returns true if this symbol represents a partial method implementation (the part that specifies both signature and body). + + + + + True if this is a partial method that doesn't have an implementation part. + + + + + Returns the implementation part of a partial method definition, + or null if this is not a partial method or it is the definition part. + + + + + Returns the definition part of a partial method implementation, + or null if this is not a partial method or it is the implementation part. + + + + + Report differences between the defining and implementing + parts of a partial method. Diagnostics are reported on the + implementing part, matching Dev10 behavior. + + + + + Unlike , this type doesn't depend + on any specific kind of syntax node associated with it. Any syntax node is good enough + for it. + + + + + Base class for parameters can be referred to from source code. + + + These parameters can potentially be targeted by an attribute specified in source code. + As an optimization we distinguish simple parameters (no attributes, no modifiers, etc.) and complex parameters. + + + + + True if the parameter is marked by . + + + + + True if the parameter has default argument syntax. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + + + The declaration diagnostics for a parameter depend on the containing symbol. + For instance, if the containing symbol is a method the declaration diagnostics + go on the compilation, but if it is a local function it is part of the local + function's declaration diagnostics. + + + + + The declared scope. From source, this is from the scope keyword only. + + + + + Base class for all parameters that are emitted. + + + + + Return Accessibility declared locally on the accessor, or + NotApplicable if no accessibility was declared explicitly. + + + + + Indicates whether this accessor itself has a 'readonly' modifier. + + + + + Indicates whether this accessor is readonly due to reasons scoped to itself and its containing property. + + + + + If we are outputting a .winmdobj then the setter name is put_, not set_. + + + + + The declaring syntax for the accessor, or property if there is no accessor-specific + syntax. + + + + + Condensed flags storing useful information about the + so that we do not have to go back to source to compute this data. + + + + + To facilitate lookup, all indexer symbols have the same name. + Check the MetadataName property to find the name that will be + emitted (based on IndexerNameAttribute, or the default "Item"). + + + + + Even though it is declared with an IndexerDeclarationSyntax, an explicit + interface implementation is not an indexer because it will not cause the + containing type to be emitted with a DefaultMemberAttribute (and even if + there is another indexer, the name of the explicit implementation won't + match). This is important for round-tripping. + + + + + The method is called at the end of constructor. + The implementation may depend only on information available from the type. + + + + + The method is called at the end of constructor. + The implementation may depend only on information available from the type. + + + + + Backing field for automatically implemented property, or + for a property with an initializer. + + + + + Return true if the accessor accessibility is more restrictive + than the property accessibility, otherwise false. + + + + + If this property is sealed, then we have to emit both accessors - regardless of whether + they are present in the source - so that they can be marked final. (i.e. sealed). + + + + + Only non-null for sealed properties without both accessors. + + + + + Returns a bag of custom attributes applied on the property and data decoded from well-known attributes. Returns null if there are no attributes. + + + Forces binding and decoding of attributes. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + NOTE: This method should always be kept as a sealed override. + If you want to override attribute binding logic for a sub-class, then override method. + + + + + Returns data decoded from well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from special early bound well-known attributes applied to the symbol or null if there are no applied attributes. + + + Forces binding and decoding of attributes. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + A source parameter that has no default value, no attributes, + and is not params. + + + + + Base class for type and method type parameters. + + + + + Gets the attributes applied on this symbol. + Returns an empty array if there are no attributes. + + + NOTE: This method should always be kept as a sealed override. + If you want to override attribute binding logic for a sub-class, then override method. + + + + + Returns a bag of applied custom attributes and data decoded from well-known attributes. Returns null if there are no attributes applied on the symbol. + + + Forces binding and decoding of attributes. + + + + + Check constraints of generic types referenced in constraint types. For instance, + with "interface I<T> where T : I<T> {}", check T satisfies constraints + on I<T>. Those constraints are not checked when binding ConstraintTypes + since ConstraintTypes has not been set on I<T> at that point. + + + + + A map shared by all type parameters for an overriding method or a method + that explicitly implements an interface. The map caches the overridden method + and a type map from overridden type parameters to overriding type parameters. + + + + + A type parameter for a method that either overrides a base + type method or explicitly implements an interface method. + + + Exists to copy constraints from the corresponding type parameter of an overridden method. + + + + + The type parameter to use for determining constraints. If there is a base + method that the owner method is overriding, the corresponding type + parameter on that method is used. Otherwise, the result is null. + + + + + Class to represent a synthesized attribute + + + + + A context for binding type parameter symbols of named types. + + + + + Type parameter has no type constraints, including `struct`, `class`, `unmanaged` and is declared in a context + where nullable annotations are disabled. + Cannot be combined with , or . + Note, presence of this flag suppresses generation of Nullable attribute on the corresponding type parameter. + This imitates the shape of metadata produced by pre-nullable compilers. Metadata import is adjusted accordingly + to distinguish between the two situations. + + + + + mismatch is detected during merging process for partial type declarations. + + + + + All bits involved into describing various aspects of 'class' constraint. + + + + + Any of these bits is equivalent to presence of 'struct' constraint. + + + + + All bits except those that are involved into describing various nullability aspects. + + + + + A simple representation of a type parameter constraint clause + as a set of constraint bits and a set of constraint types. + + + + + Either a SubstitutedNestedTypeSymbol or a ConstructedNamedTypeSymbol, which share in common that they + have type parameters substituted. + + + + + This field keeps track of the s for which we already retrieved + diagnostics. We shouldn't return from ForceComplete (i.e. indicate that diagnostics are + available) until this is equal to , except that when completing + with a given position, we might not complete .Member*. + + Since completeParts is used as a flag indicating completion of other assignments + it must be volatile to ensure the read is not reordered/optimized to happen + before the writes. + + + + + Used to force (source) symbols to a given state of completion when the only potential remaining + part is attributes. This does force the invariant on the caller that the implementation of + of will set the part on + the thread that actually completes the loading of attributes. Failure to do so will potentially + result in a deadlock. + + The owning source symbol. + + + + Produce the next (i.e. lowest) CompletionPart (bit) that is not set. + + + + + Since this formula is rather opaque, a demonstration of its correctness is + provided in Roslyn.Compilers.CSharp.UnitTests.CompletionTests.TestHasAtMostOneBitSet. + + + + + A comparer that treats dynamic and object as "the same" types, and also ignores tuple element names differences. + + + + + Synthesized namespace that contains synthesized types or subnamespaces. + All its members are stored in a table on . + + + + + Parses generated local function name out of a generated method name. + + + + + This method will work with either unmangled or mangled type names as input, but it does not remove any arity suffix if present. + + + + + Produces name of the synthesized delegate symbol that encodes the parameter byref-ness and return type of the delegate. + The arity is appended via `N suffix in MetadataName calculation since the delegate is generic. + + + Logic here should match . + + + + + Parses the name of a synthesized delegate out into the things it represents. + + + Logic here should match . + + + + + If the record type is derived from a base record type Base, the record type includes + a synthesized override of the strongly-typed Equals(Base other). The synthesized + override is sealed. It is an error if the override is declared explicitly. + The synthesized override returns Equals((object?)other). + + + + + If a virtual "clone" method is present in the base record, the synthesized "clone" method overrides it + and the return type of the method is the current containing type if the "covariant returns" feature is + supported and the override return type otherwise. An error is produced if the base record clone method + is sealed. If a virtual "clone" method is not present in the base record, the return type of the clone + method is the containing type and the method is virtual, unless the record is sealed or abstract. + If the containing record is abstract, the synthesized clone method is also abstract. + If the "clone" method is not abstract, it returns the result of a call to a copy constructor. + + + + + The record type includes synthesized '==' and '!=' operators equivalent to operators declared as follows: + + For record class: + public static bool operator==(R? left, R? right) + => (object) left == right || ((object)left != null && left.Equals(right)); + public static bool operator !=(R? left, R? right) + => !(left == right); + + For record struct: + public static bool operator==(R left, R right) + => left.Equals(right); + public static bool operator !=(R left, R right) + => !(left == right); + + The 'Equals' method called by the '==' operator is the 'Equals(R? other)' (). + The '!=' operator delegates to the '==' operator. It is an error if the operators are declared explicitly. + + + + + The record type includes synthesized '==' and '!=' operators equivalent to operators declared as follows: + + For record class: + public static bool operator==(R? left, R? right) + => (object) left == right || ((object)left != null && left.Equals(right)); + public static bool operator !=(R? left, R? right) + => !(left == right); + + For record struct: + public static bool operator==(R left, R right) + => left.Equals(right); + public static bool operator !=(R left, R right) + => !(left == right); + + The 'Equals' method called by the '==' operator is the 'Equals(R? other)' (). + The '!=' operator delegates to the '==' operator. It is an error if the operators are declared explicitly. + + + + + Unless explicitly declared, a record includes a synthesized strongly-typed overload + of `Equals(R? other)` where `R` is the record type. + The method is `public`, and the method is `virtual` unless the record type is `sealed`. + + + + + The record type includes a synthesized override of object.GetHashCode(). + The method can be declared explicitly. It is an error if the explicit + declaration is sealed unless the record type is sealed. + + + + + The record type includes synthesized '==' and '!=' operators equivalent to operators declared as follows: + + For record class: + public static bool operator==(R? left, R? right) + => (object) left == right || ((object)left != null && left.Equals(right)); + public static bool operator !=(R? left, R? right) + => !(left == right); + + For record struct: + public static bool operator==(R left, R right) + => left.Equals(right); + public static bool operator !=(R left, R right) + => !(left == right); + + The 'Equals' method called by the '==' operator is the 'Equals(R? other)' (). + The '!=' operator delegates to the '==' operator. It is an error if the operators are declared explicitly. + + + + + Common base for ordinary methods overriding methods from object synthesized by compiler for records. + + + + + Returns true if reported an error + + + + + The record type includes a synthesized override of object.Equals(object? obj). + It is an error if the override is declared explicitly. The synthesized override + returns Equals(other as R) where R is the record type. + + + + + Common base for ordinary methods synthesized by compiler for records. + + + + + The `bool PrintMembers(StringBuilder)` method is responsible for printing members declared + in the containing type that are "printable" (public fields and properties), + and delegating to the base to print inherited printable members. Base members get printed first. + It returns true if the record contains some printable members. + The method is used to implement `ToString()`. + + + + + The record includes a synthesized override of object.ToString(). + For `record R(int I) { public int J; }` it prints `R { I = ..., J = ... }`. + + The method can be declared explicitly. It is an error if the explicit + declaration does not match the expected signature or accessibility, or + if the explicit declaration doesn't allow overriding it in a derived type and + the record type is not sealed. + It is an error if either synthesized or explicitly declared method doesn't + override `object.ToString()` (for example, due to shadowing in intermediate base types, etc.). + + + + + Represents the compiler generated value parameter for property/event accessor. + This parameter has no source location/syntax, but may have attributes. + Attributes with 'param' target specifier on the accessor must be applied to the this parameter. + + + + + Represents a compiler generated backing field for an automatically implemented property. + + + + + A container synthesized for a lambda, iterator method, or async method. + + + + + Represents a compiler generated and embedded attribute type. + This type has the following properties: + 1) It is non-generic, sealed, internal, non-static class. + 2) It derives from System.Attribute + 3) It has Microsoft.CodeAnalysis.EmbeddedAttribute + 4) It has System.Runtime.CompilerServices.CompilerGeneratedAttribute + + + + + Represents a compiler generated and embedded attribute type with a single default constructor + + + + + Represents an interactive code entry point that is inserted into the compilation if there is not an existing one. + + + + A synthesized entrypoint that forwards all calls to an async Main Method + + + The syntax for the user-defined asynchronous main method. + + + The user-defined asynchronous main method. + + + + Represents __value field of an enum. + + + + + Event accessor that has been synthesized for a field-like event declared in source, + or for an event re-abstraction in an interface. + + + Associated with and . + + + + + Represents a compiler generated field. + + + Represents a compiler generated field of given type and name. + + + + + Represents a compiler generated field or captured variable. + + + + + Represents a compiler generated synthesized method symbol + that must be emitted in the compiler generated + PrivateImplementationDetails class + + + + + Synthesized methods that must be emitted in the compiler generated + PrivateImplementationDetails class have null containing type symbol. + + + + + A base class for synthesized methods that want a this parameter. + + + + + Returns data decoded from Obsolete attribute or null if there is no Obsolete attribute. + This property returns ObsoleteAttributeData.Uninitialized if attribute arguments haven't been decoded yet. + + + + + A synthesized local variable. + + + + + Throws an exception of a given type using a parameterless constructor. + + + + + Represents a simple compiler generated parameter of a given type. + + + + + For each parameter of a source method, construct a corresponding synthesized parameter + for a destination method. + + Has parameters. + Needs parameters. + Synthesized parameters to add to destination method. + + + + The corresponding . + + + + + A type parameter for a synthesized class or method. + + + + + Throws a System.ArgumentNullException if 'argument' is null. + + + + + Throws a System.ArgumentNullException with the given 'paramName'. + + + + + Throws a 'System.Runtime.CompilerServices.SwitchExpressionException' with the given 'unmatchedValue'. + + + + + Compiler should always be synthesizing locals with correct escape semantics. + Checking escape scopes is not valid here. + + + + + Represents a field of a tuple type (such as (int, byte).Item1) + that doesn't have a corresponding backing field within the tuple underlying type. + Created in response to an error condition. + + + + + If this field represents a tuple element with index X + 2X if this field represents Default-named element + 2X + 1 if this field represents Friendly-named element + Otherwise, (-1 - [index in members array]); + + + + + If this is a field representing a tuple element, + returns the index of the element (zero-based). + Otherwise returns -1 + + + + + A plain TupleElementFieldSymbol (as opposed to a TupleVirtualElementFieldSymbol) represents + an element field of a tuple type (such as (int, byte).Item1) that is backed by a real field + with the same name within the tuple underlying type. + + Note that original tuple fields (like 'System.ValueTuple`2.Item1') do not get wrapped. + + + + + If this field represents a tuple element with index X + 2X if this field represents Default-named element + 2X + 1 if this field represents Friendly-named element + + + + + If this is a field representing a tuple element, + returns the index of the element (zero-based). + Otherwise returns -1 + + + + + Represents an element field of a tuple type that is not backed by a real field + with the same name within the tuple type. + + Examples + // alias to Item1 with a different name + (int a, byte b).a + + // not backed directly by the type + (int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8).i8 + + // Item8, which is also not backed directly by the type + (int, int, int, int, int, int, int, int).Item8 + + NOTE: For any virtual element, there is a nonvirtual way to access the same underlying field. + In scenarios where we need to enumerate actual fields of a struct, + virtual fields should be ignored. + + + + + Utility class for substituting actual type arguments for formal generic type parameters. + + + + + The effective "bounds" of a type parameter: the constraint types, effective + interface set, and effective base type, determined from the declared + constraints, with any cycles removed. The fields are exposed by the + TypeParameterSymbol as ConstraintTypes, Interfaces, and BaseType. + + + + + Creates a "late" bound instance with all fields set. + + + + + The type parameters, classes, and interfaces explicitly declared as + constraint types on the containing type parameter, with cycles removed. + + + + + The set of interfaces explicitly declared on the containing type + parameter and any type parameters on which the containing + type parameter depends, with duplicates removed. + + + + + As defined in 10.1.5 of the specification. + + + + + The "exact" effective base type. + In the definition of effective base type we abstract some concrete types to their base classes: + * For each constraint of T that is a struct-type, R contains System.ValueType. + * For each constraint of T that is an enumeration type, R contains System.Enum. + * For each constraint of T that is a delegate type, R contains System.Delegate. + * For each constraint of T that is an array type, R contains System.Array. + * For each constraint of T that is a class-type C, R contains type C' which is constructed + from C by replacing all occurrences of dynamic with object. + The reason is that the CLR doesn't support operations on generic parameters that would be needed + to work with these types. For example, ldelem instruction requires the receiver to be a specific array, + not a type parameter constrained to be an array. + + When computing the deduced type we don't perform this abstraction. We keep the original constraint T. + Deduced base type is used to check that consistency rules are satisfied. + + + + + A TypeSymbol is a base class for all the symbols that represent a type + in C#. + + + + + + + + + + key = interface method/property/event compared using , + value = explicitly implementing methods/properties/events declared on this type (normally a single value, multiple in case of + an error). + + + + + The original definition of this symbol. If this symbol is constructed from another + symbol by type substitution then OriginalDefinition gets the original symbol as it was defined in + source or metadata. + + + + + Gets the BaseType of this type. If the base type could not be determined, then + an instance of ErrorType is returned. If this kind of type does not have a base type + (for example, interfaces), null is returned. Also the special class System.Object + always has a BaseType of null. + + + + + Gets the set of interfaces that this type directly implements. This set does not include + interfaces that are base interfaces of directly implemented interfaces. + + + + + The list of all interfaces of which this type is a declared subtype, excluding this type + itself. This includes all declared base interfaces, all declared base interfaces of base + types, and all declared base interfaces of those results (recursively). Each result + appears exactly once in the list. This list is topologically sorted by the inheritance + relationship: if interface type A extends interface type B, then A precedes B in the + list. This is not quite the same as "all interfaces of which this type is a proper + subtype" because it does not take into account variance: AllInterfaces for + IEnumerable<string> will not include IEnumerable<object> + + + + + If this is a type parameter returns its effective base class, otherwise returns this type. + + + + + Returns true if this type derives from a given type. + + + + + Returns true if this type is equal or derives from a given type. + + + + + Determines if this type symbol represent the same type as another, according to the language + semantics. + + The other type. + + What kind of comparison to use? + You can ignore custom modifiers, ignore the distinction between object and dynamic, or ignore tuple element names differences. + + True if the types are equivalent. + + + + We ignore custom modifiers, and the distinction between dynamic and object, when computing a type's hash code. + + + + + Produce all implemented interfaces in topologically sorted order. We use + TypeSymbol.Interfaces as the source of edge data, which has had cycles and infinitely + long dependency cycles removed. Consequently, it is possible (and we do) use the + simplest version of Tarjan's topological sorting algorithm. + + + + Gets the set of interfaces that this type directly implements, plus the base interfaces + of all such types. Keys are compared using , + values are distinct interfaces corresponding to the key, according to rules. + + + CONSIDER: it probably isn't truly necessary to cache this. If space gets tight, consider + alternative approaches (recompute every time, cache on the side, only store on some types, + etc). + + + + + Returns the corresponding symbol in this type or a base type that implements + interfaceMember (either implicitly or explicitly), or null if no such symbol exists + (which might be either because this type doesn't implement the container of + interfaceMember, or this type doesn't supply a member that successfully implements + interfaceMember). + + + Must be a non-null interface property, method, or event. + + + + + Returns true if this type is known to be a reference type. It is never the case that + IsReferenceType and IsValueType both return true. However, for an unconstrained type + parameter, IsReferenceType and IsValueType will both return false. + + + + + Returns true if this type is known to be a value type. It is never the case that + IsReferenceType and IsValueType both return true. However, for an unconstrained type + parameter, IsReferenceType and IsValueType will both return false. + + + + + Gets the kind of this type. + + + + + Gets corresponding special TypeId of this type. + + + Not preserved in types constructed from this one. + + + + + Gets corresponding primitive type code for this type declaration. + + + + + Returns true if the error code is highest priority while calculating use site error for this symbol. + + + + + Is this a symbol for an anonymous type (including delegate). + + + + + Is this a symbol for a Tuple. + + + + + True if the type represents a native integer. In C#, the types represented + by language keywords 'nint' and 'nuint' on platforms where they are not unified + with 'System.IntPtr' and 'System.UIntPtr'. + + + + + Verify if the given type is a tuple of a given cardinality, or can be used to back a tuple type + with the given cardinality. + + + + + If this symbol represents a tuple type, get the types of the tuple's elements. + + + + + If this symbol represents a tuple type, get the names of the tuple's elements. + + + + + If this symbol represents a tuple type, get the fields for the tuple's elements. + Otherwise, returns default. + + + + + Is this type a managed type (false for everything but enum, pointer, and + some struct types). + + + See Type::computeManagedType. + + + + + Indicates whether a type is managed or not (i.e. you can take a pointer to it). + Contains additional cases to help implement FeatureNotAvailable diagnostics. + + + + + Merges features of the type with another type where there is an identity conversion between them. + The features to be merged are + object vs dynamic (dynamic wins), tuple names (dropped in case of conflict), and nullable + annotations (e.g. in type arguments). + + + + + Returns true if the type may contain embedded references + + + + + Returns true if the type is a readonly struct + + + + + Locate implementation of the in context of the current type. + The method is using cache to optimize subsequent calls for the same . + + Member for which an implementation should be found. + + The process of looking up an implementation for an accessor can involve figuring out how corresponding event/property is implemented, + . And the process of looking up an implementation for a property can + involve figuring out how corresponding accessors are implemented, . This can + lead to cycles, which could be avoided if we ignore the presence of implementations in interfaces for the purpose of + . Fortunately, logic in it allows us to ignore the presence of + implementations in interfaces and we use that. + When the value of this parameter is true and the result that takes presence of implementations in interfaces into account is not + available from the cache, the lookup will be performed ignoring the presence of implementations in interfaces. Otherwise, result from + the cache is returned. + When the value of the parameter is false, the result from the cache is returned, or calculated, taking presence of implementations + in interfaces into account and then cached. + This means that: + - A symbol from an interface can still be returned even when is true. + A subsequent call with false will return the same value. + - If symbol from a non-interface is returned when is true. A subsequent + call with false will return the same value. + - If no symbol is returned for true. A subsequent call with + might return a symbol, but that symbol guaranteed to be from an interface. + - If the first request is done with false. A subsequent call + is guaranteed to return the same result regardless of value. + + + + + Performs interface mapping (spec 13.4.4). + + + CONSIDER: we could probably do less work in the metadata and retargeting cases - we won't use the diagnostics. + + A non-null implementable member on an interface type. + The type implementing the interface property (usually "this"). + Bag to which to add diagnostics. + Do not consider implementation in an interface as a valid candidate for the purpose of this computation. + + Returns true when is true, the method fails to locate an implementation and an implementation in + an interface, if any (its presence is not checked), could potentially be a candidate. Returns false otherwise. + When true is returned, a different call with false might return a symbol. That symbol, if any, + is guaranteed to be from an interface. + This parameter is used to optimize caching in . + + The implementing property or null, if there isn't one. + + + + One implementation M1 is considered more specific than another implementation M2 + if M1 is declared on interface T1, M2 is declared on interface T2, and + T1 contains T2 among its direct or indirect interfaces. + + + + + Since dev11 didn't expose a symbol API, it had the luxury of being able to accept a base class's claim that + it implements an interface. Roslyn, on the other hand, needs to be able to point to an implementing symbol + for each interface member. + + DevDiv #718115 was triggered by some unusual metadata in a Microsoft reference assembly (Silverlight System.Windows.dll). + The issue was that a type explicitly implemented the accessors of an interface event, but did not tie them together with + an event declaration. To make matters worse, it declared its own protected event with the same name as the interface + event (presumably to back the explicit implementation). As a result, when Roslyn was asked to find the implementing member + for the interface event, it found the protected event and reported an appropriate diagnostic. What it should have done + (and does do now) is recognize that no event associated with the accessors explicitly implementing the interface accessors + and returned null. + + We resolved this issue by introducing a new step into the interface mapping algorithm: after failing to find an explicit + implementation in a type, but before searching for an implicit implementation in that type, check for an explicit implementation + of an associated accessor. If there is such an implementation, then immediately return the associated property or event, + even if it is null. That is, never attempt to find an implicit implementation for an interface property or event with an + explicitly implemented accessor. + + + + + If we were looking for an accessor, then look for an accessor on the implementation of the + corresponding interface property/event. If it is valid as an implementation (ignoring the name), + then prefer it to our current result if: + 1) our current result is null; or + 2) our current result is on the same type. + + If there is no corresponding accessor on the implementation of the corresponding interface + property/event and we found an accessor, then the accessor we found is invalid, so clear it. + + + + + These diagnostics are for members that do implicitly implement an interface member, but do so + in an undesirable way. + + + + + These diagnostics are for members that almost, but not actually, implicitly implement an interface member. + + + + + Determine a better location for diagnostic squiggles. Squiggle the interface rather than the class. + + + + + Search the declared members of a type for one that could be an implementation + of a given interface member (depending on interface declarations). + + The interface member being implemented. + True if the implementing type is from some compilation (i.e. not from metadata). + The type on which we are looking for a declared implementation of the interface member. + A member on currType that could implement the interface, or null. + A member on currType that could have been an attempt to implement the interface, or null. + + There is some similarity between this member and OverriddenOrHiddenMembersHelpers.FindOverriddenOrHiddenMembersInType. + When making changes to this member, think about whether or not they should also be applied in MemberSymbol. + One key difference is that custom modifiers are considered when looking up overridden members, but + not when looking up implicit implementations. We're preserving this behavior from Dev10. + + + + + To implement an interface member, a candidate member must be public, non-static, and have + the same signature. "Have the same signature" has a looser definition if the type implementing + the interface is from source. + + + PROPERTIES: + NOTE: we're not checking whether this property has at least the accessors + declared in the interface. Dev10 considers it a match either way and, + reports failure to implement accessors separately. + + If the implementing type (i.e. the type with the interface in its interface + list) is in source, then we can ignore custom modifiers in/on the property + type because they will be copied into the bridge property that explicitly + implements the interface property (or they would be, if we created such + a bridge property). Bridge *methods* (not properties) are inserted in + SourceMemberContainerTypeSymbol.SynthesizeInterfaceMemberImplementation. + + CONSIDER: The spec for interface mapping (13.4.4) could be interpreted to mean that this + property is not an implementation unless it has an accessor for each accessor of the + interface property. For now, we prefer to represent that case as having an implemented + property and an unimplemented accessor because it makes finding accessor implementations + much easier. If we decide that we want the API to report the property as unimplemented, + then it might be appropriate to keep current result internally and just check the accessors + before returning the value from the public API (similar to the way MethodSymbol.OverriddenMethod + filters MethodSymbol.OverriddenOrHiddenMembers. + + + + + If implementation of an interface method will be accompanied with + a MethodImpl entry in metadata, information about which isn't already exposed through + API, this method returns the "Body" part + of the MethodImpl entry, i.e. the method that implements the . + Some of the MethodImpl entries could require synthetic forwarding methods. In such cases, + the result is the method that the language considers to implement the , + rather than the forwarding method. In other words, it is the method that the forwarding method forwards to. + + The interface method that is going to be implemented by using synthesized MethodImpl entry. + + + + + Returns information about interface method implementations that will be accompanied with + MethodImpl entries in metadata, information about which isn't already exposed through + API. The "Body" is the method that + implements the interface method "Implemented". + Some of the MethodImpl entries could require synthetic forwarding methods. In such cases, + the "Body" is the method that the language considers to implement the interface method, + the "Implemented", rather than the forwarding method. In other words, it is the method that + the forwarding method forwards to. + + + + + The set of abstract members in declared in this type or declared in a base type and not overridden. + + + + + Represents the method by which this type implements a given interface type + and/or the corresponding diagnostics. + + + + + Assuming that nullable annotations are enabled: + T => true + T where T : struct => false + T where T : class => false + T where T : class? => true + T where T : IComparable => true + T where T : IComparable? => true + T where T : notnull => true + + + In C#9, annotations are allowed regardless of constraints. + + + + + Assuming that nullable annotations are enabled: + T => true + T where T : struct => false + T where T : class => false + T where T : class? => true + T where T : IComparable => false + T where T : IComparable? => true + + + + + Is this System.Nullable`1 type, or its substitution. + + To check whether a type is System.Nullable`1 or is a type parameter constrained to System.Nullable`1 + use instead. + + + + + Determines if the given type is a valid attribute parameter type. + + Type to validated + compilation + + + + + Gets the typed constant kind for the given attribute parameter type. + + Type to validated + compilation + TypedConstantKind for the attribute parameter type. + + + + Returns true if the type is constructed from a generic type named "System.Linq.Expressions.Expression" + with one type parameter. + + + + + Returns true if the type is a non-generic type named "System.Linq.Expressions.Expression" + or "System.Linq.Expressions.LambdaExpression". + + + + + Returns true if the type is constructed from a generic type named "System.Linq.Expressions.Expression" + with one type parameter, or if the type is a non-generic type named "System.Linq.Expressions.Expression" + or "System.Linq.Expressions.LambdaExpression". + + + + + return true if the type is constructed from a generic interface that + might be implemented by an array. + + + + + Return the default value constant for the given type, + or null if the default value is not a constant. + + + + + Visit the given type and, in the case of compound types, visit all "sub type" + (such as A in A[], or { A<T>, T, U } in A<T>.B<U>) invoking 'predicate' + with the type and 'arg' at each sub type. If the predicate returns true for any type, + traversal stops and that type is returned from this method. Otherwise if traversal + completes without the predicate returning true for any type, this method returns null. + + + + + Visit the given type and, in the case of compound types, visit all "sub type". + One of the predicates will be invoked at each type. If the type is a + TypeWithAnnotations, + will be invoked; otherwise will be invoked. + If the corresponding predicate returns true for any type, + traversal stops and that type is returned from this method. Otherwise if traversal + completes without the predicate returning true for any type, this method returns null. + + If true, use + instead of to avoid early resolution of nullable types + + + + (null TypeParameterSymbol "parameter"): Checks if the given type is a type parameter + or its referent type is a type parameter (array/pointer) or contains a type parameter (aggregate type) + (non-null TypeParameterSymbol "parameter"): above + also checks if the type parameter + is the same as "parameter" + + + + + Return true if the type contains any dynamic type reference. + + + + + Return true if the type contains any tuples. + + + + + Return true if the type contains any tuples with element names. + + + + + Return true if the type contains any function pointer types. + + + + + Guess the non-error type that the given type was intended to represent. + If the type itself is not an error type, then it will be returned. + Otherwise, the underlying type (if any) of the error type will be + returned. + + + Any non-null type symbol returned is guaranteed not to be an error type. + + It is possible to pass in a constructed type and received back an + unconstructed type. This can occur when the type passed in was + constructed from an error type - the underlying definition will be + available, but there won't be a good way to "re-substitute" back up + to the level of the specified type. + + + + + Guess the non-error type kind that the given type was intended to represent, + if possible. If not, return TypeKind.Error. + + + + + Returns true if the type was a valid switch expression type in C# 6. We use this test to determine + whether or not we should attempt a user-defined conversion from the type to a C# 6 switch governing + type, which we support for compatibility with C# 6 and earlier. + + + + + Returns true if the type is one of the restricted types, namely: , + , or . + or a ref-like type. + + + + + Add this instance to the set of checked types. Returns true + if this was added, false if the type was already in the set. + + + + + These special types are structs that contain fields of the same type + (e.g. contains an instance field of type ). + + + + + Compute a hash code for the constructed type. The return value will be + non-zero so callers can used zero to represent an uninitialized value. + + + + + If we are in a COM PIA with embedInteropTypes enabled we should turn properties and methods + that have the type and return type of object, respectively, into type dynamic. If the requisite conditions + are fulfilled, this method returns a dynamic type. If not, it returns the original type. + + A property type or method return type to be checked for dynamification. + Containing type. + + + + + Type variables are never considered reference types by the verifier. + + + + + Type variables are never considered value types by the verifier. + + + + + Return all of the type parameters in this type and enclosing types, + from outer-most to inner-most type. + + + + + Return all of the type parameters in this type and enclosing types, + from outer-most to inner-most type. + + + + + Return the nearest type parameter with the given name in + this type or any enclosing type. + + + + + Return the nearest type parameter with the given name in + this symbol or any enclosing symbol. + + + + + Return true if the fully qualified name of the type's containing symbol + matches the given name. This method avoids string concatenations + in the common case where the type is a top-level type. + + + + + Returns true if the type is generic or non-generic custom task-like type due to the + [AsyncMethodBuilder(typeof(B))] attribute. It returns the "B". + + + For the Task types themselves, this method might return true or false depending on mscorlib. + The definition of "custom task-like type" is one that has an [AsyncMethodBuilder(typeof(B))] attribute, + no more, no less. Validation of builder type B is left for elsewhere. This method returns B + without validation of any kind. + + + + + Replace Task-like types with Task types. + + + + + Replace Task-like types with Task types. Returns true if there were changes. + + + + + Count the custom modifiers within the specified TypeSymbol. + Potentially non-zero for arrays, pointers, and generic instantiations. + + + + + Check for custom modifiers within the specified TypeSymbol. + Potentially true for arrays, pointers, and generic instantiations. + + + A much less efficient implementation would be CustomModifierCount() == 0. + CONSIDER: Could share a backing method with CustomModifierCount. + + + + + Return true if this type can unify with the specified type + (i.e. is the same for some substitution of type parameters). + + + + + Used when iterating through base types in contexts in which the caller needs to avoid cycles and can't use BaseType + (perhaps because BaseType is in the process of being computed) + + + + + + + + + + A struct that combines a single type with annotations + + + + + The underlying type, unless overridden by _extensions. + + + + + Additional data or behavior. Such cases should be + uncommon to minimize allocations. + + + + + True if the fields are unset. Appropriate when detecting if a lazily-initialized variable has been initialized. + + + + + True if the type is not null. + + + + + If this is a lazy nullable type pending resolution, forces this to be resolved. + + + + + Merges top-level and nested nullability, dynamic/object, and tuple names from an otherwise equivalent type. + + + + + Is this System.Nullable`1 type, or its substitution. + + To check whether a type is System.Nullable`1 or is a type parameter constrained to System.Nullable`1 + use instead. + + + + + The list of custom modifiers, if any, associated with the . + + + + + Extract type under assumption that there should be no custom modifiers or annotations. + The method asserts otherwise. + + + + + Is this the given type parameter? + + + + + Used by callers before calling CSharpCompilation.EnsureNullableAttributeExists(). + + + This method ignores any [NullableContext]. For example, if there is a [NullableContext(1)] + at the containing type, and this type reference is oblivious, NeedsNullableAttribute() + will return false even though a [Nullable(0)] will be emitted for this type reference. + In practice, this shouldn't be an issue though since EnsuresNullableAttributeExists() + will have returned true for at least some of other type references that required + [Nullable(1)] and were subsequently aggregated to the [NullableContext(1)]. + + + + + If the type is a non-generic value type or Nullable<>, and + is not a type parameter, the nullability is not included in the byte[]. + + + + + Used by the generated . + + + + + Used by the generated . + + + + + Compute the flow state resulting from reading from an lvalue. + + + + + Additional data or behavior beyond the core TypeWithAnnotations. + + + + + Nullable type parameter. The underlying TypeSymbol is resolved + lazily to avoid cycles when binding declarations. + + + + + A type and its corresponding flow state resulting from evaluating an rvalue expression. + + + + + Creates a new for testing purposes, + which does not verify that the containing symbol matches the original containing symbol. + + + + + This class groups together all of the functionality needed to check for error CS1961, ERR_UnexpectedVariance. + Its functionality is accessible through the NamedTypeSymbol extension method CheckInterfaceVarianceSafety and + the MethodSymbol extension method CheckMethodVarianceSafety (for checking delegate Invoke). + + + + + Accumulate diagnostics related to the variance safety of an interface. + + + + + Check for illegal nesting into a variant interface. + + + + + Accumulate diagnostics related to the variance safety of a delegate. + + + + + Accumulate diagnostics related to the variance safety of an interface method. + + + + + Accumulate diagnostics related to the variance safety of an interface property. + + + + + Accumulate diagnostics related to the variance safety of an interface event. + + + + + Accumulate diagnostics related to the variance safety of an interface method/property parameter. + + + + + Accumulate diagnostics related to the variance safety of an interface method type parameters. + + + + + Returns true if the type is output-unsafe or input-unsafe, as defined in the C# spec. + Roughly, a type is output-unsafe if it could not be the return type of a method and + input-unsafe if it could not be a parameter type of a method. + + + This method is intended to match spec section 13.1.3.1 as closely as possible + (except that the output-unsafe and input-unsafe checks are merged). + + + + + 3) T is an interface, class, struct, enum, or delegate type ]]> constructed + from a generic type ]]> where for at least one A_i one + of the following holds: + a) X_i is covariant or invariant and A_i is output-unsafe [input-unsafe] + b) X_i is contravariant or invariant and A_i is input-unsafe [output-unsafe] (note: spec has "input-safe", but it's a typo) + + + Slight rewrite to make it more idiomatic for C#: + a) X_i is covariant and A_i is input-unsafe + b) X_i is contravariant and A_i is output-unsafe + c) X_i is invariant and A_i is input-unsafe or output-unsafe + + + + + Add an ERR_UnexpectedVariance diagnostic to the diagnostic bag. + + Diagnostic bag. + Type parameter that is not variance safe. + Context in which type is not variance safe (e.g. method). + Callback to provide location. + Callback argument. + Desired variance of type. + + + + Represents an event that is based on another event. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + The underlying EventSymbol. + + + + + Represents a field that is based on another field. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + The underlying FieldSymbol. + + + + + Represents a method that is based on another method. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + Represents a named type that is based on another named type. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + The underlying NamedTypeSymbol. + + + + + Represents a parameter that is based on another parameter. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + Represents a property that is based on another property. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + The underlying PropertySymbol. + + + + + Represents a type parameter that is based on another type parameter. + When inheriting from this class, one shouldn't assume that + the default behavior it has is appropriate for every case. + That behavior should be carefully reviewed and derived type + should override behavior as appropriate. + + + + + The underlying TypeParameterSymbol, cannot be another RetargetingTypeParameterSymbol. + + + + + Traverses the symbol table checking for CLS compliance. + + + + + + + + Gets a value indicating whether is allowed to analyze in parallel. + + + + + Traverses the symbol table checking for CLS compliance. + + Compilation that owns the symbol table. + Will be supplemented with documentation comment diagnostics. + To stop traversing the symbol table early. + Only report diagnostics from this syntax tree, if non-null. + If and is non-null, report diagnostics within this span in the . + + + False if no further checks are required (because they would be cascading). + + + + BREAK: Dev11 reports WRN_CLS_ArrayArgumentToAttribute on all symbols, whereas roslyn reports it only + on accessible symbols. + + + + True if the symbol is okay (i.e. no warnings). + + + + NOTE: Dev11 behavior - First, it ignores arity, + which seems like a good way to disambiguate symbols (in particular, + CLS Rule 43 says that the name includes backtick-arity). Second, it + does not consider two members with identical names (i.e. not differing + in case) to collide. + + + + + This check (the only one that uses the "context" parameter is based on CLS Rule 46, + as implemented by LangCompiler::IsCLSAccessible. The idea is that C<int> and C<char> + are separate types in CLS, so they can't touch each other's protected members. + TODO: This should really have a separate error code - it's logically separate and requires explanation. + + Check the accessibility of this type (probably a parameter or return type). + Context for the accessibility check (e.g. containing type of method with as a parameter type. + + + + As in dev11, we ignore the fact that CLSCompliantAttribute is inherited (i.e. from the base type) + (see CSemanticChecker::CheckSymForCLS). This should only affect types where the syntactic parent + and the inheritance parent disagree. + + + + + Based on CompilationPass::CLSReduceSignature. + + + + + Traverses the symbol table processing XML documentation comments and optionally writing them to + a provided stream. + + + + + Traverses the symbol table processing XML documentation comments and optionally writing them to + a provided stream. + + Compilation that owns the symbol table. + Assembly name override, if specified. Otherwise the of the source assembly is used. + Stream to which XML will be written, if specified. + Will be supplemented with documentation comment diagnostics. + To stop traversing the symbol table early. + Only report diagnostics from this syntax tree, if non-null. + If and filterSpanWithinTree is non-null, report diagnostics within this span in the . + + + + Gets the XML that would be written to the documentation comment file for this assembly. + + The symbol for which to retrieve documentation comments. + True to treat includes as semantically meaningful (pull in contents from other files and bind crefs, etc). + To stop traversing the symbol table early. + + + + Write header, descend into members, and write footer. + + + + + Write own documentation comments and then descend into members. + + + + + Compile documentation comments on the symbol and write them to the stream if one is provided. + + + + + Loop over the DocumentationCommentTriviaSyntaxes. Gather + 1) concatenated XML, as a string; + 2) whether or not the XML is valid; + 3) set of type parameters covered by <typeparam> elements; + 4) set of parameters covered by <param> elements; + 5) list of <include> elements, as SyntaxNodes. + + True, if at least one documentation comment was processed; false, otherwise. + This was factored out for clarity, not because it's reusable. + + + + Similar to SymbolExtensions.GetParameters, but returns empty for unsupported symbols + and handles delegates. + + + + + Similar to SymbolExtensions.GetMemberTypeParameters, but returns empty for unsupported symbols. + + + + + A symbol requires a documentation comment if it was explicitly declared and + will be visible outside the current assembly (ignoring InternalsVisibleTo). + Exception: accessors do not require doc comments. + + + + + Get all of the DocumentationCommentTriviaSyntax associated with any declaring syntax of the + given symbol (except for partial methods, which only consider the part with the body). + + True if the nodes are all valid XML. + + + + Given the full text of a documentation comment, strip off the comment punctuation (///, /**, etc) + and add appropriate indentations. + + + + + Given a string, find the index of the first non-whitespace char. + + The string to search + The index of the first non-whitespace char in the string + + + + Find the first non-whitespace character in a given substring. + + The string to search + The start index + The last index (non-inclusive) + The index of the first non-whitespace char after index start in the string up to, but not including the end index + + + + Determine if the given string starts with the given prefix if whitespace + is first trimmed from the beginning. + + The string to search + The prefix + true if str.TrimStart().StartsWith(prefix) + + + + Given a string which may contain newline sequences, get the index of the first newline + sequence beginning at the given starting index. + + The string to split. + The starting index within the string. + The length of the newline sequence discovered. 0 if the end of the string was reached, otherwise either 1 or 2 chars + The index of the start of the first newline sequence following the start index + + + + Given the full text of a single-line style documentation comment, for each line, strip off + the comment punctuation (///) and add appropriate indentations. + + + + + Given the full text of a multi-line style documentation comment, broken into lines, strip off + the comment punctuation (/**, */, etc) and add appropriate indentations. + + + + + Remove "*/" and any following text, if it is present. + + + + + Return the longest prefix matching [whitespace]*[*][whitespace]*. + + + + + Return the longest common prefix of two strings + + + + + Bind a CrefSyntax and unwrap the result if it's an alias. + + + Does not respect DocumentationMode, so use a temporary bag if diagnostics are not desired. + + + + + Given a cref syntax that cannot be resolved, get the string that will be written to + the documentation file in place of a documentation comment ID. + + + + + Bind an XmlNameAttributeSyntax and update the sets of documented parameters and type parameters. + + + Does not respect DocumentationMode, so do not call unless diagnostics are desired. + + + + + WORKAROUND: + We're taking a dependency on the location and structure of a framework assembly resource. This is not a robust solution. + + Possible alternatives: + 1) Polish our XML parser until it matches MSXML. We don't want to reinvent the wheel. + 2) Build a map that lets us go from XML string positions back to source positions. + This is what the native compiler did, and it was a lot of work. We'd also still need to modify the message. + 3) Do not report a diagnostic. This is very unhelpful. + 4) Report a vague diagnostic (i.e. there's a problem somewhere in this doc comment). This is relatively unhelpful. + 5) Always report the message in English, so that we can pull it apart without needing to consume resource files. + This engenders a lot of ill will. + 6) Report the exception message without modification and (optionally) include the text with respect to which the + position is specified. This would not look sufficiently polished. + + + + + Walks a DocumentationCommentTriviaSyntax, binding the semantically meaningful parts + to produce diagnostics and to replace source crefs with documentation comment IDs. + + + + + Writes the matching 'param' tags on a primary constructor as 'summary' tags for a synthesized record property. + + + Still has all of the comment punctuation (///, /**, etc). associated with the 'param' tag. + + + + + Given a DocumentationCommentTriviaSyntax, return the full text, but with + documentation comment IDs substituted into crefs. + + + Still has all of the comment punctuation (///, /**, etc). + + + + + Rewrites nodes in , which is a snapshot of nodes from the original document. + We're mutating the tree as we rewrite, so it's important to grab a snapshot of the + nodes that we're going to reparent before we enumerate them. + + + + + This method boils down to Rewrite(XDocument.Load(fileAttrValue).XPathSelectElements(pathAttrValue)). + Everything else is error handling. + + + + + Respects the DocumentationMode at the source location. + + + + + Respects the DocumentationMode at the source location. + + + + + Contains methods related to synthesizing bound nodes in initial binding + form that needs lowering, primarily method bodies for compiler-generated methods. + + + + + Generates a submission initialization part of a Script type constructor that represents an interactive submission. + + + The constructor takes a parameter of type Microsoft.CodeAnalysis.Scripting.Session - the session reference. + It adds the object being constructed into the session by calling Microsoft.CSharp.RuntimeHelpers.SessionHelpers.SetSubmission, + and retrieves strongly typed references on all previous submission script classes whose members are referenced by this submission. + The references are stored to fields of the submission (). + + + + + Construct a body for an auto-property accessor (updating or returning the backing field). + + + + + Generate an accessor for a field-like event. + + + + + Generate a thread-safe accessor for a WinRT field-like event. + + Add: + return EventRegistrationTokenTable<Event>.GetOrCreateEventRegistrationTokenTable(ref _tokenTable).AddEventHandler(value); + + Remove: + EventRegistrationTokenTable<Event>.GetOrCreateEventRegistrationTokenTable(ref _tokenTable).RemoveEventHandler(value); + + + + + Generate a thread-safe accessor for a regular field-like event. + + DelegateType tmp0 = _event; //backing field + DelegateType tmp1; + DelegateType tmp2; + do { + tmp1 = tmp0; + tmp2 = (DelegateType)Delegate.Combine(tmp1, value); //Remove for -= + tmp0 = Interlocked.CompareExchange<DelegateType>(ref _event, tmp2, tmp1); + } while ((object)tmp0 != (object)tmp1); + + Note, if System.Threading.Interlocked.CompareExchange<T> is not available, + we emit the following code and mark the method Synchronized (unless it is a struct). + + _event = (DelegateType)Delegate.Combine(_event, value); //Remove for -= + + + + + + Look for a base type method named "Finalize" that is protected (or protected internal), has no parameters, + and returns void. It doesn't need to be virtual or a destructor. + + + You may assume that this would share code and logic with PEMethodSymbol.OverridesRuntimeFinalizer, + but FUNCBRECCS::bindDestructor has its own loop that performs these checks (differently). + + + + + In some circumstances (e.g. implicit implementation of an interface method by a non-virtual method in a + base type from another assembly) it is necessary for the compiler to generate explicit implementations for + some interface methods. They don't go in the symbol table, but if we are emitting, then we should + generate code for them. + + + + + entryPointOpt is only considered for synthesized methods (to recognize the synthesized MoveNext method for async Main) + + + + + When compiling in metadata-only mode, is not run. This is problematic because + adds synthesized explicit implementations to the list of synthesized definitions. + In lieu of running , this class performs a quick + traversal of the symbol table and performs processing of synthesized symbols if necessary + + + + + Traverse the symbol table and call Module.AddSynthesizedDefinition for each + synthesized explicit implementation stub that has been generated (e.g. when the real + implementation doesn't have the appropriate custom modifiers). + + + + + Represents the state of compilation of one particular type. + This includes, for example, a collection of synthesized methods created during lowering. + + + WARNING: Note that the collection class is not thread-safe and will + need to be revised if emit phase is changed to support multithreading when + translating a particular type. + + + + Synthesized method info + + + Flat array of created methods, non-empty if not-null + + + + Map of wrapper methods created for base access of base type virtual methods from + other classes (like those created for lambdas...); actually each method symbol will + only need one wrapper to call it non-virtually. + + + + + Type symbol being compiled, or null if we compile a synthesized type that doesn't have a symbol (e.g. PrivateImplementationDetails). + + + + + The builder for generating code, or null if not in emit phase. + + + + + Any generated methods that don't suppress debug info will use this + list of debug imports. + + + + + A graph of method->method references for this(...) constructor initializers. + Used to detect and report initializer cycles. + + + + + The type for which this compilation state is being used. + + + + + The type passed to the runtime binder as context. + + + + + Add a 'regular' synthesized method. + + + + + Add a 'wrapper' synthesized method and map it to the original one so it can be reused. + + + Wrapper methods are created for base access of base type virtual methods from + other classes (like those created for lambdas...). + + + + The index of the next wrapped method to be used + + + + Get a 'wrapper' method for the original one. + + + Wrapper methods are created for base access of base type virtual methods from + other classes (like those created for lambdas...). + + + + Free resources allocated for this method collection + + + + Report an error if adding the edge (method1, method2) to the ctor-initializer + graph would add a new cycle to that graph. + + a calling ctor + the chained-to ctor + where to report a cyclic error if needed + a diagnostic bag for receiving the diagnostic + + + + Represents various options that affect compilation, such as + whether to emit an executable or a library, whether to optimize + generated code, and so on. + + + + + Allow unsafe regions (i.e. unsafe modifiers on members and unsafe blocks). + + + + + Global namespace usings. + + + + + Flags applied to the top-level binder created for each syntax tree in the compilation + as well as for the binder of global imports. + + + + + Global Nullable context options. + + + + + Determines if the given raw kind value belongs to the C# enumeration. + + The raw value to test. + when the raw value belongs to the C# syntax kind; otherwise, . + + + + Returns for from property. + + + + + Returns for from property. + + + + + Returns for from property. + + + + + Returns for from property. + + + + + Insert one or more tokens in the list at the specified index. + + A new list with the tokens inserted. + + + + Creates a new token with the specified old trivia replaced with computed new trivia. + + + The trivia to be replaced; descendants of the root token. + A function that computes a replacement trivia for + the argument trivia. The first argument is the original trivia. The second argument is + the same trivia rewritten with replaced structure. + + + + Creates a new token with the specified old trivia replaced with a new trivia. The old trivia may appear in + the token's leading or trailing trivia. + + + The trivia to be replaced. + The new trivia to use in the new tree in place of the old + trivia. + + + + Returns this list as a . + + The type of the list elements in the separated list. + + + + + Gets the first directive of the tree rooted by this node. + + + + + Gets the last directive of the tree rooted by this node. + + + + + Gets the semantic information for an ordering clause in an orderby query clause. + + + + + Gets the semantic information associated with a select or group clause. + + + + + Returns what symbol(s), if any, the given expression syntax bound to in the program. + + An AliasSymbol will never be returned by this method. What the alias refers to will be + returned instead. To get information about aliases, call GetAliasInfo. + + If binding the type name C in the expression "new C(...)" the actual constructor bound to + will be returned (or all constructor if overload resolution failed). This occurs as long as C + unambiguously binds to a single type that has a constructor. If C ambiguously binds to multiple + types, or C binds to a static class, then type(s) are returned. + + + + + Returns what 'Add' method symbol(s), if any, corresponds to the given expression syntax + within . + + + + + Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program. + + + + + Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program. + + + + + Returns what symbol(s), if any, the given attribute syntax bound to in the program. + + + + + Gets the semantic information associated with a documentation comment cref. + + + + + Binds the expression in the context of the specified location and gets symbol information. + This method is used to get symbol information about an expression that did not actually + appear in the source code. + + + + + Binds the CrefSyntax expression in the context of the specified location and gets symbol information. + This method is used to get symbol information about an expression that did not actually + appear in the source code. + + + + + Bind the attribute in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information about an attribute + that did not actually appear in the source code. + + + + + Bind the constructor initializer in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information about a constructor + initializer that did not actually appear in the source code. + + NOTE: This will only work in locations where there is already a constructor initializer. + + + + + Bind the constructor initializer in the context of the specified location and get semantic information + about symbols. This method is used to get semantic information about a constructor + initializer that did not actually appear in the source code. + + NOTE: This will only work in locations where there is already a constructor initializer. + . + + + + + Gets type information about a constructor initializer. + + + + + Gets type information about an expression. + + + + + Gets type information about an attribute. + + + + + Binds the expression in the context of the specified location and gets type information. + This method is used to get type information about an expression that did not actually + appear in the source code. + + + + + Gets the underlying information from this . This + must have been created from CSharp code. + + The conversion expression to get original info from. + The underlying . + If the was not created from CSharp code. + + + + Gets the underlying information from this . This + conversion is applied before the operator is applied to the result of this conversion and . + + + This compound assignment must have been created from C# code. + + + + + Gets the underlying information from this . This + conversion is applied after the operator is applied, before the result is assigned to . + + + This compound assignment must have been created from C# code. + + + + + Returns the list of accessible, non-hidden indexers that could be invoked with the given expression as receiver. + + + + + Gets the semantic information associated with a query clause. + + + + + If resolves to an alias name, return the AliasSymbol corresponding + to A. Otherwise return null. + + + + + Binds the name in the context of the specified location and sees if it resolves to an + alias name. If it does, return the AliasSymbol corresponding to it. Otherwise, return null. + + + + + Analyze control-flow within a part of a method body. + + + + + Analyze control-flow within a part of a method body. + + + + + Analyze data-flow within a . + + + + + Analyze data-flow within a initializer. + + + + + Analyze data-flow within an . + + + + + Analyze data-flow within a part of a method body. + + + + + Analyze data-flow within a part of a method body. + + + + + Get a SemanticModel object that is associated with a method body that did not appear in this source code. + Given must lie within an existing method body of the Root syntax node for this SemanticModel. + Locals and labels declared within this existing method body are not considered to be in scope of the speculated method body. + + + + + Get a SemanticModel object that is associated with a method body that did not appear in this source code. + Given must lie within an existing method body of the Root syntax node for this SemanticModel. + Locals and labels declared within this existing method body are not considered to be in scope of the speculated method body. + + + + + Get a SemanticModel object that is associated with a type syntax node that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a type syntax that did not appear in source code. + + + + + Get a SemanticModel object that is associated with a cref syntax node that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a cref syntax that did not appear in source code. + + + + + Get a SemanticModel object that is associated with a statement that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a statement that did not appear in source code. + + + + + Get a SemanticModel object that is associated with an initializer that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a field initializer or default parameter value that did not appear in source code. + + + + + Get a SemanticModel object that is associated with an expression body that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of an expression body that did not appear in source code. + + + + + Get a SemanticModel object that is associated with a constructor initializer that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a constructor initializer that did not appear in source code. + + NOTE: This will only work in locations where there is already a constructor initializer. + + + + + Get a SemanticModel object that is associated with a constructor initializer that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of a constructor initializer that did not appear in source code. + + NOTE: This will only work in locations where there is already a constructor initializer. + + + + + Get a SemanticModel object that is associated with an attribute that did not appear in + this source code. This can be used to get detailed semantic information about sub-parts + of an attribute that did not appear in source code. + + + + + Determines what type of conversion, if any, would be used if a given expression was + converted to a given type. If isExplicitInSource is true, the conversion produced is + that which would be used if the conversion were done for a cast expression. + + + + + Determines what type of conversion, if any, would be used if a given expression was + converted to a given type. If isExplicitInSource is true, the conversion produced is + that which would be used if the conversion were done for a cast expression. + + + + + Given a member declaration syntax, get the corresponding symbol. + + + + + Given a compilation unit syntax, get the corresponding Simple Program entry point symbol. + + + + + Given a namespace declaration syntax node, get the corresponding namespace symbol for + the declaration assembly. + + + + + Given a namespace declaration syntax node, get the corresponding namespace symbol for + the declaration assembly. + + + + + Given a type declaration, get the corresponding type symbol. + + + + + Given a delegate declaration, get the corresponding type symbol. + + + + + Given a enum member declaration, get the corresponding field symbol. + + + + + Given a base method declaration syntax, get the corresponding method symbol. + + + + + Given a syntax node that declares a property, indexer or an event, get the corresponding declared symbol. + + + + + Given a syntax node that declares a property, get the corresponding declared symbol. + + + + + Given a syntax node that declares an indexer, get the corresponding declared symbol. + + + + + Given a syntax node that declares a (custom) event, get the corresponding event symbol. + + + + + Given a syntax node of anonymous object creation initializer, get the anonymous object property symbol. + + + + + Given a syntax node of anonymous object creation expression, get the anonymous object type symbol. + + + + + Given a syntax node of tuple expression, get the tuple type symbol. + + + + + Given a syntax node of a tuple argument, get the tuple element symbol. + + + + + Given a syntax node that declares a property or member accessor, get the corresponding symbol. + + + + + Given a variable declarator syntax, get the corresponding symbol. + + + + + Given a variable declarator syntax, get the corresponding symbol. + + + + + Given a tuple element syntax, get the corresponding symbol. + + + + + Given a labeled statement syntax, get the corresponding label symbol. + + + + + Given a switch label syntax, get the corresponding label symbol. + + + + + Given a using declaration get the corresponding symbol for the using alias that was introduced. + + + + + Given an extern alias declaration get the corresponding symbol for the alias that was introduced. + + + + + Given a parameter declaration syntax node, get the corresponding symbol. + + + + + Given a type parameter declaration (field or method), get the corresponding symbol + + + + + Given a foreach statement, get the symbol for the iteration variable + + + + + Given a catch declaration, get the symbol for the exception variable + + + + + Get the query range variable declared in a join into clause. + + + + + Get the query range variable declared in a query continuation clause. + + + + + Emit the IL for the compilation into the specified stream. + + Compilation. + Path of the file to which the PE image will be written. + Path of the file to which the compilation's debug info will be written. + Also embedded in the output file. Null to forego PDB generation. + + Path of the file to which the compilation's XML documentation will be written. Null to forego XML generation. + Path of the file from which the compilation's Win32 resources will be read (in RES format). + Null to indicate that there are none. + List of the compilation's managed resources. Null to indicate that there are none. + To cancel the emit process. + Compilation or path is null. + Path is empty or invalid. + An error occurred while reading or writing a file. + + + + This class stores several source parsing related options and offers access to their values. + + + + + The default parse options. + + + + + Gets the effective language version, which the compiler uses to select the + language rules to apply to the program. + + + + + Gets the specified language version, which is the value that was specified in + the call to the constructor, or modified using the method, + or provided on the command line. + + + + + Gets the names of defined preprocessor symbols. + + + + + Enable some experimental language features for testing. + + + + + A Declaration summarizes the declaration structure of a source file. Each entity declaration + in the program that is a container (specifically namespaces, classes, interfaces, structs, + and delegate declarations) is represented by a node in this tree. At the top level, the + compilation unit is treated as a declaration of the unnamed namespace. + + Special treatment is required for namespace declarations, because a single namespace + declaration can declare more than one namespace. For example, in the declaration + + namespace A.B.C {} + + we see that namespaces A and B and C are declared. This declaration is represented as three + declarations. All three of these ContainerDeclaration objects contain a reference to the + syntax tree for the declaration. + + A "single" declaration represents a specific namespace or type declaration at a point in + source code. A "root" declaration is a special single declaration which summarizes the + contents of an entire file's types and namespaces. Each source file is represented as a tree + of single declarations. + + A "merged" declaration merges together one or more declarations for the same symbol. For + example, the root namespace has multiple single declarations (one in each source file) but + there is a single merged declaration for them all. Similarly partial classes may have + multiple declarations, grouped together under the umbrella of a merged declaration. In the + common trivial case, a merged declaration for a single declaration contains only that single + declaration. The whole program, consisting of the set of all declarations in all of the + source files, is represented by a tree of merged declarations. + + + + + A declaration table is a device which keeps track of type and namespace declarations from + parse trees. It is optimized for the case where there is one set of declarations that stays + constant, and a specific root namespace declaration corresponding to the currently edited + file which is being added and removed repeatedly. It maintains a cache of information for + "merging" the root declarations into one big summary declaration; this cache is efficiently + re-used provided that the pattern of adds and removes is as we expect. + + + + + Any special attributes we may be referencing through a using alias in the file. + For example using X = System.Runtime.CompilerServices.TypeForwardedToAttribute. + + + + + Creates a root declaration that contains a Script class declaration (possibly in a namespace) and namespace declarations. + Top-level declarations in script code are nested in Script class. + + + + + Returns the original syntax nodes for this type declaration across all its parts. If + is provided, attributes will not be returned if it + is certain there are none that could match the request. This prevents going back to + source unnecessarily. + + + + + Any special attributes we may be referencing directly through a global using alias in the file. + global using X = System.Runtime.CompilerServices.TypeForwardedToAttribute. + + + + + Any diagnostics reported while converting the Namespace/Type syntax into the Declaration + instance. Generally, we determine and store some diagnostics here because we don't want + to have to go back to Syntax when we have our NamespaceSymbol or NamedTypeSymbol. + + + + + Any special attributes we may be referencing directly as an attribute on this type or + through a using alias in the file. For example + using X = System.Runtime.CompilerServices.TypeForwardedToAttribute or + [TypeForwardedToAttribute]. Can be used to avoid having to go back to source + to retrieve attributes when there is no chance they would bind to attribute of interest. + + + + + Simple program uses await expressions. Set only in conjunction with + + + + + Set only in conjunction with + + + + + Set only in conjunction with + + + + + A visitor that generates the part of the documentation comment after the initial type + and colon. + + + + + Matches symbols from an assembly in one compilation to + the corresponding assembly in another. Assumes that only + one assembly has changed between the two compilations. + + + + + Match local declarations to names to generate a map from + declaration to local slot. The names are indexed by slot and the + assumption is that declarations are in the same order as slots. + + + + + Members that are not listed directly on their containing type or namespace symbol as they were synthesized in a lowering phase, + after the symbol has been created. + + + + + A cache of members per type, populated when the first member for a given + type is needed. Within each type, members are indexed by name. The reason + for caching, and indexing by name, is to avoid searching sequentially + through all members of a given kind each time a member is matched. + + + + + Return a version of the baseline with all definitions mapped to this compilation. + Definitions from the initial generation, from metadata, are not mapped since + the initial generation is always included as metadata. That is, the symbols from + types, methods, ... in the TypesAdded, MethodsAdded, ... collections are replaced + by the corresponding symbols from the current compilation. + + + + + Represents a reference to a generic method instantiation, closed over type parameters, + e.g. MyNamespace.Class.Method{T}() + + + + + Represents a reference to a generic type instantiation that is not nested. + e.g. MyNamespace.A{int} + + + + + Represents a reference to a generic type instantiation that is nested in a non-generic type. + e.g. A.B{int} + + + + + Represents a reference to a generic type instantiation. + Subclasses represent nested and namespace types. + + + + + Additional types injected by the Expression Evaluator. + + + + This is a cache of a subset of . We don't include manifest resources in ref assemblies + + + + The behavior of the C# command-line compiler is as follows: + 1) If the /out switch is specified, then the explicit assembly name is used. + 2) Otherwise, + a) if the assembly is executable, then the assembly name is derived from + the name of the file containing the entrypoint; + b) otherwise, the assembly name is derived from the name of the first input + file. + + Since we don't know which method is the entrypoint until well after the + SourceAssemblySymbol is created, in case 2a, its name will not reflect the + name of the file containing the entrypoint. We leave it to our caller to + provide that name explicitly. + + + In cases 1 and 2b, we expect (metadataName == sourceAssembly.MetadataName). + + + + + The compiler-generated implementation type for each fixed-size buffer. + + + + + Returns a value indicating which embedded attributes should be generated during emit phase. + The value is set during binding the symbols that need those attributes, and is frozen on first trial to get it. + Freezing is needed to make sure that nothing tries to modify the value after the value is read. + + + + + Gets a list of documents from the method definitions in the types in or any + nested types of those types. + + + + + Ignore accessibility when resolving well-known type + members, in particular for generic type arguments + (e.g.: binding to internal types in the EE). + + + + + Override the dynamic operation context type for all dynamic calls in the module. + + + + + Builds an array of public type symbols defined in netmodules included in the compilation + and type forwarders defined in this compilation or any included netmodule (in this order). + + + + + Returns a set of top-level forwarded types + + + + + Set the underlying implementation type for a given fixed-size buffer field. + + + + + Given a type , which is either a nullable reference type OR + is a constructed type with a nullable reference type present in its type argument tree, + returns a synthesized NullableAttribute with encoded nullable transforms array. + + + + + Creates the ThrowIfNull and Throw helpers if needed. + + + The ThrowIfNull and Throw helpers are modeled off of the helpers on ArgumentNullException. + https://github.com/dotnet/runtime/blob/22663769611ba89cd92d14cfcb76e287f8af2335/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs#L56-L69 + + + + + Creates the ThrowSwitchExpressionException helper if needed. + + + + + Creates the ThrowSwitchExpressionExceptionParameterless helper if needed. + + + + + Creates the ThrowInvalidOperationException helper if needed. + + + + + Represents a reference to a field of a generic type instantiation. + e.g. + A{int}.Field + A{int}.B{string}.C.Field + + + + + Represents a generic method of a generic type instantiation, closed over type parameters. + e.g. + A{T}.M{S}() + A.B{T}.C.M{S}() + + + + + Represents a reference to an instantiation of a generic type nested in an instantiation of another generic type. + e.g. + A{int}.B{string} + A.B{int}.C.D{string} + + + + + Represents a method of a generic type instantiation. + e.g. + A{int}.M() + A.B{int}.C.M() + + + + + Represents a reference to a type nested in an instantiation of a generic type. + e.g. + A{int}.B + A.B{int}.C.D + + + + + Used only for testing. + + + + + Returns true if the type can be embedded. If the type is defined in a linked (/l-ed) + assembly, but doesn't meet embeddable type requirements, this function returns false + and reports appropriate diagnostics. + + + + + Returns the common value if all bytes are the same value. + Otherwise returns null. + + + + + A diagnostic, along with the location where it occurred. + + + + + Add a diagnostic to the bag. + + + + + + + + + Add a diagnostic to the bag. + + + + + + + + + + Adds diagnostics from useSiteDiagnostics into diagnostics and returns True if there were any errors. + + + + + Adds diagnostics from useSiteDiagnostics into diagnostics and returns True if there were any errors. + + + + Don't call this during a parse--it loads resources + + + Don't call this during a parse--it loads resources + + + Don't call this during a parse--it loads resources + + + + Returns true if this is a build-only diagnostic that is never reported from + API. + Diagnostics generated during compilation phases such as lowering, emit, etc. + are example of build-only diagnostics. + + + + + When converting an anonymous function to a delegate type, there are some diagnostics + that will occur regardless of the delegate type - particularly those that do not + depend on the substituted types (e.g. name uniqueness). Even though we need to + produce a diagnostic in such cases, we do not need to abandon overload resolution - + we can choose the overload that is best without regard to such diagnostics. + + True if seeing the ErrorCode should prevent a delegate conversion + from completing successfully. + + + + WARNING: will resolve lazy diagnostics - do not call this before the member lists are completed + or you could trigger infinite recursion. + + + + + A lazily calculated diagnostic for use of nullable annotations outside of a '#nullable' annotations context. + + + + + A `?` annotation on a type that isn't a value type causes: + - an error before C# 8.0 + - a warning outside of a NonNullTypes context + + + + + An abstract flow pass that takes some shortcuts in analyzing finally blocks, in order to enable + the analysis to take place without tracking exceptions or repeating the analysis of a finally block + for each exit from a try statement. The shortcut results in a slightly less precise + (but still conservative) analysis, but that less precise analysis is all that is required for + the language specification. The most significant shortcut is that we do not track the state + where exceptions can arise. That does not affect the soundness for most analyses, but for those + analyses whose soundness would be affected (e.g. "data flows out"), we track "unassignments" to keep + the analysis sound. + + + Formally, this is a fairly conventional lattice flow analysis () that moves upward through the operation. + + + + + The compilation in which the analysis is taking place. This is needed to determine which + conditional methods will be compiled and which will be omitted. + + + + + The method whose body is being analyzed, or the field whose initializer is being analyzed. + May be a top-level member or a lambda or local function. It is used for + references to method parameters. Thus, '_symbol' should not be used directly, but + 'MethodParameters', 'MethodThisParameter' and 'AnalyzeOutParameters(...)' should be used + instead. _symbol is null during speculative binding. + + + + + Reflects the enclosing member, lambda or local function at the current location (in the bound tree). + + + + + The bound node of the method or initializer being analyzed. + + + + + The flow analysis state at each label, computed by calling on the state from branches to that label with the state + when we fall into the label. Entries are created when the label is encountered. One + case deserves special attention: when the destination of the branch is a label earlier + in the code, it is possible (though rarely occurs in practice) that we are changing the + state at a label that we've already analyzed. In that case we run another pass of the + analysis to allow those changes to propagate. This repeats until no further changes to + the state of these labels occurs. This can result in quadratic performance in unlikely + but possible code such as this: "int x; if (cond) goto l1; x = 3; l5: print x; l4: goto + l5; l3: goto l4; l2: goto l3; l1: goto l2;" + + + + + Set to true after an analysis scan if the analysis was incomplete due to state changing + after it was used by another analysis component. In this case the caller scans again (until + this is false). Since the analysis proceeds by monotonically changing the state computed + at each label, this must terminate. + + + + + All of the labels seen so far in this forward scan of the body + + + + + Pending escapes generated in the current scope (or more deeply nested scopes). When jump + statements (goto, break, continue, return) are processed, they are placed in the + pendingBranches buffer to be processed later by the code handling the destination + statement. As a special case, the processing of try-finally statements might modify the + contents of the pendingBranches buffer to take into account the behavior of + "intervening" finally clauses. + + + + + The definite assignment and/or reachability state at the point currently being analyzed. + + + + + Indicates that the transfer function for a particular node (the function mapping the + state before the node to the state after the node) is not monotonic, in the sense that + it can change the state in either direction in the lattice. If the transfer function is + monotonic, the transfer function can only change the state toward the . Reachability and definite assignment are monotonic, and + permit a more efficient analysis. Region analysis and nullable analysis are not + monotonic. This is just an optimization; we could treat all of them as nonmonotonic + without much loss of performance. In fact, this only affects the analysis of (relatively + rare) try statements, and is only a slight optimization. + + + + + Where all diagnostics are deposited. + + + + + A cache of the state at the backward branch point of each loop. This is not needed + during normal flow analysis, but is needed for DataFlowsOut region analysis. + + + + + Subclasses may override EnterRegion to perform any actions at the entry to the region. + + + + + Subclasses may override LeaveRegion to perform any action at the end of the region. + + + + + A pending branch. These are created for a return, break, continue, goto statement, + yield return, yield break, await expression, and await foreach/using. The idea is that + we don't know if the branch will eventually reach its destination because of an + intervening finally block that cannot complete normally. So we store them up and handle + them as we complete processing each construct. At the end of a block, if there are any + pending branches to a label in that block we process the branch. Otherwise we relay it + up to the enclosing construct as a pending branch of the enclosing construct. + + + + + Perform a single pass of flow analysis. Note that after this pass, + this.backwardBranchChanged indicates if a further pass is required. + + + + + If a method is currently being analyzed returns its parameters, returns an empty array + otherwise. + + + + + If a method is currently being analyzed returns its 'this' parameter, returns null + otherwise. + + + + + Specifies whether or not method's out parameters should be analyzed. + + location to be used + true if the out parameters of the method should be analyzed + + + + Return the flow analysis state associated with a label. + + + + + + + Return to the caller the set of pending return statements. + + + + + + Set the current state to one that indicates that it is unreachable. + + + + + Visit a boolean condition expression. + + + + + + Visit a general expression, where we will only need to determine if variables are + assigned (or not). That is, we will not be needing AssignedWhenTrue and + AssignedWhenFalse. + + True when visiting an rvalue that will actually be used as an lvalue, + for example a ref parameter when simulating a read of it, or an argument corresponding to an in parameter + + + + Visit a statement. + + + + + Called at the point in a loop where the backwards branch would go to. + + + + + Called at the point in a loop where the backward branch is placed. + + + + + Used to resolve break statements in each statement form that has a break statement + (loops, switch). + + + + + Used to resolve continue statements in each statement form that supports it. + + + + + Subclasses override this if they want to take special actions on processing a goto + statement, when both the jump and the label have been located. + + + + + To handle a label, we resolve all branches to that label. Returns true if the state of + the label changes as a result. + + Target label + Statement containing the target label + + + + Since branches cannot branch into constructs, only out, we save the pending branches + when visiting more nested constructs. When tracking exceptions, we store the current + state as the exception state for the following code. + + + + + We use this when closing a block that may contain labels or branches + - branches to new labels are resolved + - new labels are removed (no longer can be reached) + - unresolved pending branches are carried forward + + The old pending branches, which are to be merged with the current ones + + + + Since each language construct must be handled according to the rules of the language specification, + the default visitor reports that the construct for the node is not implemented in the compiler. + + + + + Certain (struct) types are known by the compiler to be immutable. In these cases calling a method on + the type is known (by flow analysis) not to write the receiver. + + + + + + + Do not call for a local function. + + + + + Writes ref and out parameters + + + + + Join state from other try block, potentially in a nested method. + + + + + Visits a node only if it is a conditional access. + Returns 'true' if and only if the node was visited. + + + + + "State when not null" can only propagate out of a conditional access if + it is not subject to a user-defined conversion whose parameter is not of a non-nullable value type. + + + + + Unconditionally visits an expression. + If the expression has "state when not null" after visiting, + the method returns 'true' and writes the state to . + + + + + This visitor represents just the assignment part of the null coalescing assignment + operator. + + + + + This visitor represents just the non-assignment part of the null coalescing assignment + operator (when the left operand is non-null). + + + + + This is the "top" state of the data flow lattice. Generally, it is considered the state + which is reachable, but no information is yet available. This is the state used at the + start of method bodies. + + + + + This is the absolute "bottom" state of the data flow lattice. C# does not specify a + difference between unreachable states, so there can only be one. This is the state used + for unreachable code, like statements after a "return" or "throw" statement. + + + + + This should be a reachable state that won't affect another reachable state in a + . + + Nontrivial implementation is required for DataFlowsOutWalker or any flow analysis pass + that "tracks unassignments" like the nullable walker. The result should be a state, for + each variable, that is the strongest result possible (i.e. definitely assigned for the + data flow passes, or not null for the nullable analysis). + operation. + + + + + The "Join" operation is used when two separate control flow paths converge at a single + statement. This operation is used to combine the if/else paths of a conditional, or two + "goto" statements to the same label, for example. + + According to convention, Join moves "up" the lattice, so the following equations must hold: + 1. Join(Unreachable(), X) = X + 2. Join(Top, X) = Top + + + + True if was changed. False otherwise. + + + + + The Meet operation is the inverse of . + It's used when combining state additively, like when the state from a return statement + inside a 'try' clause is combined with the end state of a 'finally' clause. + + This moves "down" our flow lattice, by convention. The following equations must hold: + 1. Meet(Unreachable, X) = Unreachable + 2. Meet(ReachableBottom, X - Unreachable) = ReachableBottom + 3. Meet(Top, X) = X + + + + + + Produce a duplicate of this flow analysis state. + + + + + Is the code reachable? + + + + + Returns the unordered collection of branches. + + + + + Returns the unordered collection of branches. + + + + + This is the state from the local function which makes the + current state less specific. For example, in nullable analysis + this would be captured variables that may be nullable after + calling the local function. When a local function is called, + this state is + with the current state. + + + + + This is the part of the local function transfer function which + transfers knowledge additively. For example, in definite + assignment this would be captured state which is assigned by + the local function. When a local function is called, this + state is + with the current state. + + + + + Executed at the start of visiting a local function body. The + parameter holds the current state information for the local function being visited. To + save state information across the analysis, return an instance of . + + + + + Executed after visiting a local function body. The is the + return value from . The + is state information for the local function that was just visited. is + the state after visiting the method. + + + + + Is the switch statement one that could be interpreted as a C# 6 or earlier switch statement? + + + + + The possible places that we are processing when there is a region. + + + This should be nested inside but is not due to https://github.com/dotnet/roslyn/issues/36992 . + + + + + To scan the whole body, we start outside (before) the region. + + + + + A region analysis walker that computes the set of variables that are always assigned a value + in the region. A variable is "always assigned" in a region if an analysis of the region that + starts with the variable unassigned ends with the variable assigned. + + + + + This class implements the region control flow analysis operations. Region control flow + analysis provides information about statements which enter and leave a region. The analysis + is done lazily. When created, it performs no analysis, but simply caches the arguments. + Then, the first time one of the analysis results is used it computes that one result and + caches it. Each result is computed using a custom algorithm. + + + + + A collection of statements outside the region that jump into the region. + + + + + A collection of statements inside the region that jump to locations outside the region. + + + + + Returns true if and only if the endpoint of the last statement in the region is reachable or the region contains no + statements. + + + + + A collection of return (or yield break) statements found within the region that return from the enclosing method or lambda. + + + + + Returns true if and only if analysis was successful. Analysis can fail if the region does not properly span a single expression, + a single statement, or a contiguous series of statements within the enclosing block. + + + + + Produce a duplicate of this flow analysis state. + + + + + + Perform control flow analysis, reporting all necessary diagnostics. Returns true if the end of + the body might be reachable... + + + + + Analyze the body, reporting all necessary diagnostics. Returns true if the end of the + body might be reachable. + + + + + + This class implements the region data flow analysis operations. Region data flow analysis + provides information how data flows into and out of a region. The analysis is done lazily. + When created, it performs no analysis, but simply caches the arguments. Then, the first time + one of the analysis results is used it computes that one result and caches it. Each result + is computed using a custom algorithm. + + + + + A collection of the local variables that are declared within the region. Note that the region must be + bounded by a method's body or a field's initializer, so method parameter symbols are never included + in the result, but lambda parameters might appear in the result. + + + + + A collection of the local variables for which a value assigned outside the region may be used inside the region. + + + + + The set of local variables which are definitely assigned a value when a region is + entered. + + + + + The set of local variables which are definitely assigned a value when a region is + exited. + + + + + A collection of the local variables for which a value assigned inside the region may be used outside the region. + Note that every reachable assignment to a ref or out variable will be included in the results. + + + + + A collection of the local variables for which a value is always assigned inside the region. + + + + + A collection of the local variables that are read inside the region. + + + + + A collection of local variables that are written inside the region. + + + + + A collection of the local variables that are read outside the region. + + + + + A collection of local variables that are written outside the region. + + + + + A collection of the non-constant local variables and parameters that have been referenced in anonymous functions + and therefore must be moved to a field of a frame class. + + + + + A collection of the non-constant local variables and parameters that have had their address (or the address of one + of their fields) taken using the '&' operator. + + + If there are any of these in the region, then a method should not be extracted. + + + + + Returns true if and only if analysis was successful. Analysis can fail if the region does not properly span a single expression, + a single statement, or a contiguous series of statements within the enclosing block. + + + + + A region analysis walker that computes the set of variables whose values flow into (are used + in) the region. A variable assigned outside is used inside if an analysis that leaves the + variable unassigned on entry to the region would cause the generation of "unassigned" errors + within the region. + + + + + A region analysis walker that computes the set of variables for + which their assigned values flow out of the region. + A variable assigned inside is used outside if an analysis that + treats assignments in the region as unassigning the variable would + cause "unassigned" errors outside the region. + + + + + Implement C# definite assignment. + + + + + A mapping from local variables to the index of their slot in a flow analysis local state. + + + + + A mapping from the local variable slot to the symbol for the local variable itself. This + is used in the implementation of region analysis (support for extract method) to compute + the set of variables "always assigned" in a region of code. + + The first slot, slot 0, is reserved for indicating reachability, so the first tracked variable will + be given slot 1. When referring to VariableIdentifier.ContainingSlot, slot 0 indicates + that the variable in VariableIdentifier.Symbol is a root, i.e. not nested within another + tracked variable. Slots less than 0 are illegal. + + + + + Some variables that should be considered initially assigned. Used for region analysis. + + + + + Variables that were used anywhere, in the sense required to suppress warnings about + unused variables. + + + + + Parameters of record primary constructors that were read anywhere. + + + + + Variables that were used anywhere, in the sense required to suppress warnings about + unused variables. + + + + + Variables that were initialized or written anywhere. + + + + + Struct fields that are implicitly initialized, due to being used before being written, or not being written at an exit point. + + + + + Map from variables that had their addresses taken, to the location of the first corresponding + address-of expression. + + + Doesn't include fixed statement address-of operands. + + + + + Variables that were captured by anonymous functions. + + + + + The current source assembly. + + + + + A set of address-of expressions for which the operand is not definitely assigned. + + + + + Tracks variables for which we have already reported a definite assignment error. This + allows us to report at most one such error per variable. + + + + + true if we should check to ensure that out parameters are assigned on every exit point. + + + + + Track fields of classes in addition to structs. + + + + + Track static fields, properties, events, in addition to instance members. + + + + + The topmost method of this analysis. + + + + + Check that every rvalue has been converted in the definite assignment pass only (not later passes deriving from it). + + + + + Constructor to be used for region analysis, for which a struct type should never be considered empty. + + + + + Perform data flow analysis, reporting all necessary diagnostics. + + + + + Analyze the body, reporting all necessary diagnostics. + + + + + Check if the variable is captured and, if so, add it to this._capturedVariables. + + The variable to be checked + If variable.Kind is RangeVariable, its underlying lambda parameter. Else null. + + + + Add the variable to the captured set. For range variables we only add it if inside the region. + + + + + + This reflects the Dev10 compiler's rules for when a variable initialization is considered a "use" + for the purpose of suppressing the warning about unused variables. + + + + + Check that the given variable is definitely assigned. If not, produce an error. + + + + + Report a given variable as not definitely assigned. Once a variable has been so + reported, we suppress further reports of that variable. + + + + + Mark a variable as assigned (or unassigned). + + Node being assigned to. + The value being assigned. + True if target location is considered written to. + Ref assignment or value assignment. + True if target location is considered read from. + + + + Does the struct variable at the given slot have all of its instance fields assigned? + + + + + Marks attribute arguments as used. + + + + + Variables declared in a using statement are always considered used, so this is just an assert. + + + + + Produce a duplicate of this flow analysis state. + + + + + + Check that the given variable is definitely assigned when replaying local function + reads. If not, produce an error. + + + Specifying the slot manually may be necessary if the symbol is a field, + in which case + will not know which containing slot to look for. + + + + + State changes are handled by the base class. We override to find captured variables that + have been read before they were assigned and determine if the set has changed. + + + + + Does a data flow analysis for state attached to local variables and fields of struct locals. + + + + + Indicates whether this variable is nested inside another tracked variable. + For instance, if a field `x` of a struct is a tracked variable, the symbol is not sufficient + to uniquely determine which field is being tracked. The containing slot(s) would + identify which tracked variable the field `x` is part of. + + + + + True if new variables introduced in should be set + to the bottom state. False if they should be set to the top state. + + + + + A cache for remember which structs are empty. + + + + + Locals are given slots when their declarations are encountered. We only need give slots + to local variables, out parameters, and the "this" variable of a struct constructs. + Other variables are not given slots, and are therefore not tracked by the analysis. This + returns -1 for a variable that is not tracked, for fields of structs that have the same + assigned status as the container, and for structs that (recursively) contain no data members. + We do not need to track references to + variables that occur before the variable is declared, as those are reported in an + earlier phase as "use before declaration". That allows us to avoid giving slots to local + variables before processing their declarations. + + + + + Force a variable to have a slot. Returns -1 if the variable has an empty struct type. + + + + + Sets the starting state for any newly declared variables in the LocalDataFlowPass. + + + + + Descends through Rest fields of a tuple if "symbol" is an extended field + As a result the "symbol" will be adjusted to be the field of the innermost tuple + and a corresponding containingSlot is returned. + Return value -1 indicates a failure which could happen for the following reasons + a) Rest field does not exist, which could happen in rare error scenarios involving broken ValueTuple types + b) Rest is not tracked already and forceSlotsToExist is false (otherwise we create slots on demand) + + + + + Return the slot for a variable, or -1 if it is not tracked (because, for example, it is an empty struct). + + + + + + + A region analysis walker that computes the set of variables that are definitely assigned + when a region is entered or exited. + + + + + A small cache for remembering empty struct types for flow analysis. + + + + + When set, we ignore private reference fields of structs loaded from metadata. + + + + + Create a cache for computing whether or not a struct type is "empty". + + Enable compatibility with the native compiler, which + ignores inaccessible fields of reference type for structs loaded from metadata. + if is true, set to the compilation from + which to check accessibility. + + + + Specialized EmptyStructTypeCache that reports all structs as not empty + + + + + Determine if the given type is an empty struct type. + + + + + Determine if the given type is an empty struct type,. "typesWithMembersOfThisType" contains + a list of types that have members (directly or indirectly) of this type. + to remove circularity. + + + + + Get all instance fields of a struct. They are not necessarily returned in order. + + + + + Get all instance fields of a struct. They are not necessarily returned in order. + + + + + + When deciding what struct fields to drop on the floor, the native compiler looks + through arrays, and does not ignore value types or type parameters. + + + + + Is it possible that the given symbol can be accessed somewhere in the given assembly? + For the purposes of this test, we assume that code in the given assembly might derive from + any type. So protected members are considered potentially accessible. + + + + + A region analysis walker that records jumps into the region. Works by overriding NoteBranch, which is + invoked by a superclass when the two endpoints of a jump have been identified. + + + + + A region analysis walker that records jumps out of the region. + + + + + The flow analysis pass. This pass reports required diagnostics for unreachable + statements and uninitialized variables (through the call to FlowAnalysisWalker.Analyze), + and inserts a final return statement if the end of a void-returning method is reachable. + + the method to be analyzed + the method's body + The state of compilation of the enclosing type + the receiver of the reported diagnostics + indicates whether this Script had a trailing expression + the original method body is the last statement in the block + the rewritten block for the method (with a return statement possibly inserted) + + + + Nullability flow analysis. + + + + + Nullable analysis data for methods, parameter default values, and attributes + stored on the Compilation during testing only. + The key is a symbol for methods or parameters, and syntax for attributes. + + + + + Used to copy variable slots and types from the NullableWalker for the containing method + or lambda to the NullableWalker created for a nested lambda or local function. + + + + + Data recorded for a particular analysis run. + + + + + Number of entries tracked during analysis. + + + + + True if analysis was required; false if analysis was optional and results dropped. + + + + + Represents the result of visiting an expression. + Contains a result type which tells us whether the expression may be null, + and an l-value type which tells us whether we can assign null to the expression. + + + + + Represents the result of visiting an argument expression. + In addition to storing the , also stores the + for reanalyzing a lambda. + + + + + Binder for symbol being analyzed. + + + + + Conversions with nullability and unknown matching any. + + + + + 'true' if non-nullable member warnings should be issued at return points. + One situation where this is 'false' is when we are analyzing field initializers and there is a constructor symbol in the type. + + + + + If true, the parameter types and nullability from _delegateInvokeMethod is used for + initial parameter state. If false, the signature of CurrentSymbol is used instead. + + + + + If true, the return type and nullability from _delegateInvokeMethod is used. + If false, the signature of CurrentSymbol is used instead. + + + + + Method signature used for return or parameter types. Distinct from CurrentSymbol signature + when CurrentSymbol is a lambda and type is inferred from MethodTypeInferrer. + + + + + Return statements and the result types from analyzing the returned expressions. Used when inferring lambda return type in MethodTypeInferrer. + + + + + Invalid type, used only to catch Visit methods that do not set + _result.Type. See VisitExpressionWithoutStackGuard. + + + + + Contains the map of expressions to inferred nullabilities and types used by the optional rewriter phase of the + compiler. + + + + + Manages creating snapshots of the walker as appropriate. Null if we're not taking snapshots of + this walker. + + + + + State of method group receivers, used later when analyzing the conversion to a delegate. + (Could be replaced by _analyzedNullabilityMapOpt if that map is always available.) + + + + + Variables instances for each lambda or local function defined within the analyzed region. + + + + + Map from a target-typed expression (such as a target-typed conditional, switch or new) to the delegate + that completes analysis once the target type is known. + The delegate is invoked by . + + + + + True if we're analyzing speculative code. This turns off some initialization steps + that would otherwise be taken. + + + + + True if this walker was created using an initial state. + + + + + The result and l-value type of the last visited expression. + + + + + The visit result of the receiver for the current conditional access. + + For example: A conditional invocation uses a placeholder as a receiver. By storing the + visit result from the actual receiver ahead of time, we can give this placeholder a correct result. + + + + + The result type represents the state of the last visited expression. + + + + + Force the inference of the LValueResultType from ResultType. + + + + + Force the inference of the ResultType from LValueResultType. + + + + + Sets the analyzed nullability of the expression to be the given result. + + + + + Placeholder locals, e.g. for objects being constructed. + + + + + For methods with annotations, we'll need to visit the arguments twice. + Once for diagnostics and once for result state (but disabling diagnostics). + + + + + Whether we are going to read the currently visited expression. + + + + + Used to allow to substitute the correct slot for a when + it's encountered. + + + + + We have multiple ways of entering the nullable walker: we could be just analyzing the initializers, with a BoundStatementList body and _baseOrThisInitializer + having been provided, or we could be analyzing the body of a constructor, with a BoundConstructorBody body and _baseOrThisInitializer being null. + + + + + Analyzes a method body if settings indicate we should. + + + + + Gets the "after initializers state" which should be used at the beginning of nullable analysis + of certain constructors. + + + + + Analyzes a set of bound nodes, recording updated nullability information. This method is only + used when nullable is explicitly enabled for all methods but disabled otherwise to verify that + correct semantic information is being recorded for all bound nodes. The results are thrown away. + + + + + Analyzes a set of bound nodes, recording updated nullability information, and returns an + updated BoundNode with the information populated. + + + + + Returns true if the nullable analysis is needed for the region represented by . + The syntax node is used to determine the overall nullable context for the region. + + + + Analyzes a node in a "one-off" context, such as for attributes or parameter default values. + is the syntax span used to determine the overall nullable context. + + + + The contents of this method, particularly , are problematic when + inlined. The methods themselves are small but they end up allocating significantly larger + frames due to the use of biggish value types within them. The method + is used on a hot path for fluent calls and this size change is enough that it causes us + to exceed our thresholds in EndToEndTests.OverflowOnFluentCall. + + + + + Should we warn for assigning this state into this type? + + This should often be checked together with + It catches putting a `null` into a `[DisallowNull]int?` for example, which cannot simply be represented as a non-nullable target type. + + + + + Reports top-level nullability problem in assignment. + Any conversion of the value should have been applied. + + + + + Update tracked value on assignment. + + + + + Whenever assigning a variable, and that variable is not declared at the point the state is being set, + and the new state is not , this method should be called to perform the + state setting and to ensure the mutation is visible outside the finally block when the mutation occurs in a + finally block. + + + + + If , is known only within returned delegate. + + A delegate to complete the initializer analysis. + + + + If , is known only within returned delegate. + + A delegate to complete the element initializer analysis. + + + + Returns true if the type is a struct with no fields or properties. + + + + + Applies analysis similar to . + The expressions returned from a lambda are not converted though, so we'll have to classify fresh conversions. + Note: even if some conversions fail, we'll proceed to infer top-level nullability. That is reasonable in common cases. + + + + + If we learn that the operand is non-null, we can infer that certain + sub-expressions were also non-null. + Get all nested conditional slots for those sub-expressions. For example in a?.b?.c we'll set a, b, and c. + Only returns slots for tracked expressions. + + https://github.com/dotnet/roslyn/issues/53397 This method should potentially be removed. + + + + Visits a node only if it is a conditional access. + Returns 'true' if and only if the node was visited. + + + + + Unconditionally visits an expression and returns the "state when not null" for the expression. + + + + + Placeholders are bound expressions with type and state. + But for typeless expressions (such as `null` or `(null, null)` we hold onto the original bound expression, + as it will be useful for conversions from expression. + + + + + Fix a TypeWithAnnotations based on Allow/DisallowNull annotations prior to a conversion or assignment. + Note this does not work for nullable value types, so an additional check with may be required. + + + + + Update the null-state based on MaybeNull/NotNull + + + + + If you pass in a method symbol, its type arguments will be re-inferred and the re-inferred method will be returned. + + + + + Verifies that an argument's nullability is compatible with its parameter's on the way in. + + + + Returns if this is an assignment forbidden by DisallowNullAttribute, otherwise . + + + + Verifies that outbound assignments (from parameter to argument) are safe and + tracks those assignments (or learns from post-condition attributes) + + + + + Learn from postconditions on a by-value or 'in' argument. + + + + + Return top-level nullability for the expression. This method should be called on a limited + set of expressions only. It should not be called on expressions tracked by flow analysis + other than which is an expression + specifically created in NullableWalker to represent the flow analysis state. + + + + + Returns the expression without the top-most conversion plus the conversion. + If the expression is not a conversion, returns the original expression plus + the Identity conversion. If `includeExplicitConversions` is true, implicit and + explicit conversions are considered. If `includeExplicitConversions` is false + only implicit conversions are considered and if the expression is an explicit + conversion, the expression is returned as is, with the Identity conversion. + (Currently, the only visit method that passes `includeExplicitConversions: true` + is VisitConversion. All other callers are handling implicit conversions only.) + + + + + Returns true if the expression should be used as the source when calculating + a conversion from this expression, rather than using the type (with nullability) + calculated by visiting this expression. Typically, that means expressions that + do not have an explicit type but there are several other cases as well. + (See expressions handled in ClassifyImplicitBuiltInConversionFromExpression.) + + + + + Adjust declared type based on inferred nullability at the point of reference. + + + + + Gets the corresponding member for a symbol from initial binding to match an updated receiver type in NullableWalker. + For instance, this will map from List<string~>.Add(string~) to List<string?>.Add(string?) in the following example: + + string s = null; + var list = new[] { s }.ToList(); + list.Add(null); + + + + + + Visit an expression. If an explicit target type is provided, the expression is converted + to that type. This method should be called whenever an expression may contain + an implicit conversion, even if that conversion was omitted from the bound tree, + so the conversion can be re-classified with nullability. + + + + + Set the nullability of tuple elements for tuples at the point of construction. + If is true, the tuple was constructed with an explicit + 'new ValueTuple' call, in which case the 8-th element, if any, represents the 'Rest' field. + + + + + Gets the conversion node for passing to VisitConversion, if one should be passed. + + + + + Apply the conversion to the type of the operand and return the resulting type. + If the operand does not have an explicit type, the operand expression is used. + + + If , the incoming conversion is assumed to be from binding + and will be re-calculated, this time considering nullability. + Note that the conversion calculation considers nested nullability only. + The caller is responsible for checking the top-level nullability of + the type returned by this method. + + + If , the nullability of any members of the operand + will be copied to the converted result when possible. + + + If , indicates that the "non-safety" diagnostic + should be given for an invalid conversion. + + + + + Return the return type for a lifted operator, given the nullability state of its operands. + + + + + When the allowed output of a property/indexer is not-null but the allowed input is maybe-null, we store a not-null value instead. + This way, assignment of a legal input value results in a legal output value. + This adjustment doesn't apply to oblivious properties/indexers. + + + + + Return the sub-expressions for the righthand side of a deconstruction + assignment. cf. LocalRewriter.GetRightParts. + + + + + Report warning passing argument where nested nullability does not match + parameter (e.g.: calling `void F(object[] o)` with `F(new[] { maybeNull })`). + + + + + A bit array containing the nullability of variables associated with a method scope. If the method is a + nested function (a lambda or a local function), there is a reference to the corresponding instance for + the containing method scope. The instances in the chain are associated with a corresponding + chain, and the field in this type matches . + + + + + Produce a duplicate of this flow analysis state. + + + + + + Defines the starting state used in the local function body to + produce diagnostics and determine types. + + + + + A symbol to be used as a placeholder for an instance being constructed by + , or the input expression of a pattern-matching operation. + It is used to track the state of an expression, such as members being initialized. + + + + + The int key corresponds to . + + + + + The snapshot array should be sorted in ascending order by the position tuple element in order for the binary search algorithm to + function correctly. + + + + + Contains the map of expression and original symbol to reinferred symbols, used by the optional + rewriter phase of the compiler. + + + Lambda symbols are mapped to the NameTypeSymbol of the delegate type they were reinferred to, + and are stored with a null node. The LambdaSymbol itself is position-independent, and does not + need any more information to serve as a key. + All other symbol types are stored mapped to exactly the same type as was provided. + + + + + Shared walker states are the parts of the walker state that are not unique at a single position, + but are instead used by all snapshots. Each shared state corresponds to one invocation of Analyze, + so entering a lambda or local function will create a new state here. The indexes in this array + correspond to . + + + + + Snapshots are kept in a dictionary of position -> snapshot at that position. These are stored in descending order. + + + + + Every walker is walking a specific symbol, and can potentially walk each symbol multiple times + to get to a stable state. Each of these symbols gets a single shared state slot, which this + dictionary keeps track of. These slots correspond to indexes into . + + + + + Contains the shared state used to restore the walker at a specific point + + + + + Contains a snapshot of the state of the NullableWalker at any given point of execution, used for restoring the walker to + a specific point for speculatively analyzing a piece of code that does not appear in the original tree. + + + + + An immutable copy of . + + + + + Unique identifier in the chain of nested VariablesSnapshot instances. The value starts at 0 + for the outermost method and increases at each nested function. + + + + + VariablesSnapshot instance for containing method, or null if this is the outermost method. + + + + + Symbol that contains this set of variables. This is typically a method but may be a field + when analyzing a field initializer. The symbol may be null at the outermost scope when + analyzing an attribute argument value or a parameter default value. + + + + + Mapping from variable to slot. + + + + + Mapping from local or parameter to inferred type. + + + + + A collection of variables associated with a method scope. For a particular method, the variables + may contain parameters and locals and any fields from other variables in the collection. If the method + is a nested function (a lambda or a local function), there is a reference to the variables collection at + the containing method scope. The outermost scope may also contain variables for static fields. + Each variable (parameter, local, or field of other variable) must be associated with the variables collection + for that method where the parameter or local are declared, even if the variable is used in a nested scope. + + + + + Unique identifier in the chain of nested Variables instances. The value starts at 0 + for the outermost method and increases at each nested function. + + + + + Variables instance for containing method, or null if this is the outermost method. + + + + + Symbol that contains this set of variables. This is typically a method but may be a field + when analyzing a field initializer. The symbol may be null at the outermost scope when + analyzing an attribute argument value or a parameter default value. + + + + + A mapping from local variables to the index of their slot in a flow analysis local state. + + + + + The inferred type at the point of declaration of var locals and parameters. + + + + + A mapping from the local variable slot to the symbol for the local variable itself. + + The first slot, slot 0, is reserved for indicating reachability, so the first tracked variable will + be given slot 1. When referring to VariableIdentifier.ContainingSlot, slot 0 indicates + that the variable in VariableIdentifier.Symbol is a root, i.e. not nested within another + tracked variable. Slots less than 0 are illegal. + + + + + Learn something about the input from a test of a given expression against a given pattern. The given + state is updated to note that any slots that are tested against `null` may be null. + + + + + Learn from any constant null patterns appearing in the pattern. + + Type type of the input expression (before nullable analysis). + Used to determine which types can contain null. + + + + A region analysis walker that records reads and writes of all variables, both inside and outside the region. + + + + + Note that a variable is read. + + The variable + If variable.Kind is RangeVariable, its underlying lambda parameter. Else null. + + + + When we read a field from a struct, the receiver isn't seen as being read until we get to the + end of the field access expression, because we only read the relevant piece of the struct. + But we want the receiver to be considered to be read in the region in that case. + For example, if an rvalue expression is x.y.z and the region is x.y, we want x to be included + in the ReadInside set. That is implemented here. + + + + + Compute the underlying lambda parameter symbol for a range variable, if any. + + The bound node for the expansion of the range variable + + + + Represents region analysis context attributes such as compilation, region, etc... + + + + Compilation to use + + + Containing symbol if available, null otherwise + + + Bound node, not null + + + Region to be used + + + Region to be used + + + True if the input was bad, such as no first and last nodes + + + + Construct context + + + + + A region analysis walker that computes whether or not the region completes normally. It does this by determining + if the point at which the region ends is reachable. + + + + + An analysis that computes all cases where the address is taken of a variable that has not yet been assigned + + + + + An analysis that computes the set of variables that may be used + before being assigned anywhere within a method. + + + + + A region analysis walker that records declared variables. + + + + + Record declared variables in the pattern. + + + + + Specifies the language version. + + + + + C# language version 1 + + + + + C# language version 2 + + + + + C# language version 3 + + Features: LINQ. + + + + + + C# language version 4 + + Features: dynamic. + + + + + + C# language version 5 + + Features: async, caller info attributes. + + + + + + C# language version 6 + Features: + + Using of a static class + Exception filters + Await in catch/finally blocks + Auto-property initializers + Expression-bodied methods and properties + Null-propagating operator ?. + String interpolation + nameof operator + Dictionary initializer + + + + + + C# language version 7.0 + Features: + + Out variables + Pattern-matching + Tuples + Deconstruction + Discards + Local functions + Digit separators + Ref returns and locals + Generalized async return types + More expression-bodied members + Throw expressions + + + + + + C# language version 7.1 + Features: + + Async Main + Default literal + Inferred tuple element names + Pattern-matching with generics + + + + + + C# language version 7.2 + Features: + + Ref readonly + Ref and readonly structs + Ref extensions + Conditional ref operator + Private protected + Digit separators after base specifier + Non-trailing named arguments + + + + + + C# language version 7.3 + Features: + + Indexing fixed fields does not require pinning + ref local variables may be reassigned + stackalloc arrays support initializers + More types support the fixed statement + Enhanced generic constraints + Tuples support == and != + Attach attributes to the backing fields for auto-implemented properties + Method overload resolution improvements when arguments differ by 'in' + Extend expression variables in initializers + Improved overload candidates + New compiler options (-publicsign and -pathmap) + + + + + + C# language version 8.0 + Features: + + Readonly members + Default interface methods + Pattern matching enhancements (switch expressions, property patterns, tuple patterns, and positional patterns) + Using declarations + Static local functions + Disposable ref structs + Nullable reference types + Asynchronous streams + Asynchronous disposable + Indices and ranges + Null-coalescing assignment + Unmanaged constructed types + Stackalloc in nested expressions + Enhancement of interpolated verbatim strings + + + + + + C# language version 9.0 + Features: + + Records + Init only setters + Top-level statements + Pattern matching enhancements + Native sized integers + Function pointers + Suppress emitting localsinit flag + Target-typed new expressions + Static anonymous functions + Target-typed conditional expressions + Covariant return types + Extension GetEnumerator support for foreach loops + Lambda discard parameters + Attributes on local functions + Module initializers + New features for partial methods + + + + + + C# language version 10.0 + Features: + + Record structs + Global using directives + Lambda improvements + Improved definite assignment + Constant interpolated strings + Mix declarations and variables in deconstruction + Extended property patterns + Sealed record ToString + Source Generator v2 APIs + Method-level AsyncMethodBuilder + + + + + + C# language version 11.0 +
+ Features: + + Raw string literals + Static abstract members in interfaces + Generic attributes + Newlines in interpolations + List-patterns + Required members + Span<char> constant pattern + Struct auto-default + Nameof(parameter) + Checked user-defined operators + UTF-8 string literals + Unsigned right-shift operator + Relaxed shift operator + Ref fields + File-local types + +
+
+ + + The latest major supported version. + + + + + Preview of the next language version. + + + + + The latest supported version of the language. + + + + + The default language version, which is the latest supported version. + + + + + Usages of TestOptions.RegularNext and LanguageVersionFacts.CSharpNext + will be replaced with TestOptions.RegularN and LanguageVersion.CSharpN when language version N is introduced. + + Corresponds to Microsoft.CodeAnalysis.CSharp.Shared.Extensions.LanguageVersionExtensions.CSharpNext. + + + + + + Displays the version number in the format expected on the command-line (/langver flag). + For instance, "6", "7.0", "7.1", "latest". + + + + + Try parse a from a string input, returning default if input was null. + + + + + Map a language version (such as Default, Latest, or CSharpN) to a specific version (CSharpM). + + + + Inference of tuple element names was added in C# 7.1 + + + + The purpose of this rewriter is to replace await-containing catch and finally handlers + with surrogate replacements that keep actual handler code in regular code blocks. + That allows these constructs to be further lowered at the async lowering pass. + + + + + Lower a block of code by performing local rewritings. + The goal is to not have exception handlers that contain awaits in them. + + 1) Await containing finally blocks: + The general strategy is to rewrite await containing handlers into synthetic handlers. + Synthetic handlers are not handlers in IL sense so it is ok to have awaits in them. + Since synthetic handlers are just blocks, we have to deal with pending exception/branch/return manually + (this is the hard part of the rewrite). + + try{ + code; + }finally{ + handler; + } + + Into ===> + + Exception ex = null; + int pendingBranch = 0; + + try{ + code; // any gotos/returns are rewritten to code that pends the necessary info and goes to finallyLabel + goto finallyLabel; + }catch (ex){ // essentially pend the currently active exception + }; + + finallyLabel: + { + handler; + if (ex != null) throw ex; // unpend the exception + unpend branches/return + } + + 2) Await containing catches: + try{ + code; + }catch (Exception ex){ + handler; + throw; + } + + + Into ===> + + Object pendingException; + int pendingCatch = 0; + + try{ + code; + }catch (Exception temp){ // essentially pend the currently active exception + pendingException = temp; + pendingCatch = 1; + }; + + switch(pendingCatch): + { + case 1: + { + Exception ex = (Exception)pendingException; + handler; + throw pendingException + } + } + + + + + Rewrites Try/Catch part of the Try/Catch/Finally + + + + + Analyzes method body for try blocks with awaits in finally blocks + Also collects labels that such blocks contain. + + + + + Returns true if a finally of the given try contains awaits + + + + + Returns true if a catch contains awaits + + + + + Returns true if body contains await in a finally block. + + + + + Labels reachable from within this frame without invoking its finally. + null if there are no such labels. + + + + + Additional information for rewriting an async-iterator. + + + + + Produces a MoveNext() method for an async-iterator method. + Compared to an async method, this handles rewriting `yield return` (with states decreasing from -3) and + `yield break`, and adds special handling for `try` to allow disposal. + `await` is handled like in async methods (with states 0 and up). + + + + + Where should we jump to to continue the execution of disposal path. + + Initially, this is the method's return value label (). + Inside a `try` or `catch` with a `finally`, we'll use the label directly preceding the `finally`. + Inside a `try` or `catch` with an extracted `finally`, we will use the label preceding the extracted `finally`. + Inside a `finally`, we'll have no/null label (disposal continues without a jump). + + + + + We use _exprReturnLabel for normal end of method (ie. no more values) and `yield break;`. + We use _exprReturnLabelTrue for `yield return;`. + + + + + States for `yield return` are decreasing from . + + + + + Lower the body, adding an entry state (-3) at the start, + so that we can differentiate an async-iterator that was never moved forward with MoveNextAsync() + from one that is running (-1). + Then we can guard against some bad usages of DisposeAsync. + + + + + An async-iterator state machine has a flag indicating "dispose mode". + We enter dispose mode by calling DisposeAsync() when the state machine is paused on a `yield return`. + DisposeAsync() will resume execution of the state machine from that state (using existing dispatch mechanism + to restore execution from a given state, without executing other code to get there). + + From there, we don't want normal code flow: + - from `yield return` within a try, we'll jump to its `finally` if it has one (or method exit) + - after finishing a `finally` within a `finally`, we'll continue + - after finishing a `finally` within a `try`, jump to the its `finally` if it has one (or method exit) + + Some `finally` clauses may have already been rewritten and extracted to a plain block (). + In those cases, we saved the finally-entry label in . + + + + + Some `finally` clauses may have already been rewritten and extracted to a plain block (). + The extracted block will have been wrapped as a so that we can process it as a `finally` block here. + + + + + Async methods have both a return type (void, Task, or Task<T>) and a 'result' type, which is the + operand type of any return expressions in the async method. The result type is void in the case of + Task-returning and void-returning async methods, and T in the case of Task<T>-returning async + methods. + + System.Runtime.CompilerServices provides a collection of async method builders that are used in the + generated code of async methods to create and manipulate the async method's task. There are three + distinct async method builder types, one of each async return type: AsyncVoidMethodBuilder, + AsyncTaskMethodBuilder, and AsyncTaskMethodBuilder<T>. + + AsyncMethodBuilderMemberCollection provides a common mechanism for accessing the well-known members of + each async method builder type. This avoids having to inspect the return style of the current async method + to pick the right async method builder member during async rewriting. + + + + + The builder's constructed type. + + + + + The result type of the constructed task: T for Task<T>, void otherwise. + + + + + Create an instance of the method builder. + + + + + Binds an exception to the method builder. + + + + + Marks the method builder as successfully completed, and sets the result if method is Task<T>-returning. + + + + + Schedules the state machine to proceed to the next action when the specified awaiter completes. + + + + + Schedules the state machine to proceed to the next action when the specified awaiter completes. This method can be called from partially trusted code. + + + + + Begins running the builder with the associated state machine. + + + + + Associates the builder with the specified state machine. + + + + + Get the constructed task for a Task-returning or Task<T>-returning async method. + + + + + True if generic method constraints should be checked at the call-site. + + + + + Produces a MoveNext() method for an async method. + + + + + The method being rewritten. + + + + + The field of the generated async class used to store the async method builder: an instance of + , , or depending on the + return type of the async method. + + + + + A collection of well-known members for the current async method builder. + + + + + The exprReturnLabel is used to label the return handling code at the end of the async state-machine + method. Return expressions are rewritten as unconditional branches to exprReturnLabel. + + + + + The label containing a return from the method when the async method has not completed. + + + + + The field of the generated async class used in generic task returning async methods to store the value + of rewritten return expressions. The return-handling code then uses SetResult on the async method builder + to make the result available to the caller. + + + + + Generate the body for MoveNext(). + + + + + This rewriter rewrites an async-iterator method. See async-streams.md for design overview. + + + + + Generates the `ValueTask<bool> MoveNextAsync()` method. + + + + + Prepares most of the parts for MoveNextAsync() and DisposeAsync() methods. + + + + + Generates the `ValueTask IAsyncDisposable.DisposeAsync()` method. + The DisposeAsync method should not be called from states -1 (running) or 0-and-up (awaits). + + + + + Generates the Current property. + + + + + Generates the GetAsyncEnumerator method. + + + + + Rewrite an async method into a state machine type. + + + + + Returns true if all types and members we need are present and good + + + + + Note: do not use a static/singleton instance of this type, as it holds state. + + + + + The class that represents a translated async or async-iterator method. + + + + + The rewriter for removing lambda expressions from method bodies and introducing closure classes + as containers for captured variables along the lines of the example in section 6.5.3 of the + C# language specification. A closure is the lowered form of a nested function, consisting of a + synthesized method and a set of environments containing the captured variables. + + The entry point is the public method . It operates as follows: + + First, an analysis of the whole method body is performed that determines which variables are + captured, what their scopes are, and what the nesting relationship is between scopes that + have captured variables. The result of this analysis is left in . + + Then we make a frame, or compiler-generated class, represented by an instance of + for each scope with captured variables. The generated frames are kept + in . Each frame is given a single field for each captured + variable in the corresponding scope. These are maintained in . + + Next, we walk and rewrite the input bound tree, keeping track of the following: + (1) The current set of active frame pointers, in + (2) The current method being processed (this changes within a lambda's body), in + (3) The "this" symbol for the current method in , and + (4) The symbol that is used to access the innermost frame pointer (it could be a local variable or "this" parameter) + + Lastly, we visit the top-level method and each of the lowered methods + to rewrite references (e.g., calls and delegate conversions) to local + functions. We visit references to local functions separately from + lambdas because we may see the reference before we lower the target + local function. Lambdas, on the other hand, are always convertible as + they are being lowered. + + There are a few key transformations done in the rewriting. + (1) Lambda expressions are turned into delegate creation expressions, and the body of the lambda is + moved into a new, compiler-generated method of a selected frame class. + (2) On entry to a scope with captured variables, we create a frame object and store it in a local variable. + (3) References to captured variables are transformed into references to fields of a frame class. + + In addition, the rewriting deposits into + a (, ) pair for each generated method. + + produces its output in two forms. First, it returns a new bound statement + for the caller to use for the body of the original method. Second, it returns a collection of + (, ) pairs for additional methods that the lambda rewriter produced. + These additional methods contain the bodies of the lambdas moved into ordinary methods of their + respective frame classes, and the caller is responsible for processing them just as it does with + the returned bound node. For example, the caller will typically perform iterator method and + asynchronous method transformations, and emit IL instructions into an assembly. + + + + + Perform a first analysis pass in preparation for removing all lambdas from a method body. The entry point is Analyze. + The results of analysis are placed in the fields seenLambda, blockParent, variableBlock, captured, and captures. + + + + + If a local function is in the set, at some point in the code it is converted to a delegate and should then not be optimized to a struct closure. + Also contains all lambdas (as they are converted to delegates implicitly). + + + + + True if the method signature can be rewritten to contain ref/out parameters. + + + + + The root of the scope tree for this method. + + + + + Must be called only after + has been calculated. + + Finds the most optimal capture environment to place a closure in. + This roughly corresponds to the 'highest' Scope in the tree where all + the captured variables for this closure are in scope. This minimizes + the number of indirections we may have to traverse to access captured + variables. + + + + + We may have ended up with a closure environment containing only + 'this'. This is basically equivalent to the containing type itself, + so we can inline the 'this' parameter into environments that + reference this one or lower closures directly onto the containing + type. + + + + + Calculates all functions which directly or indirectly capture a scope's variables. + + + + + + Must be called only after and . + + In order to reduce allocations, merge environments into a parent environment when it is safe to do so. + This must be done whilst preserving semantics. + + We also have to make sure not to extend the life of any variable. + This means that we can only merge an environment into its parent if exactly the same closures directly or indirectly reference both environments. + + + + + Walk up the scope tree looking for a variable declaration. + + + + + Find the parent of the corresponding to + the given . + + + + + Finds a with a matching + as the one given. + + + + + Walk up the scope tree looking for a nested function. + + + A tuple of the found and the it was found in. + + + + + Finds a with a matching original symbol somewhere in the given scope or nested scopes. + + + + + This is the core node for a Scope tree, which stores all semantically meaningful + information about declared variables, closures, and environments in each scope. + It can be thought of as the essence of the bound tree -- stripping away many of + the unnecessary details stored in the bound tree and just leaving the pieces that + are important for closure conversion. The root scope is the method scope for the + method being analyzed and has a null . + + + + + A list of all nested functions (all lambdas and local functions) declared in this scope. + + + + + A list of all locals or parameters that were declared in this scope and captured + in this scope or nested scopes. "Declared" refers to the start of the variable + lifetime (which, at this point in lowering, should be equivalent to lexical scope). + + + It's important that this is a set and that enumeration order is deterministic. We loop + over this list to generate proxies and if we loop out of order this will cause + non-deterministic compilation, and if we generate duplicate proxies we'll generate + wasteful code in the best case and incorrect code in the worst. + + + + + The bound node representing this scope. This roughly corresponds to the bound + node for the block declaring locals for this scope, although parameters of + methods/functions are introduced into their Body's scope and do not get their + own scope. + + + + + The nested function that this scope is nested inside. Null if this scope is not nested + inside a nested function. + + + + + Environment created in this scope to hold . + At the moment, all variables declared in the same scope + always get assigned to the same environment. + + + + + Is it safe to move any of the variables declared in this scope to the parent scope, + or would doing so change the meaning of the program? + + + + + The NestedFunction type represents a lambda or local function and stores + information related to that function. After initially building the + tree the only information available is + and . + Subsequent passes are responsible for translating captured + variables into captured environments and for calculating + the rewritten signature of the method. + + + + + The method symbol for the original lambda or local function. + + + + + Syntax for the block of the nested function. + + + + + True if this function directly or transitively captures 'this' (captures + a local function which directly or indirectly captures 'this'). + Calculated in . + + + + + True if this environment captures a reference to a class environment + declared in a higher scope. Assigned by + + + + + + Visit all nested functions in all nested scopes and run the . + + + + + Visit all the functions and return true when the returns + true. Otherwise, returns false. + + + + + Visit the tree with the given root and run the + + + + + Builds a tree of nodes corresponding to a given method. + + visits the bound tree and translates information from the bound tree about + variable scope, declared variables, and variable captures into the resulting + tree. + + At the same time it sets + for each Scope. This is done by looking for s + and s that jump from a point + after the beginning of a , to a + before the start of the scope, but after the start of . + + All loops have been converted to gotos and labels by this stage, + so we do not have to visit them to do so. Similarly all s + have been converted to s, so we do not have to + visit them. + + + + + Do not set this directly, except when setting the root scope. + Instead use or . + + + + + Null if we're not inside a nested function, otherwise the nearest nested function. + + + + + A mapping from all captured vars to the scope they were declared in. This + is used when recording captured variables as we must know what the lifetime + of a captured variable is to determine the lifetime of its capture environment. + + + + + If a local function is in the set, at some point in the code it is converted + to a delegate and should then not be optimized to a struct closure. + Also contains all lambdas (as they are converted to delegates implicitly). + + + + + For every label visited so far, this dictionary maps to a list of all scopes either visited so far, or currently being visited, + that are both after the label, and are on the same level of the scope tree as the label. + + + + + Contains a list of the labels visited so far for each scope. + The outer ArrayBuilder is a stack representing the chain of scopes from the root scope to the current scope, + and for each item on the stack, the ArrayBuilder is the list of the labels visited so far for the scope. + + Used by to determine which labels a new child scope appears after. + + + + + This is where we calculate . + is always true unless we jump from after + the beginning of a scope, to a point in between the beginning of the parent scope, and the beginning of the scope + + + + + + Add a diagnostic if the type of a captured variable is a restricted type + + + + + Create a new nested scope under the current scope, and replace with the new scope, + or reuse the current scope if there's no change in the bound node for the nested scope. + Records the given locals as declared in the aforementioned scope. + + + + + Creates a new nested scope which is a child of , + and replaces with the new scope + + + + + + Requires that scope is either the same as , + or is the of . + Returns immediately in the first case, + Replaces with scope in the second. + + + + + + Temporary bag for methods synthesized by the rewriting. Added to + at the end of rewriting. + + + + + TODO(https://github.com/dotnet/roslyn/projects/26): Delete this. + This should only be used by which + hasn't had logic to move the proxy analysis into , + where the could be walked to build + the proxy list. + + + + + Rewrite the given node to eliminate lambda expressions. Also returned are the method symbols and their + bound bodies for the extracted lambda bodies. These would typically be emitted by the caller such as + MethodBodyCompiler. See this class' documentation + for a more thorough explanation of the algorithm and its use by clients. + + The bound node to be rewritten + The type of the top-most frame + The "this" parameter in the top-most frame, or null if static method + The containing method of the node to be rewritten + Index of the method symbol in its containing type member list. + If this is non-null, then will be treated as this for uses of parent symbols. For use in EE. + Information on lambdas defined in needed for debugging. + Information on closures defined in needed for debugging. + Slot allocator. + The caller's buffer into which we produce additional methods to be emitted by the caller + Diagnostic bag for diagnostics + The set of original locals that should be assigned to proxies if lifted + + + + Adds synthesized types to the compilation state + and creates hoisted fields for all locals captured by the environments. + + + + + Synthesize closure methods for all nested functions. + + + + + Get the static container for closures or create one if one doesn't already exist. + + + associate the frame with the first lambda that caused it to exist. + we need to associate this with some syntax. + unfortunately either containing method or containing class could be synthetic + therefore could have no syntax. + + + + + Produce a bound expression representing a pointer to a frame of a particular frame type. + + The syntax to attach to the bound nodes produced + The type of frame to be returned + A bound node that computes the pointer to the required frame + + + + Produce a bound expression representing a pointer to a frame of a particular frame class. + Note that for generic frames, the frameClass parameter is the generic definition, but + the resulting expression will be constructed with the current type parameters. + + The syntax to attach to the bound nodes produced + The class type of frame to be returned + A bound node that computes the pointer to the required frame + + + + Introduce a frame around the translation of the given node. + + The node whose translation should be translated to contain a frame + The environment for the translated node + A function that computes the translation of the node. It receives lists of added statements and added symbols + The translated statement, as returned from F + + + + Rewrites a reference to an unlowered local function to the newly + lowered local function. + + + + + Substitutes references from old type arguments to new type arguments + in the lowered methods. + + + Consider the following method: + void M() { + void L<T>(T t) => Console.Write(t); + L("A"); + } + + In this example, L<T> is a local function that will be + lowered into its own method and the type parameter T will be + alpha renamed to something else (let's call it T'). In this case, + all references to the original type parameter T in L must be + rewritten to the renamed parameter, T'. + + + + + The closure doesn't declare any variables, and is never converted to a delegate. + Lambdas are emitted directly to the containing class as a static method. + + + + + The closure doesn't declare any variables, and is converted to a delegate at least once. + Display class is a singleton and may be shared with other top-level methods. + + + + + The closure only contains a reference to the containing class instance ("this"). + We don't emit a display class, lambdas are emitted directly to the containing class as its instance methods. + + + + + General closure. + Display class may only contain lambdas defined in the same top-level method. + + + + + Visit the expression, but do so in a way that ensures that its type is precise. That means that any + sometimes-unnecessary conversions (such as an implicit reference conversion) are retained. + + + + + A field of a frame class that represents a variable that has been captured in a lambda. + + + + + The synthesized type added to a compilation to hold captured variables for closures. + + + + + The closest method/lambda that this frame is originally from. Null if nongeneric static closure. + Useful because this frame's type parameters are constructed from this method and all methods containing this method. + + + + + All fields should have already been added as synthesized members on the + , so we don't want to duplicate them here. + + + + + A method that results from the translation of a single lambda expression. + + + + + This pass detects and reports diagnostics that do not affect lambda convertibility. + This part of the partial class focuses on features that cannot be used in expression trees. + CAVEAT: Errors may be produced for ObsoleteAttribute, but such errors don't affect lambda convertibility. + + + This pass detects and reports diagnostics that do not affect lambda convertibility. + This part of the partial class focuses on expression and operator warnings. + + + + + Called when a local represents an out variable declaration. Its syntax is of type DeclarationExpressionSyntax. + + + + + This is for when we are taking the address of a field. + Distinguish from . + + + + + This is for when we are dotting into a field. + Distinguish from . + + NOTE: dev11 also calls this on string initializers in fixed statements, + but never accomplishes anything since string is a reference type. This + is probably a bug, but fixing it would be a breaking change. + + + + + Based on OutputContext::IsNonAgileField. + + + + + Returns the expression if the statement is actually an expression (ExpressionStatementSyntax with no trailing semicolon). + + + + + Utility class, provides a convenient way of combining various s in a chain, + allowing each of them to apply specific instrumentations in particular order. + + Default implementation of all APIs delegates to the "previous" passed as a parameter + to the constructor of this class. Usually, derived types are going to let the base (this class) to do its work first + and then operate on the result they get back. + + + + + This type is responsible for adding debugging sequence points for the executable code. + It can be combined with other s. Usually, this class should be + the root of the chain in order to ensure sound debugging experience for the instrumented code. + In other words, sequence points are typically applied after all other changes. + + + + + A singleton object that performs only one type of instrumentation - addition of debugging sequence points. + + + + + Add sequence point |here|: + + foreach (Type var in |expr|) { } + + + Hit once, before looping begins. + + + + + Add sequence point |here|: + + |foreach| (Type var in expr) { } + + + Hit once, before looping begins. + + + + + Add sequence point |here|: + + foreach (|Type var| in expr) { } + + + Hit every iteration. + + + + + This type provides means for instrumenting compiled methods for dynamic analysis. + It can be combined with other s. + + + + + A base class for components that instrument various portions of executable code. + It provides a set of APIs that are called by to instrument + specific portions of the code. These APIs have at least two parameters: + - original bound node produced by the for the relevant portion of the code; + - rewritten bound node created by the for the original node. + The APIs are expected to return new state of the rewritten node, after they apply appropriate + modifications, if any. + + The base class provides default implementation for all APIs, which simply returns the rewritten node. + + + + + The singleton NoOp instrumenter, can be used to terminate the chain of s. + + + + + Return a node that is associated with open brace of the block. Ok to return null. + + + + + Return a node that is associated with close brace of the block. Ok to return null. + + + + + Instrument a switch case when clause, which is translated to a conditional branch to the body of the case block. + + the bound expression of the when clause + the lowered conditional branch into the case block + + + + Instrument the expression of a switch arm of a switch expression. + + + + + The constructor of the class that is the translation of an iterator method. + + + + + A synthesized Finally method containing finalization code for a resumable try statement. + Finalization code for such try may run when: + 1) control flow goes out of try scope by dropping through + 2) control flow goes out of try scope by conditionally or unconditionally branching outside of one ore more try/finally frames. + 3) enumerator is disposed by the owner. + 4) enumerator is being disposed after an exception. + + It is easier to manage partial or complete finalization when every finally is factored out as a separate method. + + NOTE: Finally is a private void nonvirtual instance method with no parameters. + It is a valid JIT inlining target as long as JIT may consider inlining profitable. + + + + + The field of the generated iterator class that underlies the Current property. + + + + + Tells us if a particular try contains yield returns + + + + + When this is more that 0, returns are emitted as "methodValue = value; goto exitLabel;" + + + + + The current iterator finally frame in the tree of finally frames. + By default there is a root finally frame. + Root frame does not have a handler, but may contain nested frames. + + + + + Finally state of the next Finally frame if such created. + Finally state is a negative decreasing number starting with -3. (-2 is used for something else). + Root frame has finally state -1. + + The Finally state is the state that we are in when "between states". + Regular states are positive and are the only states that can be resumed to. + The purpose of distinct finally states is to have enough information about + which finally handlers must run when we need to finalize iterator after a fault. + + + + + Produces a Try/Finally if frame has a handler (otherwise a regular block). + Handler goes into the Finally. + If there are nested frames, they are emitted into the try block. + This way the handler for the current frame is guaranteed to run even if + nested handlers throw exceptions. + + { + switch(state) + { + case state1: + case state2: + case state3: + case state4: + try + { + switch(state) + { + case state3: + case state4: + try + { + ... more nested state dispatches if any .... + } + finally + { + // handler for a try where state3 and state4 can be observed + handler_3_4() + } + break; + } + } + finally + { + // handler for a try where state1 and state2 can be observed + handler_1_2() + } + break; + + case state5: + ... another dispatch of nested states to their finally blocks ... + break; + } + } + + + + + + Analyzes method body for yields in try blocks and labels that they contain. + + + + + Returns true if given try or any of its nested try blocks contain yields + + + + + Returns true if body contains yield returns within try blocks. + + + + + Labels reachable from within this frame without invoking its finally. + null if there are none such labels. + + + + + Analyzes method body for labels. + + + + + Rewrite an iterator method into a state machine class. + + + + + Returns true if all types and members we need are present and good + + + + + Check that the property and its getter exist and collect any use-site errors. + + + + + Add IEnumerator<elementType> IEnumerable<elementType>.GetEnumerator() + + + + + The class that represents a translated iterator method. + + + + + This type helps rewrite the delegate creations that target static method groups to use a cached instance of delegate. + + + + + Lower a block of code by performing local rewritings. + + + + + Return the translated node, or null if no code is necessary in the translation. + + + + + Returns substitution currently used by the rewriter for a placeholder node. + Each occurrence of the placeholder node is replaced with the node returned. + Throws if there is no substitution. + + + + + Sets substitution used by the rewriter for a placeholder node. + Each occurrence of the placeholder node is replaced with the node returned. + Throws if there is already a substitution. + + + + + Removes substitution currently used by the rewriter for a placeholder node. + Asserts if there isn't already a substitution. + + + + + This function provides a false sense of security, it is likely going to surprise you when the requested member is missing. + Recommendation: Do not use, use instead! + If used, a unit-test with a missing member is absolutely a must have. + + + + + This function provides a false sense of security, it is likely going to surprise you when the requested member is missing. + Recommendation: Do not use, use instead! + If used, a unit-test with a missing member is absolutely a must have. + + + + + Returns true if the initializer is a field initializer which should be optimized out + + + + + A common base class for lowering a decision dag. + + + + + Get the builder for code in the given section of the switch. + For an is-pattern expression, this is a singleton. + + + + + The lowered decision dag. This includes all of the code to decide which pattern + is matched, but not the code to assign to pattern variables and evaluate when clauses. + + + + + The label in the code for the beginning of code for each node of the dag. + + + + + A utility class that is used to scan a when clause to determine if it might assign a pattern variable + declared in that case, directly or indirectly. Used to determine if we can skip the allocation of + pattern-matching temporary variables and use user-declared pattern variables instead, because we can + conclude that they are not mutated by a when clause while the pattern-matching automaton is running. + + + + + If we have a type test followed by a cast to that type, and the types are reference types, + then we can replace the pair of them by a conversion using `as` and a null check. + + true if we generated code for the test + + + + Generate a switch dispatch for a contiguous sequence of dag nodes if applicable. + Returns true if it was applicable. + + + + + Push the set of equality tests down to the level of the leaves in the value dispatch tree. + + + + + A comparer for sorting cases containing values of type float, double, or decimal. + + + + + Checks whether we are generating a hash table based string switch and + we need to generate a new helper method for computing string hash value. + Creates the method if needed. + + + + + Translate the decision dag for node, given that it will be followed by the translation for nextNode. + + + + + A node in a tree representing the form of a generated decision tree for classifying an input value. + + + + + A node representing the dispatch by value (equality). This corresponds to a classical C switch + statement, except that it also handles values of type float, double, decimal, and string. + + + + + A node representing a final destination that requires no further dispatch. + + + + + A node representing a dispatch based on a relational test of the input value by some constant. + Nodes of this kind are required to be height-balanced when constructed, so that when the full + decision tree is produced it generates a balanced tree of comparisons. The shape of the tree + keeps tests for lower values on the left and tests for higher values on the right: + For and , + the branch is and the branch + is ; for and + it is reversed. + See for where that is computed. + + + + The side of the test handling lower values. The true side for < and <=, the false side for > and >=. + + + The side of the test handling higher values. The false side for < and <=, the true side for > and >=. + + + + Is the operator among those for which is ? + + + + + A common base class for lowering constructs that use pattern-matching. + + + + + True if we should produce instrumentation and sequence points, which we do for a switch statement and a switch expression. + This affects + - whether or not we invoke the instrumentation APIs + - production of sequence points + - synthesized local variable kind + The temp variables must be long lived in a switch statement since their lifetime spans across sequence points. + + + + + Try setting a user-declared variable (given by its accessing expression) to be + used for a pattern-matching temporary variable. Returns true when not already + assigned. The return value of this method is typically ignored by the caller as + once we have made an assignment we can keep it (we keep the first assignment we + find), but we return a success bool to emphasize that the assignment is not unconditional. + + + + + Return the side-effect expression corresponding to an evaluation. + + + + + Return the boolean expression to be evaluated for the given test. Returns `null` if the test is trivially true. + + + + + Lower a test followed by an evaluation into a side-effect followed by a test. This permits us to optimize + a type test followed by a cast into an `as` expression followed by a null check. Returns true if the optimization + applies and the results are placed into and . The caller + should place the side-effect before the test in the generated code. + + + + + + true if the optimization is applied + + + + Produce assignment of the input expression. This method is also responsible for assigning + variables for some pattern-matching temps that can be shared with user variables. + + + + + We have a decision dag whose input is a tuple literal, and the decision dag does not need the tuple itself. + We rewrite the decision dag into one which doesn't touch the tuple, but instead works directly with the + values that have been stored in temps. This permits the caller to avoid creation of the tuple object + itself. We also emit assignments of the tuple values into their corresponding temps. + + An expression that produces the value of the original input if needed + by the caller. + A new decision dag that does not reference the input directly + + + + Generates a lowered form of the assignment operator for the given left and right sub-expressions. + Left and right sub-expressions must be in lowered form. + + + + + Generates a lowered form of the assignment operator for the given left and right sub-expressions. + Left and right sub-expressions must be in lowered form. + + + + + Lower an await expression that has already had its components rewritten. + + + + + A common base class for lowering the pattern switch statement and the pattern switch expression. + + + + + Map from when clause's syntax to the lowered code for the matched pattern. The code for a section + includes the code to assign to the pattern variables and evaluate the when clause. Since a + when clause can yield a false value, it can jump back to a label in the lowered decision dag. + + + + + Lower the given nodes into _loweredDecisionDag. Should only be called once per instance of this. + + + + + This function provides a false sense of security, it is likely going to surprise you when the requested member is missing. + Recommendation: Do not use, use instead! + If used, a unit-test with a missing member is absolutely a must have. + + + + + This function provides a false sense of security, it is likely going to surprise you when the requested member is missing. + Recommendation: Do not use, use instead! + If used, a unit-test with a missing member is absolutely a must have. + + + + + Spec section 7.9: if the left operand is int or uint, mask the right operand with 0x1F; + if the left operand is long or ulong, mask the right operand with 0x3F. + + + + + This rather confusing method tries to reproduce the functionality of ExpressionBinder::bindPtrAddMul and + ExpressionBinder::bindPtrMul. The basic idea is that we have a numeric expression, x, and a pointer type, + T*, and we want to multiply x by sizeof(T). Unfortunately, we need to stick in some conversions to make + everything work. + + 1) If x is an int, then convert it to an IntPtr (i.e. a native int). Dev10 offers no explanation (ExpressionBinder::bindPtrMul). + 2) Do overload resolution based on the (possibly converted) type of X and int (the type of sizeof(T)). + 3) If the result type of the chosen multiplication operator is signed, convert the product to IntPtr; + otherwise, convert the product to UIntPtr. + + + + + Visit a partial list of statements that possibly contain using declarations + + The array builder to append statements to + The list of statements to visit + The index of the to begin visiting at + An of + + + + Visits a node that is possibly a + + The node to visit + All statements in the block containing this node + The current statement being visited in + Set to true if this visited a node + A + + The node being visited is not necessarily equal to statements[startIndex]. + When traversing down a set of labels, we set node to the label.body and recurse, but statements[startIndex] still refers to the original parent label + as we haven't actually moved down the original statement list + + + + + No special capture of the receiver, unless arguments need to refer to it. + For example, in case of a string interpolation handler. + + + + + Used for a regular indexer compound assignment rewrite. + Everything is going to be in a single setter call with a getter call inside its value argument. + Only receiver and the indexes can be evaluated prior to evaluating the setter call. + + + + + Used for situations when additional arbitrary side-effects are possibly involved. + Think about deconstruction, etc. + + + + + Visits all arguments of a method, doing any necessary rewriting for interpolated string handler conversions that + might be present in the arguments and creating temps for any discard parameters. + + + + + Rewrites arguments of an invocation according to the receiving method or indexer. + It is assumed that each argument has already been lowered, but we may need + additional rewriting for the arguments, such as generating a params array, re-ordering + arguments based on map, inserting arguments for optional parameters, etc. + + + + + Patch refKinds for arguments that match 'In' or 'Ref' parameters to have effective RefKind. + For the purpose of further analysis we will mark the arguments as - + - In if was originally passed as None + - StrictIn if was originally passed as In + - Ref if the argument is an interpolated string literal subject to an interpolated string handler conversion. No other types + are patched here. + Here and in the layers after the lowering we only care about None/notNone differences for the arguments + Except for async stack spilling which needs to know whether arguments were originally passed as "In" and must obey "no copying" rule. + + + + + Returns true if the given argument is the beginning of a list of param array arguments (could be empty), otherwise returns false. + When returns true, numberOfParamArrayArguments is set to the number of param array arguments. + + + + + To create literal expression for IOperation, set localRewriter to null. + + + + + Process tempStores and add them as side-effects to arguments where needed. The return + value tells how many temps are actually needed. For unnecessary temps the corresponding + temp store will be cleared. + + + + + Returns true if the was lowered and transformed. + The is not changed if this function returns false. + + + + + In the expanded form of a compound assignment (or increment/decrement), the LHS appears multiple times. + If we aren't careful, this can result in repeated side-effects. This creates (ordered) temps for all of the + subexpressions that could result in side-effects and returns a side-effect-free expression that can be used + in place of the LHS in the expanded form. + + The LHS sub-expression of the compound assignment (or increment/decrement). + Populated with a list of assignment expressions that initialize the temporary locals. + Populated with a list of temporary local symbols. + True if the compound assignment is a dynamic operation. + + A side-effect-free expression representing the LHS. + The returned node needs to be lowered but its children are already lowered. + + + + + Variables local to current frame do not need temps when re-read multiple times + as long as there is no code that may write to locals in between accesses and they + are not captured. + + Example: + l += goo(ref l); + + even though l is a local, we must access it via a temp since "goo(ref l)" may change it + on between accesses. + + Note: In this.x++, this cannot change between reads. But in (this, ...) == (..., this.Mutate()) it can. + + + + + If the condition has a constant value, then just use the selected branch. + e.g. "true ? x : y" becomes "x". + + + + + Helper method to generate a lowered conversion. + + + + + Helper method to generate a lowered conversion from the given to the given . + + + If we're converting a default parameter value to the parameter type, then the conversion can actually fail + (e.g. if the default value was specified by an attribute and was, therefore, not checked by the compiler). + Set acceptFailingConversion if you want to see default(rewrittenType) in such cases. + The error will be suppressed only for conversions from or . + + + + + If the nullable expression always has a value, returns the value, otherwise null. + This is normally performed on a lowered expression, however for the purpose of + tuples and tuple equality operators, we do this on a partially lowered expression in + which conversions appearing at the top of the expression have not been lowered. + If this method is updated to recognize more complex patterns, callers should be reviewed. + + + + + Reports diagnostics and returns Conversion.NoConversion in case of missing runtime helpers. + + + + + Reports diagnostics and returns Conversion.NoConversion in case of missing runtime helpers. + + + + + Reports diagnostics and returns Conversion.NoConversion in case of missing runtime helpers. + + + + + The left represents a tree of L-values. The structure of right can be missing parts of the tree on the left. + The conversion holds nested conversions and deconstruction information, which matches the tree from the left, + and it provides the information to fill in the missing parts of the tree from the right and convert it to + the tree from the left. + + A bound sequence is returned which has different phases of side-effects: + - the initialization phase includes side-effects from the left, followed by evaluations of the right + - the deconstruction phase includes all the invocations of Deconstruct methods and tuple element accesses below a Deconstruct call + - the conversion phase + - the assignment phase + + + + + This method recurses through leftTargets, right and conversion at the same time. + As it does, it collects side-effects into the proper buckets (init, deconstructions, conversions, assignments). + + The side-effects from the right initially go into the init bucket. But once we started drilling into a Deconstruct + invocation, subsequent side-effects from the right go into the deconstructions bucket (otherwise they would + be evaluated out of order). + + + + + Evaluate side effects into a temp, if any. Return the expression to give the value later. + + The argument to evaluate early. + A store of the argument into a temp, if necessary, is added here. + Any generated temps are added here. + An expression evaluating the argument later (e.g. reading the temp), including a possible deferred user-defined conversion. + + + + Adds the side effects to effects and returns temporaries to access them. + The caller is responsible for releasing the nested ArrayBuilders. + The variables should be unlowered. + + + + + If we have a WinRT type event, we need to encapsulate the adder call + (which returns an EventRegistrationToken) with a call to + WindowsRuntimeMarshal.AddEventHandler or RemoveEventHandler, but these + require us to create a new Func representing the adder and another + Action representing the Remover. + + The rewritten call looks something like: + + WindowsRuntimeMarshal.AddEventHandler<EventHandler> + (new Func<EventHandler, EventRegistrationToken>(@object.add), + new Action<EventRegistrationToken>(@object.remove), handler); + + Where @object is a compiler-generated local temp if needed. + + + TODO: use or delete isDynamic. + + + + + Converts access to a tuple instance into access into the underlying ValueTuple(s). + + For instance, tuple.Item8 + produces fieldAccess(field=Item1, receiver=fieldAccess(field=Rest, receiver=ValueTuple for tuple)) + + + + + Basically, what we need to know is, if an exception occurred within the fixed statement, would + additional code in the current method be executed before its stack frame was popped? + + + + + If two (or more) fixed statements are nested, then we want to avoid having the outer + fixed statement re-traverse the lowered bound tree of the inner one. We accomplish + this by having each fixed statement cache a set of unmatched gotos that can be + reused by any containing fixed statements. + + + + + Look for gotos without corresponding labels in the lowered body of a fixed statement. + + + Assumes continue, break, etc have already been rewritten to gotos. + + + + + + + pinned ref int pinnedTemp = ref v; // pinning managed ref + int* ptr = (int*)&pinnedTemp; // unsafe cast to unmanaged ptr + . . . + ]]> + + + + + + + pinned ref int pinnedTemp = ref v; // pinning managed ref + int* ptr = (int*)&pinnedTemp; // unsafe cast to unmanaged ptr + . . . + ]]> + + + + + fixed(char* ptr = stringVar){ ... } == becomes ===> + + pinned string pinnedTemp = stringVar; // pinning managed ref + char* ptr = (char*)pinnedTemp; // unsafe cast to unmanaged ptr + if (pinnedTemp != null) ptr += OffsetToStringData(); + . . . + + + + + + + pinned int[] pinnedTemp = arr; // pinning managed ref + int* ptr = pinnedTemp != null && pinnedTemp.Length != 0 ? + (int*)&pinnedTemp[0] : // unsafe cast to unmanaged ptr + 0; + . . . + ]]> + + + + + This is the entry point for foreach-loop lowering. It delegates to + RewriteEnumeratorForEachStatement + RewriteSingleDimensionalArrayForEachStatement + RewriteMultiDimensionalArrayForEachStatement + CanRewriteForEachAsFor + + + We are diverging from the C# 4 spec (and Dev10) to follow the C# 5 spec. + The iteration variable will be declared *inside* each loop iteration, + rather than outside the loop. + + + + + Lower a foreach loop that will enumerate a collection using an enumerator. + + + + + + + There are three possible cases where we need disposal: + - pattern-based disposal (we have a Dispose/DisposeAsync method) + - interface-based disposal (the enumerator type converts to IDisposable/IAsyncDisposable) + - we need to do a runtime check for IDisposable + + + + + Produce: + await /* disposeCall */; + + + + + Optionally apply a conversion to the receiver. + + If the receiver is of struct type and the method is an interface method, then skip the conversion. + When we call the interface method directly - the code generator will detect it and generate a + constrained virtual call. + + A syntax node to attach to the synthesized bound node. + Receiver of method call. + Method to invoke. + Conversion to be applied to the receiver if not calling an interface method on a struct. + Type of the receiver after applying the conversion. + + + + Lower a foreach loop that will enumerate a collection via indexing. + + + + + NOTE: We're assuming that sequence points have already been generated. + Otherwise, lowering to for-loops would generated spurious ones. + + + + + Takes the expression for the current value of the iteration variable and either + (1) assigns it into a local, or + (2) deconstructs it into multiple locals (if there is a deconstruct step). + + Produces V v = /* expression */ or (D1 d1, ...) = /* expression */. + + + + + Lower a foreach loop that will enumerate a single-dimensional array. + + A[] a = x; + for (int p = 0; p < a.Length; p = p + 1) { + V v = (V)a[p]; /* OR */ (D1 d1, ...) = (V)a[p]; + // body + } + + + We will follow Dev10 in diverging from the C# 4 spec by ignoring Array's + implementation of IEnumerable and just indexing into its elements. + + NOTE: We're assuming that sequence points have already been generated. + Otherwise, lowering to for-loops would generated spurious ones. + + + + + Lower a foreach loop that will enumerate a multi-dimensional array. + + A[...] a = x; + int q_0 = a.GetUpperBound(0), q_1 = a.GetUpperBound(1), ...; + for (int p_0 = a.GetLowerBound(0); p_0 <= q_0; p_0 = p_0 + 1) + for (int p_1 = a.GetLowerBound(1); p_1 <= q_1; p_1 = p_1 + 1) + ... + { + V v = (V)a[p_0, p_1, ...]; /* OR */ (D1 d1, ...) = (V)a[p_0, p_1, ...]; + /* body */ + } + + + We will follow Dev10 in diverging from the C# 4 spec by ignoring Array's + implementation of IEnumerable and just indexing into its elements. + + NOTE: We're assuming that sequence points have already been generated. + Otherwise, lowering to nested for-loops would generated spurious ones. + + + + + So that the binding info can return an appropriate SemanticInfo.Converted type for the collection + expression of a foreach node, it is wrapped in a BoundConversion to the collection type in the + initial bound tree. However, we may be able to optimize away (or entirely disregard) the conversion + so we pull out the bound node for the underlying expression. + + + + + Used to produce an expression translating to an integer offset + according to the . + The implementation should be in sync with . + + The lowered input for the translation + + An expression accessing the length of the indexing target. This should + be a non-side-effecting operation. + + The translation strategy + + + + Determine the lowering strategy for translating a System.Index value to an integer offset value + and prepare the lowered input for the translation process handled by . + The implementation should be in sync with . + + + + + A local rewriter for lowering an is-pattern expression. This handles the general case by lowering + the decision dag, and returning a "true" or "false" value as the result at the end. + + + + + Accumulates side-effects that come before the next conjunct. + + + + + Accumulates conjuncts (conditions that must all be true) for the translation. When a conjunct is added, + elements of the _sideEffectBuilder, if any, should be added as part of a sequence expression for + the conjunct being added. + + + + + Translate the single test into _sideEffectBuilder and _conjunctBuilder. + + + + + Translate an is-pattern expression into a sequence of tests separated by the control-flow-and operator. + + + + + Lowers a lock statement to a try-finally block that calls Monitor.Enter and Monitor.Exit + before and after the body, respectively. + + + + + A map from section syntax to the first label in that section. + + + + + We revise the returned label for a leaf so that all leaves in the same switch section are given the same label. + This enables the switch emitter to produce better code. + + + + + The strategy of this rewrite is to do rewrite "locally". + We analyze arguments of the concat in a shallow fashion assuming that + lowering and optimizations (including this one) is already done for the arguments. + Based on the arguments we select the most appropriate pattern for the current node. + + NOTE: it is not guaranteed that the node that we chose will be the most optimal since we have only + local information - i.e. we look at the arguments, but we do not know about siblings. + When we move to the parent, the node may be rewritten by this or some another optimization. + + Example: + result = ( "abc" + "def" + null ?? expr1 + "moo" + "baz" ) + expr2 + + Will rewrite into: + result = Concat("abcdef", expr2) + + However there will be transient nodes like Concat(expr1 + "moo") that will not be present in the + resulting tree. + + + + + + digs into known concat operators and unwraps their arguments + otherwise returns the expression as-is + + Generally we only need to recognize same node patterns that we create as a result of concatenation rewrite. + + + + + Determines whether an expression is a known string concat operator (with or without a subsequent ?? ""), and extracts + its args if so. + + True if this is a call to a known string concat operator, false otherwise + + + + folds two concat operands into one expression if possible + otherwise returns null + + + + + folds two concat constants into one if possible + otherwise returns null. + It is generally always possible to concat constants, unless resulting string would be too large. + + + + + Strangely enough there is such a thing as unary concatenation and it must be rewritten. + + + + + Most of the above optimizations are not applicable in expression trees as the operator + must stay a binary operator. We cannot do much beyond constant folding which is done in binder. + + + + + Returns an expression which converts the given expression into a string (or null). + If necessary, this invokes .ToString() on the expression, to avoid boxing value types. + + + + + Helper method to generate a lowered conversion from the given to the given . + + + + + Rewrites the given interpolated string to the set of handler creation and Append calls, returning an array builder of the append calls and the result + local temp. + + Caller is responsible for freeing the ArrayBuilder + + + + Is there any code to execute in the given statement that could have side-effects, + such as throwing an exception? This implementation is conservative, in the sense + that it may return true when the statement actually may have no side effects. + + + + + Rewrite GetTuple() == (1, 2) to tuple.Item1 == 1 && tuple.Item2 == 2. + Also supports the != operator, nullable and nested tuples. + + Note that all the side-effects for visible expressions are evaluated first and from left to right. The initialization phase + contains side-effects for: + - single elements in tuple literals, like a in (a, ...) == (...) for example + - nested expressions that aren't tuple literals, like GetTuple() in (..., GetTuple()) == (..., (..., ...)) + On the other hand, Item1 and Item2 of GetTuple() are not saved as part of the initialization phase of GetTuple() == (..., ...) + + Element-wise conversions occur late, together with the element-wise comparisons. They might not be evaluated. + + + + + Walk down tuple literals and replace all the side-effecting elements that need saving with temps. + Expressions that are not tuple literals need saving, as are tuple literals that are involved in + a simple comparison rather than a tuple comparison. + + + + + Evaluate side effects into a temp, if necessary. If there is an implicit user-defined + conversion operation near the top of the arg, preserve that in the returned expression to be evaluated later. + Conversions at the head of the result are unlowered, though the nested arguments within it are lowered. + That resulting expression must be passed through to + complete the lowering. + + + + + Produce a .HasValue and a .GetValueOrDefault() for nullable expressions that are neither always null or + never null, and functionally equivalent parts for other cases. + + + + + Returns a temp which is initialized with lowered-expression.HasValue + + + + + Produces a chain of equality (or inequality) checks combined logically with AND (or OR) + + + + + For tuple literals, we just return the element. + For expressions with tuple type, we access Item{i+1}. + + + + + Produce an element-wise comparison and logic to ensure the result is a bool type. + + If an element-wise comparison doesn't return bool, then: + - if it is dynamic, we'll do !(comparisonResult.false) or comparisonResult.true + - if it implicitly converts to bool, we'll just do the conversion + - otherwise, we'll do !(comparisonResult.false) or comparisonResult.true (as we'd do for if or while) + + + + + Lower any conversions appearing near the top of the bound expression, assuming non-conversions + appearing below them have already been lowered. + + + + + Converts the expression for creating a tuple instance into an expression creating a ValueTuple (if short) or nested ValueTuples (if longer). + + For instance, for a long tuple we'll generate: + creationExpression(ctor=largestCtor, args=firstArgs+(nested creationExpression for remainder, with smaller ctor and next few args)) + + + + + This rewriter lowers pre-/post- increment/decrement operations (initially represented as + unary operators). We use BoundSequenceExpressions because we need to capture the RHS of the + assignment in a temp variable. + + + This rewriter assumes that it will be run before decimal rewriting (so that it does not have + to lower decimal constants and operations) and call rewriting (so that it does not have to + lower property accesses). + + + + + The rewrites are as follows: suppose the operand x is a variable of type X. The + chosen increment/decrement operator is modelled as a static method on a type T, + which takes a value of type T and returns the result of incrementing or decrementing + that value. + + x++ + X temp = x + x = (X)(T.Increment((T)temp)) + return temp + x-- + X temp = x + x = (X)(T.Decrement((T)temp)) + return temp + ++x + X temp = (X)(T.Increment((T)x)) + x = temp + return temp + --x + X temp = (X)(T.Decrement((T)x)) + x = temp + return temp + + Note: + Dev11 implements dynamic prefix operators incorrectly. + + result = ++x.P is emitted as result = SetMember{"P"}(t, UnaryOperation{Inc}(GetMember{"P"}(x))) + + The difference is that Dev11 relies on SetMember returning the same value as it was given as an argument. + Failing to do so changes the semantics of ++/-- operator which is undesirable. We emit the same pattern for + both dynamic and static operators. + + For example, we might have a class X with user-defined implicit conversions + to and from short, but no user-defined increment or decrement operators. We + would bind x++ as "X temp = x; x = (X)(short)((int)(short)temp + 1); return temp;" + + The unary operator expression representing the increment/decrement. + A bound sequence that uses a temp to achieve the correct side effects and return value. + + + + Transform an expression from a form suitable as an lvalue to a form suitable as an rvalue. + + The children of this node must already be lowered. + Fully lowered node. + + + + Rewrite a using statement into a try finally statement. Four forms are possible: + 1) using (expr) stmt + 2) await using (expr) stmt + 3) using (C c = expr) stmt + 4) await using (C c = expr) stmt + + The first two are handled by RewriteExpressionUsingStatement and the latter two are handled by + RewriteDeclarationUsingStatement (called in a loop, once for each local declared). + + For the async variants, `IAsyncDisposable` is used instead of `IDisposable` and we produce + `... await expr.DisposeAsync() ...` instead of `... expr.Dispose() ...`. + + + It would be more in line with our usual pattern to rewrite using to try-finally + in the ControlFlowRewriter, but if we don't do it here the BoundMultipleLocalDeclarations + will be rewritten into a form that makes them harder to separate. + + + + + Lower "[await] using var x = (expression)" to a try-finally block. + + + + + Lower "using [await] (expression) statement" to a try-finally block. + + + + + Lower "using [await] (ResourceType resource = expression) statement" to a try-finally block. + + + Assumes that the local symbol will be declared (i.e. in the LocalsOpt array) of an enclosing block. + Assumes that using statements with multiple locals have already been split up into multiple using statements. + + + + + The node that declares the type of the resource (might be shared by multiple resource declarations, e.g. using T x = expr, y = expr;) + + + The node that declares the resource storage, e.g. x = expr in using T x = expr, y = expr;. + + + + + The node that declares the type of the resource (might be shared by multiple resource declarations, e.g. using T x = expr, y = expr;) + + + The node that declares the resource storage, e.g. x = expr in using T x = expr, y = expr;. + + + + + Synthesize a call `expression.Method()`, but with some extra smarts to handle extension methods, and to fill-in optional and params parameters. This call expects that the + receiver parameter has already been visited. + + + + + The dynamic operation factories below return this struct so that the caller + have the option of separating the call-site initialization from its invocation. + + Most callers just call to get the combo but some (object and array initializers) + hoist all call-site initialization code and emit multiple invocations of the same site. + + + + + Corresponds to Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags. + + + + + Corresponds to Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags. + + + + + If there are any discards in the arguments, create locals for each, updates the arguments and + returns the symbols that were created. + Returns default if no discards found. + + + + + If an expression node that declares synthesized short-lived locals (currently only sequence) contains + a spill sequence (from an await or switch expression), these locals become long-lived since their + values may be read by code that follows. We promote these variables to long-lived of kind + . + + + + + Rewrite the replacement expression for the hoisted local so all synthesized field are accessed as members + of the appropriate frame. + + + + + A walker that computes the set of local variables of an iterator/async + method that must be hoisted to the state machine. + + + Data flow analysis is used to calculate the locals. At yield/await we mark all variables as "unassigned". + When a read from an unassigned variables is reported we add the variable to the captured set. + "this" parameter is captured if a reference to "this", "base" or an instance field is encountered. + Variables used in finally also need to be captured if there is a yield in the corresponding try block. + + + + + The "state" of the state machine that is the translation of the iterator method. + + + + + Cached "state" of the state machine within the MoveNext method. We work with a copy of + the state to avoid shared mutable state between threads. (Two threads can be executing + in a Task's MoveNext method because an awaited task may complete after the awaiter has + tested whether the subtask is complete but before the awaiter has returned) + + + + + Cached "this" local, used to store the captured "this", which is safe to cache locally since "this" + is semantically immutable. + It would be hard for such caching to happen at JIT level (since JIT does not know that it never changes). + NOTE: this field is null when we are not caching "this" which happens when + - not optimizing + - method is not capturing "this" at all + - containing type is a struct + (we could cache "this" as a ref local for struct containers, + but such caching would not save as much indirection and could actually + be done at JIT level, possibly more efficiently) + + + + + Allocates resumable states, i.e. states that resume execution of the state machine after await expression or yield return. + + + + + For each distinct label, the set of states that need to be dispatched to that label. + Note that there is a dispatch occurring at every try-finally statement, so this + variable takes on a new set of values inside each try block. + + + + + A pool of fields used to hoist locals. They appear in this set when not in scope, + so that members of this set may be allocated to locals when the locals come into scope. + + + + + Fields allocated for temporary variables are given unique names distinguished by a number at the end. + This counter ensures they are unique within a given translated method. + + + + + Used to enumerate the instance fields of a struct. + + + + + The set of local variables and parameters that were hoisted and need a proxy. + + + + + EnC support: the rewriter stores debug info for each await/yield in this builder. + + + + + Generate return statements from the state machine method body. + + + + + Generates code that switches over states and jumps to the target labels listed in . + + + If this is the outermost state dispatch switching over all states of the state machine - i.e. not state dispatch generated for a try-block. + + + + + Translate a statement that declares a given set of locals. Also allocates and frees hoisted temps as + required for the translation. + + The set of locals declared in the original version of this statement + A delegate to return the translation of the body of this statement + + + + Must remain in sync with . + + + + + Must remain in sync with . + + + + + Might the given type be, or contain, managed references? This is used to determine which + fields allocated to temporaries should be cleared when the underlying variable goes out of scope, so + that they do not cause unnecessary object retention. + + + + + The try statement is the most complex part of the state machine transformation. + Since the CLR will not allow a 'goto' into the scope of a try statement, we must + generate the dispatch to the state's label stepwise. That is done by translating + the try statements from the inside to the outside. Within a try statement, we + start with an empty dispatch table (representing the mapping from state numbers + to labels). During translation of the try statement's body, the dispatch table + will be filled in with the data necessary to dispatch once we're inside the try + block. We generate that at the head of the translated try statement. Then, we + copy all of the states from that table into the table for the enclosing construct, + but associate them with a label just before the translated try block. That way + the enclosing construct will generate the code necessary to get control into the + try block for all of those states. + + + + + Set the state field and the cached state + + + + + Allocates resumable states, i.e. states that resume execution of the state machine after await expression or yield return. + + + + + The number of the next generated resumable state (i.e. state that resumes execution of the state machine after await expression or yield return). + + + + + EnC support: number of states in this state machine that match states of the previous generation state machine. + + + + + True if any of the states generated for any previous state machine has not been allocated in this version. + + + + + Represents a synthesized state machine field. + + + + + True if the initial values of locals in the rewritten method and the initial thread ID need to be preserved. (e.g. enumerable iterator methods and async-enumerable iterator methods) + + + + + Add fields to the state machine class that control the state machine. + + + + + Initialize the state machine class. + + + + + Generate implementation-specific state machine initialization for the kickoff method body. + + + + + Generate implementation-specific state machine member method implementations. + + + + + Produce Environment.CurrentManagedThreadId if available, otherwise CurrentThread.ManagedThreadId + + + + + Generate the GetEnumerator() method for iterators and GetAsyncEnumerator() for async-iterators. + + + + + Generate logic to reset the current instance (rather than creating a new instance) + + + + + Returns true if either Thread.ManagedThreadId or Environment.CurrentManagedThreadId are available + + + + + State machine interface method implementation. + + + + + Represents a state machine MoveNext method. + Handles special behavior around inheriting some attributes from the original async/iterator method. + + + + + Represents a state machine method other than a MoveNext method. + All such methods are considered debugger hidden. + + + + + Tracks synthesized fields that are needed in a submission being compiled. + + + For every other submission referenced by this submission we add a field, so that we can access members of the target submission. + A field is also needed for the host object, if provided. + + + + + A helper class for synthesizing quantities of code. + + + + + Thrown by the bound node factory when there is a failure to synthesize code. + An appropriate diagnostic is included that should be reported. Currently + the only diagnostic handled through this mechanism is a missing special/well-known + member. + + + + + A binder suitable for performing overload resolution to synthesize a call to a helper method. + + + + + A binder used only for performing overload resolution of runtime helper methods. + + + + + Create a bound node factory. Note that the use of the factory to get special or well-known members + that do not exist will result in an exception of type being thrown. + + The top-level method that will contain the code + The syntax node to which generated code should be attributed + The state of compilation of the enclosing type + A bag where any diagnostics should be output + + + The top-level method that will contain the code + The enclosing class + The syntax node to which generated code should be attributed + The state of compilation of the enclosing type + A bag where any diagnostics should be output + + + + Get the symbol for a well-known member. The use of this method to get a well-known member + that does not exist will result in an exception of type being thrown + containing an appropriate diagnostic for the caller to report. + + The desired well-known member + If true, the method may return null for a missing member without an exception + A symbol for the well-known member, or null if it is missing and == true + + + + Get the symbol for a special member. The use of this method to get a special member + that does not exist will result in an exception of type MissingPredefinedMember being thrown + containing an appropriate diagnostic for the caller to report. + + The desired special member + A symbol for the special member. + + + + An internal helper class for building a switch statement. + + + + + Produce an int switch. + + + + + Check for (and assert that there are no) duplicate case labels in the switch. + + + + + + Synthesizes an expression that evaluates to the current module's MVID. + + + + + + Synthesizes an expression that evaluates to the index of a source document in the table of debug source documents. + + + + + Helper that will use Array.Empty if available and elements have 0 length + NOTE: it is valid only if we know that the API that is being called will not + retain or use the array argument for any purpose (like locking or key in a hash table) + Typical example of valid use is Linq.Expressions factories - they do not make any + assumptions about array arguments and do not keep them or rely on their identity. + + + + + Takes an expression and returns the bound local expression "temp" + and the bound assignment expression "temp = expr". + + + + + Compiles a list of all labels that are targeted by gotos within a + node, but are not declared within the node. + + + + + newPosition represents the position we are in the final SourceText. As we consume and reuse + nodes from the old tree we will update our position in the new text accordingly. + Likewise, when we must lex tokens out of the new tree we will update as well. + + NOTE(cyrusn): We do not need an oldPosition because it is redundant given the + oldTreeCursor. The oldPosition is implicitly defined by the position of the cursor. + + + + + Affected range of a change is the range within which nodes can be affected by a change + and cannot be reused. Because of lookahead effective range of a change is larger than + the change itself. + + + + + THe cursor represents a location in the tree that we can move around to indicate where + we are in the original tree as we're incrementally parsing. When it is at a node or + token, it can either move forward to that entity's next sibling. It can also move down + to a node's first child or first token. + + Once the cursor hits the end of file, it's done. Note: the cursor will skip any other + zero length nodes in the tree. + + + + + An error/warning directive tells the compiler to indicate a syntactic error/warning + at the current location. + + Format: #error Error message string + Resulting message: from the first non-whitespace character after the directive + keyword until the end of the directive (aka EOD) at the line break or EOF. + Resulting span: [first non-whitespace char, EOD) + + Examples (pipes indicate span): + #error |goo| + #error |goo| + #error |goo | + #error |goo baz| + #error |//goo| + #error |/*goo*/| + #error |/*goo| + + The '#' token. + The 'error' or 'warning' token. + True if the error/warning should be recorded. + An ErrorDirective or WarningDirective node. + + + + These aren't acceptable in place of ASCII quotation marks in XML, + but we want to consume them (and produce an appropriate error) if + they occur in a place where a quotation mark is legal. + + + + + ACASEY: This grammar is derived from the behavior and sources of the native compiler. + Tokens start with underscores (I've cheated for _PredefinedTypeToken, which is not actually a + SyntaxKind), "*" indicates "0 or more", "?" indicates "0 or 1", and parentheses are for grouping. + + Cref = CrefType _DotToken CrefMember + | CrefType + | CrefMember + | CrefFirstType _OpenParenToken CrefParameterList? _CloseParenToken + CrefName = _IdentifierToken (_LessThanToken _IdentifierToken (_CommaToken _IdentifierToken)* _GreaterThanToken)? + CrefFirstType = ((_IdentifierToken _ColonColonToken)? CrefName) + | _PredefinedTypeToken + CrefType = CrefFirstType (_DotToken CrefName)* + CrefMember = CrefName (_OpenParenToken CrefParameterList? _CloseParenToken)? + | _ThisKeyword (_OpenBracketToken CrefParameterList _CloseBracketToken)? + | _OperatorKeyword _OperatorToken (_OpenParenToken CrefParameterList? _CloseParenToken)? + | (_ImplicitKeyword | _ExplicitKeyword) _OperatorKeyword CrefParameterType (_OpenParenToken CrefParameterList? _CloseParenToken)? + CrefParameterList = CrefParameter (_CommaToken CrefParameter)* + CrefParameter = (_RefKeyword | _OutKeyword)? CrefParameterType + CrefParameterType = CrefParameterType2 _QuestionToken? _AsteriskToken* (_OpenBracketToken _CommaToken* _CloseBracketToken)* + CrefParameterType2 = (((_IdentifierToken _ColonColonToken)? CrefParameterType3) | _PredefinedTypeToken) (_DotToken CrefParameterType3)* + CrefParameterType3 = _IdentifierToken (_LessThanToken CrefParameterType (_CommaToken CrefParameterType)* _GreaterThanToken)? + + NOTE: type parameters, not type arguments + NOTE: the first production of Cref is preferred to the other two + NOTE: pointer, array, and nullable types only work in parameters + NOTE: CrefParameterType2 and CrefParameterType3 correspond to CrefType and CrefName, respectively. + Since the only difference is that they accept non-identifier type arguments, this is accomplished + using parameters on the parsing methods (rather than whole new methods). + + + + + Parse the custom cref syntax for a named member (method, property, etc), + an indexer, an overloadable operator, or a user-defined conversion. + + + + + Parse a named member (method, property, etc), with optional type + parameters and regular parameters. + + + + + Parse an indexer member, with optional parameters. + + + + + Parse an overloadable operator, with optional parameters. + + + + + Parse a user-defined conversion, with optional parameters. + + + + + Parse a parenthesized parameter list. + + + + + Parse a bracketed parameter list. + + + + + Parse the parameter list (if any) of a cref member (name, indexer, operator, or conversion). + + + + + True if the current token could be the beginning of a cref parameter. + + + + + Parse an element of a cref parameter list. + + + "ref" and "out" work, but "params", "this", and "__arglist" don't. + + + + + Parse an identifier, optionally followed by an angle-bracketed list of type parameters. + + True to give an error when a non-identifier + type argument is seen, false to accept. No change in the shape of the tree. + + + + Parse a type. May include an alias, a predefined type, and/or a qualified name. + + + Pointer, nullable, or array types are only allowed if is false. + Leaves a dot and a name unconsumed if the name is not followed by another dot + and checkForMember is true. + + True to give an error when a non-identifier + type argument is seen, false to accept. No change in the shape of the tree. + True means that the last name should not be consumed + if it is followed by a parameter list. + + + + Parse a type. May include an alias, a predefined type, and/or a qualified name. + + + No pointer, nullable, or array types. + Leaves a dot and a name unconsumed if the name is not followed by another dot + and checkForMember is true. + + True to give an error when a non-identifier + type argument is seen, false to accept. No change in the shape of the tree. + True means that the last name should not be consumed + if it is followed by a parameter list. + + + + Once the name part of a type (including type parameter/argument lists) is parsed, + we need to consume ?, *, and rank specifiers. + + + + + Ends at appropriate quotation mark, EOF, or EndOfDocumentationComment. + + + + + Convenience method for checking the mode. + + + + + Ends at appropriate quotation mark, EOF, or EndOfDocumentationComment. + + + + + Set of well-known SyntaxTokens commonly found within XML doc comments. + + + + + Look up a well known SyntaxToken for a given XML element tag or attribute. + This is a performance optimization to avoid creating duplicate tokens for the same content. + + The text of the tag or attribute. + The leading trivia of the token. + The SyntaxToken representing the well-known tag or attribute or null if it's not well-known. + + + + Returns true if the lookahead tokens compose extern alias directive. + + + + + Changes in this function around member parsing should be mirrored in . + Try keeping structure of both functions similar to simplify this task. The split was made to + reduce the stack usage during recursive parsing. + + Returns null if we can't parse anything (even partially). + + + + Changes in this function should be mirrored in . + Try keeping structure of both functions similar to simplify this task. The split was made to + reduce the stack usage during recursive parsing. + + Returns null if we can't parse anything (even partially). + + + + Parses any block or expression bodies that are present. Also parses + the trailing semicolon if one is present. + + + + + WARNING: it is possible that "list" is really the underlying builder of a SeparateSyntaxListBuilder, + so it is important that we not add anything to the list. + + + + + Parses the !! as skipped tokens following a parameter name token. If the parameter name + is followed by !!= or ! !=, then the final equals will be returned through . + + + + + Merges two successive tokens into a single token with the given . If the two tokens + have no trivia between them, then the final token will be trivially generated, properly passing on the right + leading/trailing trivia. However, if there is trivia between the tokens, then appropriate errors will be + reported that the tokens cannot merge successfully. + + + IsFabricatedToken should be updated for tokens whose SyntaxKind is . + + + + + True if current identifier token is not really some contextual keyword + + + + + + True if the given token is not really some contextual keyword. + This method is for use in executable code, as it treats partial as an identifier. + + + + + This is an adjusted version of . + When it returns true, it stops at operator keyword (). + When it returns false, it does not advance in the token stream. + + + + + Definitely not a type name. + + + + + Definitely a type name: either a predefined type (int, string, etc.) or an array + type (ending with a [] brackets), or a pointer type (ending with *s), or a function + pointer type (ending with > in valid cases, or a *, ), or calling convention + identifier, in invalid cases). + + + + + Might be a generic (qualified) type name or a method name. + + + + + Might be a generic (qualified) type name or an expression or a method name. + + + + + Might be a non-generic (qualified) type name or an expression. + + + + + A type name with alias prefix (Alias::Name). Note that Alias::Name.X would not fall under this. This + only is returned for exactly Alias::Name. + + + + + Nullable type (ending with ?). + + + + + Might be a pointer type or a multiplication. + + + + + Might be a tuple type. + + + + + Returns TupleType when a possible tuple type is found. + Note that this is not MustBeType, so that the caller can consider deconstruction syntaxes. + The caller is expected to have consumed the opening paren. + + + + If we're being called while parsing a C# top-level statements (Script or Simple Program). + At the top level in Script, we allow most statements *except* for local-decls/local-funcs. + Those will instead be parsed out as script-fields/methods. + + + + true if the current token can be the first token of a typed identifier (a type name followed by an identifier), + false if it definitely can't be, + null if we need to scan further to find out. + + + + + Used to parse the block-body for a method or accessor. For blocks that appear *inside* + method bodies, call . + + If is true, then we produce a special diagnostic if the + open brace is missing. + + + + Used to parse normal blocks that appear inside method bodies. For the top level block + of a method/accessor use . + + + + + Is the following set of tokens, interpreted as a type, the type var? + + + + + Parses any kind of local declaration statement: local variable or local function. + + + + + Parse a single variable designation (e.g. x) or a wildcard designation (e.g. _) + + + + + + Parse a local variable declaration. + + + + + + Is the current token one that could start an expression? + + + + + Is the current token one that could be in an expression? + + + + + Parse a subexpression of the enclosing operator of the given precedence. + + + + + Returns true if... + 1. The precedence is less than or equal to Assignment, and + 2. The current token is the identifier var or a predefined type, and + 3. it is followed by (, and + 4. that ( begins a valid parenthesized designation, and + 5. the token following that designation is = + + + + + Tokens that match the following are considered a possible lambda expression: + attribute-list* ('async' | 'static')* type? ('(' | identifier) ... + For better error recovery 'static =>' is also considered a possible lambda expression. + + + + + Parse expected lambda expression but assume `x ? () => y :` is a conditional + expression rather than a lambda expression with an explicit return type and + return null in that case only. + + + + + Interpret the given raw text from source as an InterpolatedStringTextToken. + + The text for the full string literal, including the quotes and contents + The kind of the interpolated string we were processing + + + + Parses the type, or pattern, right-hand operand of an is expression. + Priority is the TypeSyntax. It may return a TypeSyntax which turns out in binding to + be a constant pattern such as enum 'Days.Sunday'. We handle such cases in the binder of the is operator. + Note that the syntax `_` will be parsed as a type. + + + + + Given tk, the type of the current token, does this look like the type of a pattern? + + + + + Is the current token something that could follow a type in a pattern? + + + + + Check the next token to see if it is valid as the first token of a subpattern element. + Used to assist in error recovery for subpattern lists (e.g. determining which tokens to skip) + to ensure we make forward progress during recovery. + + + + + The lexer is for the contents of an interpolation that is followed by a colon that signals the start of the format string. + + + + + This method is essentially the same as ScanIdentifier_SlowPath, + except that it can handle XML entities. Since ScanIdentifier + is hot code and since this method does extra work, it seem + worthwhile to separate it from the common case. + + + + + + + Scans a new-line sequence (either a single new-line character or a CR-LF combo). + + A trivia node with the new-line text + + + + Scans all of the whitespace (not new-lines) into a trivia node until it runs out. + + A trivia node with the whitespace text + + + + Lexer entry point for LexMode.XmlDocComment + + + + + Lexer entry point for LexMode.XmlElementTag + + + + + Determines whether this Unicode character can start a XMLName. + + The Unicode character. + + + + Determines if this Unicode character can be part of an XML Name. + + The Unicode character. + + + + Lexer entry point for LexMode.XmlAttributeText + + + + + Lexer entry point for LexerMode.XmlCharacter. + + + + + Scan a single XML character (or entity). Assumes that leading trivia has already + been consumed. + + + + + Lexer entry point for LexerMode.XmlCrefQuote, LexerMode.XmlCrefDoubleQuote, + LexerMode.XmlNameQuote, and LexerMode.XmlNameDoubleQuote. + + + + + Scan a single cref attribute token. Assumes that leading trivia has already + been consumed. + + + Within this method, characters that are not XML meta-characters can be seamlessly + replaced with the corresponding XML entities. + + + + + Given a character, advance the input if either the character or the + corresponding XML entity appears next in the text window. + + + + + + + Convenience property for determining whether we are currently lexing the + value of a cref or name attribute. + + + + + Convenience property for determining whether we are currently lexing the + value of a name attribute. + + + + + Diagnostics that occur within cref attributes need to be + wrapped with ErrorCode.WRN_ErrorOverride. + + + + + Diagnostics that occur within cref attributes need to be + wrapped with ErrorCode.WRN_ErrorOverride. + + + + + Lexer entry point for LexMode.XmlCDataSectionText + + + + + Lexer entry point for LexMode.XmlCommentText + + + + + Lexer entry point for LexMode.XmlProcessingInstructionText + + + + + Collects XML doc comment exterior trivia, and therefore is a no op unless we are in the Start or Exterior of an XML doc comment. + + List in which to collect the trivia + + + + Collects whitespace and new line trivia for XML doc comments. Does not see XML doc comment exterior trivia, and is a no op unless we are in the interior. + + List in which to collect the trivia + + + + Range of the format colon in the interpolation. Empty if there is no colon. + + + + + Range of the close brace. Empty if there was no close brace (an error condition). + + + + The number of quotes that were consumed + + + + Returns true if starts with . + + + + + Turn a (parsed) interpolated string nonterminal into an interpolated string token. + + + + + + Normal interpolated string that just starts with $" + + + + + Verbatim interpolated string that starts with $@" or @$" + + + + + Single-line raw interpolated string that starts with at least one $, and at least three "s. + + + + + Multi-line raw interpolated string that starts with at least one $, and at least three "s. + + + + + Non-copyable ref-struct so that this will only live on the stack for the lifetime of the lexer/parser + recursing to process interpolated strings. + + + + + Error encountered while scanning. If we run into an error, then we'll attempt to stop parsing at the + next potential ending location to prevent compounding the issue. + + + + + Number of '$' characters this interpolated string started with. We'll need to see that many '{' in a + row to start an interpolation. Any less and we'll treat that as just text. Note if this count is '1' + then this is a normal (non-raw) interpolation and `{{` is treated as an escape. + + Number of '"' characters this interpolated string started with. + if we successfully processed the open quote range and can proceed to the + rest of the literal. if we were not successful and should stop + processing. + + + + Returns if the quote was an end delimiter and lexing of the contents of the + interpolated string literal should stop. If it was an end delimiter it will not be consumed. If it is + content and should not terminate the string then it will be consumed by this method. + + + + + Scan past the hole inside an interpolated string literal, leaving the current character on the '}' (if any) + + + + + The lexer can run away consuming the rest of the input when delimiters are mismatched. This is a test + for when we are attempting to recover from that situation. Note that just running into new lines will + not make us think we're in runaway lexing. + + + + + Keeps a sliding buffer over the SourceText of a file for the lexer. Also + provides the lexer with the ability to keep track of a current "lexeme" + by leaving a marker and advancing ahead the offset. The lexer can then + decide to "keep" the lexeme by erasing the marker, or abandon the current + lexeme by moving the offset back to the marker. + + + + + In many cases, e.g. PeekChar, we need the ability to indicate that there are + no characters left and we have reached the end of the stream, or some other + invalid or not present character was asked for. Due to perf concerns, things + like nullable or out variables are not viable. Instead we need to choose a + char value which can never be legal. + + In .NET, all characters are represented in 16 bits using the UTF-16 encoding. + Fortunately for us, there are a variety of different bit patterns which + are *not* legal UTF-16 characters. 0xffff (char.MaxValue) is one of these + characters -- a legal Unicode code point, but not a legal UTF-16 bit pattern. + + + + + The current absolute position in the text file. + + + + + The current offset inside the window (relative to the window start). + + + + + The buffer backing the current window. + + + + + Returns the start of the current lexeme relative to the window start. + + + + + Number of characters in the character window. + + + + + The absolute position of the start of the current lexeme in the given + SourceText. + + + + + The number of characters in the current lexeme. + + + + + Start parsing a new lexeme. + + + + + After reading , a consumer can determine + if the InvalidCharacter was in the user's source or a sentinel. + + Comments and string literals are allowed to contain any Unicode character. + + + + + + Advance the current position by one. No guarantee that this + position is valid. + + + + + Advance the current position by n. No guarantee that this position + is valid. + + + + + Moves past the newline that the text window is currently pointing at. The text window must be pointing at a + newline. If the newline is \r\n then that entire sequence will be skipped. Otherwise, the text + window will only advance past a single character. + + + + + Gets the length of the newline the text window must be pointing at here. For \r\n this is 2, + for everything else, this is 1. + + + + + Grab the next character and advance the position. + + + The next character, if there were no characters + remaining. + + + + + Gets the next character if there are any characters in the + SourceText. May advance the window if we are at the end. + + + The next character if any are available. InvalidCharacter otherwise. + + + + + Gets the character at the given offset to the current position if + the position is valid within the SourceText. + + + The next character if any are available. InvalidCharacter otherwise. + + + + + Given that the next character is an ampersand ('&'), attempt to interpret the + following characters as an XML entity. On success, populate the out parameters + with the low and high UTF-16 surrogates for the character represented by the + entity. + + e.g. '<' for &lt;. + e.g. '\uDC00' for &#x10000; (ch == '\uD800'). + True if a valid XML entity was consumed. + + NOTE: Always advances, even on failure. + + + + + If the next characters in the window match the given string, + then advance past those characters. Otherwise, do nothing. + + + + + Because syntax nodes need to be constructed with context information - to allow us to + determine whether or not they can be reused during incremental parsing - the syntax + factory needs a view of some internal parser state. + + + Read-only outside SyntaxParser (not enforced for perf reasons). + Reference type so that the factory stays up-to-date. + + + + + If a method goes from async to non-async, or vice versa, then every occurrence of "await" + within the method (but not within a lambda) needs to be reinterpreted, to determine whether + it is a keyword or an identifier. + + + + + If the end of a query expression statement is commented out, then the following statement may + appear to be part of the query. When this occurs, identifiers within the following statement + may need to be reinterpreted as query keywords. + + + + + Returns and consumes the current token if it has the requested . + Otherwise, returns . + + + + + Converts skippedSyntax node into tokens and adds these as trivia on the target token. + Also adds the first error (in depth-first preorder) found in the skipped syntax tree to the target token. + + + + + This function searches for the given location node within the subtree rooted at root node. + If it finds it, the function computes the offset span of that child node within the root and returns true, + otherwise it returns false. + + Root node + Node to search in the subtree rooted at root node + Offset of the location node within the subtree rooted at child + + + + + NOTE: we are specifically diverging from dev11 to improve the user experience. + Since treating the "async" keyword as an identifier in older language + versions can never result in a correct program, we instead accept it as a + keyword regardless of the language version and produce an error if the version + is insufficient. + + + + + Whenever parsing in a while (true) loop and a bug could prevent the loop from making progress, + this method can prevent the parsing from hanging. + Use as: + int tokenProgress = -1; + while (IsMakingProgress(ref tokenProgress)) + It should be used as a guardrail, not as a crutch, so it asserts if no progress was made. + + + + + Should only be called during construction. + + + This should probably be an extra constructor parameter, but we don't need more constructor overloads. + + + + + Gets the syntax node represented the structure of this trivia, if any. The HasStructure property can be used to + determine if this trivia has structure. + + + A CSharpSyntaxNode derived from StructuredTriviaSyntax, with the structured view of this trivia node. + If this trivia node does not have structure, returns null. + + + Some types of trivia have structure that can be accessed as additional syntax nodes. + These forms of trivia include: + directives, where the structure describes the structure of the directive. + documentation comments, where the structure describes the XML structure of the comment. + skipped tokens, where the structure describes the tokens that were skipped by the parser. + + + + Class which represents the syntax node for identifier name. + + + SyntaxToken representing the keyword for the kind of the identifier name. + + + Class which represents the syntax node for name colon syntax. + + + IdentifierNameSyntax representing the identifier name. + + + SyntaxToken representing colon. + + + + Creates a token whose and are the same. + + + + + Returns the string representation of this token, not including its leading and trailing trivia. + + The string representation of this token, not including its leading and trailing trivia. + The length of the returned string is always the same as Span.Length + + + Provides the base class from which the classes that represent type syntax nodes are derived. This is an abstract class. + + + Provides the base class from which the classes that represent name syntax nodes are derived. This is an abstract class. + + + Provides the base class from which the classes that represent simple name syntax nodes are derived. This is an abstract class. + + + SyntaxToken representing the identifier of the simple name. + + + Class which represents the syntax node for qualified name. + + + NameSyntax node representing the name on the left side of the dot token of the qualified name. + + + SyntaxToken representing the dot. + + + SimpleNameSyntax node representing the name on the right side of the dot token of the qualified name. + + + Class which represents the syntax node for generic name. + + + SyntaxToken representing the name of the identifier of the generic name. + + + TypeArgumentListSyntax node representing the list of type arguments of the generic name. + + + Class which represents the syntax node for type argument list. + + + SyntaxToken representing less than. + + + SeparatedSyntaxList of TypeSyntax node representing the type arguments. + + + SyntaxToken representing greater than. + + + Class which represents the syntax node for alias qualified name. + + + IdentifierNameSyntax node representing the name of the alias + + + SyntaxToken representing colon colon. + + + SimpleNameSyntax node representing the name that is being alias qualified. + + + Class which represents the syntax node for predefined types. + + + SyntaxToken which represents the keyword corresponding to the predefined type. + + + Class which represents the syntax node for the array type. + + + TypeSyntax node representing the type of the element of the array. + + + SyntaxList of ArrayRankSpecifierSyntax nodes representing the list of rank specifiers for the array. + + + Class which represents the syntax node for pointer type. + + + TypeSyntax node that represents the element type of the pointer. + + + SyntaxToken representing the asterisk. + + + SyntaxToken representing the delegate keyword. + + + SyntaxToken representing the asterisk. + + + Node representing the optional calling convention. + + + List of the parameter types and return type of the function pointer. + + + Function pointer parameter list syntax. + + + SyntaxToken representing the less than token. + + + SeparatedSyntaxList of ParameterSyntaxes representing the list of parameters and return type. + + + SyntaxToken representing the greater than token. + + + Function pointer calling convention syntax. + + + SyntaxToken representing whether the calling convention is managed or unmanaged. + + + Optional list of identifiers that will contribute to an unmanaged calling convention. + + + Function pointer calling convention syntax. + + + SyntaxToken representing open bracket. + + + SeparatedSyntaxList of calling convention identifiers. + + + SyntaxToken representing close bracket. + + + Individual function pointer unmanaged calling convention. + + + SyntaxToken representing the calling convention identifier. + + + Class which represents the syntax node for a nullable type. + + + TypeSyntax node representing the type of the element. + + + SyntaxToken representing the question mark. + + + Class which represents the syntax node for tuple type. + + + SyntaxToken representing the open parenthesis. + + + SyntaxToken representing the close parenthesis. + + + Tuple type element. + + + Gets the type of the tuple element. + + + Gets the name of the tuple element. + + + Class which represents a placeholder in the type argument list of an unbound generic type. + + + SyntaxToken representing the omitted type argument. + + + The ref modifier of a method's return value or a local. + + + Gets the optional "readonly" keyword. + + + The 'scoped' modifier of a local. + + + Provides the base class from which the classes that represent expression syntax nodes are derived. This is an abstract class. + + + Class which represents the syntax node for parenthesized expression. + + + SyntaxToken representing the open parenthesis. + + + ExpressionSyntax node representing the expression enclosed within the parenthesis. + + + SyntaxToken representing the close parenthesis. + + + Class which represents the syntax node for tuple expression. + + + SyntaxToken representing the open parenthesis. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing the close parenthesis. + + + Class which represents the syntax node for prefix unary expression. + + + SyntaxToken representing the kind of the operator of the prefix unary expression. + + + ExpressionSyntax representing the operand of the prefix unary expression. + + + Class which represents the syntax node for an "await" expression. + + + SyntaxToken representing the kind "await" keyword. + + + ExpressionSyntax representing the operand of the "await" operator. + + + Class which represents the syntax node for postfix unary expression. + + + ExpressionSyntax representing the operand of the postfix unary expression. + + + SyntaxToken representing the kind of the operator of the postfix unary expression. + + + Class which represents the syntax node for member access expression. + + + ExpressionSyntax node representing the object that the member belongs to. + + + SyntaxToken representing the kind of the operator in the member access expression. + + + SimpleNameSyntax node representing the member being accessed. + + + Class which represents the syntax node for conditional access expression. + + + ExpressionSyntax node representing the object conditionally accessed. + + + SyntaxToken representing the question mark. + + + ExpressionSyntax node representing the access expression to be executed when the object is not null. + + + Class which represents the syntax node for member binding expression. + + + SyntaxToken representing dot. + + + SimpleNameSyntax node representing the member being bound to. + + + Class which represents the syntax node for element binding expression. + + + BracketedArgumentListSyntax node representing the list of arguments of the element binding expression. + + + Class which represents the syntax node for a range expression. + + + ExpressionSyntax node representing the expression on the left of the range operator. + + + SyntaxToken representing the operator of the range expression. + + + ExpressionSyntax node representing the expression on the right of the range operator. + + + Class which represents the syntax node for implicit element access expression. + + + BracketedArgumentListSyntax node representing the list of arguments of the implicit element access expression. + + + Class which represents an expression that has a binary operator. + + + ExpressionSyntax node representing the expression on the left of the binary operator. + + + SyntaxToken representing the operator of the binary expression. + + + ExpressionSyntax node representing the expression on the right of the binary operator. + + + Class which represents an expression that has an assignment operator. + + + ExpressionSyntax node representing the expression on the left of the assignment operator. + + + SyntaxToken representing the operator of the assignment expression. + + + ExpressionSyntax node representing the expression on the right of the assignment operator. + + + Class which represents the syntax node for conditional expression. + + + ExpressionSyntax node representing the condition of the conditional expression. + + + SyntaxToken representing the question mark. + + + ExpressionSyntax node representing the expression to be executed when the condition is true. + + + SyntaxToken representing the colon. + + + ExpressionSyntax node representing the expression to be executed when the condition is false. + + + Provides the base class from which the classes that represent instance expression syntax nodes are derived. This is an abstract class. + + + Class which represents the syntax node for a this expression. + + + SyntaxToken representing the this keyword. + + + Class which represents the syntax node for a base expression. + + + SyntaxToken representing the base keyword. + + + Class which represents the syntax node for a literal expression. + + + SyntaxToken representing the keyword corresponding to the kind of the literal expression. + + + Class which represents the syntax node for MakeRef expression. + + + SyntaxToken representing the MakeRefKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for RefType expression. + + + SyntaxToken representing the RefTypeKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for RefValue expression. + + + SyntaxToken representing the RefValueKeyword. + + + SyntaxToken representing open parenthesis. + + + Typed reference expression. + + + Comma separating the arguments. + + + The type of the value. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for Checked or Unchecked expression. + + + SyntaxToken representing the checked or unchecked keyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for Default expression. + + + SyntaxToken representing the DefaultKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for TypeOf expression. + + + SyntaxToken representing the TypeOfKeyword. + + + SyntaxToken representing open parenthesis. + + + The expression to return type of. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for SizeOf expression. + + + SyntaxToken representing the SizeOfKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for invocation expression. + + + ExpressionSyntax node representing the expression part of the invocation. + + + ArgumentListSyntax node representing the list of arguments of the invocation expression. + + + Class which represents the syntax node for element access expression. + + + ExpressionSyntax node representing the expression which is accessing the element. + + + BracketedArgumentListSyntax node representing the list of arguments of the element access expression. + + + Provides the base class from which the classes that represent argument list syntax nodes are derived. This is an abstract class. + + + SeparatedSyntaxList of ArgumentSyntax nodes representing the list of arguments. + + + Class which represents the syntax node for the list of arguments. + + + SyntaxToken representing open parenthesis. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for bracketed argument list. + + + SyntaxToken representing open bracket. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing close bracket. + + + Class which represents the syntax node for argument. + + + NameColonSyntax node representing the optional name arguments. + + + SyntaxToken representing the optional ref or out keyword. + + + ExpressionSyntax node representing the argument. + + + Class which represents the syntax node for the variable declaration in an out var declaration or a deconstruction declaration. + + + Declaration representing the variable declared in an out parameter or deconstruction. + + + Class which represents the syntax node for cast expression. + + + SyntaxToken representing the open parenthesis. + + + TypeSyntax node representing the type to which the expression is being cast. + + + SyntaxToken representing the close parenthesis. + + + ExpressionSyntax node representing the expression that is being casted. + + + Provides the base class from which the classes that represent anonymous function expressions are derived. + + + + BlockSyntax node representing the body of the anonymous function. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the anonymous function. + Only one of Block or ExpressionBody will be non-null. + + + + Class which represents the syntax node for anonymous method expression. + + + SyntaxToken representing the delegate keyword. + + + List of parameters of the anonymous method expression, or null if there no parameters are specified. + + + + BlockSyntax node representing the body of the anonymous function. + This will never be null. + + + + + Inherited from AnonymousFunctionExpressionSyntax, but not used for + AnonymousMethodExpressionSyntax. This will always be null. + + + + Provides the base class from which the classes that represent lambda expressions are derived. + + + SyntaxToken representing equals greater than. + + + Class which represents the syntax node for a simple lambda expression. + + + ParameterSyntax node representing the parameter of the lambda expression. + + + SyntaxToken representing equals greater than. + + + + BlockSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + Class which represents the syntax node for parenthesized lambda expression. + + + ParameterListSyntax node representing the list of parameters for the lambda expression. + + + SyntaxToken representing equals greater than. + + + + BlockSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + Class which represents the syntax node for initializer expression. + + + SyntaxToken representing the open brace. + + + SeparatedSyntaxList of ExpressionSyntax representing the list of expressions in the initializer expression. + + + SyntaxToken representing the close brace. + + + SyntaxToken representing the new keyword. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + Class which represents the syntax node for implicit object creation expression. + + + SyntaxToken representing the new keyword. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + Class which represents the syntax node for object creation expression. + + + SyntaxToken representing the new keyword. + + + TypeSyntax representing the type of the object being created. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + InitializerExpressionSyntax representing the initializer expression for the with expression. + + + NameEqualsSyntax representing the optional name of the member being initialized. + + + ExpressionSyntax representing the value the member is initialized with. + + + Class which represents the syntax node for anonymous object creation expression. + + + SyntaxToken representing the new keyword. + + + SyntaxToken representing the open brace. + + + SeparatedSyntaxList of AnonymousObjectMemberDeclaratorSyntax representing the list of object member initializers. + + + SyntaxToken representing the close brace. + + + Class which represents the syntax node for array creation expression. + + + SyntaxToken representing the new keyword. + + + ArrayTypeSyntax node representing the type of the array. + + + InitializerExpressionSyntax node representing the initializer of the array creation expression. + + + Class which represents the syntax node for implicit array creation expression. + + + SyntaxToken representing the new keyword. + + + SyntaxToken representing the open bracket. + + + SyntaxList of SyntaxToken representing the commas in the implicit array creation expression. + + + SyntaxToken representing the close bracket. + + + InitializerExpressionSyntax representing the initializer expression of the implicit array creation expression. + + + Class which represents the syntax node for stackalloc array creation expression. + + + SyntaxToken representing the stackalloc keyword. + + + TypeSyntax node representing the type of the stackalloc array. + + + InitializerExpressionSyntax node representing the initializer of the stackalloc array creation expression. + + + Class which represents the syntax node for implicit stackalloc array creation expression. + + + SyntaxToken representing the stackalloc keyword. + + + SyntaxToken representing the open bracket. + + + SyntaxToken representing the close bracket. + + + InitializerExpressionSyntax representing the initializer expression of the implicit stackalloc array creation expression. + + + Gets the identifier. + + + Gets the identifier. + + + Gets the identifier. + + + Gets the identifier. + + + Gets the identifier. + + + Class which represents a placeholder in an array size list. + + + SyntaxToken representing the omitted array size expression. + + + The first part of an interpolated string, $" or $@" or $""" + + + List of parts of the interpolated string, each one is either a literal part or an interpolation. + + + The closing quote of the interpolated string. + + + Class which represents a simple pattern-matching expression using the "is" keyword. + + + ExpressionSyntax node representing the expression on the left of the "is" operator. + + + PatternSyntax node representing the pattern on the right of the "is" operator. + + + ExpressionSyntax node representing the constant expression. + + + SyntaxToken representing the operator of the relational pattern. + + + The type for the type pattern. + + + The text contents of a part of the interpolated string. + + + This could be a single { or multiple in a row (in the case of an interpolation in a raw interpolated string). + + + + This could be a single } or multiple in a row (in the case of an interpolation in a raw interpolated string). + + + + The text contents of the format specifier for an interpolation. + + + Represents the base class for all statements syntax classes. + + + Gets the identifier. + + + Gets the optional semicolon token. + + + Gets the modifier list. + + + Gets the identifier. + + + Represents a labeled statement syntax. + + + Gets the identifier. + + + Gets a SyntaxToken that represents the colon following the statement's label. + + + + Represents a goto statement syntax + + + + + Gets a SyntaxToken that represents the goto keyword. + + + + + Gets a SyntaxToken that represents the case or default keywords if any exists. + + + + + Gets a constant expression for a goto case statement. + + + + + Gets a SyntaxToken that represents the semi-colon at the end of the statement. + + + + Gets the identifier. + + + + The variable(s) of the loop. In correct code this is a tuple + literal, declaration expression with a tuple designator, or + a discard syntax in the form of a simple identifier. In broken + code it could be something else. + + + + + Represents an if statement syntax. + + + + + Gets a SyntaxToken that represents the if keyword. + + + + + Gets a SyntaxToken that represents the open parenthesis before the if statement's condition expression. + + + + + Gets an ExpressionSyntax that represents the condition of the if statement. + + + + + Gets a SyntaxToken that represents the close parenthesis after the if statement's condition expression. + + + + + Gets a StatementSyntax the represents the statement to be executed when the condition is true. + + + + + Gets an ElseClauseSyntax that represents the statement to be executed when the condition is false if such statement exists. + + + + Represents an else statement syntax. + + + + Gets a syntax token + + + + Represents a switch statement syntax. + + + + Gets a SyntaxToken that represents the switch keyword. + + + + + Gets a SyntaxToken that represents the open parenthesis preceding the switch governing expression. + + + + + Gets an ExpressionSyntax representing the expression of the switch statement. + + + + + Gets a SyntaxToken that represents the close parenthesis following the switch governing expression. + + + + + Gets a SyntaxToken that represents the open braces preceding the switch sections. + + + + + Gets a SyntaxList of SwitchSectionSyntax's that represents the switch sections of the switch statement. + + + + + Gets a SyntaxToken that represents the open braces following the switch sections. + + + + Represents a switch section syntax of a switch statement. + + + + Gets a SyntaxList of SwitchLabelSyntax's the represents the possible labels that control can transfer to within the section. + + + + + Gets a SyntaxList of StatementSyntax's the represents the statements to be executed when control transfer to a label the belongs to the section. + + + + Represents a switch label within a switch statement. + + + + Gets a SyntaxToken that represents a case or default keyword that belongs to a switch label. + + + + + Gets a SyntaxToken that represents the colon that terminates the switch label. + + + + Represents a case label within a switch statement. + + + Gets the case keyword token. + + + + Gets a PatternSyntax that represents the pattern that gets matched for the case label. + + + + Represents a case label within a switch statement. + + + Gets the case keyword token. + + + + Gets an ExpressionSyntax that represents the constant expression that gets matched for the case label. + + + + Represents a default label within a switch statement. + + + Gets the default keyword token. + + + Gets the attribute declaration list. + + + + Represents an ExternAlias directive syntax, e.g. "extern alias MyAlias;" with specifying "/r:MyAlias=SomeAssembly.dll " on the compiler command line. + + + + SyntaxToken representing the extern keyword. + + + SyntaxToken representing the alias keyword. + + + Gets the identifier. + + + SyntaxToken representing the semicolon token. + + + Member declaration syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Gets the optional semicolon token. + + + Class representing one or more attributes applied to a language construct. + + + Gets the open bracket token. + + + Gets the optional construct targeted by the attribute. + + + Gets the attribute declaration list. + + + Gets the close bracket token. + + + Class representing what language construct an attribute targets. + + + Gets the identifier. + + + Gets the colon token. + + + Attribute syntax. + + + Gets the name. + + + Attribute argument list syntax. + + + Gets the open paren token. + + + Gets the arguments syntax list. + + + Gets the close paren token. + + + Attribute argument syntax. + + + Gets the expression. + + + Class representing an identifier name followed by an equals token. + + + Gets the identifier name. + + + Type parameter list syntax. + + + Gets the < token. + + + Gets the parameter list. + + + Gets the > token. + + + Type parameter syntax. + + + Gets the attribute declaration list. + + + Gets the identifier. + + + Base class for type declaration syntax. + + + Gets the identifier. + + + Gets the base type list. + + + Gets the open brace token. + + + Gets the close brace token. + + + Gets the optional semicolon token. + + + Base class for type declaration syntax (class, struct, interface, record). + + + Gets the type keyword token ("class", "struct", "interface", "record"). + + + Gets the type constraint list. + + + Gets the member declarations. + + + Class type declaration syntax. + + + Gets the class keyword token. + + + Struct type declaration syntax. + + + Gets the struct keyword token. + + + Interface type declaration syntax. + + + Gets the interface keyword token. + + + Enum type declaration syntax. + + + Gets the enum keyword token. + + + Gets the members declaration list. + + + Gets the optional semicolon token. + + + Delegate declaration syntax. + + + Gets the "delegate" keyword. + + + Gets the return type. + + + Gets the identifier. + + + Gets the parameter list. + + + Gets the constraint clause list. + + + Gets the semicolon token. + + + Gets the identifier. + + + Base list syntax. + + + Gets the colon token. + + + Gets the base type references. + + + Provides the base class from which the classes that represent base type syntax nodes are derived. This is an abstract class. + + + Type parameter constraint clause. + + + Gets the identifier. + + + Gets the colon token. + + + Gets the constraints list. + + + Base type for type parameter constraint syntax. + + + Constructor constraint syntax. + + + Gets the "new" keyword. + + + Gets the open paren keyword. + + + Gets the close paren keyword. + + + Class or struct constraint syntax. + + + Gets the constraint keyword ("class" or "struct"). + + + SyntaxToken representing the question mark. + + + Type constraint syntax. + + + Gets the type syntax. + + + Default constraint syntax. + + + Gets the "default" keyword. + + + Base type for method declaration syntax. + + + Gets the parameter list. + + + Gets the optional semicolon token. + + + Method declaration syntax. + + + Gets the return type syntax. + + + Gets the identifier. + + + Gets the constraint clause list. + + + Gets the optional semicolon token. + + + Operator declaration syntax. + + + Gets the return type. + + + Gets the "operator" keyword. + + + Gets the "checked" keyword. + + + Gets the operator token. + + + Gets the optional semicolon token. + + + Conversion operator declaration syntax. + + + Gets the "implicit" or "explicit" token. + + + Gets the "operator" token. + + + Gets the "checked" keyword. + + + Gets the type. + + + Gets the optional semicolon token. + + + Constructor declaration syntax. + + + Gets the identifier. + + + Gets the optional semicolon token. + + + Constructor initializer syntax. + + + Gets the colon token. + + + Gets the "this" or "base" keyword. + + + Destructor declaration syntax. + + + Gets the tilde token. + + + Gets the identifier. + + + Gets the optional semicolon token. + + + Base type for property declaration syntax. + + + Gets the type syntax. + + + Gets the optional explicit interface specifier. + + + Gets the identifier. + + + The syntax for the expression body of an expression-bodied member. + + + Gets the identifier. + + + Gets the parameter list. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Gets the keyword token, or identifier if an erroneous accessor declaration. + + + Gets the optional body block which may be empty, but it is null if there are no braces. + + + Gets the optional expression body. + + + Gets the optional semicolon token. + + + Base type for parameter list syntax. + + + Gets the parameter list. + + + Parameter list syntax. + + + Gets the open paren token. + + + Gets the close paren token. + + + Parameter list syntax with surrounding brackets. + + + Gets the open bracket token. + + + Gets the close bracket token. + + + Base parameter syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Parameter syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Gets the identifier. + + + Parameter syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + + A symbol referenced by a cref attribute (e.g. in a <see> or <seealso> documentation comment tag). + For example, the M in <see cref="M" />. + + + + + A symbol reference that definitely refers to a type. + For example, "int", "A::B", "A.B", "A<T>", but not "M()" (has parameter list) or "this" (indexer). + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + + + A symbol reference to a type or non-type member that is qualified by an enclosing type or namespace. + For example, cref="System.String.ToString()". + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + + + The unqualified part of a CrefSyntax. + For example, "ToString()" in "object.ToString()". + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + + + A MemberCrefSyntax specified by a name (an identifier, predefined type keyword, or an alias-qualified name, + with an optional type parameter list) and an optional parameter list. + For example, "M", "M<T>" or "M(int)". + Also, "A::B()" or "string()". + + + + + A MemberCrefSyntax specified by a this keyword and an optional parameter list. + For example, "this" or "this[int]". + + + + + A MemberCrefSyntax specified by an operator keyword, an operator symbol and an optional parameter list. + For example, "operator +" or "operator -[int]". + NOTE: the operator must be overloadable. + + + + Gets the operator token. + + + + A MemberCrefSyntax specified by an implicit or explicit keyword, an operator keyword, a destination type, and an optional parameter list. + For example, "implicit operator int" or "explicit operator MyType(int)". + + + + + A list of cref parameters with surrounding punctuation. + Unlike regular parameters, cref parameters do not have names. + + + + Gets the parameter list. + + + + A parenthesized list of cref parameters. + + + + Gets the open paren token. + + + Gets the close paren token. + + + + A bracketed list of cref parameters. + + + + Gets the open bracket token. + + + Gets the close bracket token. + + + + An element of a BaseCrefParameterListSyntax. + Unlike a regular parameter, a cref parameter has only an optional ref or out keyword and a type - + there is no name and there are no attributes or other modifiers. + + + + Class which represents the syntax node for alias qualified name. + + This node is associated with the following syntax kinds: + + + + + + + IdentifierNameSyntax node representing the name of the alias + + + SyntaxToken representing colon colon. + + + SimpleNameSyntax node representing the name that is being alias qualified. + + + Provides the base class from which the classes that represent anonymous function expressions are derived. + + + + Either the if it is not null or the + otherwise. + + + + + If the given is default, remove all async keywords, if any. + Otherwise, replace the existing (the first one) or add a new one. + + + + + BlockSyntax node representing the body of the anonymous function. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the anonymous function. + Only one of Block or ExpressionBody will be non-null. + + + + Class which represents the syntax node for anonymous method expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the delegate keyword. + + + List of parameters of the anonymous method expression, or null if there no parameters are specified. + + + + BlockSyntax node representing the body of the anonymous function. + This will never be null. + + + + + Inherited from AnonymousFunctionExpressionSyntax, but not used for + AnonymousMethodExpressionSyntax. This will always be null. + + + + Class which represents the syntax node for argument. + + This node is associated with the following syntax kinds: + + + + + + + + Pre C# 7.2 back-compat overload, which simply calls the replacement property . + + + + + Pre C# 7.2 back-compat overload, which simply calls the replacement method . + + + + NameColonSyntax node representing the optional name arguments. + + + SyntaxToken representing the optional ref or out keyword. + + + ExpressionSyntax node representing the argument. + + + + This node is associated with the following syntax kinds: + + + + + + + Attribute syntax. + + This node is associated with the following syntax kinds: + + + + + + + + Return the name used in syntax for the attribute. This is typically the class + name without the "Attribute" suffix. (For certain diagnostics, the native + compiler uses the attribute name from syntax rather than the class name.) + + + + Gets the name. + + + Class representing what language construct an attribute targets. + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Gets the colon token. + + + Base type for method declaration syntax. + + + Gets the parameter list. + + + Gets the optional semicolon token. + + + Base type for property declaration syntax. + + + Gets the type syntax. + + + Gets the optional explicit interface specifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + Class or struct constraint syntax. + + This node is associated with the following syntax kinds: + + + + + + + + Gets the constraint keyword ("class" or "struct"). + + + SyntaxToken representing the question mark. + + + + This node is associated with the following syntax kinds: + + + + + + + + Returns #r directives specified in the compilation. + + + + + Returns #load directives specified in the compilation. + + + + Gets the attribute declaration list. + + + Constructor declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Gets the optional semicolon token. + + + + This node is associated with the following syntax kinds: + + + + + + + Conversion operator declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the "implicit" or "explicit" token. + + + Gets the "operator" token. + + + Gets the "checked" keyword. + + + Gets the type. + + + Gets the optional semicolon token. + + + + A MemberCrefSyntax specified by an implicit or explicit keyword, an operator keyword, a destination type, and an optional parameter list. + For example, "implicit operator int" or "explicit operator MyType(int)". + + + This node is associated with the following syntax kinds: + + + + + + + + An element of a BaseCrefParameterListSyntax. + Unlike a regular parameter, a cref parameter has only an optional ref or out keyword and a type - + there is no name and there are no attributes or other modifiers. + + + This node is associated with the following syntax kinds: + + + + + + + + Pre C# 7.2 back-compat overload, which simply calls the replacement property . + + + + + Pre C# 7.2 back-compat overload, which simply calls the replacement method . + + + + + Adds C# specific parts to the line directive map. + + + + + Describes how to report a warning diagnostic. + + + + + Report a diagnostic by default. + Either there is no corresponding #pragma, or the action is "restore". + + + + + Diagnostic is enabled. + NOTE: this may be removed as part of https://github.com/dotnet/roslyn/issues/36550 + + + + + Diagnostic is disabled. + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the modifier list. + + + Delegate declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the "delegate" keyword. + + + Gets the return type. + + + Gets the identifier. + + + Gets the parameter list. + + + Gets the constraint clause list. + + + Gets the semicolon token. + + + Destructor declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the tilde token. + + + Gets the identifier. + + + Gets the optional semicolon token. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + Returns true if the property is allowed by the rules of the + language to be an arbitrary expression, not just a statement expression. + + + True if, for example, this expression statement represents the last expression statement + of the interactive top-level code. + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + The variable(s) of the loop. In correct code this is a tuple + literal, declaration expression with a tuple designator, or + a discard syntax in the form of a simple identifier. In broken + code it could be something else. + + + + + This node is associated with the following syntax kinds: + + + + + + + Class which represents the syntax node for generic name. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the name of the identifier of the generic name. + + + TypeArgumentListSyntax node representing the list of type arguments of the generic name. + + + + This node is associated with the following syntax kinds: + + + + + + + + Represents a goto statement syntax + + + This node is associated with the following syntax kinds: + + + + + + + + + + Gets a SyntaxToken that represents the goto keyword. + + + + + Gets a SyntaxToken that represents the case or default keywords if any exists. + + + + + Gets a constant expression for a goto case statement. + + + + + Gets a SyntaxToken that represents the semi-colon at the end of the statement. + + + + Class which represents the syntax node for identifier name. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the keyword for the kind of the identifier name. + + + + Represents an if statement syntax. + + + This node is associated with the following syntax kinds: + + + + + + + + Gets a SyntaxToken that represents the if keyword. + + + + + Gets a SyntaxToken that represents the open parenthesis before the if statement's condition expression. + + + + + Gets an ExpressionSyntax that represents the condition of the if statement. + + + + + Gets a SyntaxToken that represents the close parenthesis after the if statement's condition expression. + + + + + Gets a StatementSyntax the represents the statement to be executed when the condition is true. + + + + + Gets an ElseClauseSyntax that represents the statement to be executed when the condition is false if such statement exists. + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the parameter list. + + + Represents a labeled statement syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Gets a SyntaxToken that represents the colon following the statement's label. + + + Provides the base class from which the classes that represent lambda expressions are derived. + + + SyntaxToken representing equals greater than. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Gets the optional semicolon token. + + + + This node is associated with the following syntax kinds: + + + + + + + + This class contains a variety of helper methods for determining whether a + position is within the scope (and not just the span) of a node. In general, + general, the scope extends from the first token up to, but not including, + the last token. For example, the open brace of a block is within the scope + of the block, but the close brace is not. + + + + + A position is considered to be inside a block if it is on or after + the open brace and strictly before the close brace. + + + + + A position is inside a property body only if it is inside an expression body. + All block bodies for properties are part of the accessor declaration (a type + of BaseMethodDeclaration), not the property declaration. + + + + + A position is inside a property body only if it is inside an expression body. + All block bodies for properties are part of the accessor declaration (a type + of BaseMethodDeclaration), not the property declaration. + + + + + A position is inside an accessor body if it is inside the block or expression + body. + + + + + A position is inside a body if it is inside the block or expression + body. + + A position is considered to be inside a block if it is on or after + the open brace and strictly before the close brace. A position is + considered to be inside an expression body if it is on or after + the '=>' and strictly before the semicolon. + + + + + Returns true if position is within the given node and before the first excluded token. + + + + + Used to determine whether it would be appropriate to use the binder for the statement (if any). + Not used to determine whether the position is syntactically within the statement. + + + + + Used to determine whether it would be appropriate to use the binder for the switch section (if any). + Not used to determine whether the position is syntactically within the statement. + + + + + Used to determine whether it would be appropriate to use the binder for the statement (if any). + Not used to determine whether the position is syntactically within the statement. + + + + + Used to determine whether it would be appropriate to use the binder for the statement (if any). + Not used to determine whether the position is syntactically within the statement. + + + + Method declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the return type syntax. + + + Gets the identifier. + + + Gets the constraint clause list. + + + Gets the optional semicolon token. + + + Class which represents the syntax node for name colon syntax. + + This node is associated with the following syntax kinds: + + + + + + + IdentifierNameSyntax representing the identifier name. + + + SyntaxToken representing colon. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the optional semicolon token. + + + Provides the base class from which the classes that represent name syntax nodes are derived. This is an abstract class. + + + + Returns the unqualified (right-most) part of a qualified or alias-qualified name, or the name itself if already unqualified. + + The unqualified (right-most) part of a qualified or alias-qualified name, or the name itself if already unqualified. + If called on an instance of returns the value of the property. + If called on an instance of returns the value of the property. + If called on an instance of returns the instance itself. + + + + + Return the name in string form, without trivia or generic arguments, for use in diagnostics. + + + + + This inspection is entirely syntactic. We are not trying to find the alias corresponding to the assembly symbol + containing the explicitly implemented interface symbol - there may be more than one. We just want to know + how the name was qualified in source so that we can make a similar qualification (for uniqueness purposes). + + + + + Contains the nullable warnings and annotations context state at a given position in source. + + + + + Returns whether nullable warnings are enabled within the span. + Returns true if nullable warnings are enabled anywhere in the span; + false if nullable warnings are disabled throughout the span; and + null otherwise. + + + + Operator declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the return type. + + + Gets the "operator" keyword. + + + Gets the "checked" keyword. + + + Gets the operator token. + + + Gets the optional semicolon token. + + + + A MemberCrefSyntax specified by an operator keyword, an operator symbol and an optional parameter list. + For example, "operator +" or "operator -[int]". + NOTE: the operator must be overloadable. + + + This node is associated with the following syntax kinds: + + + + + + + Gets the operator token. + + + Parameter list syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the open paren token. + + + Gets the close paren token. + + + Parameter syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Gets the identifier. + + + Class which represents the syntax node for parenthesized lambda expression. + + This node is associated with the following syntax kinds: + + + + + + + ParameterListSyntax node representing the list of parameters for the lambda expression. + + + SyntaxToken representing equals greater than. + + + + BlockSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + + + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Gets the keyword token, or identifier if an erroneous accessor declaration. + + + Gets the optional body block which may be empty, but it is null if there are no braces. + + + Gets the optional expression body. + + + Gets the optional semicolon token. + + + Class which represents the syntax node for qualified name. + + This node is associated with the following syntax kinds: + + + + + + + NameSyntax node representing the name on the left side of the dot token of the qualified name. + + + SyntaxToken representing the dot. + + + SimpleNameSyntax node representing the name on the right side of the dot token of the qualified name. + + + + This node is associated with the following syntax kinds: + + + + + + + + The ref modifier of a method's return value or a local. + + This node is associated with the following syntax kinds: + + + + + + + Gets the optional "readonly" keyword. + + + + This node is associated with the following syntax kinds: + + + + + + + Class which represents the syntax node for a simple lambda expression. + + This node is associated with the following syntax kinds: + + + + + + + ParameterSyntax node representing the parameter of the lambda expression. + + + SyntaxToken representing equals greater than. + + + + BlockSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + + ExpressionSyntax node representing the body of the lambda. + Only one of Block or ExpressionBody will be non-null. + + + + Provides the base class from which the classes that represent simple name syntax nodes are derived. This is an abstract class. + + + SyntaxToken representing the identifier of the simple name. + + + + This node is associated with the following syntax kinds: + + + + + + + Class which represents the syntax node for stackalloc array creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the stackalloc keyword. + + + TypeSyntax node representing the type of the stackalloc array. + + + InitializerExpressionSyntax node representing the initializer of the stackalloc array creation expression. + + + + It's a non terminal Trivia CSharpSyntaxNode that has a tree underneath it. + + + + + Get parent trivia. + + + + + This node is associated with the following syntax kinds: + + + + + + + Represents a switch statement syntax. + + This node is associated with the following syntax kinds: + + + + + + + + Gets a SyntaxToken that represents the switch keyword. + + + + + Gets a SyntaxToken that represents the open parenthesis preceding the switch governing expression. + + + + + Gets an ExpressionSyntax representing the expression of the switch statement. + + + + + Gets a SyntaxToken that represents the close parenthesis following the switch governing expression. + + + + + Gets a SyntaxToken that represents the open braces preceding the switch sections. + + + + + Gets a SyntaxList of SwitchSectionSyntax's that represents the switch sections of the switch statement. + + + + + Gets a SyntaxToken that represents the open braces following the switch sections. + + + + + Returns whether the specified token is also the end of the line. This will + be true for , , + and all preprocessor directives. + + + + + Returns the first end of line found in a . + + + + + Tells if the given SyntaxNode is inside single-line initializer context. + Initializers in such context are not expected to be large, + so formatting them in single-line fashion looks more compact. + Current cases: + + Interpolation holes in strings + Attribute arguments + Normal arguments + + + + + + Tells if given SyntaxNode is an initializer in a single-line initializer context. + See + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Base class for type declaration syntax (class, struct, interface, record). + + + Gets the type keyword token ("class", "struct", "interface", "record"). + + + Gets the type constraint list. + + + Gets the member declarations. + + + Provides the base class from which the classes that represent type syntax nodes are derived. This is an abstract class. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + Class which represents the syntax node for type argument list. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing less than. + + + SeparatedSyntaxList of TypeSyntax node representing the type arguments. + + + SyntaxToken representing greater than. + + + Class which represents the syntax node for predefined types. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken which represents the keyword corresponding to the predefined type. + + + Class which represents the syntax node for the array type. + + This node is associated with the following syntax kinds: + + + + + + + TypeSyntax node representing the type of the element of the array. + + + SyntaxList of ArrayRankSpecifierSyntax nodes representing the list of rank specifiers for the array. + + + Class which represents the syntax node for pointer type. + + This node is associated with the following syntax kinds: + + + + + + + TypeSyntax node that represents the element type of the pointer. + + + SyntaxToken representing the asterisk. + + + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the delegate keyword. + + + SyntaxToken representing the asterisk. + + + Node representing the optional calling convention. + + + List of the parameter types and return type of the function pointer. + + + Function pointer parameter list syntax. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the less than token. + + + SeparatedSyntaxList of ParameterSyntaxes representing the list of parameters and return type. + + + SyntaxToken representing the greater than token. + + + Function pointer calling convention syntax. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing whether the calling convention is managed or unmanaged. + + + Optional list of identifiers that will contribute to an unmanaged calling convention. + + + Function pointer calling convention syntax. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing open bracket. + + + SeparatedSyntaxList of calling convention identifiers. + + + SyntaxToken representing close bracket. + + + Individual function pointer unmanaged calling convention. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the calling convention identifier. + + + Class which represents the syntax node for a nullable type. + + This node is associated with the following syntax kinds: + + + + + + + TypeSyntax node representing the type of the element. + + + SyntaxToken representing the question mark. + + + Class which represents the syntax node for tuple type. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the open parenthesis. + + + SyntaxToken representing the close parenthesis. + + + Tuple type element. + + This node is associated with the following syntax kinds: + + + + + + + Gets the type of the tuple element. + + + Gets the name of the tuple element. + + + Class which represents a placeholder in the type argument list of an unbound generic type. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the omitted type argument. + + + The 'scoped' modifier of a local. + + This node is associated with the following syntax kinds: + + + + + + + Provides the base class from which the classes that represent expression syntax nodes are derived. This is an abstract class. + + + Class which represents the syntax node for parenthesized expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the open parenthesis. + + + ExpressionSyntax node representing the expression enclosed within the parenthesis. + + + SyntaxToken representing the close parenthesis. + + + Class which represents the syntax node for tuple expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the open parenthesis. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing the close parenthesis. + + + Class which represents the syntax node for prefix unary expression. + + This node is associated with the following syntax kinds: + + + + + + + + + + + + + + + SyntaxToken representing the kind of the operator of the prefix unary expression. + + + ExpressionSyntax representing the operand of the prefix unary expression. + + + Class which represents the syntax node for an "await" expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the kind "await" keyword. + + + ExpressionSyntax representing the operand of the "await" operator. + + + Class which represents the syntax node for postfix unary expression. + + This node is associated with the following syntax kinds: + + + + + + + + + ExpressionSyntax representing the operand of the postfix unary expression. + + + SyntaxToken representing the kind of the operator of the postfix unary expression. + + + Class which represents the syntax node for member access expression. + + This node is associated with the following syntax kinds: + + + + + + + + ExpressionSyntax node representing the object that the member belongs to. + + + SyntaxToken representing the kind of the operator in the member access expression. + + + SimpleNameSyntax node representing the member being accessed. + + + Class which represents the syntax node for conditional access expression. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the object conditionally accessed. + + + SyntaxToken representing the question mark. + + + ExpressionSyntax node representing the access expression to be executed when the object is not null. + + + Class which represents the syntax node for member binding expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing dot. + + + SimpleNameSyntax node representing the member being bound to. + + + Class which represents the syntax node for element binding expression. + + This node is associated with the following syntax kinds: + + + + + + + BracketedArgumentListSyntax node representing the list of arguments of the element binding expression. + + + Class which represents the syntax node for a range expression. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the expression on the left of the range operator. + + + SyntaxToken representing the operator of the range expression. + + + ExpressionSyntax node representing the expression on the right of the range operator. + + + Class which represents the syntax node for implicit element access expression. + + This node is associated with the following syntax kinds: + + + + + + + BracketedArgumentListSyntax node representing the list of arguments of the implicit element access expression. + + + Class which represents an expression that has a binary operator. + + This node is associated with the following syntax kinds: + + + + + + + + + + + + + + + + + + + + + + + + + + + + ExpressionSyntax node representing the expression on the left of the binary operator. + + + SyntaxToken representing the operator of the binary expression. + + + ExpressionSyntax node representing the expression on the right of the binary operator. + + + Class which represents an expression that has an assignment operator. + + This node is associated with the following syntax kinds: + + + + + + + + + + + + + + + + + + + ExpressionSyntax node representing the expression on the left of the assignment operator. + + + SyntaxToken representing the operator of the assignment expression. + + + ExpressionSyntax node representing the expression on the right of the assignment operator. + + + Class which represents the syntax node for conditional expression. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the condition of the conditional expression. + + + SyntaxToken representing the question mark. + + + ExpressionSyntax node representing the expression to be executed when the condition is true. + + + SyntaxToken representing the colon. + + + ExpressionSyntax node representing the expression to be executed when the condition is false. + + + Provides the base class from which the classes that represent instance expression syntax nodes are derived. This is an abstract class. + + + Class which represents the syntax node for a this expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the this keyword. + + + Class which represents the syntax node for a base expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the base keyword. + + + Class which represents the syntax node for a literal expression. + + This node is associated with the following syntax kinds: + + + + + + + + + + + + + + + SyntaxToken representing the keyword corresponding to the kind of the literal expression. + + + Class which represents the syntax node for MakeRef expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the MakeRefKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for RefType expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the RefTypeKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for RefValue expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the RefValueKeyword. + + + SyntaxToken representing open parenthesis. + + + Typed reference expression. + + + Comma separating the arguments. + + + The type of the value. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for Checked or Unchecked expression. + + This node is associated with the following syntax kinds: + + + + + + + + SyntaxToken representing the checked or unchecked keyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for Default expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the DefaultKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for TypeOf expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the TypeOfKeyword. + + + SyntaxToken representing open parenthesis. + + + The expression to return type of. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for SizeOf expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the SizeOfKeyword. + + + SyntaxToken representing open parenthesis. + + + Argument of the primary function. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for invocation expression. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the expression part of the invocation. + + + ArgumentListSyntax node representing the list of arguments of the invocation expression. + + + Class which represents the syntax node for element access expression. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the expression which is accessing the element. + + + BracketedArgumentListSyntax node representing the list of arguments of the element access expression. + + + Provides the base class from which the classes that represent argument list syntax nodes are derived. This is an abstract class. + + + SeparatedSyntaxList of ArgumentSyntax nodes representing the list of arguments. + + + Class which represents the syntax node for the list of arguments. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing open parenthesis. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing close parenthesis. + + + Class which represents the syntax node for bracketed argument list. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing open bracket. + + + SeparatedSyntaxList of ArgumentSyntax representing the list of arguments. + + + SyntaxToken representing close bracket. + + + + This node is associated with the following syntax kinds: + + + + + + + Class which represents the syntax node for the variable declaration in an out var declaration or a deconstruction declaration. + + This node is associated with the following syntax kinds: + + + + + + + Declaration representing the variable declared in an out parameter or deconstruction. + + + Class which represents the syntax node for cast expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the open parenthesis. + + + TypeSyntax node representing the type to which the expression is being cast. + + + SyntaxToken representing the close parenthesis. + + + ExpressionSyntax node representing the expression that is being casted. + + + + This node is associated with the following syntax kinds: + + + + + + + Class which represents the syntax node for initializer expression. + + This node is associated with the following syntax kinds: + + + + + + + + + + + SyntaxToken representing the open brace. + + + SeparatedSyntaxList of ExpressionSyntax representing the list of expressions in the initializer expression. + + + SyntaxToken representing the close brace. + + + SyntaxToken representing the new keyword. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + Class which represents the syntax node for implicit object creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the new keyword. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + Class which represents the syntax node for object creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the new keyword. + + + TypeSyntax representing the type of the object being created. + + + ArgumentListSyntax representing the list of arguments passed as part of the object creation expression. + + + InitializerExpressionSyntax representing the initializer expression for the object being created. + + + + This node is associated with the following syntax kinds: + + + + + + + InitializerExpressionSyntax representing the initializer expression for the with expression. + + + + This node is associated with the following syntax kinds: + + + + + + + NameEqualsSyntax representing the optional name of the member being initialized. + + + ExpressionSyntax representing the value the member is initialized with. + + + Class which represents the syntax node for anonymous object creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the new keyword. + + + SyntaxToken representing the open brace. + + + SeparatedSyntaxList of AnonymousObjectMemberDeclaratorSyntax representing the list of object member initializers. + + + SyntaxToken representing the close brace. + + + Class which represents the syntax node for array creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the new keyword. + + + ArrayTypeSyntax node representing the type of the array. + + + InitializerExpressionSyntax node representing the initializer of the array creation expression. + + + Class which represents the syntax node for implicit array creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the new keyword. + + + SyntaxToken representing the open bracket. + + + SyntaxList of SyntaxToken representing the commas in the implicit array creation expression. + + + SyntaxToken representing the close bracket. + + + InitializerExpressionSyntax representing the initializer expression of the implicit array creation expression. + + + Class which represents the syntax node for implicit stackalloc array creation expression. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the stackalloc keyword. + + + SyntaxToken representing the open bracket. + + + SyntaxToken representing the close bracket. + + + InitializerExpressionSyntax representing the initializer expression of the implicit stackalloc array creation expression. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Class which represents a placeholder in an array size list. + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the omitted array size expression. + + + + This node is associated with the following syntax kinds: + + + + + + + The first part of an interpolated string, $" or $@" or $""" + + + List of parts of the interpolated string, each one is either a literal part or an interpolation. + + + The closing quote of the interpolated string. + + + Class which represents a simple pattern-matching expression using the "is" keyword. + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the expression on the left of the "is" operator. + + + PatternSyntax node representing the pattern on the right of the "is" operator. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + ExpressionSyntax node representing the constant expression. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the operator of the relational pattern. + + + + This node is associated with the following syntax kinds: + + + + + + + The type for the type pattern. + + + + This node is associated with the following syntax kinds: + + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + The text contents of a part of the interpolated string. + + + + This node is associated with the following syntax kinds: + + + + + + + This could be a single { or multiple in a row (in the case of an interpolation in a raw interpolated string). + + + + This could be a single } or multiple in a row (in the case of an interpolation in a raw interpolated string). + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + The text contents of the format specifier for an interpolation. + + + Represents the base class for all statements syntax classes. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Represents an else statement syntax. + + This node is associated with the following syntax kinds: + + + + + + + + Gets a syntax token + + + + Represents a switch section syntax of a switch statement. + + This node is associated with the following syntax kinds: + + + + + + + + Gets a SyntaxList of SwitchLabelSyntax's the represents the possible labels that control can transfer to within the section. + + + + + Gets a SyntaxList of StatementSyntax's the represents the statements to be executed when control transfer to a label the belongs to the section. + + + + Represents a switch label within a switch statement. + + + + Gets a SyntaxToken that represents a case or default keyword that belongs to a switch label. + + + + + Gets a SyntaxToken that represents the colon that terminates the switch label. + + + + Represents a case label within a switch statement. + + This node is associated with the following syntax kinds: + + + + + + + Gets the case keyword token. + + + + Gets a PatternSyntax that represents the pattern that gets matched for the case label. + + + + Represents a case label within a switch statement. + + This node is associated with the following syntax kinds: + + + + + + + Gets the case keyword token. + + + + Gets an ExpressionSyntax that represents the constant expression that gets matched for the case label. + + + + Represents a default label within a switch statement. + + This node is associated with the following syntax kinds: + + + + + + + Gets the default keyword token. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + Represents an ExternAlias directive syntax, e.g. "extern alias MyAlias;" with specifying "/r:MyAlias=SomeAssembly.dll " on the compiler command line. + + + This node is associated with the following syntax kinds: + + + + + + + SyntaxToken representing the extern keyword. + + + SyntaxToken representing the alias keyword. + + + Gets the identifier. + + + SyntaxToken representing the semicolon token. + + + Member declaration syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + + This node is associated with the following syntax kinds: + + + + + + + Class representing one or more attributes applied to a language construct. + + This node is associated with the following syntax kinds: + + + + + + + Gets the open bracket token. + + + Gets the optional construct targeted by the attribute. + + + Gets the attribute declaration list. + + + Gets the close bracket token. + + + Attribute argument list syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the open paren token. + + + Gets the arguments syntax list. + + + Gets the close paren token. + + + Attribute argument syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the expression. + + + Class representing an identifier name followed by an equals token. + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier name. + + + Type parameter list syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the < token. + + + Gets the parameter list. + + + Gets the > token. + + + Type parameter syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the attribute declaration list. + + + Gets the identifier. + + + Base class for type declaration syntax. + + + Gets the identifier. + + + Gets the base type list. + + + Gets the open brace token. + + + Gets the close brace token. + + + Gets the optional semicolon token. + + + Class type declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the class keyword token. + + + Struct type declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the struct keyword token. + + + Interface type declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the interface keyword token. + + + Enum type declaration syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the enum keyword token. + + + Gets the members declaration list. + + + Gets the optional semicolon token. + + + Base list syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the colon token. + + + Gets the base type references. + + + Provides the base class from which the classes that represent base type syntax nodes are derived. This is an abstract class. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Type parameter constraint clause. + + This node is associated with the following syntax kinds: + + + + + + + Gets the identifier. + + + Gets the colon token. + + + Gets the constraints list. + + + Base type for type parameter constraint syntax. + + + Constructor constraint syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the "new" keyword. + + + Gets the open paren keyword. + + + Gets the close paren keyword. + + + Type constraint syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the type syntax. + + + Default constraint syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the "default" keyword. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Constructor initializer syntax. + + This node is associated with the following syntax kinds: + + + + + + + + Gets the colon token. + + + Gets the "this" or "base" keyword. + + + The syntax for the expression body of an expression-bodied member. + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + Base type for parameter list syntax. + + + Gets the parameter list. + + + Parameter list syntax with surrounding brackets. + + This node is associated with the following syntax kinds: + + + + + + + Gets the open bracket token. + + + Gets the close bracket token. + + + Base parameter syntax. + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + Parameter syntax. + + This node is associated with the following syntax kinds: + + + + + + + Gets the attribute declaration list. + + + Gets the modifier list. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + + A symbol referenced by a cref attribute (e.g. in a <see> or <seealso> documentation comment tag). + For example, the M in <see cref="M" />. + + + + + A symbol reference that definitely refers to a type. + For example, "int", "A::B", "A.B", "A<T>", but not "M()" (has parameter list) or "this" (indexer). + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + This node is associated with the following syntax kinds: + + + + + + + + A symbol reference to a type or non-type member that is qualified by an enclosing type or namespace. + For example, cref="System.String.ToString()". + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + This node is associated with the following syntax kinds: + + + + + + + + The unqualified part of a CrefSyntax. + For example, "ToString()" in "object.ToString()". + NOTE: TypeCrefSyntax, QualifiedCrefSyntax, and MemberCrefSyntax overlap. The syntax in a TypeCrefSyntax + will always be bound as type, so it's safer to use QualifiedCrefSyntax or MemberCrefSyntax if the symbol + might be a non-type member. + + + + + A MemberCrefSyntax specified by a name (an identifier, predefined type keyword, or an alias-qualified name, + with an optional type parameter list) and an optional parameter list. + For example, "M", "M<T>" or "M(int)". + Also, "A::B()" or "string()". + + + This node is associated with the following syntax kinds: + + + + + + + + A MemberCrefSyntax specified by a this keyword and an optional parameter list. + For example, "this" or "this[int]". + + + This node is associated with the following syntax kinds: + + + + + + + + A list of cref parameters with surrounding punctuation. + Unlike regular parameters, cref parameters do not have names. + + + + Gets the parameter list. + + + + A parenthesized list of cref parameters. + + + This node is associated with the following syntax kinds: + + + + + + + Gets the open paren token. + + + Gets the close paren token. + + + + A bracketed list of cref parameters. + + + This node is associated with the following syntax kinds: + + + + + + + Gets the open bracket token. + + + Gets the close bracket token. + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + This node is associated with the following syntax kinds: + + + + + + + + Defines a set of methods to determine how Unicode characters are treated by the C# compiler. + + + + + Returns true if the Unicode character is a hexadecimal digit. + + The Unicode character. + true if the character is a hexadecimal digit 0-9, A-F, a-f. + + + + Returns true if the Unicode character is a binary (0-1) digit. + + The Unicode character. + true if the character is a binary digit. + + + + Returns true if the Unicode character is a decimal digit. + + The Unicode character. + true if the Unicode character is a decimal digit. + + + + Returns the value of a hexadecimal Unicode character. + + The Unicode character. + + + + Returns the value of a binary Unicode character. + + The Unicode character. + + + + Returns the value of a decimal Unicode character. + + The Unicode character. + + + + Returns true if the Unicode character represents a whitespace. + + The Unicode character. + + + + Returns true if the Unicode character is a newline character. + + The Unicode character. + + + + Returns true if the Unicode character can be the starting character of a C# identifier. + + The Unicode character. + + + + Returns true if the Unicode character can be a part of a C# identifier. + + The Unicode character. + + + + Check that the name is a valid identifier. + + + + + Spec section 2.4.2 says that identifiers are compared without regard + to leading "@" characters or unicode formatting characters. As in dev10, + this is actually accomplished by dropping such characters during parsing. + Unfortunately, metadata names can still contain these characters and will + not be referenceable from source if they do (lookup will fail since the + characters will have been dropped from the search string). + See DevDiv #14432 for more. + + + + + Returns true if the node is the alias of an AliasQualifiedNameSyntax + + + + + Returns true if the node is the object of an invocation expression. + + + + + Returns true if the node is the object of an element access expression. + + + + + Returns true if the node is in a tree location that is expected to be a type + + + + + + + Returns true if a node is in a tree location that is expected to be either a namespace or type + + + + + + + Is the node the name of a named argument of an invocation, object creation expression, + constructor initializer, or element access, but not an attribute. + + + + + Is the expression the initializer in a fixed statement? + + + + + Given an initializer expression infer the name of anonymous property or tuple element. + Returns null if unsuccessful + + + + + Checks whether the element name is reserved. + + For example: + "Item3" is reserved (at certain positions). + "Rest", "ToString" and other members of System.ValueTuple are reserved (in any position). + Names that are not reserved return false. + + + + + A custom equality comparer for + + + PERF: The framework specializes EqualityComparer for enums, but only if the underlying type is System.Int32 + Since SyntaxKind's underlying type is System.UInt16, ObjectEqualityComparer will be chosen instead. + + + + + Some preprocessor keywords are only keywords when they appear after a + hash sign (#). For these keywords, the lexer will produce tokens with + Kind = SyntaxKind.IdentifierToken and ContextualKind set to the keyword + SyntaxKind. + + + This wrinkle is specifically not publicly exposed. + + + + + Member declarations that can appear in global code (other than type declarations). + + + + + A implementation for the CSharp language. + + + + + Creates a new instance of + + The that should be used when parsing generated files. + The generators that will run as part of this driver. + An that can be used to retrieve analyzer config values by the generators in this driver. + A list of s available to generators in this driver. + + + + Creates a new instance of with the specified s and default options + + The generators to create this driver with + A new instance. + + + + Creates a new instance of with the specified s and default options + + The incremental generators to create this driver with + A new instance. + + + + Creates a new instance of with the specified s and the provided options or default. + + The generators to create this driver with + A list of s available to generators in this driver, or null if there are none. + The that should be used when parsing generated files, or null to use + An that can be used to retrieve analyzer config values by the generators in this driver, or null if there are none. + A that controls the behavior of the created driver. + A new instance. + + + + Displays a value in the C# style. + + + Separate from because we want to link this functionality into + the Formatter project and we don't want it to be public there. + + + + + + Returns a string representation of an object of primitive type. + + A value to display as a string. + Options used to customize formatting of an object value. + A string representation of an object of primitive type (or null if the type is not supported). + + Handles , , , + , , , , , + , , , , , + and null. + + + + + Returns true if the character should be replaced and sets + to the replacement text. + + + + + Returns a C# string literal with the given value. + + The value that the resulting string literal should have. + Options used to customize formatting of an object value. + A string literal with the given value. + + Optionally escapes non-printable characters. + + + + + Returns a C# character literal with the given value. + + The value that the resulting character literal should have. + Options used to customize formatting of an object value. + A character literal with the given value. + + + + Displays a symbol in the C# style. + + + + + + Displays a symbol in the C# style, based on a . + + The symbol to be displayed. + The formatting options to apply. If null is passed, will be used. + A formatted string that can be displayed to the user. + + The return value is not expected to be syntactically valid C#. + + + + + Displays a symbol in the C# style, based on a . + Based on the context, qualify type and member names as little as possible without + introducing ambiguities. + + The symbol to be displayed. + Semantic information about the context in which the symbol is being displayed. + A position within the or . + The formatting options to apply. If null is passed, will be used. + A formatted string that can be displayed to the user. + + The return value is not expected to be syntactically valid C#. + + + + + Convert a symbol to an array of string parts, each of which has a kind. Useful for + colorizing the display string. + + The symbol to be displayed. + The formatting options to apply. If null is passed, will be used. + A list of display parts. + + Parts are not localized until they are converted to strings. + + + + + Convert a symbol to an array of string parts, each of which has a kind. Useful for + colorizing the display string. + + The symbol to be displayed. + Semantic information about the context in which the symbol is being displayed. + A position within the or . + The formatting options to apply. If null is passed, will be used. + A list of display parts. + + Parts are not localized until they are converted to strings. + + + + + Returns a string representation of an object of primitive type. + + A value to display as a string. + Whether or not to quote string literals. + Whether or not to display integral literals in hexadecimal. + A string representation of an object of primitive type (or null if the type is not supported). + + Handles , , , + , , , , , + , , , , , + and null. + + + + + Returns a C# string literal with the given value. + + The value that the resulting string literal should have. + True to put (double) quotes around the string literal. + A string literal with the given value. + + Escapes non-printable characters. + + + + + Returns a C# character literal with the given value. + + The value that the resulting character literal should have. + True to put (single) quotes around the character literal. + A character literal with the given value. + + Escapes non-printable characters. + + + + + Returns true if tuple type syntax can be used to refer to the tuple type without loss of information. + For example, it cannot be used when extension tuple is using non-default friendly names. + + + + + + + The nullable annotations that can apply in source. + + + The order of values here is used in the computation of , + , and + . If the order here is changed + then those implementations may have to be revised (or simplified). + + + + + Type is not annotated - string, int, T (including the case when T is unconstrained). + + + + + The type is not annotated in a context where the nullable feature is not enabled. + Used for interoperation with existing pre-nullable code. + + + + + Type is annotated with '?' - string?, T?. + + + + + Used for indexed type parameters and used locally in override/implementation checks. + When substituting a type parameter with Ignored annotation into some original type parameter + with some other annotation, the result is the annotation from the original symbol. + + T annotated + (T -> U ignored) = U annotated + T oblivious + (T -> U ignored) = U oblivious + T not-annotated + (T -> U ignored) = U not-annotated + + + + + Join nullable annotations from the set of lower bounds for fixing a type parameter. + This uses the covariant merging rules. (Annotated wins over Oblivious which wins over NotAnnotated) + + + + + Meet two nullable annotations for computing the nullable annotation of a type parameter from upper bounds. + This uses the contravariant merging rules. (NotAnnotated wins over Oblivious which wins over Annotated) + + + + + Return the nullable annotation to use when two annotations are expected to be "compatible", which means + they could be the same. These are the "invariant" merging rules. (NotAnnotated wins over Annotated which wins over Oblivious) + + + + + Merges nullability. + + + + + The attribute (metadata) representation of . + + + + + The attribute (metadata) representation of . + + + + + The attribute (metadata) representation of . + + + + + The nullable state of an rvalue computed in . + When in doubt we conservatively use + to minimize diagnostics. + + + + + Not null. + + + + + Maybe null (type is nullable). + + + + + Maybe null (type may be not nullable). + + + + + Join nullable flow states from distinct branches during flow analysis. + The result is if either operand is that. + + + + + Meet two nullable flow states from distinct states for the meet (union) operation in flow analysis. + The result is if either operand is that. + + + + + Some error messages are particularly confusing if multiple placeholders are substituted + with the same string. For example, "cannot convert from 'Goo' to 'Goo'". Usually, this + occurs because there are two types in different contexts with the same qualified name. + The solution is to provide additional qualification on each symbol - either a source + location, an assembly path, or an assembly identity. + + + Performs the same function as ErrArgFlags::Unique in the native compiler. + + + + + Virtual dispatch based on a symbol's particular class. + + Additional argument type + Result type + + + + Call the correct VisitXXX method in this class based on the particular type of symbol that is passed in. + Return default(TResult) if symbol is null + + + + + The default Visit method called when visiting any and + if visiting specific symbol method VisitXXX is not overridden + + The visited symbol + Additional argument + + + + + Called when visiting an ; Override this method with + specific implementation; Calling default if it's not + overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this method with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Should override this method if + want to visit members of the namespace; Calling + and loop over each member; calling on it Or override this with + specific implementation; Calling if it's not + overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting an ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting an + Error symbol is created when there is compiler error; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting an ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting an ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Called when visiting a ; Override this with specific + implementation; Calling default if it's not overridden + + The visited symbol + Additional argument + + + + + Returns the System.String that represents the current TypedConstant. + + A System.String that represents the current TypedConstant. + + + + Determine whether there is any substitution of type parameters that will + make two types identical. + + + + + Determine whether there is any substitution of type parameters that will + make two types identical. + + LHS + RHS + + Substitutions performed so far (or null for none). + Keys are type parameters, values are types (possibly type parameters). + Will be updated with new substitutions by the callee. + Should be ignored when false is returned. + + True if there exists a type map such that Map(LHS) == Map(RHS). + + Derived from Dev10's BSYMMGR::UnifyTypes. + Two types will not unify if they have different custom modifiers. + + + + + Return true if the given type contains the specified type parameter. + + + + + A class containing factory methods for constructing syntax nodes, tokens and trivia. + + + + Creates a new AnonymousMethodExpressionSyntax instance. + + + Creates a new LiteralExpressionSyntax instance. + + + Creates a new AccessorDeclarationSyntax instance. + + + Creates a new RefTypeSyntax instance. + + + + A trivia with kind EndOfLineTrivia containing both the carriage return and line feed characters. + + + + + A trivia with kind EndOfLineTrivia containing a single line feed character. + + + + + A trivia with kind EndOfLineTrivia containing a single carriage return character. + + + + + A trivia with kind WhitespaceTrivia containing a single space character. + + + + + A trivia with kind WhitespaceTrivia containing a single tab character. + + + + + An elastic trivia with kind EndOfLineTrivia containing both the carriage return and line feed characters. + Elastic trivia are used to denote trivia that was not produced by parsing source text, and are usually not + preserved during formatting. + + + + + An elastic trivia with kind EndOfLineTrivia containing a single line feed character. Elastic trivia are used + to denote trivia that was not produced by parsing source text, and are usually not preserved during + formatting. + + + + + An elastic trivia with kind EndOfLineTrivia containing a single carriage return character. Elastic trivia + are used to denote trivia that was not produced by parsing source text, and are usually not preserved during + formatting. + + + + + An elastic trivia with kind WhitespaceTrivia containing a single space character. Elastic trivia are used to + denote trivia that was not produced by parsing source text, and are usually not preserved during formatting. + + + + + An elastic trivia with kind WhitespaceTrivia containing a single tab character. Elastic trivia are used to + denote trivia that was not produced by parsing source text, and are usually not preserved during formatting. + + + + + An elastic trivia with kind WhitespaceTrivia containing no characters. Elastic marker trivia are included + automatically by factory methods when trivia is not specified. Syntax formatting will replace elastic + markers with appropriate trivia. + + + + + Creates a trivia with kind EndOfLineTrivia containing the specified text. + + The text of the end of line. Any text can be specified here, however only carriage return and + line feed characters are recognized by the parser as end of line. + + + + Creates a trivia with kind EndOfLineTrivia containing the specified text. Elastic trivia are used to + denote trivia that was not produced by parsing source text, and are usually not preserved during formatting. + + The text of the end of line. Any text can be specified here, however only carriage return and + line feed characters are recognized by the parser as end of line. + + + + Creates a trivia with kind WhitespaceTrivia containing the specified text. + + The text of the whitespace. Any text can be specified here, however only specific + whitespace characters are recognized by the parser. + + + + Creates a trivia with kind WhitespaceTrivia containing the specified text. Elastic trivia are used to + denote trivia that was not produced by parsing source text, and are usually not preserved during formatting. + + The text of the whitespace. Any text can be specified here, however only specific + whitespace characters are recognized by the parser. + + + + Creates a trivia with kind either SingleLineCommentTrivia or MultiLineCommentTrivia containing the specified + text. + + The entire text of the comment including the leading '//' token for single line comments + or stop or start tokens for multiline comments. + + + + Creates a trivia with kind DisabledTextTrivia. Disabled text corresponds to any text between directives that + is not considered active. + + + + + Creates a trivia with kind PreprocessingMessageTrivia. + + + + + Trivia nodes represent parts of the program text that are not parts of the + syntactic grammar, such as spaces, newlines, comments, preprocessor + directives, and disabled code. + + + A representing the specific kind of . One of + , , + , , + , + + + The actual text of this token. + + + + + Creates a token corresponding to a syntax kind. This method can be used for token syntax kinds whose text + can be inferred by the kind alone. + + A syntax kind value for a token. These have the suffix Token or Keyword. + + + + + Creates a token corresponding to syntax kind. This method can be used for token syntax kinds whose text can + be inferred by the kind alone. + + A list of trivia immediately preceding the token. + A syntax kind value for a token. These have the suffix Token or Keyword. + A list of trivia immediately following the token. + + + + Creates a token corresponding to syntax kind. This method gives control over token Text and ValueText. + + For example, consider the text '<see cref="operator &#43;"/>'. To create a token for the value of + the operator symbol (&#43;), one would call + Token(default(SyntaxTriviaList), SyntaxKind.PlusToken, "&#43;", "+", default(SyntaxTriviaList)). + + A list of trivia immediately preceding the token. + A syntax kind value for a token. These have the suffix Token or Keyword. + The text from which this token was created (e.g. lexed). + How C# should interpret the text of this token. + A list of trivia immediately following the token. + + + + Creates a missing token corresponding to syntax kind. A missing token is produced by the parser when an + expected token is not found. A missing token has no text and normally has associated diagnostics. + + A syntax kind value for a token. These have the suffix Token or Keyword. + + + + Creates a missing token corresponding to syntax kind. A missing token is produced by the parser when an + expected token is not found. A missing token has no text and normally has associated diagnostics. + + A list of trivia immediately preceding the token. + A syntax kind value for a token. These have the suffix Token or Keyword. + A list of trivia immediately following the token. + + + + Creates a token with kind IdentifierToken containing the specified text. + + The raw text of the identifier name, including any escapes or leading '@' character. + + + + Creates a token with kind IdentifierToken containing the specified text. + + A list of trivia immediately preceding the token. + The raw text of the identifier name, including any escapes or leading '@' + character. + A list of trivia immediately following the token. + + + + Creates a verbatim token with kind IdentifierToken containing the specified text. + + A list of trivia immediately preceding the token. + The identifier, not including any escapes or leading '@' + character. + The canonical value of the token's text. + A list of trivia immediately following the token. + + + + Creates a token with kind IdentifierToken containing the specified text. + + A list of trivia immediately preceding the token. + An alternative SyntaxKind that can be inferred for this token in special + contexts. These are usually keywords. + The raw text of the identifier name, including any escapes or leading '@' + character. + The text of the identifier name without escapes or leading '@' character. + A list of trivia immediately following the token. + + + + + Creates a token with kind NumericLiteralToken from a 4-byte signed integer value. + + The 4-byte signed integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte signed integer value. + + The raw text of the literal. + The 4-byte signed integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte signed integer value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 4-byte signed integer value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from a 4-byte unsigned integer value. + + The 4-byte unsigned integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte unsigned integer value. + + The raw text of the literal. + The 4-byte unsigned integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte unsigned integer value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 4-byte unsigned integer value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from an 8-byte signed integer value. + + The 8-byte signed integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte signed integer value. + + The raw text of the literal. + The 8-byte signed integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte signed integer value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 8-byte signed integer value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from an 8-byte unsigned integer value. + + The 8-byte unsigned integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte unsigned integer value. + + The raw text of the literal. + The 8-byte unsigned integer value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte unsigned integer value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 8-byte unsigned integer value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from a 4-byte floating point value. + + The 4-byte floating point value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte floating point value. + + The raw text of the literal. + The 4-byte floating point value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 4-byte floating point value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 4-byte floating point value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from an 8-byte floating point value. + + The 8-byte floating point value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte floating point value. + + The raw text of the literal. + The 8-byte floating point value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte floating point value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The 8-byte floating point value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind NumericLiteralToken from a decimal value. + + The decimal value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding decimal value. + + The raw text of the literal. + The decimal value to be represented by the returned token. + + + + Creates a token with kind NumericLiteralToken from the text and corresponding decimal value. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The decimal value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind StringLiteralToken from a string value. + + The string value to be represented by the returned token. + + + + Creates a token with kind StringLiteralToken from the text and corresponding string value. + + The raw text of the literal, including quotes and escape sequences. + The string value to be represented by the returned token. + + + + Creates a token with kind StringLiteralToken from the text and corresponding string value. + + A list of trivia immediately preceding the token. + The raw text of the literal, including quotes and escape sequences. + The string value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind CharacterLiteralToken from a character value. + + The character value to be represented by the returned token. + + + + Creates a token with kind CharacterLiteralToken from the text and corresponding character value. + + The raw text of the literal, including quotes and escape sequences. + The character value to be represented by the returned token. + + + + Creates a token with kind CharacterLiteralToken from the text and corresponding character value. + + A list of trivia immediately preceding the token. + The raw text of the literal, including quotes and escape sequences. + The character value to be represented by the returned token. + A list of trivia immediately following the token. + + + + Creates a token with kind BadToken. + + A list of trivia immediately preceding the token. + The raw text of the bad token. + A list of trivia immediately following the token. + + + + Creates a token with kind XmlTextLiteralToken. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The xml text value. + A list of trivia immediately following the token. + + + + Creates a token with kind XmlEntityLiteralToken. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The xml entity value. + A list of trivia immediately following the token. + + + + Creates an xml documentation comment that abstracts xml syntax creation. + + + A list of xml node syntax that will be the content within the xml documentation comment + (e.g. a summary element, a returns element, exception element and so on). + + + + + Creates a summary element within an xml documentation comment. + + A list of xml node syntax that will be the content within the summary element. + + + + Creates a summary element within an xml documentation comment. + + A list of xml node syntax that will be the content within the summary element. + + + + Creates a see element within an xml documentation comment. + + A cref syntax node that points to the referenced item (e.g. a class, struct). + + + + Creates a seealso element within an xml documentation comment. + + A cref syntax node that points to the referenced item (e.g. a class, struct). + + + + Creates a seealso element within an xml documentation comment. + + The uri of the referenced item. + A list of xml node syntax that will be used as the link text for the referenced item. + + + + Creates a threadsafety element within an xml documentation comment. + + + + + Creates a threadsafety element within an xml documentation comment. + + Indicates whether static member of this type are safe for multi-threaded operations. + Indicates whether instance members of this type are safe for multi-threaded operations. + + + + Creates a syntax node for a name attribute in a xml element within a xml documentation comment. + + The value of the name attribute. + + + + Creates a syntax node for a preliminary element within a xml documentation comment. + + + + + Creates a syntax node for a cref attribute within a xml documentation comment. + + The used for the xml cref attribute syntax. + + + + Creates a syntax node for a cref attribute within a xml documentation comment. + + The used for the xml cref attribute syntax. + The kind of the quote for the referenced item in the cref attribute. + + + + Creates a remarks element within an xml documentation comment. + + A list of xml node syntax that will be the content within the remarks element. + + + + Creates a remarks element within an xml documentation comment. + + A list of xml node syntax that will be the content within the remarks element. + + + + Creates a returns element within an xml documentation comment. + + A list of xml node syntax that will be the content within the returns element. + + + + Creates a returns element within an xml documentation comment. + + A list of xml node syntax that will be the content within the returns element. + + + + Creates the syntax representation of an xml value element (e.g. for xml documentation comments). + + A list of xml syntax nodes that represents the content of the value element. + + + + Creates the syntax representation of an xml value element (e.g. for xml documentation comments). + + A list of xml syntax nodes that represents the content of the value element. + + + + Creates the syntax representation of an exception element within xml documentation comments. + + Syntax representation of the reference to the exception type. + A list of syntax nodes that represents the content of the exception element. + + + + Creates the syntax representation of an exception element within xml documentation comments. + + Syntax representation of the reference to the exception type. + A list of syntax nodes that represents the content of the exception element. + + + + Creates the syntax representation of a permission element within xml documentation comments. + + Syntax representation of the reference to the permission type. + A list of syntax nodes that represents the content of the permission element. + + + + Creates the syntax representation of a permission element within xml documentation comments. + + Syntax representation of the reference to the permission type. + A list of syntax nodes that represents the content of the permission element. + + + + Creates the syntax representation of an example element within xml documentation comments. + + A list of syntax nodes that represents the content of the example element. + + + + Creates the syntax representation of an example element within xml documentation comments. + + A list of syntax nodes that represents the content of the example element. + + + + Creates the syntax representation of a para element within xml documentation comments. + + A list of syntax nodes that represents the content of the para element. + + + + Creates the syntax representation of a para element within xml documentation comments. + + A list of syntax nodes that represents the content of the para element. + + + + Creates the syntax representation of a param element within xml documentation comments (e.g. for + documentation of method parameters). + + The name of the parameter. + A list of syntax nodes that represents the content of the param element (e.g. + the description and meaning of the parameter). + + + + Creates the syntax representation of a param element within xml documentation comments (e.g. for + documentation of method parameters). + + The name of the parameter. + A list of syntax nodes that represents the content of the param element (e.g. + the description and meaning of the parameter). + + + + Creates the syntax representation of a paramref element within xml documentation comments (e.g. for + referencing particular parameters of a method). + + The name of the referenced parameter. + + + + Creates the syntax representation of a see element within xml documentation comments, + that points to the 'null' language keyword. + + + + + Creates the syntax representation of a see element within xml documentation comments, + that points to a language keyword. + + The language keyword to which the see element points to. + + + + Creates the syntax representation of a placeholder element within xml documentation comments. + + A list of syntax nodes that represents the content of the placeholder element. + + + + Creates the syntax representation of a placeholder element within xml documentation comments. + + A list of syntax nodes that represents the content of the placeholder element. + + + + Creates the syntax representation of a named empty xml element within xml documentation comments. + + The name of the empty xml element. + + + + Creates the syntax representation of a named xml element within xml documentation comments. + + The name of the empty xml element. + A list of syntax nodes that represents the content of the xml element. + + + + Creates the syntax representation of a named xml element within xml documentation comments. + + The name of the empty xml element. + A list of syntax nodes that represents the content of the xml element. + + + + Creates the syntax representation of an xml text attribute. + + The name of the xml text attribute. + The value of the xml text attribute. + + + + Creates the syntax representation of an xml text attribute. + + The name of the xml text attribute. + A list of tokens used for the value of the xml text attribute. + + + + Creates the syntax representation of an xml text attribute. + + The name of the xml text attribute. + The kind of the quote token to be used to quote the value (e.g. " or '). + A list of tokens used for the value of the xml text attribute. + + + + Creates the syntax representation of an xml text attribute. + + The name of the xml text attribute. + The kind of the quote token to be used to quote the value (e.g. " or '). + A list of tokens used for the value of the xml text attribute. + + + + Creates the syntax representation of an xml element that spans multiple text lines. + + The name of the xml element. + A list of syntax nodes that represents the content of the xml multi line element. + + + + Creates the syntax representation of an xml element that spans multiple text lines. + + The name of the xml element. + A list of syntax nodes that represents the content of the xml multi line element. + + + + Creates the syntax representation of an xml text that contains a newline token with a documentation comment + exterior trivia at the end (continued documentation comment). + + The raw text within the new line. + + + + Creates the syntax representation of an xml newline token with a documentation comment exterior trivia at + the end (continued documentation comment). + + The raw text within the new line. + + + + Creates a token with kind XmlTextLiteralNewLineToken. + + A list of trivia immediately preceding the token. + The raw text of the literal. + The xml text new line value. + A list of trivia immediately following the token. + + + + Creates the syntax representation of an xml newline token for xml documentation comments. + + The raw text within the new line. + + If set to true, a documentation comment exterior token will be added to the trailing trivia + of the new token. + + + + Generates the syntax representation of a xml text node (e.g. for xml documentation comments). + + The string literal used as the text of the xml text node. + + + + Generates the syntax representation of a xml text node (e.g. for xml documentation comments). + + A list of text tokens used as the text of the xml text node. + + + + Generates the syntax representation of an xml text literal. + + The text used within the xml text literal. + + + + Generates the syntax representation of an xml text literal. + + The raw text of the literal. + The text used within the xml text literal. + + + + Helper method that replaces less-than and greater-than characters with brackets. + + The original token that is to be replaced. + The new rewritten token. + Returns the new rewritten token with replaced characters. + + + + Creates a trivia with kind DocumentationCommentExteriorTrivia. + + The raw text of the literal. + + + + Creates an empty list of syntax nodes. + + The specific type of the element nodes. + + + + Creates a singleton list of syntax nodes. + + The specific type of the element nodes. + The single element node. + + + + + Creates a list of syntax nodes. + + The specific type of the element nodes. + A sequence of element nodes. + + + + Creates an empty list of tokens. + + + + + Creates a singleton list of tokens. + + The single token. + + + + Creates a list of tokens. + + An array of tokens. + + + + Creates a list of tokens. + + + + + + + Creates a trivia from a StructuredTriviaSyntax node. + + + + + Creates an empty list of trivia. + + + + + Creates a singleton list of trivia. + + A single trivia. + + + + Creates a list of trivia. + + An array of trivia. + + + + Creates a list of trivia. + + A sequence of trivia. + + + + Creates an empty separated list. + + The specific type of the element nodes. + + + + Creates a singleton separated list. + + The specific type of the element nodes. + A single node. + + + + Creates a separated list of nodes from a sequence of nodes, synthesizing comma separators in between. + + The specific type of the element nodes. + A sequence of syntax nodes. + + + + Creates a separated list of nodes from a sequence of nodes and a sequence of separator tokens. + + The specific type of the element nodes. + A sequence of syntax nodes. + A sequence of token to be interleaved between the nodes. The number of tokens must + be one less than the number of nodes. + + + + Creates a separated list from a sequence of nodes and tokens, starting with a node and alternating between additional nodes and separator tokens. + + The specific type of the element nodes. + A sequence of nodes or tokens, alternating between nodes and separator tokens. + + + + Creates a separated list from a , where the list elements start with a node and then alternate between + additional nodes and separator tokens. + + The specific type of the element nodes. + The list of nodes and tokens. + + + + Creates an empty . + + + + + Create a from a sequence of . + + The sequence of nodes and tokens + + + + Create a from one or more . + + The nodes and tokens + + + + Creates an IdentifierNameSyntax node. + + The identifier name. + + + + Create a new syntax tree from a syntax node. + + + + + + + + + + + Parse a list of trivia rules for leading trivia. + + + + + Parse a list of trivia rules for leading trivia. + + + + + Parse a list of trivia using the parsing rules for trailing trivia. + + + + + Parse a C# language token. + + The text of the token including leading and trailing trivia. + Optional offset into text. + + + + Parse a sequence of C# language tokens. + Since this API does not create a that owns all produced tokens, + the API may yield surprising results for + the produced tokens and its behavior is generally unspecified. + + The text of all the tokens. + An integer to use as the starting position of the first token. + Optional offset into text. + Parse options. + + + + Parse a NameSyntax node using the grammar rule for names. + + + + + Parse a TypeNameSyntax node using the grammar rule for type names. + + + + + Parse a TypeNameSyntax node using the grammar rule for type names. + + + + + Parse an ExpressionSyntax node using the lowest precedence grammar rule for expressions. + + The text of the expression. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse a StatementSyntaxNode using grammar rule for statements. + + The text of the statement. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse a MemberDeclarationSyntax. This includes all of the kinds of members that could occur in a type declaration. + If nothing resembling a valid member declaration is found in the input, returns null. + + The text of the declaration. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input following a declaration should be treated as an error + + + + Parse a CompilationUnitSyntax using the grammar rule for an entire compilation unit (file). To produce a + SyntaxTree instance, use CSharpSyntaxTree.ParseText instead. + + The text of the compilation unit. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + + + + Parse a ParameterListSyntax node. + + The text of the parenthesized parameter list. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse a BracketedParameterListSyntax node. + + The text of the bracketed parameter list. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse an ArgumentListSyntax node. + + The text of the parenthesized argument list. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse a BracketedArgumentListSyntax node. + + The text of the bracketed argument list. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Parse an AttributeArgumentListSyntax node. + + The text of the attribute argument list. + Optional offset into text. + The optional parse options to use. If no options are specified default options are + used. + True if extra tokens in the input should be treated as an error + + + + Helper method for wrapping a string in a SourceText. + + + + + Determines if two trees are the same, disregarding trivia differences. + + The original tree. + The new tree. + + If true then the trees are equivalent if the contained nodes and tokens declaring + metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies + or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Determines if two syntax nodes are the same, disregarding trivia differences. + + The old node. + The new node. + + If true then the nodes are equivalent if the contained nodes and tokens declaring + metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies + or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Determines if two syntax nodes are the same, disregarding trivia differences. + + The old node. + The new node. + + If specified called for every child syntax node (not token) that is visited during the comparison. + If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded. + + + + + Determines if two syntax tokens are the same, disregarding trivia differences. + + The old token. + The new token. + + + + Determines if two lists of tokens are the same, disregarding trivia differences. + + The old token list. + The new token list. + + + + Determines if two lists of syntax nodes are the same, disregarding trivia differences. + + The old list. + The new list. + + If true then the nodes are equivalent if the contained nodes and tokens declaring + metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies + or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Determines if two lists of syntax nodes are the same, disregarding trivia differences. + + The old list. + The new list. + + If specified called for every child syntax node (not token) that is visited during the comparison. + If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded. + + + + + Determines if two lists of syntax nodes are the same, disregarding trivia differences. + + The old list. + The new list. + + If true then the nodes are equivalent if the contained nodes and tokens declaring + metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies + or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Determines if two lists of syntax nodes are the same, disregarding trivia differences. + + The old list. + The new list. + + If specified called for every child syntax node (not token) that is visited during the comparison. + If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded. + + + + + Gets the containing expression that is actually a language expression and not just typed + as an ExpressionSyntax for convenience. For example, NameSyntax nodes on the right side + of qualified names and member access expressions are not language expressions, yet the + containing qualified names or member access expressions are indeed expressions. + + + + + Gets the containing expression that is actually a language expression (or something that + GetSymbolInfo can be applied to) and not just typed + as an ExpressionSyntax for convenience. For example, NameSyntax nodes on the right side + of qualified names and member access expressions are not language expressions, yet the + containing qualified names or member access expressions are indeed expressions. + Similarly, if the input node is a cref part that is not independently meaningful, then + the result will be the full cref. Besides an expression, an input that is a NameSyntax + of a SubpatternSyntax, e.g. in `name: 3` may cause this method to return the enclosing + SubpatternSyntax. + + + + + Given a conditional binding expression, find corresponding conditional access node. + + + + + Converts a generic name expression into one without the generic arguments. + + + + + + + Determines whether the given text is considered a syntactically complete submission. + Throws if the tree was not compiled as an interactive submission. + + + + Creates a new CaseSwitchLabelSyntax instance. + + + Creates a new DefaultSwitchLabelSyntax instance. + + + Creates a new BlockSyntax instance. + + + Creates a new BlockSyntax instance. + + + Creates a new instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new instance. + + + Creates a new UsingDirectiveSyntax instance. + + + Creates a new ClassOrStructConstraintSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new SwitchStatementSyntax instance. + + + Creates a new SwitchStatementSyntax instance. + + + Creates a new instance. + + + Creates a new instance. + + + Creates a new IdentifierNameSyntax instance. + + + Creates a new QualifiedNameSyntax instance. + + + Creates a new QualifiedNameSyntax instance. + + + Creates a new GenericNameSyntax instance. + + + Creates a new GenericNameSyntax instance. + + + Creates a new GenericNameSyntax instance. + + + Creates a new TypeArgumentListSyntax instance. + + + Creates a new TypeArgumentListSyntax instance. + + + Creates a new AliasQualifiedNameSyntax instance. + + + Creates a new AliasQualifiedNameSyntax instance. + + + Creates a new AliasQualifiedNameSyntax instance. + + + Creates a new PredefinedTypeSyntax instance. + + + Creates a new ArrayTypeSyntax instance. + + + Creates a new ArrayTypeSyntax instance. + + + Creates a new ArrayRankSpecifierSyntax instance. + + + Creates a new ArrayRankSpecifierSyntax instance. + + + Creates a new PointerTypeSyntax instance. + + + Creates a new PointerTypeSyntax instance. + + + Creates a new FunctionPointerTypeSyntax instance. + + + Creates a new FunctionPointerTypeSyntax instance. + + + Creates a new FunctionPointerTypeSyntax instance. + + + Creates a new FunctionPointerParameterListSyntax instance. + + + Creates a new FunctionPointerParameterListSyntax instance. + + + Creates a new FunctionPointerCallingConventionSyntax instance. + + + Creates a new FunctionPointerCallingConventionSyntax instance. + + + Creates a new FunctionPointerUnmanagedCallingConventionListSyntax instance. + + + Creates a new FunctionPointerUnmanagedCallingConventionListSyntax instance. + + + Creates a new FunctionPointerUnmanagedCallingConventionSyntax instance. + + + Creates a new NullableTypeSyntax instance. + + + Creates a new NullableTypeSyntax instance. + + + Creates a new TupleTypeSyntax instance. + + + Creates a new TupleTypeSyntax instance. + + + Creates a new TupleElementSyntax instance. + + + Creates a new TupleElementSyntax instance. + + + Creates a new OmittedTypeArgumentSyntax instance. + + + Creates a new OmittedTypeArgumentSyntax instance. + + + Creates a new RefTypeSyntax instance. + + + Creates a new RefTypeSyntax instance. + + + Creates a new ScopedTypeSyntax instance. + + + Creates a new ScopedTypeSyntax instance. + + + Creates a new ParenthesizedExpressionSyntax instance. + + + Creates a new ParenthesizedExpressionSyntax instance. + + + Creates a new TupleExpressionSyntax instance. + + + Creates a new TupleExpressionSyntax instance. + + + Creates a new PrefixUnaryExpressionSyntax instance. + + + Creates a new PrefixUnaryExpressionSyntax instance. + + + Creates a new AwaitExpressionSyntax instance. + + + Creates a new AwaitExpressionSyntax instance. + + + Creates a new PostfixUnaryExpressionSyntax instance. + + + Creates a new PostfixUnaryExpressionSyntax instance. + + + Creates a new MemberAccessExpressionSyntax instance. + + + Creates a new MemberAccessExpressionSyntax instance. + + + Creates a new ConditionalAccessExpressionSyntax instance. + + + Creates a new ConditionalAccessExpressionSyntax instance. + + + Creates a new MemberBindingExpressionSyntax instance. + + + Creates a new MemberBindingExpressionSyntax instance. + + + Creates a new ElementBindingExpressionSyntax instance. + + + Creates a new ElementBindingExpressionSyntax instance. + + + Creates a new RangeExpressionSyntax instance. + + + Creates a new RangeExpressionSyntax instance. + + + Creates a new RangeExpressionSyntax instance. + + + Creates a new ImplicitElementAccessSyntax instance. + + + Creates a new ImplicitElementAccessSyntax instance. + + + Creates a new BinaryExpressionSyntax instance. + + + Creates a new BinaryExpressionSyntax instance. + + + Creates a new AssignmentExpressionSyntax instance. + + + Creates a new AssignmentExpressionSyntax instance. + + + Creates a new ConditionalExpressionSyntax instance. + + + Creates a new ConditionalExpressionSyntax instance. + + + Creates a new ThisExpressionSyntax instance. + + + Creates a new ThisExpressionSyntax instance. + + + Creates a new BaseExpressionSyntax instance. + + + Creates a new BaseExpressionSyntax instance. + + + Creates a new LiteralExpressionSyntax instance. + + + Creates a new MakeRefExpressionSyntax instance. + + + Creates a new MakeRefExpressionSyntax instance. + + + Creates a new RefTypeExpressionSyntax instance. + + + Creates a new RefTypeExpressionSyntax instance. + + + Creates a new RefValueExpressionSyntax instance. + + + Creates a new RefValueExpressionSyntax instance. + + + Creates a new CheckedExpressionSyntax instance. + + + Creates a new CheckedExpressionSyntax instance. + + + Creates a new DefaultExpressionSyntax instance. + + + Creates a new DefaultExpressionSyntax instance. + + + Creates a new TypeOfExpressionSyntax instance. + + + Creates a new TypeOfExpressionSyntax instance. + + + Creates a new SizeOfExpressionSyntax instance. + + + Creates a new SizeOfExpressionSyntax instance. + + + Creates a new InvocationExpressionSyntax instance. + + + Creates a new InvocationExpressionSyntax instance. + + + Creates a new ElementAccessExpressionSyntax instance. + + + Creates a new ElementAccessExpressionSyntax instance. + + + Creates a new ArgumentListSyntax instance. + + + Creates a new ArgumentListSyntax instance. + + + Creates a new BracketedArgumentListSyntax instance. + + + Creates a new BracketedArgumentListSyntax instance. + + + Creates a new ArgumentSyntax instance. + + + Creates a new ArgumentSyntax instance. + + + Creates a new ExpressionColonSyntax instance. + + + Creates a new NameColonSyntax instance. + + + Creates a new DeclarationExpressionSyntax instance. + + + Creates a new CastExpressionSyntax instance. + + + Creates a new CastExpressionSyntax instance. + + + Creates a new AnonymousMethodExpressionSyntax instance. + + + Creates a new SimpleLambdaExpressionSyntax instance. + + + Creates a new SimpleLambdaExpressionSyntax instance. + + + Creates a new SimpleLambdaExpressionSyntax instance. + + + Creates a new RefExpressionSyntax instance. + + + Creates a new RefExpressionSyntax instance. + + + Creates a new ParenthesizedLambdaExpressionSyntax instance. + + + Creates a new ParenthesizedLambdaExpressionSyntax instance. + + + Creates a new ParenthesizedLambdaExpressionSyntax instance. + + + Creates a new InitializerExpressionSyntax instance. + + + Creates a new InitializerExpressionSyntax instance. + + + Creates a new ImplicitObjectCreationExpressionSyntax instance. + + + Creates a new ImplicitObjectCreationExpressionSyntax instance. + + + Creates a new ImplicitObjectCreationExpressionSyntax instance. + + + Creates a new ObjectCreationExpressionSyntax instance. + + + Creates a new ObjectCreationExpressionSyntax instance. + + + Creates a new ObjectCreationExpressionSyntax instance. + + + Creates a new WithExpressionSyntax instance. + + + Creates a new WithExpressionSyntax instance. + + + Creates a new AnonymousObjectMemberDeclaratorSyntax instance. + + + Creates a new AnonymousObjectMemberDeclaratorSyntax instance. + + + Creates a new AnonymousObjectCreationExpressionSyntax instance. + + + Creates a new AnonymousObjectCreationExpressionSyntax instance. + + + Creates a new ArrayCreationExpressionSyntax instance. + + + Creates a new ArrayCreationExpressionSyntax instance. + + + Creates a new ArrayCreationExpressionSyntax instance. + + + Creates a new ImplicitArrayCreationExpressionSyntax instance. + + + Creates a new ImplicitArrayCreationExpressionSyntax instance. + + + Creates a new ImplicitArrayCreationExpressionSyntax instance. + + + Creates a new StackAllocArrayCreationExpressionSyntax instance. + + + Creates a new StackAllocArrayCreationExpressionSyntax instance. + + + Creates a new StackAllocArrayCreationExpressionSyntax instance. + + + Creates a new ImplicitStackAllocArrayCreationExpressionSyntax instance. + + + Creates a new ImplicitStackAllocArrayCreationExpressionSyntax instance. + + + Creates a new QueryExpressionSyntax instance. + + + Creates a new QueryBodySyntax instance. + + + Creates a new QueryBodySyntax instance. + + + Creates a new FromClauseSyntax instance. + + + Creates a new FromClauseSyntax instance. + + + Creates a new FromClauseSyntax instance. + + + Creates a new FromClauseSyntax instance. + + + Creates a new LetClauseSyntax instance. + + + Creates a new LetClauseSyntax instance. + + + Creates a new LetClauseSyntax instance. + + + Creates a new JoinClauseSyntax instance. + + + Creates a new JoinClauseSyntax instance. + + + Creates a new JoinClauseSyntax instance. + + + Creates a new JoinClauseSyntax instance. + + + Creates a new JoinIntoClauseSyntax instance. + + + Creates a new JoinIntoClauseSyntax instance. + + + Creates a new JoinIntoClauseSyntax instance. + + + Creates a new WhereClauseSyntax instance. + + + Creates a new WhereClauseSyntax instance. + + + Creates a new OrderByClauseSyntax instance. + + + Creates a new OrderByClauseSyntax instance. + + + Creates a new OrderingSyntax instance. + + + Creates a new OrderingSyntax instance. + + + Creates a new SelectClauseSyntax instance. + + + Creates a new SelectClauseSyntax instance. + + + Creates a new GroupClauseSyntax instance. + + + Creates a new GroupClauseSyntax instance. + + + Creates a new QueryContinuationSyntax instance. + + + Creates a new QueryContinuationSyntax instance. + + + Creates a new QueryContinuationSyntax instance. + + + Creates a new OmittedArraySizeExpressionSyntax instance. + + + Creates a new OmittedArraySizeExpressionSyntax instance. + + + Creates a new InterpolatedStringExpressionSyntax instance. + + + Creates a new InterpolatedStringExpressionSyntax instance. + + + Creates a new IsPatternExpressionSyntax instance. + + + Creates a new IsPatternExpressionSyntax instance. + + + Creates a new ThrowExpressionSyntax instance. + + + Creates a new ThrowExpressionSyntax instance. + + + Creates a new WhenClauseSyntax instance. + + + Creates a new WhenClauseSyntax instance. + + + Creates a new DiscardPatternSyntax instance. + + + Creates a new DiscardPatternSyntax instance. + + + Creates a new DeclarationPatternSyntax instance. + + + Creates a new VarPatternSyntax instance. + + + Creates a new VarPatternSyntax instance. + + + Creates a new RecursivePatternSyntax instance. + + + Creates a new RecursivePatternSyntax instance. + + + Creates a new PositionalPatternClauseSyntax instance. + + + Creates a new PositionalPatternClauseSyntax instance. + + + Creates a new PropertyPatternClauseSyntax instance. + + + Creates a new PropertyPatternClauseSyntax instance. + + + Creates a new SubpatternSyntax instance. + + + Creates a new SubpatternSyntax instance. + + + Creates a new ConstantPatternSyntax instance. + + + Creates a new ParenthesizedPatternSyntax instance. + + + Creates a new ParenthesizedPatternSyntax instance. + + + Creates a new RelationalPatternSyntax instance. + + + Creates a new TypePatternSyntax instance. + + + Creates a new BinaryPatternSyntax instance. + + + Creates a new BinaryPatternSyntax instance. + + + Creates a new UnaryPatternSyntax instance. + + + Creates a new UnaryPatternSyntax instance. + + + Creates a new ListPatternSyntax instance. + + + Creates a new ListPatternSyntax instance. + + + Creates a new ListPatternSyntax instance. + + + Creates a new SlicePatternSyntax instance. + + + Creates a new SlicePatternSyntax instance. + + + Creates a new InterpolatedStringTextSyntax instance. + + + Creates a new InterpolatedStringTextSyntax instance. + + + Creates a new InterpolationSyntax instance. + + + Creates a new InterpolationSyntax instance. + + + Creates a new InterpolationSyntax instance. + + + Creates a new InterpolationAlignmentClauseSyntax instance. + + + Creates a new InterpolationFormatClauseSyntax instance. + + + Creates a new InterpolationFormatClauseSyntax instance. + + + Creates a new GlobalStatementSyntax instance. + + + Creates a new GlobalStatementSyntax instance. + + + Creates a new BlockSyntax instance. + + + Creates a new BlockSyntax instance. + + + Creates a new BlockSyntax instance. + + + Creates a new LocalFunctionStatementSyntax instance. + + + Creates a new LocalFunctionStatementSyntax instance. + + + Creates a new LocalFunctionStatementSyntax instance. + + + Creates a new LocalFunctionStatementSyntax instance. + + + Creates a new LocalDeclarationStatementSyntax instance. + + + Creates a new LocalDeclarationStatementSyntax instance. + + + Creates a new LocalDeclarationStatementSyntax instance. + + + Creates a new VariableDeclarationSyntax instance. + + + Creates a new VariableDeclarationSyntax instance. + + + Creates a new VariableDeclaratorSyntax instance. + + + Creates a new VariableDeclaratorSyntax instance. + + + Creates a new VariableDeclaratorSyntax instance. + + + Creates a new EqualsValueClauseSyntax instance. + + + Creates a new EqualsValueClauseSyntax instance. + + + Creates a new SingleVariableDesignationSyntax instance. + + + Creates a new DiscardDesignationSyntax instance. + + + Creates a new DiscardDesignationSyntax instance. + + + Creates a new ParenthesizedVariableDesignationSyntax instance. + + + Creates a new ParenthesizedVariableDesignationSyntax instance. + + + Creates a new ExpressionStatementSyntax instance. + + + Creates a new ExpressionStatementSyntax instance. + + + Creates a new ExpressionStatementSyntax instance. + + + Creates a new EmptyStatementSyntax instance. + + + Creates a new EmptyStatementSyntax instance. + + + Creates a new EmptyStatementSyntax instance. + + + Creates a new LabeledStatementSyntax instance. + + + Creates a new LabeledStatementSyntax instance. + + + Creates a new LabeledStatementSyntax instance. + + + Creates a new LabeledStatementSyntax instance. + + + Creates a new GotoStatementSyntax instance. + + + Creates a new GotoStatementSyntax instance. + + + Creates a new GotoStatementSyntax instance. + + + Creates a new BreakStatementSyntax instance. + + + Creates a new BreakStatementSyntax instance. + + + Creates a new BreakStatementSyntax instance. + + + Creates a new ContinueStatementSyntax instance. + + + Creates a new ContinueStatementSyntax instance. + + + Creates a new ContinueStatementSyntax instance. + + + Creates a new ReturnStatementSyntax instance. + + + Creates a new ReturnStatementSyntax instance. + + + Creates a new ReturnStatementSyntax instance. + + + Creates a new ThrowStatementSyntax instance. + + + Creates a new ThrowStatementSyntax instance. + + + Creates a new ThrowStatementSyntax instance. + + + Creates a new YieldStatementSyntax instance. + + + Creates a new YieldStatementSyntax instance. + + + Creates a new YieldStatementSyntax instance. + + + Creates a new WhileStatementSyntax instance. + + + Creates a new WhileStatementSyntax instance. + + + Creates a new WhileStatementSyntax instance. + + + Creates a new DoStatementSyntax instance. + + + Creates a new DoStatementSyntax instance. + + + Creates a new DoStatementSyntax instance. + + + Creates a new ForStatementSyntax instance. + + + Creates a new ForStatementSyntax instance. + + + Creates a new ForStatementSyntax instance. + + + Creates a new ForEachStatementSyntax instance. + + + Creates a new ForEachStatementSyntax instance. + + + Creates a new ForEachStatementSyntax instance. + + + Creates a new ForEachStatementSyntax instance. + + + Creates a new ForEachVariableStatementSyntax instance. + + + Creates a new ForEachVariableStatementSyntax instance. + + + Creates a new ForEachVariableStatementSyntax instance. + + + Creates a new UsingStatementSyntax instance. + + + Creates a new UsingStatementSyntax instance. + + + Creates a new UsingStatementSyntax instance. + + + Creates a new FixedStatementSyntax instance. + + + Creates a new FixedStatementSyntax instance. + + + Creates a new FixedStatementSyntax instance. + + + Creates a new CheckedStatementSyntax instance. + + + Creates a new CheckedStatementSyntax instance. + + + Creates a new CheckedStatementSyntax instance. + + + Creates a new UnsafeStatementSyntax instance. + + + Creates a new UnsafeStatementSyntax instance. + + + Creates a new UnsafeStatementSyntax instance. + + + Creates a new LockStatementSyntax instance. + + + Creates a new LockStatementSyntax instance. + + + Creates a new LockStatementSyntax instance. + + + Creates a new IfStatementSyntax instance. + + + Creates a new IfStatementSyntax instance. + + + Creates a new IfStatementSyntax instance. + + + Creates a new ElseClauseSyntax instance. + + + Creates a new ElseClauseSyntax instance. + + + Creates a new SwitchStatementSyntax instance. + + + Creates a new SwitchSectionSyntax instance. + + + Creates a new SwitchSectionSyntax instance. + + + Creates a new CasePatternSwitchLabelSyntax instance. + + + Creates a new CasePatternSwitchLabelSyntax instance. + + + Creates a new CasePatternSwitchLabelSyntax instance. + + + Creates a new CaseSwitchLabelSyntax instance. + + + Creates a new CaseSwitchLabelSyntax instance. + + + Creates a new DefaultSwitchLabelSyntax instance. + + + Creates a new DefaultSwitchLabelSyntax instance. + + + Creates a new SwitchExpressionSyntax instance. + + + Creates a new SwitchExpressionSyntax instance. + + + Creates a new SwitchExpressionSyntax instance. + + + Creates a new SwitchExpressionArmSyntax instance. + + + Creates a new SwitchExpressionArmSyntax instance. + + + Creates a new SwitchExpressionArmSyntax instance. + + + Creates a new TryStatementSyntax instance. + + + Creates a new TryStatementSyntax instance. + + + Creates a new TryStatementSyntax instance. + + + Creates a new CatchClauseSyntax instance. + + + Creates a new CatchClauseSyntax instance. + + + Creates a new CatchClauseSyntax instance. + + + Creates a new CatchDeclarationSyntax instance. + + + Creates a new CatchDeclarationSyntax instance. + + + Creates a new CatchDeclarationSyntax instance. + + + Creates a new CatchFilterClauseSyntax instance. + + + Creates a new CatchFilterClauseSyntax instance. + + + Creates a new FinallyClauseSyntax instance. + + + Creates a new FinallyClauseSyntax instance. + + + Creates a new CompilationUnitSyntax instance. + + + Creates a new CompilationUnitSyntax instance. + + + Creates a new CompilationUnitSyntax instance. + + + Creates a new ExternAliasDirectiveSyntax instance. + + + Creates a new ExternAliasDirectiveSyntax instance. + + + Creates a new ExternAliasDirectiveSyntax instance. + + + Creates a new UsingDirectiveSyntax instance. + + + Creates a new UsingDirectiveSyntax instance. + + + Creates a new UsingDirectiveSyntax instance. + + + Creates a new NamespaceDeclarationSyntax instance. + + + Creates a new NamespaceDeclarationSyntax instance. + + + Creates a new NamespaceDeclarationSyntax instance. + + + Creates a new FileScopedNamespaceDeclarationSyntax instance. + + + Creates a new FileScopedNamespaceDeclarationSyntax instance. + + + Creates a new FileScopedNamespaceDeclarationSyntax instance. + + + Creates a new AttributeListSyntax instance. + + + Creates a new AttributeListSyntax instance. + + + Creates a new AttributeListSyntax instance. + + + Creates a new AttributeTargetSpecifierSyntax instance. + + + Creates a new AttributeTargetSpecifierSyntax instance. + + + Creates a new AttributeSyntax instance. + + + Creates a new AttributeSyntax instance. + + + Creates a new AttributeArgumentListSyntax instance. + + + Creates a new AttributeArgumentListSyntax instance. + + + Creates a new AttributeArgumentSyntax instance. + + + Creates a new AttributeArgumentSyntax instance. + + + Creates a new NameEqualsSyntax instance. + + + Creates a new NameEqualsSyntax instance. + + + Creates a new NameEqualsSyntax instance. + + + Creates a new TypeParameterListSyntax instance. + + + Creates a new TypeParameterListSyntax instance. + + + Creates a new TypeParameterSyntax instance. + + + Creates a new TypeParameterSyntax instance. + + + Creates a new TypeParameterSyntax instance. + + + Creates a new ClassDeclarationSyntax instance. + + + Creates a new ClassDeclarationSyntax instance. + + + Creates a new ClassDeclarationSyntax instance. + + + Creates a new ClassDeclarationSyntax instance. + + + Creates a new StructDeclarationSyntax instance. + + + Creates a new StructDeclarationSyntax instance. + + + Creates a new StructDeclarationSyntax instance. + + + Creates a new StructDeclarationSyntax instance. + + + Creates a new InterfaceDeclarationSyntax instance. + + + Creates a new InterfaceDeclarationSyntax instance. + + + Creates a new InterfaceDeclarationSyntax instance. + + + Creates a new InterfaceDeclarationSyntax instance. + + + Creates a new RecordDeclarationSyntax instance. + + + Creates a new RecordDeclarationSyntax instance. + + + Creates a new RecordDeclarationSyntax instance. + + + Creates a new RecordDeclarationSyntax instance. + + + Creates a new EnumDeclarationSyntax instance. + + + Creates a new EnumDeclarationSyntax instance. + + + Creates a new EnumDeclarationSyntax instance. + + + Creates a new EnumDeclarationSyntax instance. + + + Creates a new DelegateDeclarationSyntax instance. + + + Creates a new DelegateDeclarationSyntax instance. + + + Creates a new DelegateDeclarationSyntax instance. + + + Creates a new DelegateDeclarationSyntax instance. + + + Creates a new EnumMemberDeclarationSyntax instance. + + + Creates a new EnumMemberDeclarationSyntax instance. + + + Creates a new EnumMemberDeclarationSyntax instance. + + + Creates a new BaseListSyntax instance. + + + Creates a new BaseListSyntax instance. + + + Creates a new SimpleBaseTypeSyntax instance. + + + Creates a new PrimaryConstructorBaseTypeSyntax instance. + + + Creates a new PrimaryConstructorBaseTypeSyntax instance. + + + Creates a new TypeParameterConstraintClauseSyntax instance. + + + Creates a new TypeParameterConstraintClauseSyntax instance. + + + Creates a new TypeParameterConstraintClauseSyntax instance. + + + Creates a new TypeParameterConstraintClauseSyntax instance. + + + Creates a new ConstructorConstraintSyntax instance. + + + Creates a new ConstructorConstraintSyntax instance. + + + Creates a new ClassOrStructConstraintSyntax instance. + + + Creates a new ClassOrStructConstraintSyntax instance. + + + Creates a new TypeConstraintSyntax instance. + + + Creates a new DefaultConstraintSyntax instance. + + + Creates a new DefaultConstraintSyntax instance. + + + Creates a new FieldDeclarationSyntax instance. + + + Creates a new FieldDeclarationSyntax instance. + + + Creates a new FieldDeclarationSyntax instance. + + + Creates a new EventFieldDeclarationSyntax instance. + + + Creates a new EventFieldDeclarationSyntax instance. + + + Creates a new EventFieldDeclarationSyntax instance. + + + Creates a new ExplicitInterfaceSpecifierSyntax instance. + + + Creates a new ExplicitInterfaceSpecifierSyntax instance. + + + Creates a new MethodDeclarationSyntax instance. + + + Creates a new MethodDeclarationSyntax instance. + + + Creates a new MethodDeclarationSyntax instance. + + + Creates a new MethodDeclarationSyntax instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new OperatorDeclarationSyntax instance. + + + Creates a new ConversionOperatorDeclarationSyntax instance. + + + Creates a new ConversionOperatorDeclarationSyntax instance. + + + Creates a new ConversionOperatorDeclarationSyntax instance. + + + Creates a new ConstructorDeclarationSyntax instance. + + + Creates a new ConstructorDeclarationSyntax instance. + + + Creates a new ConstructorDeclarationSyntax instance. + + + Creates a new ConstructorDeclarationSyntax instance. + + + Creates a new ConstructorInitializerSyntax instance. + + + Creates a new ConstructorInitializerSyntax instance. + + + Creates a new DestructorDeclarationSyntax instance. + + + Creates a new DestructorDeclarationSyntax instance. + + + Creates a new DestructorDeclarationSyntax instance. + + + Creates a new DestructorDeclarationSyntax instance. + + + Creates a new PropertyDeclarationSyntax instance. + + + Creates a new PropertyDeclarationSyntax instance. + + + Creates a new PropertyDeclarationSyntax instance. + + + Creates a new PropertyDeclarationSyntax instance. + + + Creates a new ArrowExpressionClauseSyntax instance. + + + Creates a new ArrowExpressionClauseSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new EventDeclarationSyntax instance. + + + Creates a new IndexerDeclarationSyntax instance. + + + Creates a new IndexerDeclarationSyntax instance. + + + Creates a new IndexerDeclarationSyntax instance. + + + Creates a new AccessorListSyntax instance. + + + Creates a new AccessorListSyntax instance. + + + Creates a new AccessorDeclarationSyntax instance. + + + Creates a new AccessorDeclarationSyntax instance. + + + Creates a new AccessorDeclarationSyntax instance. + + + Creates a new ParameterListSyntax instance. + + + Creates a new ParameterListSyntax instance. + + + Creates a new BracketedParameterListSyntax instance. + + + Creates a new BracketedParameterListSyntax instance. + + + Creates a new ParameterSyntax instance. + + + Creates a new ParameterSyntax instance. + + + Creates a new FunctionPointerParameterSyntax instance. + + + Creates a new FunctionPointerParameterSyntax instance. + + + Creates a new IncompleteMemberSyntax instance. + + + Creates a new IncompleteMemberSyntax instance. + + + Creates a new SkippedTokensTriviaSyntax instance. + + + Creates a new SkippedTokensTriviaSyntax instance. + + + Creates a new DocumentationCommentTriviaSyntax instance. + + + Creates a new DocumentationCommentTriviaSyntax instance. + + + Creates a new TypeCrefSyntax instance. + + + Creates a new QualifiedCrefSyntax instance. + + + Creates a new QualifiedCrefSyntax instance. + + + Creates a new NameMemberCrefSyntax instance. + + + Creates a new NameMemberCrefSyntax instance. + + + Creates a new IndexerMemberCrefSyntax instance. + + + Creates a new IndexerMemberCrefSyntax instance. + + + Creates a new OperatorMemberCrefSyntax instance. + + + Creates a new OperatorMemberCrefSyntax instance. + + + Creates a new OperatorMemberCrefSyntax instance. + + + Creates a new ConversionOperatorMemberCrefSyntax instance. + + + Creates a new ConversionOperatorMemberCrefSyntax instance. + + + Creates a new ConversionOperatorMemberCrefSyntax instance. + + + Creates a new CrefParameterListSyntax instance. + + + Creates a new CrefParameterListSyntax instance. + + + Creates a new CrefBracketedParameterListSyntax instance. + + + Creates a new CrefBracketedParameterListSyntax instance. + + + Creates a new CrefParameterSyntax instance. + + + Creates a new CrefParameterSyntax instance. + + + Creates a new XmlElementSyntax instance. + + + Creates a new XmlElementSyntax instance. + + + Creates a new XmlElementStartTagSyntax instance. + + + Creates a new XmlElementStartTagSyntax instance. + + + Creates a new XmlElementStartTagSyntax instance. + + + Creates a new XmlElementEndTagSyntax instance. + + + Creates a new XmlElementEndTagSyntax instance. + + + Creates a new XmlEmptyElementSyntax instance. + + + Creates a new XmlEmptyElementSyntax instance. + + + Creates a new XmlEmptyElementSyntax instance. + + + Creates a new XmlNameSyntax instance. + + + Creates a new XmlNameSyntax instance. + + + Creates a new XmlNameSyntax instance. + + + Creates a new XmlPrefixSyntax instance. + + + Creates a new XmlPrefixSyntax instance. + + + Creates a new XmlPrefixSyntax instance. + + + Creates a new XmlTextAttributeSyntax instance. + + + Creates a new XmlTextAttributeSyntax instance. + + + Creates a new XmlTextAttributeSyntax instance. + + + Creates a new XmlCrefAttributeSyntax instance. + + + Creates a new XmlCrefAttributeSyntax instance. + + + Creates a new XmlNameAttributeSyntax instance. + + + Creates a new XmlNameAttributeSyntax instance. + + + Creates a new XmlNameAttributeSyntax instance. + + + Creates a new XmlTextSyntax instance. + + + Creates a new XmlTextSyntax instance. + + + Creates a new XmlCDataSectionSyntax instance. + + + Creates a new XmlCDataSectionSyntax instance. + + + Creates a new XmlProcessingInstructionSyntax instance. + + + Creates a new XmlProcessingInstructionSyntax instance. + + + Creates a new XmlProcessingInstructionSyntax instance. + + + Creates a new XmlCommentSyntax instance. + + + Creates a new XmlCommentSyntax instance. + + + Creates a new IfDirectiveTriviaSyntax instance. + + + Creates a new IfDirectiveTriviaSyntax instance. + + + Creates a new ElifDirectiveTriviaSyntax instance. + + + Creates a new ElifDirectiveTriviaSyntax instance. + + + Creates a new ElseDirectiveTriviaSyntax instance. + + + Creates a new ElseDirectiveTriviaSyntax instance. + + + Creates a new EndIfDirectiveTriviaSyntax instance. + + + Creates a new EndIfDirectiveTriviaSyntax instance. + + + Creates a new RegionDirectiveTriviaSyntax instance. + + + Creates a new RegionDirectiveTriviaSyntax instance. + + + Creates a new EndRegionDirectiveTriviaSyntax instance. + + + Creates a new EndRegionDirectiveTriviaSyntax instance. + + + Creates a new ErrorDirectiveTriviaSyntax instance. + + + Creates a new ErrorDirectiveTriviaSyntax instance. + + + Creates a new WarningDirectiveTriviaSyntax instance. + + + Creates a new WarningDirectiveTriviaSyntax instance. + + + Creates a new BadDirectiveTriviaSyntax instance. + + + Creates a new BadDirectiveTriviaSyntax instance. + + + Creates a new DefineDirectiveTriviaSyntax instance. + + + Creates a new DefineDirectiveTriviaSyntax instance. + + + Creates a new DefineDirectiveTriviaSyntax instance. + + + Creates a new UndefDirectiveTriviaSyntax instance. + + + Creates a new UndefDirectiveTriviaSyntax instance. + + + Creates a new UndefDirectiveTriviaSyntax instance. + + + Creates a new LineDirectiveTriviaSyntax instance. + + + Creates a new LineDirectiveTriviaSyntax instance. + + + Creates a new LineDirectiveTriviaSyntax instance. + + + Creates a new LineDirectivePositionSyntax instance. + + + Creates a new LineDirectivePositionSyntax instance. + + + Creates a new LineSpanDirectiveTriviaSyntax instance. + + + Creates a new LineSpanDirectiveTriviaSyntax instance. + + + Creates a new LineSpanDirectiveTriviaSyntax instance. + + + Creates a new PragmaWarningDirectiveTriviaSyntax instance. + + + Creates a new PragmaWarningDirectiveTriviaSyntax instance. + + + Creates a new PragmaWarningDirectiveTriviaSyntax instance. + + + Creates a new PragmaChecksumDirectiveTriviaSyntax instance. + + + Creates a new PragmaChecksumDirectiveTriviaSyntax instance. + + + Creates a new ReferenceDirectiveTriviaSyntax instance. + + + Creates a new ReferenceDirectiveTriviaSyntax instance. + + + Creates a new LoadDirectiveTriviaSyntax instance. + + + Creates a new LoadDirectiveTriviaSyntax instance. + + + Creates a new ShebangDirectiveTriviaSyntax instance. + + + Creates a new ShebangDirectiveTriviaSyntax instance. + + + Creates a new NullableDirectiveTriviaSyntax instance. + + + Creates a new NullableDirectiveTriviaSyntax instance. + + + Creates a new NullableDirectiveTriviaSyntax instance. + + + + Represents a non-terminal node in the syntax tree. + + + + + Used by structured trivia which has "parent == null", and therefore must know its + SyntaxTree explicitly when created. + + + + + Returns a non-null that owns this node. + If this node was created with an explicit non-null , returns that tree. + Otherwise, if this node has a non-null parent, then returns the parent's . + Otherwise, returns a newly created rooted at this node, preserving this node's reference identity. + + + + + The node that contains this node in its Children collection. + + + + + Returns the of the node. + + + + + The language name that this node is syntax of. + + + + + The list of trivia that appears before this node in the source code. + + + + + The list of trivia that appears after this node in the source code. + + + + + Deserialize a syntax node from the byte stream. + + + + + Gets a for this node. + + + + + Gets a SyntaxReference for this syntax node. SyntaxReferences can be used to + regain access to a syntax node without keeping the entire tree and source text in + memory. + + + + + Gets a list of all the diagnostics in the sub tree that has this node as its root. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets the first directive of the tree rooted by this node. + + + + + Gets the last directive of the tree rooted by this node. + + + + + Gets the first token of the tree rooted by this node. + + True if zero width tokens should be included, false by + default. + True if skipped tokens should be included, false by default. + True if directives should be included, false by default. + True if documentation comments should be + included, false by default. + + + + + Gets the first token of the tree rooted by this node. + + Only tokens for which this predicate returns true are included. Pass null to include + all tokens. + Steps into trivia if this is not null. Only trivia for which this delegate returns + true are included. + + + + + Gets the last non-zero-width token of the tree rooted by this node. + + True if zero width tokens should be included, false by + default. + True if skipped tokens should be included, false by default. + True if directives should be included, false by default. + True if documentation comments should be + included, false by default. + + + + + Finds a token according to the following rules: + 1) If position matches the End of the node/s FullSpan and the node is CompilationUnit, + then EoF is returned. + + 2) If node.FullSpan.Contains(position) then the token that contains given position is + returned. + + 3) Otherwise an ArgumentOutOfRangeException is thrown + + + + + Finds a token according to the following rules: + 1) If position matches the End of the node/s FullSpan and the node is CompilationUnit, + then EoF is returned. + + 2) If node.FullSpan.Contains(position) then the token that contains given position is + returned. + + 3) Otherwise an ArgumentOutOfRangeException is thrown + + + + + Finds a descendant trivia of this node at the specified position, where the position is + within the span of the node. + + The character position of the trivia relative to the beginning of + the file. + Specifies a function that determines per trivia node, whether to + descend into structured trivia of that node. + + + + + Finds a descendant trivia of this node whose span includes the supplied position. + + The character position of the trivia relative to the beginning of + the file. + Whether to search inside structured trivia. + + + + Determine if this node is structurally equivalent to another. + + + + + + + This is ONLY used for debugging purpose + + + + + Represents a which descends an entire graph and + may replace or remove visited SyntaxNodes in depth-first order. + + + + + The parsed representation of a C# source document. + + + + + Stores positions where preprocessor state changes. Sorted by position. + The updated state can be found in array at the same index. + + + + + Preprocessor states corresponding to positions in . + + + + + The options used by the parser to produce the syntax tree. + + + + + Produces a clone of a which will have current syntax tree as its parent. + + Caller must guarantee that if the same instance of makes multiple calls + to this function, only one result is observable. + + Type of the syntax node. + The original syntax node. + A clone of the original syntax node that has current as its parent. + + + + Gets the root node of the syntax tree. + + + + + Gets the root node of the syntax tree if it is already available. + + + + + Gets the root node of the syntax tree asynchronously. + + + By default, the work associated with this method will be executed immediately on the current thread. + Implementations that wish to schedule this work differently should override . + + + + + Gets the root of the syntax tree statically typed as . + + + Ensure that is true for this tree prior to invoking this method. + + Throws this exception if is false. + + + + Determines if two trees are the same, disregarding trivia differences. + + The tree to compare against. + + If true then the trees are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, + ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Creates a new syntax tree from a syntax node. + + + + + Creates a new syntax tree from a syntax node. + + An obsolete parameter. Diagnostic options should now be passed with + An obsolete parameter. It is unused. + + + + Creates a new syntax tree from a syntax node with text that should correspond to the syntax node. + + This is used by the ExpressionEvaluator. + + + + + Internal helper for class to create a new syntax tree rooted at the given root node. + This method does not create a clone of the given root, but instead preserves it's reference identity. + + NOTE: This method is only intended to be used from property. + NOTE: Do not use this method elsewhere, instead use method for creating a syntax tree. + + + + + Produces a syntax tree by parsing the source text lazily. The syntax tree is realized when + is called. + + + + + Produces a syntax tree by parsing the source text. + + + + + Produces a syntax tree by parsing the source text. + + An obsolete parameter. Diagnostic options should now be passed with + An obsolete parameter. It is unused. + + + + Produces a syntax tree by parsing the source text. + + + + + Produces a syntax tree by parsing the source text. + + An obsolete parameter. Diagnostic options should now be passed with + An obsolete parameter. It is unused. + + + + Creates a new syntax based off this tree using a new source text. + + + If the new source text is a minor change from the current source text an incremental parse will occur + reusing most of the current syntax tree internal data. Otherwise, a full parse will occur using the new + source text. + + + + + Produces a pessimistic list of spans that denote the regions of text in this tree that + are changed from the text of the old tree. + + The old tree. Cannot be null. + The list is pessimistic because it may claim more or larger regions than actually changed. + + + + Gets a list of text changes that when applied to the old tree produce this tree. + + The old tree. Cannot be null. + The list of changes may be different than the original changes that produced this tree. + + + + Gets the location in terms of path, line and column for a given span. + + Span within the tree. + Cancellation token. + + that contains path, line and column information. + + The values are not affected by line mapping directives (#line). + + + + Gets the location in terms of path, line and column after applying source line mapping directives (#line). + + Span within the tree. + Cancellation token. + + A valid that contains path, line and column information. + + If the location path is mapped the resulting path is the path specified in the corresponding #line, + otherwise it's . + + + A location path is considered mapped if the first #line directive that precedes it and that + either specifies an explicit file path or is #line default exists and specifies an explicit path. + + + + + + + + + + + + Gets a for a . FileLinePositionSpans are used + primarily for diagnostics and source locations. + + The source to convert. + When the method returns, contains a boolean value indicating whether this span is considered hidden or not. + A resulting . + + + + Gets a boolean value indicating whether there are any hidden regions in the tree. + + True if there is at least one hidden region. + + + + Given the error code and the source location, get the warning state based on #pragma warning directives. + + Error code. + Source location. + + + + Gets a for the specified text . + + + + + Gets a list of all the diagnostics in the sub tree that has the specified node as its root. + + + This method does not filter diagnostics based on #pragmas and compiler options + like /nowarn, /warnaserror etc. + + + + + Gets a list of all the diagnostics associated with the token and any related trivia. + + + This method does not filter diagnostics based on #pragmas and compiler options + like /nowarn, /warnaserror etc. + + + + + Gets a list of all the diagnostics associated with the trivia. + + + This method does not filter diagnostics based on #pragmas and compiler options + like /nowarn, /warnaserror etc. + + + + + Gets a list of all the diagnostics in either the sub tree that has the specified node as its root or + associated with the token and its related trivia. + + + This method does not filter diagnostics based on #pragmas and compiler options + like /nowarn, /warnaserror etc. + + + + + Gets a list of all the diagnostics in the syntax tree. + + + This method does not filter diagnostics based on #pragmas and compiler options + like /nowarn, /warnaserror etc. + + + + + This is ONLY used for debugging purpose + + + + + Use by Expression Evaluator. + + + + + Represents a visitor that visits only the single CSharpSyntaxNode + passed into its Visit method and produces + a value of the type specified by the parameter. + + + The type of the return value this visitor's Visit method. + + + + Called when the visitor visits a IdentifierNameSyntax node. + + + Called when the visitor visits a QualifiedNameSyntax node. + + + Called when the visitor visits a GenericNameSyntax node. + + + Called when the visitor visits a TypeArgumentListSyntax node. + + + Called when the visitor visits a AliasQualifiedNameSyntax node. + + + Called when the visitor visits a PredefinedTypeSyntax node. + + + Called when the visitor visits a ArrayTypeSyntax node. + + + Called when the visitor visits a ArrayRankSpecifierSyntax node. + + + Called when the visitor visits a PointerTypeSyntax node. + + + Called when the visitor visits a FunctionPointerTypeSyntax node. + + + Called when the visitor visits a FunctionPointerParameterListSyntax node. + + + Called when the visitor visits a FunctionPointerCallingConventionSyntax node. + + + Called when the visitor visits a FunctionPointerUnmanagedCallingConventionListSyntax node. + + + Called when the visitor visits a FunctionPointerUnmanagedCallingConventionSyntax node. + + + Called when the visitor visits a NullableTypeSyntax node. + + + Called when the visitor visits a TupleTypeSyntax node. + + + Called when the visitor visits a TupleElementSyntax node. + + + Called when the visitor visits a OmittedTypeArgumentSyntax node. + + + Called when the visitor visits a RefTypeSyntax node. + + + Called when the visitor visits a ScopedTypeSyntax node. + + + Called when the visitor visits a ParenthesizedExpressionSyntax node. + + + Called when the visitor visits a TupleExpressionSyntax node. + + + Called when the visitor visits a PrefixUnaryExpressionSyntax node. + + + Called when the visitor visits a AwaitExpressionSyntax node. + + + Called when the visitor visits a PostfixUnaryExpressionSyntax node. + + + Called when the visitor visits a MemberAccessExpressionSyntax node. + + + Called when the visitor visits a ConditionalAccessExpressionSyntax node. + + + Called when the visitor visits a MemberBindingExpressionSyntax node. + + + Called when the visitor visits a ElementBindingExpressionSyntax node. + + + Called when the visitor visits a RangeExpressionSyntax node. + + + Called when the visitor visits a ImplicitElementAccessSyntax node. + + + Called when the visitor visits a BinaryExpressionSyntax node. + + + Called when the visitor visits a AssignmentExpressionSyntax node. + + + Called when the visitor visits a ConditionalExpressionSyntax node. + + + Called when the visitor visits a ThisExpressionSyntax node. + + + Called when the visitor visits a BaseExpressionSyntax node. + + + Called when the visitor visits a LiteralExpressionSyntax node. + + + Called when the visitor visits a MakeRefExpressionSyntax node. + + + Called when the visitor visits a RefTypeExpressionSyntax node. + + + Called when the visitor visits a RefValueExpressionSyntax node. + + + Called when the visitor visits a CheckedExpressionSyntax node. + + + Called when the visitor visits a DefaultExpressionSyntax node. + + + Called when the visitor visits a TypeOfExpressionSyntax node. + + + Called when the visitor visits a SizeOfExpressionSyntax node. + + + Called when the visitor visits a InvocationExpressionSyntax node. + + + Called when the visitor visits a ElementAccessExpressionSyntax node. + + + Called when the visitor visits a ArgumentListSyntax node. + + + Called when the visitor visits a BracketedArgumentListSyntax node. + + + Called when the visitor visits a ArgumentSyntax node. + + + Called when the visitor visits a ExpressionColonSyntax node. + + + Called when the visitor visits a NameColonSyntax node. + + + Called when the visitor visits a DeclarationExpressionSyntax node. + + + Called when the visitor visits a CastExpressionSyntax node. + + + Called when the visitor visits a AnonymousMethodExpressionSyntax node. + + + Called when the visitor visits a SimpleLambdaExpressionSyntax node. + + + Called when the visitor visits a RefExpressionSyntax node. + + + Called when the visitor visits a ParenthesizedLambdaExpressionSyntax node. + + + Called when the visitor visits a InitializerExpressionSyntax node. + + + Called when the visitor visits a ImplicitObjectCreationExpressionSyntax node. + + + Called when the visitor visits a ObjectCreationExpressionSyntax node. + + + Called when the visitor visits a WithExpressionSyntax node. + + + Called when the visitor visits a AnonymousObjectMemberDeclaratorSyntax node. + + + Called when the visitor visits a AnonymousObjectCreationExpressionSyntax node. + + + Called when the visitor visits a ArrayCreationExpressionSyntax node. + + + Called when the visitor visits a ImplicitArrayCreationExpressionSyntax node. + + + Called when the visitor visits a StackAllocArrayCreationExpressionSyntax node. + + + Called when the visitor visits a ImplicitStackAllocArrayCreationExpressionSyntax node. + + + Called when the visitor visits a QueryExpressionSyntax node. + + + Called when the visitor visits a QueryBodySyntax node. + + + Called when the visitor visits a FromClauseSyntax node. + + + Called when the visitor visits a LetClauseSyntax node. + + + Called when the visitor visits a JoinClauseSyntax node. + + + Called when the visitor visits a JoinIntoClauseSyntax node. + + + Called when the visitor visits a WhereClauseSyntax node. + + + Called when the visitor visits a OrderByClauseSyntax node. + + + Called when the visitor visits a OrderingSyntax node. + + + Called when the visitor visits a SelectClauseSyntax node. + + + Called when the visitor visits a GroupClauseSyntax node. + + + Called when the visitor visits a QueryContinuationSyntax node. + + + Called when the visitor visits a OmittedArraySizeExpressionSyntax node. + + + Called when the visitor visits a InterpolatedStringExpressionSyntax node. + + + Called when the visitor visits a IsPatternExpressionSyntax node. + + + Called when the visitor visits a ThrowExpressionSyntax node. + + + Called when the visitor visits a WhenClauseSyntax node. + + + Called when the visitor visits a DiscardPatternSyntax node. + + + Called when the visitor visits a DeclarationPatternSyntax node. + + + Called when the visitor visits a VarPatternSyntax node. + + + Called when the visitor visits a RecursivePatternSyntax node. + + + Called when the visitor visits a PositionalPatternClauseSyntax node. + + + Called when the visitor visits a PropertyPatternClauseSyntax node. + + + Called when the visitor visits a SubpatternSyntax node. + + + Called when the visitor visits a ConstantPatternSyntax node. + + + Called when the visitor visits a ParenthesizedPatternSyntax node. + + + Called when the visitor visits a RelationalPatternSyntax node. + + + Called when the visitor visits a TypePatternSyntax node. + + + Called when the visitor visits a BinaryPatternSyntax node. + + + Called when the visitor visits a UnaryPatternSyntax node. + + + Called when the visitor visits a ListPatternSyntax node. + + + Called when the visitor visits a SlicePatternSyntax node. + + + Called when the visitor visits a InterpolatedStringTextSyntax node. + + + Called when the visitor visits a InterpolationSyntax node. + + + Called when the visitor visits a InterpolationAlignmentClauseSyntax node. + + + Called when the visitor visits a InterpolationFormatClauseSyntax node. + + + Called when the visitor visits a GlobalStatementSyntax node. + + + Called when the visitor visits a BlockSyntax node. + + + Called when the visitor visits a LocalFunctionStatementSyntax node. + + + Called when the visitor visits a LocalDeclarationStatementSyntax node. + + + Called when the visitor visits a VariableDeclarationSyntax node. + + + Called when the visitor visits a VariableDeclaratorSyntax node. + + + Called when the visitor visits a EqualsValueClauseSyntax node. + + + Called when the visitor visits a SingleVariableDesignationSyntax node. + + + Called when the visitor visits a DiscardDesignationSyntax node. + + + Called when the visitor visits a ParenthesizedVariableDesignationSyntax node. + + + Called when the visitor visits a ExpressionStatementSyntax node. + + + Called when the visitor visits a EmptyStatementSyntax node. + + + Called when the visitor visits a LabeledStatementSyntax node. + + + Called when the visitor visits a GotoStatementSyntax node. + + + Called when the visitor visits a BreakStatementSyntax node. + + + Called when the visitor visits a ContinueStatementSyntax node. + + + Called when the visitor visits a ReturnStatementSyntax node. + + + Called when the visitor visits a ThrowStatementSyntax node. + + + Called when the visitor visits a YieldStatementSyntax node. + + + Called when the visitor visits a WhileStatementSyntax node. + + + Called when the visitor visits a DoStatementSyntax node. + + + Called when the visitor visits a ForStatementSyntax node. + + + Called when the visitor visits a ForEachStatementSyntax node. + + + Called when the visitor visits a ForEachVariableStatementSyntax node. + + + Called when the visitor visits a UsingStatementSyntax node. + + + Called when the visitor visits a FixedStatementSyntax node. + + + Called when the visitor visits a CheckedStatementSyntax node. + + + Called when the visitor visits a UnsafeStatementSyntax node. + + + Called when the visitor visits a LockStatementSyntax node. + + + Called when the visitor visits a IfStatementSyntax node. + + + Called when the visitor visits a ElseClauseSyntax node. + + + Called when the visitor visits a SwitchStatementSyntax node. + + + Called when the visitor visits a SwitchSectionSyntax node. + + + Called when the visitor visits a CasePatternSwitchLabelSyntax node. + + + Called when the visitor visits a CaseSwitchLabelSyntax node. + + + Called when the visitor visits a DefaultSwitchLabelSyntax node. + + + Called when the visitor visits a SwitchExpressionSyntax node. + + + Called when the visitor visits a SwitchExpressionArmSyntax node. + + + Called when the visitor visits a TryStatementSyntax node. + + + Called when the visitor visits a CatchClauseSyntax node. + + + Called when the visitor visits a CatchDeclarationSyntax node. + + + Called when the visitor visits a CatchFilterClauseSyntax node. + + + Called when the visitor visits a FinallyClauseSyntax node. + + + Called when the visitor visits a CompilationUnitSyntax node. + + + Called when the visitor visits a ExternAliasDirectiveSyntax node. + + + Called when the visitor visits a UsingDirectiveSyntax node. + + + Called when the visitor visits a NamespaceDeclarationSyntax node. + + + Called when the visitor visits a FileScopedNamespaceDeclarationSyntax node. + + + Called when the visitor visits a AttributeListSyntax node. + + + Called when the visitor visits a AttributeTargetSpecifierSyntax node. + + + Called when the visitor visits a AttributeSyntax node. + + + Called when the visitor visits a AttributeArgumentListSyntax node. + + + Called when the visitor visits a AttributeArgumentSyntax node. + + + Called when the visitor visits a NameEqualsSyntax node. + + + Called when the visitor visits a TypeParameterListSyntax node. + + + Called when the visitor visits a TypeParameterSyntax node. + + + Called when the visitor visits a ClassDeclarationSyntax node. + + + Called when the visitor visits a StructDeclarationSyntax node. + + + Called when the visitor visits a InterfaceDeclarationSyntax node. + + + Called when the visitor visits a RecordDeclarationSyntax node. + + + Called when the visitor visits a EnumDeclarationSyntax node. + + + Called when the visitor visits a DelegateDeclarationSyntax node. + + + Called when the visitor visits a EnumMemberDeclarationSyntax node. + + + Called when the visitor visits a BaseListSyntax node. + + + Called when the visitor visits a SimpleBaseTypeSyntax node. + + + Called when the visitor visits a PrimaryConstructorBaseTypeSyntax node. + + + Called when the visitor visits a TypeParameterConstraintClauseSyntax node. + + + Called when the visitor visits a ConstructorConstraintSyntax node. + + + Called when the visitor visits a ClassOrStructConstraintSyntax node. + + + Called when the visitor visits a TypeConstraintSyntax node. + + + Called when the visitor visits a DefaultConstraintSyntax node. + + + Called when the visitor visits a FieldDeclarationSyntax node. + + + Called when the visitor visits a EventFieldDeclarationSyntax node. + + + Called when the visitor visits a ExplicitInterfaceSpecifierSyntax node. + + + Called when the visitor visits a MethodDeclarationSyntax node. + + + Called when the visitor visits a OperatorDeclarationSyntax node. + + + Called when the visitor visits a ConversionOperatorDeclarationSyntax node. + + + Called when the visitor visits a ConstructorDeclarationSyntax node. + + + Called when the visitor visits a ConstructorInitializerSyntax node. + + + Called when the visitor visits a DestructorDeclarationSyntax node. + + + Called when the visitor visits a PropertyDeclarationSyntax node. + + + Called when the visitor visits a ArrowExpressionClauseSyntax node. + + + Called when the visitor visits a EventDeclarationSyntax node. + + + Called when the visitor visits a IndexerDeclarationSyntax node. + + + Called when the visitor visits a AccessorListSyntax node. + + + Called when the visitor visits a AccessorDeclarationSyntax node. + + + Called when the visitor visits a ParameterListSyntax node. + + + Called when the visitor visits a BracketedParameterListSyntax node. + + + Called when the visitor visits a ParameterSyntax node. + + + Called when the visitor visits a FunctionPointerParameterSyntax node. + + + Called when the visitor visits a IncompleteMemberSyntax node. + + + Called when the visitor visits a SkippedTokensTriviaSyntax node. + + + Called when the visitor visits a DocumentationCommentTriviaSyntax node. + + + Called when the visitor visits a TypeCrefSyntax node. + + + Called when the visitor visits a QualifiedCrefSyntax node. + + + Called when the visitor visits a NameMemberCrefSyntax node. + + + Called when the visitor visits a IndexerMemberCrefSyntax node. + + + Called when the visitor visits a OperatorMemberCrefSyntax node. + + + Called when the visitor visits a ConversionOperatorMemberCrefSyntax node. + + + Called when the visitor visits a CrefParameterListSyntax node. + + + Called when the visitor visits a CrefBracketedParameterListSyntax node. + + + Called when the visitor visits a CrefParameterSyntax node. + + + Called when the visitor visits a XmlElementSyntax node. + + + Called when the visitor visits a XmlElementStartTagSyntax node. + + + Called when the visitor visits a XmlElementEndTagSyntax node. + + + Called when the visitor visits a XmlEmptyElementSyntax node. + + + Called when the visitor visits a XmlNameSyntax node. + + + Called when the visitor visits a XmlPrefixSyntax node. + + + Called when the visitor visits a XmlTextAttributeSyntax node. + + + Called when the visitor visits a XmlCrefAttributeSyntax node. + + + Called when the visitor visits a XmlNameAttributeSyntax node. + + + Called when the visitor visits a XmlTextSyntax node. + + + Called when the visitor visits a XmlCDataSectionSyntax node. + + + Called when the visitor visits a XmlProcessingInstructionSyntax node. + + + Called when the visitor visits a XmlCommentSyntax node. + + + Called when the visitor visits a IfDirectiveTriviaSyntax node. + + + Called when the visitor visits a ElifDirectiveTriviaSyntax node. + + + Called when the visitor visits a ElseDirectiveTriviaSyntax node. + + + Called when the visitor visits a EndIfDirectiveTriviaSyntax node. + + + Called when the visitor visits a RegionDirectiveTriviaSyntax node. + + + Called when the visitor visits a EndRegionDirectiveTriviaSyntax node. + + + Called when the visitor visits a ErrorDirectiveTriviaSyntax node. + + + Called when the visitor visits a WarningDirectiveTriviaSyntax node. + + + Called when the visitor visits a BadDirectiveTriviaSyntax node. + + + Called when the visitor visits a DefineDirectiveTriviaSyntax node. + + + Called when the visitor visits a UndefDirectiveTriviaSyntax node. + + + Called when the visitor visits a LineDirectiveTriviaSyntax node. + + + Called when the visitor visits a LineDirectivePositionSyntax node. + + + Called when the visitor visits a LineSpanDirectiveTriviaSyntax node. + + + Called when the visitor visits a PragmaWarningDirectiveTriviaSyntax node. + + + Called when the visitor visits a PragmaChecksumDirectiveTriviaSyntax node. + + + Called when the visitor visits a ReferenceDirectiveTriviaSyntax node. + + + Called when the visitor visits a LoadDirectiveTriviaSyntax node. + + + Called when the visitor visits a ShebangDirectiveTriviaSyntax node. + + + Called when the visitor visits a NullableDirectiveTriviaSyntax node. + + + + Represents a visitor that visits only the single CSharpSyntaxNode + passed into its Visit method. + + + + Called when the visitor visits a IdentifierNameSyntax node. + + + Called when the visitor visits a QualifiedNameSyntax node. + + + Called when the visitor visits a GenericNameSyntax node. + + + Called when the visitor visits a TypeArgumentListSyntax node. + + + Called when the visitor visits a AliasQualifiedNameSyntax node. + + + Called when the visitor visits a PredefinedTypeSyntax node. + + + Called when the visitor visits a ArrayTypeSyntax node. + + + Called when the visitor visits a ArrayRankSpecifierSyntax node. + + + Called when the visitor visits a PointerTypeSyntax node. + + + Called when the visitor visits a FunctionPointerTypeSyntax node. + + + Called when the visitor visits a FunctionPointerParameterListSyntax node. + + + Called when the visitor visits a FunctionPointerCallingConventionSyntax node. + + + Called when the visitor visits a FunctionPointerUnmanagedCallingConventionListSyntax node. + + + Called when the visitor visits a FunctionPointerUnmanagedCallingConventionSyntax node. + + + Called when the visitor visits a NullableTypeSyntax node. + + + Called when the visitor visits a TupleTypeSyntax node. + + + Called when the visitor visits a TupleElementSyntax node. + + + Called when the visitor visits a OmittedTypeArgumentSyntax node. + + + Called when the visitor visits a RefTypeSyntax node. + + + Called when the visitor visits a ScopedTypeSyntax node. + + + Called when the visitor visits a ParenthesizedExpressionSyntax node. + + + Called when the visitor visits a TupleExpressionSyntax node. + + + Called when the visitor visits a PrefixUnaryExpressionSyntax node. + + + Called when the visitor visits a AwaitExpressionSyntax node. + + + Called when the visitor visits a PostfixUnaryExpressionSyntax node. + + + Called when the visitor visits a MemberAccessExpressionSyntax node. + + + Called when the visitor visits a ConditionalAccessExpressionSyntax node. + + + Called when the visitor visits a MemberBindingExpressionSyntax node. + + + Called when the visitor visits a ElementBindingExpressionSyntax node. + + + Called when the visitor visits a RangeExpressionSyntax node. + + + Called when the visitor visits a ImplicitElementAccessSyntax node. + + + Called when the visitor visits a BinaryExpressionSyntax node. + + + Called when the visitor visits a AssignmentExpressionSyntax node. + + + Called when the visitor visits a ConditionalExpressionSyntax node. + + + Called when the visitor visits a ThisExpressionSyntax node. + + + Called when the visitor visits a BaseExpressionSyntax node. + + + Called when the visitor visits a LiteralExpressionSyntax node. + + + Called when the visitor visits a MakeRefExpressionSyntax node. + + + Called when the visitor visits a RefTypeExpressionSyntax node. + + + Called when the visitor visits a RefValueExpressionSyntax node. + + + Called when the visitor visits a CheckedExpressionSyntax node. + + + Called when the visitor visits a DefaultExpressionSyntax node. + + + Called when the visitor visits a TypeOfExpressionSyntax node. + + + Called when the visitor visits a SizeOfExpressionSyntax node. + + + Called when the visitor visits a InvocationExpressionSyntax node. + + + Called when the visitor visits a ElementAccessExpressionSyntax node. + + + Called when the visitor visits a ArgumentListSyntax node. + + + Called when the visitor visits a BracketedArgumentListSyntax node. + + + Called when the visitor visits a ArgumentSyntax node. + + + Called when the visitor visits a ExpressionColonSyntax node. + + + Called when the visitor visits a NameColonSyntax node. + + + Called when the visitor visits a DeclarationExpressionSyntax node. + + + Called when the visitor visits a CastExpressionSyntax node. + + + Called when the visitor visits a AnonymousMethodExpressionSyntax node. + + + Called when the visitor visits a SimpleLambdaExpressionSyntax node. + + + Called when the visitor visits a RefExpressionSyntax node. + + + Called when the visitor visits a ParenthesizedLambdaExpressionSyntax node. + + + Called when the visitor visits a InitializerExpressionSyntax node. + + + Called when the visitor visits a ImplicitObjectCreationExpressionSyntax node. + + + Called when the visitor visits a ObjectCreationExpressionSyntax node. + + + Called when the visitor visits a WithExpressionSyntax node. + + + Called when the visitor visits a AnonymousObjectMemberDeclaratorSyntax node. + + + Called when the visitor visits a AnonymousObjectCreationExpressionSyntax node. + + + Called when the visitor visits a ArrayCreationExpressionSyntax node. + + + Called when the visitor visits a ImplicitArrayCreationExpressionSyntax node. + + + Called when the visitor visits a StackAllocArrayCreationExpressionSyntax node. + + + Called when the visitor visits a ImplicitStackAllocArrayCreationExpressionSyntax node. + + + Called when the visitor visits a QueryExpressionSyntax node. + + + Called when the visitor visits a QueryBodySyntax node. + + + Called when the visitor visits a FromClauseSyntax node. + + + Called when the visitor visits a LetClauseSyntax node. + + + Called when the visitor visits a JoinClauseSyntax node. + + + Called when the visitor visits a JoinIntoClauseSyntax node. + + + Called when the visitor visits a WhereClauseSyntax node. + + + Called when the visitor visits a OrderByClauseSyntax node. + + + Called when the visitor visits a OrderingSyntax node. + + + Called when the visitor visits a SelectClauseSyntax node. + + + Called when the visitor visits a GroupClauseSyntax node. + + + Called when the visitor visits a QueryContinuationSyntax node. + + + Called when the visitor visits a OmittedArraySizeExpressionSyntax node. + + + Called when the visitor visits a InterpolatedStringExpressionSyntax node. + + + Called when the visitor visits a IsPatternExpressionSyntax node. + + + Called when the visitor visits a ThrowExpressionSyntax node. + + + Called when the visitor visits a WhenClauseSyntax node. + + + Called when the visitor visits a DiscardPatternSyntax node. + + + Called when the visitor visits a DeclarationPatternSyntax node. + + + Called when the visitor visits a VarPatternSyntax node. + + + Called when the visitor visits a RecursivePatternSyntax node. + + + Called when the visitor visits a PositionalPatternClauseSyntax node. + + + Called when the visitor visits a PropertyPatternClauseSyntax node. + + + Called when the visitor visits a SubpatternSyntax node. + + + Called when the visitor visits a ConstantPatternSyntax node. + + + Called when the visitor visits a ParenthesizedPatternSyntax node. + + + Called when the visitor visits a RelationalPatternSyntax node. + + + Called when the visitor visits a TypePatternSyntax node. + + + Called when the visitor visits a BinaryPatternSyntax node. + + + Called when the visitor visits a UnaryPatternSyntax node. + + + Called when the visitor visits a ListPatternSyntax node. + + + Called when the visitor visits a SlicePatternSyntax node. + + + Called when the visitor visits a InterpolatedStringTextSyntax node. + + + Called when the visitor visits a InterpolationSyntax node. + + + Called when the visitor visits a InterpolationAlignmentClauseSyntax node. + + + Called when the visitor visits a InterpolationFormatClauseSyntax node. + + + Called when the visitor visits a GlobalStatementSyntax node. + + + Called when the visitor visits a BlockSyntax node. + + + Called when the visitor visits a LocalFunctionStatementSyntax node. + + + Called when the visitor visits a LocalDeclarationStatementSyntax node. + + + Called when the visitor visits a VariableDeclarationSyntax node. + + + Called when the visitor visits a VariableDeclaratorSyntax node. + + + Called when the visitor visits a EqualsValueClauseSyntax node. + + + Called when the visitor visits a SingleVariableDesignationSyntax node. + + + Called when the visitor visits a DiscardDesignationSyntax node. + + + Called when the visitor visits a ParenthesizedVariableDesignationSyntax node. + + + Called when the visitor visits a ExpressionStatementSyntax node. + + + Called when the visitor visits a EmptyStatementSyntax node. + + + Called when the visitor visits a LabeledStatementSyntax node. + + + Called when the visitor visits a GotoStatementSyntax node. + + + Called when the visitor visits a BreakStatementSyntax node. + + + Called when the visitor visits a ContinueStatementSyntax node. + + + Called when the visitor visits a ReturnStatementSyntax node. + + + Called when the visitor visits a ThrowStatementSyntax node. + + + Called when the visitor visits a YieldStatementSyntax node. + + + Called when the visitor visits a WhileStatementSyntax node. + + + Called when the visitor visits a DoStatementSyntax node. + + + Called when the visitor visits a ForStatementSyntax node. + + + Called when the visitor visits a ForEachStatementSyntax node. + + + Called when the visitor visits a ForEachVariableStatementSyntax node. + + + Called when the visitor visits a UsingStatementSyntax node. + + + Called when the visitor visits a FixedStatementSyntax node. + + + Called when the visitor visits a CheckedStatementSyntax node. + + + Called when the visitor visits a UnsafeStatementSyntax node. + + + Called when the visitor visits a LockStatementSyntax node. + + + Called when the visitor visits a IfStatementSyntax node. + + + Called when the visitor visits a ElseClauseSyntax node. + + + Called when the visitor visits a SwitchStatementSyntax node. + + + Called when the visitor visits a SwitchSectionSyntax node. + + + Called when the visitor visits a CasePatternSwitchLabelSyntax node. + + + Called when the visitor visits a CaseSwitchLabelSyntax node. + + + Called when the visitor visits a DefaultSwitchLabelSyntax node. + + + Called when the visitor visits a SwitchExpressionSyntax node. + + + Called when the visitor visits a SwitchExpressionArmSyntax node. + + + Called when the visitor visits a TryStatementSyntax node. + + + Called when the visitor visits a CatchClauseSyntax node. + + + Called when the visitor visits a CatchDeclarationSyntax node. + + + Called when the visitor visits a CatchFilterClauseSyntax node. + + + Called when the visitor visits a FinallyClauseSyntax node. + + + Called when the visitor visits a CompilationUnitSyntax node. + + + Called when the visitor visits a ExternAliasDirectiveSyntax node. + + + Called when the visitor visits a UsingDirectiveSyntax node. + + + Called when the visitor visits a NamespaceDeclarationSyntax node. + + + Called when the visitor visits a FileScopedNamespaceDeclarationSyntax node. + + + Called when the visitor visits a AttributeListSyntax node. + + + Called when the visitor visits a AttributeTargetSpecifierSyntax node. + + + Called when the visitor visits a AttributeSyntax node. + + + Called when the visitor visits a AttributeArgumentListSyntax node. + + + Called when the visitor visits a AttributeArgumentSyntax node. + + + Called when the visitor visits a NameEqualsSyntax node. + + + Called when the visitor visits a TypeParameterListSyntax node. + + + Called when the visitor visits a TypeParameterSyntax node. + + + Called when the visitor visits a ClassDeclarationSyntax node. + + + Called when the visitor visits a StructDeclarationSyntax node. + + + Called when the visitor visits a InterfaceDeclarationSyntax node. + + + Called when the visitor visits a RecordDeclarationSyntax node. + + + Called when the visitor visits a EnumDeclarationSyntax node. + + + Called when the visitor visits a DelegateDeclarationSyntax node. + + + Called when the visitor visits a EnumMemberDeclarationSyntax node. + + + Called when the visitor visits a BaseListSyntax node. + + + Called when the visitor visits a SimpleBaseTypeSyntax node. + + + Called when the visitor visits a PrimaryConstructorBaseTypeSyntax node. + + + Called when the visitor visits a TypeParameterConstraintClauseSyntax node. + + + Called when the visitor visits a ConstructorConstraintSyntax node. + + + Called when the visitor visits a ClassOrStructConstraintSyntax node. + + + Called when the visitor visits a TypeConstraintSyntax node. + + + Called when the visitor visits a DefaultConstraintSyntax node. + + + Called when the visitor visits a FieldDeclarationSyntax node. + + + Called when the visitor visits a EventFieldDeclarationSyntax node. + + + Called when the visitor visits a ExplicitInterfaceSpecifierSyntax node. + + + Called when the visitor visits a MethodDeclarationSyntax node. + + + Called when the visitor visits a OperatorDeclarationSyntax node. + + + Called when the visitor visits a ConversionOperatorDeclarationSyntax node. + + + Called when the visitor visits a ConstructorDeclarationSyntax node. + + + Called when the visitor visits a ConstructorInitializerSyntax node. + + + Called when the visitor visits a DestructorDeclarationSyntax node. + + + Called when the visitor visits a PropertyDeclarationSyntax node. + + + Called when the visitor visits a ArrowExpressionClauseSyntax node. + + + Called when the visitor visits a EventDeclarationSyntax node. + + + Called when the visitor visits a IndexerDeclarationSyntax node. + + + Called when the visitor visits a AccessorListSyntax node. + + + Called when the visitor visits a AccessorDeclarationSyntax node. + + + Called when the visitor visits a ParameterListSyntax node. + + + Called when the visitor visits a BracketedParameterListSyntax node. + + + Called when the visitor visits a ParameterSyntax node. + + + Called when the visitor visits a FunctionPointerParameterSyntax node. + + + Called when the visitor visits a IncompleteMemberSyntax node. + + + Called when the visitor visits a SkippedTokensTriviaSyntax node. + + + Called when the visitor visits a DocumentationCommentTriviaSyntax node. + + + Called when the visitor visits a TypeCrefSyntax node. + + + Called when the visitor visits a QualifiedCrefSyntax node. + + + Called when the visitor visits a NameMemberCrefSyntax node. + + + Called when the visitor visits a IndexerMemberCrefSyntax node. + + + Called when the visitor visits a OperatorMemberCrefSyntax node. + + + Called when the visitor visits a ConversionOperatorMemberCrefSyntax node. + + + Called when the visitor visits a CrefParameterListSyntax node. + + + Called when the visitor visits a CrefBracketedParameterListSyntax node. + + + Called when the visitor visits a CrefParameterSyntax node. + + + Called when the visitor visits a XmlElementSyntax node. + + + Called when the visitor visits a XmlElementStartTagSyntax node. + + + Called when the visitor visits a XmlElementEndTagSyntax node. + + + Called when the visitor visits a XmlEmptyElementSyntax node. + + + Called when the visitor visits a XmlNameSyntax node. + + + Called when the visitor visits a XmlPrefixSyntax node. + + + Called when the visitor visits a XmlTextAttributeSyntax node. + + + Called when the visitor visits a XmlCrefAttributeSyntax node. + + + Called when the visitor visits a XmlNameAttributeSyntax node. + + + Called when the visitor visits a XmlTextSyntax node. + + + Called when the visitor visits a XmlCDataSectionSyntax node. + + + Called when the visitor visits a XmlProcessingInstructionSyntax node. + + + Called when the visitor visits a XmlCommentSyntax node. + + + Called when the visitor visits a IfDirectiveTriviaSyntax node. + + + Called when the visitor visits a ElifDirectiveTriviaSyntax node. + + + Called when the visitor visits a ElseDirectiveTriviaSyntax node. + + + Called when the visitor visits a EndIfDirectiveTriviaSyntax node. + + + Called when the visitor visits a RegionDirectiveTriviaSyntax node. + + + Called when the visitor visits a EndRegionDirectiveTriviaSyntax node. + + + Called when the visitor visits a ErrorDirectiveTriviaSyntax node. + + + Called when the visitor visits a WarningDirectiveTriviaSyntax node. + + + Called when the visitor visits a BadDirectiveTriviaSyntax node. + + + Called when the visitor visits a DefineDirectiveTriviaSyntax node. + + + Called when the visitor visits a UndefDirectiveTriviaSyntax node. + + + Called when the visitor visits a LineDirectiveTriviaSyntax node. + + + Called when the visitor visits a LineDirectivePositionSyntax node. + + + Called when the visitor visits a LineSpanDirectiveTriviaSyntax node. + + + Called when the visitor visits a PragmaWarningDirectiveTriviaSyntax node. + + + Called when the visitor visits a PragmaChecksumDirectiveTriviaSyntax node. + + + Called when the visitor visits a ReferenceDirectiveTriviaSyntax node. + + + Called when the visitor visits a LoadDirectiveTriviaSyntax node. + + + Called when the visitor visits a ShebangDirectiveTriviaSyntax node. + + + Called when the visitor visits a NullableDirectiveTriviaSyntax node. + + + + Represents a that descends an entire graph + visiting each CSharpSyntaxNode and its child SyntaxNodes and s in depth-first order. + + + + + Returns true if the specified node represents a lambda. + + + + + Given a node that represents a lambda body returns a node that represents the lambda. + + + + + See SyntaxNode.GetCorrespondingLambdaBody. + + + + + Returns true if the specified represents a body of a lambda. + + + + + When queries are translated into expressions select and group-by expressions such that + 1) select/group-by expression is the same identifier as the "source" identifier and + 2) at least one Where or OrderBy clause but no other clause is present in the contained query body or + the expression in question is a group-by expression and the body has no clause + + do not translate into lambdas. + By "source" identifier we mean the identifier specified in the from clause that initiates the query or the query continuation that includes the body. + + The above condition can be derived from the language specification (chapter 7.16.2) as follows: + - In order for 7.16.2.5 "Select clauses" to be applicable the following conditions must hold: + - There has to be at least one clause in the body, otherwise the query is reduced into a final form by 7.16.2.3 "Degenerate query expressions". + - Only where and order-by clauses may be present in the query body, otherwise a transformation in 7.16.2.4 "From, let, where, join and orderby clauses" + produces pattern that doesn't match the requirements of 7.16.2.5. + + - In order for 7.16.2.6 "Groupby clauses" to be applicable the following conditions must hold: + - Only where and order-by clauses may be present in the query body, otherwise a transformation in 7.16.2.4 "From, let, where, join and orderby clauses" + produces pattern that doesn't match the requirements of 7.16.2.5. + + + + + In C# lambda bodies are expressions or block statements. In both cases it's a single node. + In VB a lambda body might be a sequence of nodes (statements). + We define this function to minimize differences between C# and VB implementation. + + + + + If the specified node represents a lambda returns a node (or nodes) that represent its body (bodies). + + + + + Compares content of two nodes ignoring lambda bodies and trivia. + + + + + "Pair lambda" is a synthesized lambda that creates an instance of an anonymous type representing a pair of values. + + + + + Returns true if the specified node is of a kind that could represent a closure scope -- that + is, a scope of a captured variable. + Doesn't check whether or not the node actually declares any captured variable. + + + + + Given a node that represents a variable declaration, lambda or a closure scope return the position to be used to calculate + the node's syntax offset with respect to its containing member. + + + + + A SyntaxReference implementation that lazily translates the result (CSharpSyntaxNode) of the + original syntax reference to a syntax reference for its NamespaceDeclarationSyntax. + + + + + this is a basic do-nothing implementation of a syntax reference + + + + + Gets the expression-body syntax from an expression-bodied member. The + given syntax must be for a member which could contain an expression-body. + + + + + Creates a new syntax token with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The token to normalize. + A sequence of whitespace characters that defines a single level of indentation. + If true the replaced trivia is elastic trivia. + + + + Return the identifier of an out declaration argument expression. + + + + + Creates a new syntax token with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The token to normalize. + An optional sequence of whitespace characters that defines a + single level of indentation. + An optional sequence of whitespace characters used for end of line. + If true the replaced trivia is elastic trivia. + + + + Creates a new syntax trivia list with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The trivia list to normalize. + A sequence of whitespace characters that defines a single level of indentation. + If true the replaced trivia is elastic trivia. + + + + Creates a new syntax trivia list with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The trivia list to normalize. + An optional sequence of whitespace characters that defines a + single level of indentation. + An optional sequence of whitespace characters used for end of line. + If true the replaced trivia is elastic trivia. + + + + Updates the given SimpleNameSyntax node with the given identifier token. + This function is a wrapper that calls WithIdentifier on derived syntax nodes. + + + + The given simple name updated with the given identifier. + + + + Returns true if the expression on the left-hand-side of an assignment causes the assignment to be a deconstruction. + + + + + If this declaration or identifier is part of a deconstruction, find the deconstruction. + If found, returns either an assignment expression or a foreach variable statement. + Returns null otherwise. + + + + + Visits all the ArrayRankSpecifiers of a typeSyntax, invoking an action on each one in turn. + + + + The argument that is passed to the action whenever it is invoked + + + Represents ~ token. + + + Represents ! token. + + + Represents $ token. + + This is a debugger special punctuation and not related to string interpolation. + + + + + Represents % token. + + + Represents ^ token. + + + Represents & token. + + + Represents * token. + + + Represents ( token. + + + Represents ) token. + + + Represents - token. + + + Represents + token. + + + Represents = token. + + + Represents { token. + + + Represents } token. + + + Represents [ token. + + + Represents ] token. + + + Represents | token. + + + Represents \ token. + + + Represents : token. + + + Represents ; token. + + + Represents " token. + + + Represents ' token. + + + Represents < token. + + + Represents , token. + + + Represents > token. + + + Represents . token. + + + Represents ? token. + + + Represents # token. + + + Represents / token. + + + Represents .. token. + + + Represents /> token. + + + Represents </ token. + + + Represents <!-- token. + + + Represents --> token. + + + Represents <![CDATA[ token. + + + Represents ]]> token. + + + Represents <? token. + + + Represents ?> token. + + + Represents || token. + + + Represents && token. + + + Represents -- token. + + + Represents ++ token. + + + Represents :: token. + + + Represents ?? token. + + + Represents -> token. + + + Represents != token. + + + Represents == token. + + + Represents => token. + + + Represents <= token. + + + Represents << token. + + + Represents <<= token. + + + Represents >= token. + + + Represents >> token. + + + Represents >>= token. + + + Represents /= token. + + + Represents *= token. + + + Represents |= token. + + + Represents &= token. + + + Represents += token. + + + Represents -= token. + + + Represents ^= token. + + + Represents %= token. + + + Represents ??= token. + + + Represents >>> token. + + + Represents >>>= token. + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents $" token. + + + Represents " token that is closing $". + + + Represents $@ or @$ token. + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents . + + + Represents _ token. + + + Represents that nothing was specified as a type argument. + For example Dictionary<,> which has as a child of + before and after the . + + + + + Represents that nothing was specified as an array size. + For example int[,] which has as a child of + before and after the . + + + + + Represents a token that comes after the end of a directive such as #endif. + + + Represents the end of a triple-slash documentation comment. + + + Represents the end of a file. + + + + Token for a whole interpolated string $""" ... { expr } ...""". This only exists in transient form during parsing. + + + + + This method is used to keep the code that generates binders in sync + with the code that searches for binders. We don't want the searcher + to skip over any nodes that could have associated binders, especially + if changes are made later. + + "Local binder" is a term that refers to binders that are + created by LocalBinderFactory. + + + + + Because the instruction cannot have any values on the stack before CLR execution + we limited it to assignments and conditional expressions in C# 7. + See https://github.com/dotnet/roslyn/issues/22046. + In C# 8 we relaxed + that by rewriting the code to move it to the statement level where the stack is empty. + + + + + Given an initializer expression infer the name of anonymous property or tuple element. + Returns default if unsuccessful + + + + + For callers that just want to unwrap a and don't care if ref/readonly was there. + As these callers don't care about 'ref', they are in scenarios where 'ref' is not legal, and existing code + will error out for them. Callers that do want to know what the ref-kind is should use or depending on which language feature they are + asking for. + + + + + See if the expression is an invocation of a method named 'var', + I.e. something like "var(x, y)" or "var(x, (y, z))" or "var(1)". + We report an error when such an invocation is used in a certain syntactic contexts that + will require an lvalue because we may elect to support deconstruction + in the future. We need to ensure that we do not successfully interpret this as an invocation of a + ref-returning method named var. + + + + + An enumerator for diagnostic lists. + + + + + Moves the enumerator to the next diagnostic instance in the diagnostic list. + + Returns true if enumerator moved to the next diagnostic, false if the + enumerator was at the end of the diagnostic list. + + + + The current diagnostic that the enumerator is pointing at. + + + + + An interface representing a set of values of a specific type. During construction of the state machine + for pattern-matching, we track the set of values of each intermediate result that can reach each state. + That permits us to determine when tests can be eliminated either because they are impossible (and can be + replaced by an always-false test) or always true with the set of values that can reach that state (and + can be replaced by an always-true test). + + + + + Return the intersection of this value set with another. Both must have been created with the same . + + + + + Return this union of this value set with another. Both must have been created with the same . + + + + + Return the complement of this value set. + + + + + Test if the value set contains any values that satisfy the given relation with the given value. Supported values for + are for all supported types, and for numeric types we also support + , , , and + . + + + + + Test if all of the value in the set satisfy the given relation with the given value. Note that the empty set trivially satisfies this. + Because of that all four combinations of results from and + are possible: both true when the set is nonempty and all values satisfy the relation; both false when the set is nonempty and none of + the values satisfy the relation; all but not any when the set is empty; any but not all when the set is nonempty and some values satisfy + the relation and some do not. + + + + + Does this value set contain no values? + + + + + Produce a sample value contained in the set. Throws if the set is empty. If the set + contains values but we cannot produce a particular value (e.g. for the set `nint > int.MaxValue`), returns null. + + + + + An interface representing a set of values of a specific type. Like but strongly typed to . + + + + + Return the intersection of this value set with another. Both must have been created with the same . + + + + + Return this union of this value set with another. Both must have been created with the same . + + + + + Return the complement of this value set. + + + + + Test if the value set contains any values that satisfy the given relation with the given value. + + + + + Test if all of the value in the set satisfy the given relation with the given value. Note that the empty set trivially satisfies this. + Because of that all four combinations of results from and + are possible: both true when the set is nonempty and all values satisfy the relation; both false when the set is nonempty and none of + the values satisfy the relation; all but not any when the set is empty; any but not all when the set is nonempty and some values satisfy + the relation and some do not. + + + + + A value set factory, which can be used to create a value set instance. A given instance of + supports only one type for the value sets it can produce. + + + + + Returns a value set that includes any values that satisfy the given relation when compared to the given value. + + + + + Returns true iff the values are related according to the given relation. + + + + + Produce a random value set with the given expected size for testing. + + + + + Produce a random value for testing. + + + + + The set containing all values of the type. + + + + + The empty set of values. + + + + + A value set factory, which can be used to create a value set instance. Like but strongly + typed to . + + + + + Returns a value set that includes any values that satisfy the given relation when compared to the given value. + + + + + A collection of value set factory instances for built-in types. + + + + + A value set factory for boolean values. + + + + + The implementation of Next depends critically on the internal representation of an IEEE floating-point + number. Every bit sequence between the representation of 0 and MaxValue represents a distinct + value, and the integer representations are ordered by value the same as the floating-point numbers they represent. + + + + + Produce a string for testing purposes that is likely to be the same independent of platform and locale. + + + + + A value set that only supports equality and works by including or excluding specific values. + This is used for value set of because the language defines no + relational operators for it; such a set can be formed only by including explicitly mentioned + members (or the inverse, excluding them, by complementing the set). + + + + + In , then members are listed by inclusion. Otherwise all members + are assumed to be contained in the set unless excluded. + + + + + A value set factory that only supports equality and works by including or excluding specific values. + + + + + A type class providing primitive operations needed to support a value set for a floating-point type. + + + + + A "not a number" value for the floating-point type . + All NaN values are treated as equivalent. + + + + + A value set implementation for and . + + A floating-point type. + A typeclass supporting that floating-point type. + + + + A type class for values (of type ) that can be directly compared for equality + using . + + + + + Get the constant value of type from a . This method is shared among all + typeclasses for value sets. + + + + + Translate a numeric value of type into a . + + + + + Generate random values of type . + If the domain of is infinite (for example, a string type), + the parameter is used to identify the size of a restricted + domain. If the domain is finite (for example the numeric types), then + is ignored. + + + + + A type class providing the primitive operations needed to support a value set. + + the underlying primitive numeric type + + + + Get the constant value of type from a . This method is shared among all + typeclasses for value sets. + + + + + Translate a numeric value of type into a . + + + + + Compute the value of the binary relational operator on the given operands. + + + + + The smallest value of . + + + + + The largest value of . + + + + + The successor (next larger) value to a given value. The result is not defined + when is . + + + + + The predecessor (previous larger) value to a given value. The result is not defined + when is . + + + + + Produce a randomly-selected value for testing purposes. + + + + + Produce the zero value for the type. + + + + + A formatter for values of type . This is needed for testing because + the default ToString output for float and double changed between desktop and .net core, + and also because we want the string representation to be locale-independent. + + + + + A value of type nint may, in a 64-bit runtime, take on values less than . + A value set representing values of type nint groups them all together, so that it is not possible to + distinguish one such value from another. The flag is true when the set is considered + to contain all values less than (if any). + + + + + A value of type nint may, in a 64-bit runtime, take on values greater than . + A value set representing values of type nint groups them all together, so that it is not possible to + distinguish one such value from another. The flag is true when the set is considered + to contain all values greater than (if any). + + + + + A value of type nuint may, in a 64-bit runtime, take on values greater than . + A value set representing values of type nuint groups them all together, so that it is not possible to + distinguish one such value from another. The flag is true when the set is considered + to contain all values greater than (if any). + + + + + The implementation of a value set for an numeric type . + + + + + Add an interval to the end of the builder. + + + + + Produce a random value set for testing purposes. + + + + + A string representation for testing purposes. + + + + + The implementation of a value set factory of any numeric type , + parameterized by a type class + that provides the primitives for that type. + + + + + The implementation of Next depends critically on the internal representation of an IEEE floating-point + number. Every bit sequence between the representation of 0 and MaxValue represents a distinct + value, and the integer representations are ordered by value the same as the floating-point numbers they represent. + + + + + Produce a string for testing purposes that is likely to be the same independent of platform and locale. + + + + + Gets the expression-body syntax from an expression-bodied member. The + given syntax must be for a member which could contain an expression-body. + + + + <null> + + + <throw expression> + + + <switch expression> + + + local function attributes + + + extern local functions + + + (Location of symbol related to previous error) + + + (Location of symbol related to previous warning) + + + <!-- Badly formed XML comment ignored for member "{0}" --> + + + Badly formed XML file "{0}" cannot be included + + + Failed to insert some or all of included XML + + + Include tag is invalid + + + No matching elements were found for the following include tag + + + Missing file attribute + + + Missing path attribute + + + <missing> + + + <global namespace> + + + generics + + + anonymous methods + + + module as an attribute target specifier + + + namespace alias qualifier + + + fixed size buffers + + + #pragma + + + static classes + + + readonly structs + + + partial types + + + async function + + + switch on boolean type + + + method group + + + anonymous method + + + lambda expression + + + collection + + + disposable + + + access modifiers on properties + + + extern alias + + + iterators + + + default operator + + + async streams + + + unmanaged constructed types + + + readonly members + + + default literal + + + private protected + + + tuple equality + + + nullable types + + + pattern matching + + + expression body property accessor + + + expression body constructor and destructor + + + throw expression + + + implicitly typed array + + + implicitly typed local variable + + + anonymous types + + + automatically implemented properties + + + readonly automatically implemented properties + + + object initializer + + + collection initializer + + + query expression + + + extension method + + + partial method + + + method + + + type + + + namespace + + + field + + + property + + + element + + + variable + + + label + + + event + + + type parameter + + + using alias + + + extern alias + + + constructor + + + foreach iteration variable + + + fixed variable + + + using variable + + + contravariant + + + contravariantly + + + covariant + + + covariantly + + + invariantly + + + dynamic + + + named argument + + + optional parameter + + + exception filter + + + type variance + + + parameter + + + return + + + The character(s) '{0}' cannot be used at this location. + + + Incorrect syntax was used in a comment. + + + An invalid character was found inside an entity reference. + + + Expected '>' or '/>' to close tag '{0}'. + + + An identifier was expected. + + + Invalid unicode character. + + + Whitespace is not allowed at this location. + + + The character '<' cannot be used in an attribute value. + + + Missing equals sign between attribute and attribute value. + + + Reference to undefined entity '{0}'. + + + A string literal was expected, but no opening quotation mark was found. + + + Missing closing quotation mark for string literal. + + + Non-ASCII quotations marks may not be used around string literals. + + + End tag was not expected at this location. + + + End tag '{0}' does not match the start tag '{1}'. + + + Expected an end tag for element '{0}'. + + + Required white space was missing. + + + Unexpected character at this location. + + + The literal string ']]>' is not allowed in element content. + + + Duplicate '{0}' attribute + + + Metadata file '{0}' could not be found + + + Metadata references are not supported. + + + Metadata file '{0}' could not be opened -- {1} + + + The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + + + The type '{0}' is defined in a module that has not been added. You must add the module '{1}'. + + + Could not write to output file '{0}' -- '{1}' + + + Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point. + + + Operator '{0}' cannot be applied to operands of type '{1}' and '{2}' + + + Operator '{0}' cannot be applied to 'default' and operand of type '{1}' because it is a type parameter that is not known to be a reference type + + + Division by constant zero + + + Cannot apply indexing with [] to an expression of type '{0}' + + + Wrong number of indices inside []; expected {0} + + + Operator '{0}' cannot be applied to operand of type '{1}' + + + Operator '{0}' cannot be applied to operand '{1}' + + + Keyword 'this' is not valid in a static property, static method, or static field initializer + + + Keyword 'this' is not available in the current context + + + Omitting the type argument is not allowed in the current context + + + '{0}' has the wrong signature to be an entry point + + + Method has the wrong signature to be an entry point + + + Cannot implicitly convert type '{0}' to '{1}' + + + Cannot convert type '{0}' to '{1}' + + + Constant value '{0}' cannot be converted to a '{1}' + + + Operator '{0}' is ambiguous on operands of type '{1}' and '{2}' + + + Operator '{0}' is ambiguous on operands '{1}' and '{2}' + + + Operator '{0}' is ambiguous on an operand of type '{1}' + + + An out parameter cannot have the In attribute + + + Cannot convert null to '{0}' because it is a non-nullable value type + + + Cannot convert type '{0}' to '{1}' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion + + + Unexpected error writing debug information -- '{0}' + + + Inconsistent accessibility: return type '{1}' is less accessible than method '{0}' + + + Inconsistent accessibility: parameter type '{1}' is less accessible than method '{0}' + + + Inconsistent accessibility: field type '{1}' is less accessible than field '{0}' + + + Inconsistent accessibility: property type '{1}' is less accessible than property '{0}' + + + Inconsistent accessibility: indexer return type '{1}' is less accessible than indexer '{0}' + + + Inconsistent accessibility: parameter type '{1}' is less accessible than indexer '{0}' + + + Inconsistent accessibility: return type '{1}' is less accessible than operator '{0}' + + + Inconsistent accessibility: parameter type '{1}' is less accessible than operator '{0}' + + + Inconsistent accessibility: return type '{1}' is less accessible than delegate '{0}' + + + Inconsistent accessibility: parameter type '{1}' is less accessible than delegate '{0}' + + + Inconsistent accessibility: base class '{1}' is less accessible than class '{0}' + + + Inconsistent accessibility: base interface '{1}' is less accessible than interface '{0}' + + + '{0}': event property must have both add and remove accessors + + + '{0}': abstract event cannot use event accessor syntax + + + '{0}': event must be of a delegate type + + + The event '{0}' is never used + + + Event is never used + + + '{0}': instance event in interface cannot have initializer + + + The event '{0}' can only appear on the left hand side of += or -= (except when used from within the type '{1}') + + + An explicit interface implementation of an event must use event accessor syntax + + + '{0}': cannot override; '{1}' is not an event + + + An add or remove accessor must have a body + + + '{0}': abstract event cannot have initializer + + + The assembly name '{0}' is reserved and cannot be used as a reference in an interactive session + + + The enumerator name '{0}' is reserved and cannot be used + + + The as operator must be used with a reference type or nullable type ('{0}' is a non-nullable value type) + + + The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity + + + The 'l' suffix is easily confused with the digit '1' + + + The event '{0}' can only appear on the left hand side of += or -= + + + Constraints are not allowed on non-generic declarations + + + Type parameter declaration must be an identifier not a type + + + Type '{1}' already reserves a member called '{0}' with the same parameter types + + + The parameter name '{0}' is a duplicate + + + The namespace '{1}' already contains a definition for '{0}' + + + The type '{0}' already contains a definition for '{1}' + + + The name '{0}' does not exist in the current context + + + The name '{0}' does not exist in the current context (are you missing a reference to assembly '{1}'?) + + + '{0}' is an ambiguous reference between '{1}' and '{2}' + + + The using directive for '{0}' appeared previously in this namespace + + + Using directive appeared previously in this namespace + + + The modifier '{0}' is not valid for this item + + + The 'init' accessor is not valid on static members + + + More than one protection modifier + + + '{0}' hides inherited member '{1}'. Use the new keyword if hiding was intended. + + + Member hides inherited member; missing new keyword + + + A variable was declared with the same name as a variable in a base type. However, the new keyword was not used. This warning informs you that you should use new; the variable is declared as if new had been used in the declaration. + + + The member '{0}' does not hide an accessible member. The new keyword is not required. + + + Member does not hide an inherited member; new keyword is not required + + + The evaluation of the constant value for '{0}' involves a circular definition + + + Type '{1}' already defines a member called '{0}' with the same parameter types + + + A static member cannot be marked as '{0}' + + + A member '{0}' marked as override cannot be marked as new or virtual + + + '{0}' hides inherited member '{1}'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. + + + Member hides inherited member; missing override keyword + + + '{0}': no suitable method found to override + + + A namespace cannot directly contain members such as fields, methods or statements + + + '{0}' does not contain a definition for '{1}' + + + '{0}' is a {1} but is used like a {2} + + + '{0}' is a {1}, which is not valid in the given context + + + An object reference is required for the non-static field, method, or property '{0}' + + + The call is ambiguous between the following methods or properties: '{0}' and '{1}' + + + '{0}' is inaccessible due to its protection level + + + No overload for '{0}' matches delegate '{1}' + + + An object of a type convertible to '{0}' is required + + + Since '{0}' returns void, a return keyword must not be followed by an object expression + + + A local variable or function named '{0}' is already defined in this scope + + + The left-hand side of an assignment must be a variable, property or indexer + + + '{0}': a static constructor must be parameterless + + + The expression being assigned to '{0}' must be constant + + + '{0}' is of type '{1}'. A const field of a reference type other than string can only be initialized with null. + + + A local or parameter named '{0}' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter + + + A 'using namespace' directive can only be applied to namespaces; '{0}' is a type not a namespace. Consider a 'using static' directive instead + + + A 'using static' directive can only be applied to types; '{0}' is a namespace not a type. Consider a 'using namespace' directive instead + + + A 'using static' directive cannot be used to declare an alias + + + No enclosing loop out of which to break or continue + + + The label '{0}' is a duplicate + + + The type '{0}' has no constructors defined + + + Cannot create an instance of the abstract type or interface '{0}' + + + A const field requires a value to be provided + + + Circular base type dependency involving '{0}' and '{1}' + + + The delegate '{0}' does not have a valid constructor + + + Method name expected + + + A constant value is expected + + + A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type in C# 6 and earlier. + + + A value of an integral type expected + + + The switch statement contains multiple cases with the label value '{0}' + + + A goto case is only valid inside a switch statement + + + The property or indexer '{0}' cannot be used in this context because it lacks the get accessor + + + The type caught or thrown must be derived from System.Exception + + + A throw statement with no arguments is not allowed outside of a catch clause + + + Control cannot leave the body of a finally clause + + + The label '{0}' shadows another label by the same name in a contained scope + + + No such label '{0}' within the scope of the goto statement + + + A previous catch clause already catches all exceptions of this or of a super type ('{0}') + + + Filter expression is a constant 'true', consider removing the filter + + + Filter expression is a constant 'true' + + + '{0}': not all code paths return a value + + + Unreachable code detected + + + Unreachable code detected + + + Control cannot fall through from one case label ('{0}') to another + + + This label has not been referenced + + + This label has not been referenced + + + Use of unassigned local variable '{0}' + + + Use of unassigned local variable '{0}' + + + Use of unassigned local variable + + + The variable '{0}' is declared but never used + + + Variable is declared but never used + + + The field '{0}' is never used + + + Field is never used + + + Use of possibly unassigned field '{0}' + + + Use of possibly unassigned field '{0}' + + + Use of possibly unassigned field + + + Use of possibly unassigned auto-implemented property '{0}' + + + Use of possibly unassigned auto-implemented property '{0}' + + + Use of possibly unassigned auto-implemented property + + + Field '{0}' must be fully assigned before control is returned to the caller. Consider updating to language version '{1}' to auto-default the field. + + + Field '{0}' must be fully assigned before control is returned to the caller. Consider updating to language version '{1}' to auto-default the field. + + + Fields of a struct must be fully assigned in a constructor before control is returned to the caller. Consider updating the language version to auto-default the field. + + + Type of conditional expression cannot be determined because '{0}' and '{1}' implicitly convert to one another + + + Type of conditional expression cannot be determined because there is no implicit conversion between '{0}' and '{1}' + + + A base class is required for a 'base' reference + + + Use of keyword 'base' is not valid in this context + + + Member '{0}' cannot be accessed with an instance reference; qualify it with a type name instead + + + The out parameter '{0}' must be assigned to before control leaves the current method + + + The out parameter '{0}' must be assigned to before control leaves the current method + + + An out parameter must be assigned to before control leaves the method + + + Invalid rank specifier: expected ',' or ']' + + + '{0}' cannot be extern and declare a body + + + '{0}' cannot be extern and have a constructor initializer + + + '{0}' cannot be both extern and abstract + + + Attribute constructor parameter '{0}' has type '{1}', which is not a valid attribute parameter type + + + An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type + + + Attribute constructor parameter '{0}' is optional, but no default parameter value was specified. + + + The given expression is always of the provided ('{0}') type + + + 'is' expression's given expression is always of the provided type + + + The given expression is never of the provided ('{0}') type + + + 'is' expression's given expression is never of the provided type + + + '{0}' is not a reference type as required by the lock statement + + + Use of null is not valid in this context + + + Use of default literal is not valid in this context + + + The 'this' object cannot be used before all of its fields have been assigned. Consider updating to language version '{0}' to auto-default the unassigned fields. + + + The 'this' object cannot be used before all of its fields have been assigned. Consider updating to language version '{0}' to auto-default the unassigned fields. + + + The 'this' object cannot be used in a constructor before all of its fields have been assigned. Consider updating the language version to auto-default the unassigned fields. + + + The __arglist construct is valid only within a variable argument method + + + The * or -> operator must be applied to a pointer + + + A pointer must be indexed by only one value + + + Using '{0}' as a ref or out value or taking its address may cause a runtime exception because it is a field of a marshal-by-reference class + + + Using a field of a marshal-by-reference class as a ref or out value or taking its address may cause a runtime exception + + + A static readonly field cannot be assigned to (except in a static constructor or a variable initializer) + + + A static readonly field cannot be used as a ref or out value (except in a static constructor) + + + Property or indexer '{0}' cannot be assigned to -- it is read only + + + Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement + + + foreach requires that the return type '{0}' of '{1}' must have a suitable public 'MoveNext' method and public 'Current' property + + + Asynchronous foreach requires that the return type '{0}' of '{1}' must have a suitable public 'MoveNextAsync' method and public 'Current' property + + + Only 65534 locals, including those generated by the compiler, are allowed + + + Cannot call an abstract base member: '{0}' + + + A non ref-returning property or indexer may not be used as an out or ref value + + + Cannot take the address of, get the size of, or declare a pointer to a managed type ('{0}') + + + This takes the address of, gets the size of, or declares a pointer to a managed type ('{0}') + + + This takes the address of, gets the size of, or declares a pointer to a managed type + + + The type of a local declared in a fixed statement must be a pointer type + + + You must provide an initializer in a fixed or using statement declaration + + + Cannot take the address of the given expression + + + You can only take the address of an unfixed expression inside of a fixed statement initializer + + + You cannot use the fixed statement to take the address of an already fixed expression + + + The given expression cannot be used in a fixed statement + + + Pointers and fixed size buffers may only be used in an unsafe context + + + The return type of operator True or False must be bool + + + The operator '{0}' requires a matching operator '{1}' to also be defined + + + In order to be applicable as a short circuit operator a user-defined logical operator ('{0}') must have the same return type and parameter types + + + In order for '{0}' to be applicable as a short circuit operator, its declaring type '{1}' must define operator true and operator false + + + The variable '{0}' is assigned but its value is never used + + + Variable is assigned but its value is never used + + + The operation overflows at compile time in checked mode + + + Constant value '{0}' cannot be converted to a '{1}' (use 'unchecked' syntax to override) + + + A method with vararg cannot be generic, be in a generic type, or have a params parameter + + + The params parameter must be a single dimensional array + + + An __arglist expression may only appear inside of a call or new expression + + + Unsafe code may only appear if compiling with /unsafe + + + Ambiguity between '{0}' and '{1}' + + + Type and identifier are both required in a foreach statement + + + A params parameter must be the last parameter in a parameter list + + + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + + + The type or namespace name '{0}' does not exist in the namespace '{1}' (are you missing an assembly reference?) + + + A field initializer cannot reference the non-static field, method, or property '{0}' + + + '{0}' cannot be sealed because it is not an override + + + '{0}': cannot override inherited member '{1}' because it is sealed + + + The operation in question is undefined on void pointers + + + The Conditional attribute is not valid on '{0}' because it is an override method + + + Local function '{0}' must be 'static' in order to use the Conditional attribute + + + Neither 'is' nor 'as' is valid on pointer types + + + Destructors and object.Finalize cannot be called directly. Consider calling IDisposable.Dispose if available. + + + The type or namespace name '{0}' could not be found (are you missing a using directive or an assembly reference?) + + + Cannot use a negative size with stackalloc + + + Cannot create an array with a negative size + + + Do not override object.Finalize. Instead, provide a destructor. + + + Do not directly call your base type Finalize method. It is called automatically from your destructor. + + + Indexing an array with a negative index (array indices always start at zero) + + + Indexing an array with a negative index + + + Possible unintended reference comparison; to get a value comparison, cast the left hand side to type '{0}' + + + Possible unintended reference comparison; left hand side needs cast + + + Possible unintended reference comparison; to get a value comparison, cast the right hand side to type '{0}' + + + Possible unintended reference comparison; right hand side needs cast + + + The right hand side of a fixed statement assignment may not be a cast expression + + + stackalloc may not be used in a catch or finally block + + + An __arglist parameter must be the last parameter in a parameter list + + + Missing partial modifier on declaration of type '{0}'; another partial declaration of this type exists + + + Partial declarations of '{0}' must be all classes, all record classes, all structs, all record structs, or all interfaces + + + Partial declarations of '{0}' have conflicting accessibility modifiers + + + Partial declarations of '{0}' must not specify different base classes + + + Partial declarations of '{0}' must have the same type parameter names in the same order + + + Partial declarations of '{0}' have inconsistent constraints for type parameter '{1}' + + + Cannot implicitly convert type '{0}' to '{1}'. An explicit conversion exists (are you missing a cast?) + + + The 'partial' modifier can only appear immediately before 'class', 'record', 'struct', 'interface', or a method return type. + + + Imported type '{0}' is invalid. It contains a circular base type dependency. + + + Use of unassigned out parameter '{0}' + + + Use of unassigned out parameter '{0}' + + + Use of unassigned out parameter + + + Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) + + + The property or indexer '{0}' cannot be used in this context because the get accessor is inaccessible + + + The property or indexer '{0}' cannot be used in this context because the set accessor is inaccessible + + + The accessibility modifier of the '{0}' accessor must be more restrictive than the property or indexer '{1}' + + + Cannot specify accessibility modifiers for both accessors of the property or indexer '{0}' + + + '{0}': accessibility modifiers on accessors may only be used if the property or indexer has both a get and a set accessor + + + '{0}' does not implement interface member '{1}'. '{2}' is not public. + + + '{0}' does not implement the '{1}' pattern. '{2}' is ambiguous with '{3}'. + + + Type does not implement the collection pattern; members are ambiguous + + + '{0}' does not implement the '{1}' pattern. '{2}' is not a public instance or extension method. + + + Type does not implement the collection pattern; member is is not a public instance or extension method. + + + '{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature. + + + Type does not implement the collection pattern; member has the wrong signature + + + Friend access was granted by '{0}', but the public key of the output assembly ('{1}') does not match that specified by the InternalsVisibleTo attribute in the granting assembly. + + + Friend access was granted by '{0}', but the strong name signing state of the output assembly does not match that of the granting assembly. + + + There is no defined ordering between fields in multiple declarations of partial struct '{0}'. To specify an ordering, all instance fields must be in the same declaration. + + + There is no defined ordering between fields in multiple declarations of partial struct + + + The type '{0}' cannot be declared const + + + Cannot create an instance of the variable type '{0}' because it does not have the new() constraint + + + Using the generic {1} '{0}' requires {2} type arguments + + + The type '{0}' may not be used as a type argument + + + The {1} '{0}' cannot be used with type arguments + + + The non-generic {1} '{0}' cannot be used with type arguments + + + '{2}' must be a non-abstract type with a public parameterless constructor in order to use it as parameter '{1}' in the generic type or method '{0}' + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no implicit reference conversion from '{3}' to '{1}'. + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'. + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'. Nullable types can not satisfy any interface constraints. + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no boxing conversion or type parameter conversion from '{3}' to '{1}'. + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no boxing conversion from '{3}' to '{1}'. + + + The parameter name '{0}' conflicts with an automatically-generated parameter name + + + The type or namespace name '{0}' could not be found in the global namespace (are you missing an assembly reference?) + + + The new() constraint must be the last constraint specified + + + '{0}': an entry point cannot be generic or in a generic type + + + An entry point cannot be generic or in a generic type + + + Cannot convert null to type parameter '{0}' because it could be a non-nullable value type. Consider using 'default({0})' instead. + + + Duplicate constraint '{0}' for type parameter '{1}' + + + The class type constraint '{0}' must come before any other constraints + + + '{1} {0}' has the wrong return type + + + Ref mismatch between '{0}' and delegate '{1}' + + + A constraint clause has already been specified for type parameter '{0}'. All of the constraints for a type parameter must be specified in a single where clause. + + + The type arguments for method '{0}' cannot be inferred from the usage. Try specifying the type arguments explicitly. + + + '{0}': a parameter, local variable, or local function cannot have the same name as a method type parameter + + + The type parameter '{0}' cannot be used with the 'as' operator because it does not have a class type constraint nor a 'class' constraint + + + The field '{0}' is assigned but its value is never used + + + Field is assigned but its value is never used + + + The '{0}' attribute is valid only on an indexer that is not an explicit interface member declaration + + + '{0}': an attribute argument cannot use type parameters + + + '{0}': an attribute type argument cannot use type parameters + + + Type '{0}' cannot be used in this context because it cannot be represented in metadata. + + + Type cannot be used in this context because it cannot be represented in metadata. + + + Type '{0}' cannot be used in this context because it cannot be represented in metadata. + + + '{0}': cannot provide arguments when creating an instance of a variable type + + + '{0}': an abstract type cannot be sealed or static + + + Ambiguous reference in cref attribute: '{0}'. Assuming '{1}', but could have also matched other overloads including '{2}'. + + + Ambiguous reference in cref attribute + + + '{0}': a reference to a volatile field will not be treated as volatile + + + A reference to a volatile field will not be treated as volatile + + + A volatile field should not normally be used as a ref or out value, since it will not be treated as volatile. There are exceptions to this, such as when calling an interlocked API. + + + Since '{1}' has the ComImport attribute, '{0}' must be extern or abstract + + + '{0}': a class with the ComImport attribute cannot specify a base class + + + The constraints for type parameter '{0}' of method '{1}' must match the constraints for type parameter '{2}' of interface method '{3}'. Consider using an explicit interface implementation instead. + + + The tuple element names in the signature of method '{0}' must match the tuple element names of interface method '{1}' (including on the return type). + + + The type name '{0}' does not exist in the type '{1}' + + + Cannot convert method group '{0}' to non-delegate type '{1}'. Did you intend to invoke the method? + + + Converting method group '{0}' to non-delegate type '{1}'. Did you intend to invoke the method? + + + Converting method group to non-delegate type + + + The extern alias '{0}' was not specified in a /reference option + + + Cannot use alias '{0}' with '::' since the alias references a type. Use '.' instead. + + + Alias '{0}' not found + + + The type '{1}' exists in both '{0}' and '{2}' + + + The namespace '{1}' in '{0}' conflicts with the type '{3}' in '{2}' + + + The namespace '{1}' in '{0}' conflicts with the imported type '{3}' in '{2}'. Using the namespace defined in '{0}'. + + + Namespace conflicts with imported type + + + The type '{1}' in '{0}' conflicts with the imported type '{3}' in '{2}'. Using the type defined in '{0}'. + + + Type conflicts with imported type + + + The type '{1}' in '{0}' conflicts with the imported namespace '{3}' in '{2}'. Using the type defined in '{0}'. + + + Type conflicts with imported namespace + + + The type '{1}' in '{0}' conflicts with the namespace '{3}' in '{2}' + + + An extern alias declaration must precede all other elements defined in the namespace + + + Defining an alias named 'global' is ill-advised since 'global::' always references the global namespace and not an alias + + + Defining an alias named 'global' is ill-advised + + + '{0}': a type cannot be both static and sealed + + + '{0}': abstract properties cannot have private accessors + + + Syntax error; value expected + + + Cannot modify the result of an unboxing conversion + + + Foreach cannot operate on a '{0}'. Did you intend to invoke the '{0}'? + + + The return type for ++ or -- operator must match the parameter type or be derived from the parameter type + + + The 'class', 'struct', 'unmanaged', 'notnull', and 'default' constraints cannot be combined or duplicated, and must be specified first in the constraints list. + + + '{0}': cannot specify both a constraint class and the 'class' or 'struct' constraint + + + '{0}': cannot specify both a constraint class and the 'unmanaged' constraint + + + The 'new()' constraint cannot be used with the 'struct' constraint + + + The type '{2}' must be a reference type in order to use it as parameter '{1}' in the generic type or method '{0}' + + + The type '{2}' must be a non-nullable value type in order to use it as parameter '{1}' in the generic type or method '{0}' + + + Circular constraint dependency involving '{0}' and '{1}' + + + Type parameter '{0}' inherits conflicting constraints '{1}' and '{2}' + + + Type parameter '{1}' has the 'struct' constraint so '{1}' cannot be used as a constraint for '{0}' + + + Ambiguous user defined conversions '{0}' and '{1}' when converting from '{2}' to '{3}' + + + The result of the expression is always 'null' of type '{0}' + + + The result of the expression is always 'null' + + + Cannot return 'this' by reference. + + + Cannot use attribute constructor '{0}' because it has 'in' parameters. + + + Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly, except for either a 'class', or a 'struct' constraint. + + + The inherited members '{0}' and '{1}' have the same signature in type '{2}', so they cannot be overridden + + + Evaluation of the decimal constant expression failed + + + Comparing with null of type '{0}' always produces 'false' + + + Comparing with null of struct type always produces 'false' + + + Introducing a 'Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor? + + + Introducing a 'Finalize' method can interfere with destructor invocation + + + This warning occurs when you create a class with a method whose signature is public virtual void Finalize. + + If such a class is used as a base class and if the deriving class defines a destructor, the destructor will override the base class Finalize method, ... + + + '{0}' should not have a params parameter since '{1}' does not + + + The 'goto case' value is not implicitly convertible to type '{0}' + + + The 'goto case' value is not implicitly convertible to the switch type + + + Method '{0}' cannot implement interface accessor '{1}' for type '{2}'. Use an explicit interface implementation. + + + The result of the expression is always '{0}' since a value of type '{1}' is never equal to 'null' of type '{2}' + + + The result of the expression is always the same since a value of this type is never equal to 'null' + + + The result of the expression is always '{0}' since a value of type '{1}' is never equal to 'null' of type '{2}' + + + The result of the expression is always the same since a value of this type is never equal to 'null' + + + Explicit interface implementation '{0}' matches more than one interface member. Which interface member is actually chosen is implementation-dependent. Consider using a non-explicit implementation instead. + + + Explicit interface implementation matches more than one interface member + + + '{0}' cannot declare a body because it is marked abstract + + + '{0}' must declare a body because it is not marked abstract, extern, or partial + + + '{0}' cannot be both abstract and sealed + + + The abstract {0} '{1}' cannot be marked virtual + + + The constant '{0}' cannot be marked static + + + '{0}': cannot override because '{1}' is not a function + + + '{0}': cannot override inherited member '{1}' because it is not marked virtual, abstract, or override + + + '{0}': cannot change access modifiers when overriding '{1}' inherited member '{2}' + + + '{0}': cannot change tuple element names when overriding inherited member '{1}' + + + '{0}': return type must be '{2}' to match overridden member '{1}' + + + '{0}': cannot derive from sealed type '{1}' + + + '{0}' is abstract but it is contained in non-abstract type '{1}' + + + '{0}': static constructor cannot have an explicit 'this' or 'base' constructor call + + + '{0}': access modifiers are not allowed on static constructors + + + Constructor '{0}' cannot call itself + + + Constructor '{0}' cannot call itself through another constructor + + + '{0}' has no base class and cannot call a base constructor + + + Predefined type '{0}' is not defined or imported + + + Predefined type '{0}' is not defined or imported + + + Predefined type '{0}' is declared in multiple referenced assemblies: '{1}' and '{2}' + + + '{0}': structs cannot call base class constructors + + + Struct member '{0}' of type '{1}' causes a cycle in the struct layout + + + Interfaces cannot contain instance fields + + + Interfaces cannot contain instance constructors + + + Type '{0}' in interface list is not an interface + + + '{0}' is already listed in interface list + + + '{0}' is already listed in the interface list on type '{2}' with different tuple element names, as '{1}'. + + + '{0}' is already listed in the interface list on type '{2}' as '{1}'. + + + Inherited interface '{1}' causes a cycle in the interface hierarchy of '{0}' + + + '{0}' hides inherited abstract member '{1}' + + + '{0}' does not implement inherited abstract member '{1}' + + + '{0}' does not implement interface member '{1}' + + + The class System.Object cannot have a base class or implement an interface + + + '{0}' in explicit interface declaration is not an interface + + + '{0}' in explicit interface declaration is not found among members of the interface that can be implemented + + + '{0}': containing type does not implement interface '{1}' + + + '{0}': explicit interface declaration can only be declared in a class, record, struct or interface + + + '{0}': member names cannot be the same as their enclosing type + + + '{0}': the enumerator value is too large to fit in its type + + + '{0}': cannot override because '{1}' is not a property + + + '{0}': cannot override because '{1}' does not have an overridable get accessor + + + '{0}': cannot override because '{1}' does not have an overridable set accessor + + + '{0}': property or indexer cannot have void type + + + '{0}': property or indexer must have at least one accessor + + + __arglist cannot have an argument of void type + + + '{0}' is a new virtual member in sealed type '{1}' + + + '{0}' adds an accessor not found in interface member '{1}' + + + Accessors '{0}' and '{1}' should both be init-only or neither + + + Explicit interface implementation '{0}' is missing accessor '{1}' + + + '{0}': user-defined conversions to or from an interface are not allowed + + + '{0}': user-defined conversions to or from a base type are not allowed + + + '{0}': user-defined conversions to or from a derived type are not allowed + + + User-defined operator cannot convert a type to itself + + + User-defined conversion must convert to or from the enclosing type + + + Duplicate user-defined conversion in type '{0}' + + + User-defined operator '{0}' must be declared static and public + + + The parameter type for ++ or -- operator must be the containing type + + + The parameter of a unary operator must be the containing type + + + One of the parameters of a binary operator must be the containing type + + + The first operand of an overloaded shift operator must have the same type as the containing type + + + Conversion, equality, or inequality operators declared in interfaces must be abstract or virtual + + + Enums cannot contain explicit parameterless constructors + + + '{0}': cannot override '{1}' because it is not supported by the language + + + '{0}' is not supported by the language + + + '{0}': cannot explicitly call operator or accessor + + + '{0}': cannot reference a type through an expression; try '{1}' instead + + + Name of destructor must match name of type + + + Only class types can contain destructors + + + Namespace '{1}' contains a definition conflicting with alias '{0}' + + + Alias '{0}' conflicts with {1} definition + + + The Conditional attribute is not valid on '{0}' because it is a constructor, destructor, operator, lambda expression, or explicit interface implementation + + + The Conditional attribute is not valid on '{0}' because its return type is not void + + + Duplicate '{0}' attribute + + + Duplicate '{0}' attribute in '{1}' + + + The Conditional attribute is not valid on interface members + + + User-defined operators cannot return void + + + '{0}': user-defined conversions to or from the dynamic type are not allowed + + + Invalid value for argument to '{0}' attribute + + + Parameter not valid for the specified unmanaged type. + + + Attribute parameter '{0}' must be specified. + + + Attribute parameter '{0}' or '{1}' must be specified. + + + Unmanaged type '{0}' not valid for fields. + + + Unmanaged type '{0}' is only valid for fields. + + + Attribute '{0}' is not valid on this declaration type. It is only valid on '{1}' declarations. + + + Floating-point constant is outside the range of type '{0}' + + + The Guid attribute must be specified with the ComImport attribute + + + Invalid value for named attribute argument '{0}' + + + The DllImport attribute must be specified on a method marked 'static' and 'extern' + + + Cannot update '{0}'; attribute '{1}' is missing. + + + The DllImport attribute cannot be applied to a method that is generic or contained in a generic method or type. + + + Field or property cannot be of type '{0}' + + + Field or auto-implemented property cannot be of type '{0}' unless it is an instance member of a ref struct. + + + Array elements cannot be of type '{0}' + + + '{0}' is obsolete + + + Type or member is obsolete + + + '{0}' is not an attribute class + + + '{0}' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, or const, or read-write properties which are public and not static. + + + '{0}' is obsolete: '{1}' + + + Type or member is obsolete + + + '{0}' is obsolete: '{1}' + + + Indexers cannot have void type + + + '{0}': virtual or abstract members cannot be private + + + Can only use array initializer expressions to assign to array types. Try using a new expression instead. + + + Array initializers can only be used in a variable or field initializer. Try using a new expression instead. + + + '{0}': instance field in types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute + + + Method, operator, or accessor '{0}' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation. + + + Method, operator, or accessor is marked external and has no attributes on it + + + '{0}': new protected member declared in sealed type + + + New protected member declared in sealed type + + + Conditional member '{0}' cannot implement interface member '{1}' in type '{2}' + + + '{0}' cannot implement interface member '{1}' in type '{2}' because it has an __arglist parameter + + + ref and out are not valid in this context + + + The argument to the '{0}' attribute must be a valid identifier + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + + + The FieldOffset attribute is not allowed on static or const fields + + + Attribute '{0}' is only valid on classes derived from System.Attribute + + + Possible mistaken empty statement + + + Possible mistaken empty statement + + + '{0}' duplicate named attribute argument + + + '{0}' cannot derive from special class '{1}' + + + Cannot specify the DefaultMember attribute on a type containing an indexer + + + '{0}' is a type not supported by the language + + + Field '{0}' is never assigned to, and will always have its default value {1} + + + Field is never assigned to, and will always have its default value + + + Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. + + + Comparison to integral constant is useless; the constant is outside the range of type '{0}' + + + Comparison to integral constant is useless; the constant is outside the range of the type + + + Cannot apply attribute class '{0}' because it is abstract + + + '{0}' is not a valid named attribute argument because it is not a valid attribute parameter type + + + Missing compiler required member '{0}.{1}' + + + '{0}' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are '{1}'. All attributes in this block will be ignored. + + + Not a valid attribute location for this declaration + + + '{0}' is not a recognized attribute location. Valid attribute locations for this declaration are '{1}'. All attributes in this block will be ignored. + + + Not a recognized attribute location + + + '{0}' overrides Object.Equals(object o) but does not override Object.GetHashCode() + + + Type overrides Object.Equals(object o) but does not override Object.GetHashCode() + + + '{0}' defines operator == or operator != but does not override Object.Equals(object o) + + + Type defines operator == or operator != but does not override Object.Equals(object o) + + + '{0}' defines operator == or operator != but does not override Object.GetHashCode() + + + Type defines operator == or operator != but does not override Object.GetHashCode() + + + Cannot specify the Out attribute on a ref parameter without also specifying the In attribute. + + + '{0}' cannot define an overloaded {1} that differs only on parameter modifiers '{2}' and '{3}' + + + Literal of type double cannot be implicitly converted to type '{1}'; use an '{0}' suffix to create a literal of this type + + + Assignment in conditional expression is always constant; did you mean to use == instead of = ? + + + Assignment in conditional expression is always constant + + + '{0}': new protected member declared in struct + + + Two indexers have different names; the IndexerName attribute must be used with the same name on every indexer within a type + + + A class with the ComImport attribute cannot have a user-defined constructor + + + Field cannot have void type + + + Member '{0}' overrides obsolete member '{1}'. Add the Obsolete attribute to '{0}'. + + + Member overrides obsolete member + + + System.Void cannot be used from C# -- use typeof(void) to get the void type object + + + Do not use 'System.ParamArrayAttribute'. Use the 'params' keyword instead. + + + Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first + + + Bitwise-or operator used on a sign-extended operand + + + The compiler implicitly widened and sign-extended a variable, and then used the resulting value in a bitwise OR operation. This can result in unexpected behavior. + + + '{0}': a volatile field cannot be of the type '{1}' + + + '{0}': a field cannot be both volatile and readonly + + + The modifier 'abstract' is not valid on fields. Try using a property instead. + + + '{0}' cannot implement '{1}' because it is not supported by the language + + + '{0}' explicit method implementation cannot implement '{1}' because it is an accessor + + + '{0}' interface marked with 'CoClassAttribute' not marked with 'ComImportAttribute' + + + Interface marked with 'CoClassAttribute' not marked with 'ComImportAttribute' + + + Conditional member '{0}' cannot have an out parameter + + + Accessor '{0}' cannot implement interface member '{1}' for type '{2}'. Use an explicit interface implementation. + + + The namespace alias qualifier '::' always resolves to a type or namespace so is illegal here. Consider using '.' instead. + + + Cannot derive from '{0}' because it is a type parameter + + + Duplicate type parameter '{0}' + + + Type parameter '{0}' has the same name as the type parameter from outer type '{1}' + + + Type parameter has the same name as the type parameter from outer type + + + Type parameter '{0}' has the same name as the type parameter from outer method '{1}' + + + Type parameter has the same type as the type parameter from outer method. + + + Type parameter '{0}' has the same name as the containing type, or method + + + '{0}' cannot implement both '{1}' and '{2}' because they may unify for some type parameter substitutions + + + '{1}' does not define type parameter '{0}' + + + '{0}' is not a valid constraint. A type used as a constraint must be an interface, a non-sealed class or a type parameter. + + + Constraint cannot be special class '{0}' + + + Inconsistent accessibility: constraint type '{1}' is less accessible than '{0}' + + + Cannot do non-virtual member lookup in '{0}' because it is a type parameter + + + Invalid constraint type. A type used as a constraint must be an interface, a non-sealed class or a type parameter. + + + '{0}': cannot declare instance members in a static class + + + '{1}': cannot derive from static class '{0}' + + + Static classes cannot have instance constructors + + + Static classes cannot contain destructors + + + Cannot create an instance of the static class '{0}' + + + Static class '{0}' cannot derive from type '{1}'. Static classes must derive from object. + + + '{0}': static classes cannot implement interfaces + + + '{0}': ref structs cannot implement interfaces + + + '{0}': static classes cannot contain user-defined operators + + + Cannot convert to static type '{0}' + + + '{0}': static classes cannot be used as constraints + + + '{0}': static types cannot be used as type arguments + + + '{0}': array elements cannot be of static type + + + '{0}': cannot declare indexers in a static class + + + '{0}': static types cannot be used as parameters + + + '{0}': static types cannot be used as parameters + + + Static types cannot be used as parameters + + + '{0}': static types cannot be used as return types + + + '{0}': static types cannot be used as return types + + + Static types cannot be used as return types + + + Cannot declare a variable of static type '{0}' + + + A throw statement with no arguments is not allowed in a finally clause that is nested inside the nearest enclosing catch clause + + + '{0}' is not a valid format specifier + + + Possibly incorrect assignment to local '{0}' which is the argument to a using or lock statement. The Dispose call or unlocking will happen on the original value of the local. + + + Possibly incorrect assignment to local which is the argument to a using or lock statement + + + Type '{0}' is defined in this assembly, but a type forwarder is specified for it + + + Cannot forward type '{0}' because it is a nested type of '{1}' + + + The type forwarder for type '{0}' in assembly '{1}' causes a cycle + + + The /moduleassemblyname option may only be specified when building a target type of 'module' + + + Assembly reference '{0}' is invalid and cannot be resolved + + + Invalid type specified as an argument for TypeForwardedTo attribute + + + '{0}' does not implement instance interface member '{1}'. '{2}' cannot implement the interface member because it is static. + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implement an interface member because it is not public. + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implement '{1}' because it does not have the matching return type of '{3}'. + + + '{0}' duplicate TypeForwardedToAttribute + + + A query body must end with a select clause or a group clause + + + Expected contextual keyword 'on' + + + Expected contextual keyword 'equals' + + + Expected contextual keyword 'by' + + + Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access. + + + Invalid initializer member declarator + + + Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit + + + A partial method cannot have the 'abstract' modifier + + + A partial method must be declared within a partial type + + + A partial method may not explicitly implement an interface method + + + Both partial method declarations must be extension methods or neither may be an extension method + + + A partial method may not have multiple defining declarations + + + A partial method may not have multiple implementing declarations + + + Both partial method declarations must use a params parameter or neither may use a params parameter + + + No defining declaration found for implementing declaration of partial method '{0}' + + + Both partial method declarations, '{0}' and '{1}', must use the same tuple element names. + + + Partial method declarations of '{0}' have inconsistent constraints for type parameter '{1}' + + + Cannot create delegate from method '{0}' because it is a partial method without an implementing declaration + + + Both partial method declarations must be static or neither may be static + + + Both partial method declarations must be unsafe or neither may be unsafe + + + Partial methods with only a defining declaration or removed conditional methods cannot be used in expression trees + + + Obsolete member '{0}' overrides non-obsolete member '{1}' + + + Obsolete member overrides non-obsolete member + + + The fully qualified name for '{0}' is too long for debug information. Compile without '/debug' option. + + + Fully qualified name is too long for debug information + + + Cannot assign {0} to an implicitly-typed variable + + + Implicitly-typed variables must be initialized + + + Implicitly-typed variables cannot have multiple declarators + + + Cannot initialize an implicitly-typed variable with an array initializer + + + Implicitly-typed local variables cannot be fixed + + + Implicitly-typed variables cannot be constant + + + Constructor '{0}' is marked external + + + Constructor is marked external + + + The contextual keyword 'var' may only appear within a local variable declaration or in script code + + + No best type found for implicitly-typed array + + + Cannot assign '{0}' to anonymous type property + + + An expression tree may not contain a base access + + + An expression tree may not contain a tuple == or != operator + + + An expression tree may not contain an assignment operator + + + An anonymous type cannot have multiple properties with the same name + + + A lambda expression with a statement body cannot be converted to an expression tree + + + Cannot convert lambda to an expression tree whose type argument '{0}' is not a delegate type + + + Cannot use anonymous type in a constant expression + + + The first operand of an 'is' or 'as' operator may not be a lambda expression, anonymous method, or method group. + + + The first operand of an 'as' operator may not be a tuple literal without a natural type. + + + An expression tree may not contain a multidimensional array initializer + + + Argument missing + + + Cannot use local variable '{0}' before it is declared + + + Type of '{0}' cannot be inferred since its initializer directly or indirectly refers to the definition. + + + Auto-implemented property '{0}' must be fully assigned before control is returned to the caller. Consider updating to language version '{1}' to auto-default the property. + + + Auto-implemented property '{0}' must be fully assigned before control is returned to the caller. Consider updating to language version '{1}' to auto-default the property. + + + An auto-implemented property must be fully assigned before control is returned to the caller. Consider updating the language version to auto-default the property. + + + Cannot use local variable '{0}' before it is declared. The declaration of the local variable hides the field '{1}'. + + + An expression tree lambda may not contain a coalescing operator with a null or default literal left-hand side + + + Identifier expected + + + ; expected + + + Syntax error, '{0}' expected + + + Duplicate '{0}' modifier + + + Property accessor already defined + + + Type byte, sbyte, short, ushort, int, uint, long, or ulong expected + + + Unrecognized escape sequence + + + Newline in constant + + + Empty character literal + + + Too many characters in character literal + + + Invalid number + + + A get or set accessor expected + + + An object, string, or class type expected + + + Named attribute argument expected + + + Catch clauses cannot follow the general catch clause of a try statement + + + Keyword 'this' or 'base' expected + + + Overloadable unary operator expected + + + Overloadable binary operator expected + + + Integral constant is too large + + + Type or namespace definition, or end-of-file expected + + + Member definition, statement, or end-of-file expected + + + Embedded statement cannot be a declaration or labeled statement + + + Preprocessor directive expected + + + Single-line comment or end-of-line expected + + + ) expected + + + #endif directive expected + + + Unexpected preprocessor directive + + + #error: '{0}' + + + #warning: '{0}' + + + #warning directive + + + Type expected + + + Cannot define/undefine preprocessor symbols after first token in file + + + Cannot use #r after first token in file + + + End-of-file found, '*/' expected + + + Merge conflict marker encountered + + + Do not use refout when using refonly. + + + Cannot compile net modules when using /refout or /refonly. + + + Overloadable operator expected + + + #endregion directive expected + + + Unterminated string literal + + + Preprocessor directives must appear as the first non-whitespace character on a line + + + Identifier expected; '{1}' is a keyword + + + { or ; expected + + + Cannot use more than one type in a for, using, fixed, or declaration statement + + + An add or remove accessor expected + + + Unexpected character '{0}' + + + Unexpected token '{0}' + + + '{0}': static classes cannot contain protected members + + + A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException. + + + A previous catch clause already catches all exceptions + + + This warning is caused when a catch() block has no specified exception type after a catch (System.Exception e) block. The warning advises that the catch() block will not catch any exceptions. + + A catch() block after a catch (System.Exception e) block can ca ... + + + The operand of an increment or decrement operator must be a variable, property or indexer + + + '{0}' does not contain a definition for '{1}' and no accessible extension method '{1}' accepting a first argument of type '{0}' could be found (are you missing a using directive or an assembly reference?) + + + '{0}' does not contain a definition for '{1}' and no extension method '{1}' accepting a first argument of type '{0}' could be found (are you missing a using directive for '{2}'?) + + + Method '{0}' has a parameter modifier 'this' which is not on the first parameter + + + The parameter modifier '{0}' cannot be used with '{1}' + + + The first parameter of an extension method cannot be of type '{0}' + + + A parameter array cannot be used with 'this' modifier on an extension method + + + Extension method must be static + + + Extension method must be defined in a non-generic static class + + + A parameter can only have one '{0}' modifier + + + Extension methods must be defined in a top level static class; {0} is a nested class + + + Cannot define a new extension method because the compiler required type '{0}' cannot be found. Are you missing a reference to System.Core.dll? + + + Do not use 'System.Runtime.CompilerServices.ExtensionAttribute'. Use the 'this' keyword instead. + + + Do not use 'System.Runtime.CompilerServices.DynamicAttribute'. Use the 'dynamic' keyword instead. + + + The constructor call needs to be dynamically dispatched, but cannot be because it is part of a constructor initializer. Consider casting the dynamic arguments. + + + Extension method '{0}' defined on value type '{1}' cannot be used to create delegates + + + No overload for method '{0}' takes {1} arguments + + + Argument {0}: cannot convert from '{1}' to '{2}' + + + Source file '{0}' could not be opened -- {1} + + + Cannot link resource files when building a module + + + Resource identifier '{0}' has already been used in this assembly + + + Each linked resource and module must have a unique filename. Filename '{0}' is specified more than once in this assembly + + + The referenced file '{0}' is not an assembly + + + A ref or out value must be an assignable variable + + + Keyword 'base' is not available in a static method + + + Keyword 'base' is not available in the current context + + + } expected + + + { expected + + + 'in' expected + + + Invalid preprocessor expression + + + Invalid token '{0}' in class, record, struct, or interface member declaration + + + Method must have a return type + + + Invalid base type + + + Empty switch block + + + Empty switch block + + + Expected catch or finally + + + Invalid expression term '{0}' + + + A new expression requires an argument list or (), [], or {} after type + + + Elements defined in a namespace cannot be explicitly declared as private, protected, protected internal, or private protected + + + Expected ; or = (cannot specify constructor arguments in declaration) + + + A using clause must precede all other elements defined in the namespace except extern alias declarations + + + Overloaded binary operator '{0}' takes two parameters + + + Overloaded unary operator '{0}' takes one parameter + + + Invalid parameter type 'void' + + + The using alias '{0}' appeared previously in this namespace + + + Cannot access protected member '{0}' via a qualifier of type '{1}'; the qualifier must be of type '{2}' (or derived from it) + + + '{0}' cannot be added to this assembly because it already is an assembly + + + Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor methods '{1}' or '{2}' + + + Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor method '{1}' + + + Keyword 'void' cannot be used in this context + + + Indexers must have at least one parameter + + + Array type specifier, [], must appear before parameter name + + + Declaration is not valid; use '{0} operator <dest-type> (...' instead + + + Could not find '{0}' specified for Main method + + + '{0}' specified for Main method must be a non-generic class, record, struct, or interface + + + '{0}' does not have a suitable static 'Main' method + + + Cannot use '{0}' for Main method because it is imported + + + Outputs without source must have the /out option specified + + + Output directory could not be determined + + + Conflicting options specified: Win32 resource file; Win32 manifest + + + Conflicting options specified: Win32 resource file; Win32 icon + + + Error reading resource '{0}' -- '{1}' + + + Error writing to XML documentation file: {0} + + + XML comment has badly formed XML -- '{0}' + + + XML comment has badly formed XML + + + XML comment has a duplicate param tag for '{0}' + + + XML comment has a duplicate param tag + + + XML comment has a param tag for '{0}', but there is no parameter by that name + + + XML comment has a param tag, but there is no parameter by that name + + + XML comment on '{1}' has a paramref tag for '{0}', but there is no parameter by that name + + + XML comment has a paramref tag, but there is no parameter by that name + + + Parameter '{0}' has no matching param tag in the XML comment for '{1}' (but other parameters do) + + + Parameter has no matching param tag in the XML comment (but other parameters do) + + + XML comment has cref attribute '{0}' that could not be resolved + + + XML comment has cref attribute that could not be resolved + + + A stackalloc expression requires [] after type + + + The line number specified for #line directive is missing or invalid + + + Quoted file name, single-line comment or end-of-line expected + + + Quoted file name expected + + + #r is only allowed in scripts + + + foreach statement cannot operate on variables of type '{0}' because '{0}' does not contain a public instance or extension definition for '{1}' + + + Asynchronous foreach statement cannot operate on variables of type '{0}' because '{0}' does not contain a suitable public instance or extension definition for '{1}' + + + foreach statement cannot operate on variables of type '{0}' because '{0}' does not contain a public instance or extension definition for '{1}'. Did you mean 'await foreach' rather than 'foreach'? + + + Asynchronous foreach statement cannot operate on variables of type '{0}' because '{0}' does not contain a public instance or extension definition for '{1}'. Did you mean 'foreach' rather than 'await foreach'? + + + The body of an async-iterator method must contain a 'yield' statement. + + + The body of an async-iterator method must contain a 'yield' statement. Consider removing 'async' from the method declaration or adding a 'yield' statement. + + + A static local function cannot contain a reference to '{0}'. + + + A static local function cannot contain a reference to 'this' or 'base'. + + + Invalid type for parameter {0} in XML comment cref attribute: '{1}' + + + Invalid type for parameter in XML comment cref attribute + + + Invalid return type in XML comment cref attribute + + + Invalid return type in XML comment cref attribute + + + Error reading Win32 resources -- {0} + + + XML comment has syntactically incorrect cref attribute '{0}' + + + XML comment has syntactically incorrect cref attribute + + + Member modifier '{0}' must precede the member type and name + + + Array creation must have array size or array initializer + + + XML comment is not placed on a valid language element + + + XML comment is not placed on a valid language element + + + Unable to include XML fragment '{1}' of file '{0}' -- {2} + + + Unable to include XML fragment + + + Invalid XML include element -- {0} + + + Invalid XML include element + + + Missing XML comment for publicly visible type or member '{0}' + + + Missing XML comment for publicly visible type or member + + + The /doc compiler option was specified, but one or more constructs did not have comments. + + + Badly formed XML in included comments file -- '{0}' + + + Badly formed XML in included comments file + + + Delegate '{0}' does not take {1} arguments + + + Semicolon after method or accessor block is not valid + + + The return type of a method, delegate, or function pointer cannot be '{0}' + + + Compilation cancelled by user + + + Cannot make reference to variable of type '{0}' + + + Cannot assign to '{0}' because it is read-only + + + Cannot use '{0}' as a ref or out value because it is read-only + + + The RequiredAttribute attribute is not permitted on C# types + + + Modifiers cannot be placed on event accessor declarations + + + The params parameter cannot be declared as {0} + + + Cannot modify the return value of '{0}' because it is not a variable + + + The managed coclass wrapper class '{0}' for interface '{1}' cannot be found (are you missing an assembly reference?) + + + '{0}' is ambiguous between '{1}' and '{2}'. Either use '@{0}' or explicitly include the 'Attribute' suffix. + + + Argument {0} may not be passed with the '{1}' keyword + + + Option '{0}' overrides attribute '{1}' given in a source file or added module + + + Option overrides attribute given in a source file or added module + + + This warning occurs if the assembly attributes AssemblyKeyFileAttribute or AssemblyKeyNameAttribute found in source conflict with the /keyfile or /keycontainer command line option or key file name or key container specified in the Project Properties. + + + Invalid option '{0}' for /langversion. Use '/langversion:?' to list supported values. + + + Cannot create delegate with '{0}' because it or a method it overrides has a Conditional attribute + + + Cannot create temporary file -- {0} + + + Argument {0} must be passed with the '{1}' keyword + + + The yield statement cannot be used inside an anonymous method or lambda expression + + + Cannot return a value from an iterator. Use the yield return statement to return a value, or yield break to end the iteration. + + + Iterators cannot have ref, in or out parameters + + + The body of '{0}' cannot be an iterator block because '{1}' is not an iterator interface type + + + Cannot yield in the body of a finally clause + + + Method '{0}' with an iterator block must be 'async' to return '{1}' + + + Cannot yield a value in the body of a try block with a catch clause + + + Expression expected after yield return + + + Cannot use ref, out, or in parameter '{0}' inside an anonymous method, lambda expression, query expression, or local function + + + Unsafe code may not appear in iterators + + + Cannot yield a value in the body of a catch clause + + + Control cannot leave the body of an anonymous method or lambda expression + + + The suppression operator is not allowed in this context + + + Unrecognized #pragma directive + + + Unrecognized #pragma directive + + + Expected 'disable' or 'restore' + + + Expected 'disable' or 'restore' after #pragma warning + + + Cannot restore warning 'CS{0}' because it was disabled globally + + + Cannot restore warning because it was disabled globally + + + __arglist is not allowed in the parameter list of iterators + + + Iterators cannot have unsafe parameters or yield types + + + The managed coclass wrapper class signature '{0}' for interface '{1}' is not a valid class name signature + + + foreach statement cannot operate on variables of type '{0}' because it implements multiple instantiations of '{1}'; try casting to a specific interface instantiation + + + Asynchronous foreach statement cannot operate on variables of type '{0}' because it implements multiple instantiations of '{1}'; try casting to a specific interface instantiation + + + A fixed size buffer field must have the array size specifier after the field name + + + Fixed size buffer fields may only be members of structs + + + Not all code paths return a value in {0} of type '{1}' + + + Feature '{0}' is not part of the standardized ISO C# language specification, and may not be accepted by other compilers + + + Feature is not part of the standardized ISO C# language specification, and may not be accepted by other compilers + + + Keyword, identifier, or string expected after verbatim specifier: @ + + + A readonly field cannot be used as a ref or out value (except in a constructor) + + + Members of readonly field '{0}' cannot be used as a ref or out value (except in a constructor) + + + A readonly field cannot be assigned to (except in a constructor or init-only setter of the type in which the field is defined or a variable initializer) + + + Members of readonly field '{0}' cannot be modified (except in a constructor or a variable initializer) + + + Cannot use {0} '{1}' as a ref or out value because it is a readonly variable + + + Members of {0} '{1}' cannot be used as a ref or out value because it is a readonly variable + + + Cannot assign to {0} '{1}' or use it as the right hand side of a ref assignment because it is a readonly variable + + + Cannot assign to a member of {0} '{1}' or use it as the right hand side of a ref assignment because it is a readonly variable + + + Cannot return {0} '{1}' by writable reference because it is a readonly variable + + + Members of {0} '{1}' cannot be returned by writable reference because it is a readonly variable + + + Fields of static readonly field '{0}' cannot be assigned to (except in a static constructor or a variable initializer) + + + Fields of static readonly field '{0}' cannot be used as a ref or out value (except in a static constructor) + + + Cannot modify members of '{0}' because it is a '{1}' + + + Cannot use fields of '{0}' as a ref or out value because it is a '{1}' + + + Cannot assign to '{0}' because it is a '{1}' + + + Cannot use '{0}' as a ref or out value because it is a '{1}' + + + {0}. See also error CS{1}. + + + Warning is overriding an error + + + The compiler emits this warning when it overrides an error with a warning. For information about the problem, search for the error code mentioned. + + + Cannot convert {0} to type '{1}' because it is not a delegate type + + + Cannot convert {0} to type '{1}' because the parameter types do not match the delegate parameter types + + + Cannot convert {0} to type '{1}' because the return type does not match the delegate return type + + + Cannot convert {0} to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type + + + Since this is an async method, the return expression must be of type '{0}' rather than '{1}' + + + Cannot convert async {0} to delegate type '{1}'. An async {0} may return void, Task or Task<T>, none of which are convertible to '{1}'. + + + Fixed size buffer type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float or double + + + Fixed size buffer of length {0} and type '{1}' is too big + + + Fixed size buffers must have a length greater than zero + + + You cannot use fixed size buffers contained in unfixed expressions. Try using the fixed statement. + + + Attribute '{0}' is not valid on property or event accessors. It is only valid on '{1}' declarations. + + + Invalid search path '{0}' specified in '{1}' -- '{2}' + + + Invalid search path specified + + + __arglist is not valid in this context + + + params is not valid in this context + + + A namespace declaration cannot have modifiers or attributes + + + Invalid option '{0}' for /platform; must be anycpu, x86, Itanium, arm, arm64 or x64 + + + Anonymous methods, lambda expressions, query expressions, and local functions inside structs cannot access instance members of 'this'. Consider copying 'this' to a local variable outside the anonymous method, lambda expression, query expression, or local f ... + + + '{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. + + + '{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'? + + + '{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. + + + '{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'? + + + Parameter {0} must be declared with the '{1}' keyword + + + Parameter {0} should not be declared with the '{1}' keyword + + + Parameter {0} is declared as type '{1}{2}' but should be '{3}{4}' + + + Invalid extern alias for '/reference'; '{0}' is not a valid identifier + + + Invalid reference alias option: '{0}=' -- missing filename + + + You cannot redefine the global extern alias + + + Reference to type '{0}' claims it is defined in this assembly, but it is not defined in source or any added modules + + + Reference to type '{0}' claims it is defined in '{1}', but it could not be found + + + The predefined type '{0}' is defined in multiple assemblies in the global alias; using definition from '{1}' + + + Predefined type is defined in multiple assemblies in the global alias + + + This error occurs when a predefined system type such as System.Int32 is found in two assemblies. One way this can happen is if you are referencing mscorlib or System.Runtime.dll from two different places, such as trying to run two versions of the .NET Fram ... + + + Local '{0}' or its members cannot have their address taken and be used inside an anonymous method or lambda expression + + + Source file has exceeded the limit of 16,707,565 lines representable in the PDB; debug information will be incorrect + + + Source file has exceeded the limit of 16,707,565 lines representable in the PDB; debug information will be incorrect + + + Cannot convert anonymous method block without a parameter list to delegate type '{0}' because it has one or more out parameters + + + Attribute '{0}' is only valid on methods or attribute classes + + + Accessing a member on '{0}' may cause a runtime exception because it is a field of a marshal-by-reference class + + + Accessing a member on a field of a marshal-by-reference class may cause a runtime exception + + + This warning occurs when you try to call a method, property, or indexer on a member of a class that derives from MarshalByRefObject, and the member is a value type. Objects that inherit from MarshalByRefObject are typically intended to be marshaled by refe ... + + + '{0}' is not a valid warning number + + + Not a valid warning number + + + A number that was passed to the #pragma warning preprocessor directive was not a valid warning number. Verify that the number represents a warning, not an error. + + + Invalid number + + + Invalid number + + + Invalid filename specified for preprocessor directive. Filename is too long or not a valid filename. + + + Invalid filename specified for preprocessor directive + + + Invalid #pragma checksum syntax; should be #pragma checksum "filename" "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" "XXXX..." + + + Invalid #pragma checksum syntax + + + Single-line comment or end-of-line expected + + + Single-line comment or end-of-line expected after #pragma directive + + + Different checksum values given for '{0}' + + + Different #pragma checksum values given + + + Assembly reference '{0}' is invalid and cannot be resolved + + + Assembly reference is invalid and cannot be resolved + + + This warning indicates that an attribute, such as InternalsVisibleToAttribute, was not specified correctly. + + + Assuming assembly reference '{0}' used by '{1}' matches identity '{2}' of '{3}', you may need to supply runtime policy + + + Assuming assembly reference matches identity + + + The two assemblies differ in release and/or version number. For unification to occur, you must specify directives in the application's .config file, and you must provide the correct strong name of an assembly. + + + Assuming assembly reference '{0}' used by '{1}' matches identity '{2}' of '{3}', you may need to supply runtime policy + + + Assuming assembly reference matches identity + + + The two assemblies differ in release and/or version number. For unification to occur, you must specify directives in the application's .config file, and you must provide the correct strong name of an assembly. + + + Multiple assemblies with equivalent identity have been imported: '{0}' and '{1}'. Remove one of the duplicate references. + + + An assembly with the same simple name '{0}' has already been imported. Try removing one of the references (e.g. '{1}') or sign them to enable side-by-side. + + + Assembly '{0}' with identity '{1}' uses '{2}' which has a higher version than referenced assembly '{3}' with identity '{4}' + + + Fixed size buffers can only be accessed through locals or fields + + + XML comment has a duplicate typeparam tag for '{0}' + + + XML comment has a duplicate typeparam tag + + + XML comment has a typeparam tag for '{0}', but there is no type parameter by that name + + + XML comment has a typeparam tag, but there is no type parameter by that name + + + XML comment on '{1}' has a typeparamref tag for '{0}', but there is no type parameter by that name + + + XML comment has a typeparamref tag, but there is no type parameter by that name + + + Type parameter '{0}' has no matching typeparam tag in the XML comment on '{1}' (but other type parameters do) + + + Type parameter has no matching typeparam tag in the XML comment (but other type parameters do) + + + '{0}': type must be '{2}' to match overridden member '{1}' + + + Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the 'fixed' field modifier instead. + + + Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute on a property + + + Assignment made to same variable; did you mean to assign something else? + + + Assignment made to same variable + + + Comparison made to same variable; did you mean to compare something else? + + + Comparison made to same variable + + + Error opening Win32 resource file '{0}' -- '{1}' + + + Expression will always cause a System.NullReferenceException because the default value of '{0}' is null + + + Expression will always cause a System.NullReferenceException because the type's default value is null + + + Class '{0}' cannot have multiple base classes: '{1}' and '{2}' + + + Base class '{0}' must come before any interfaces + + + XML comment has cref attribute '{0}' that refers to a type parameter + + + XML comment has cref attribute that refers to a type parameter + + + Friend assembly reference '{0}' is invalid. InternalsVisibleTo declarations cannot have a version, culture, public key token, or processor architecture specified. + + + Friend assembly reference '{0}' is invalid. Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations. + + + Cannot bind delegate to '{0}' because it is a member of 'System.Nullable<T>' + + + '{0}' does not contain a constructor that takes {1} arguments + + + Assembly and module attributes must precede all other elements defined in a file except using clauses and extern alias declarations + + + Expected expression + + + Invalid version {0} for /subsystemversion. The version must be 6.02 or greater for ARM or AppContainerExe, and 4.00 or greater otherwise + + + Embedded interop method '{0}' contains a body. + + + Warning level must be zero or greater + + + Invalid option '{0}' for /debug; must be 'portable', 'embedded', 'full' or 'pdbonly' + + + Invalid option '{0}'; Resource visibility must be either 'public' or 'private' + + + The type of the argument to the DefaultParameterValue attribute must match the parameter type + + + Argument of type '{0}' is not applicable for the DefaultParameterValue attribute + + + Duplicate initialization of member '{0}' + + + Member '{0}' cannot be initialized. It is not a field or property. + + + Static field or property '{0}' cannot be assigned in an object initializer + + + Members of readonly field '{0}' of type '{1}' cannot be assigned with an object initializer because it is of a value type + + + Members of property '{0}' of type '{1}' cannot be assigned with an object initializer because it is of a value type + + + Unsafe type '{0}' cannot be used in object creation + + + Element initializer cannot be empty + + + The best overloaded method match for '{0}' has wrong signature for the initializer element. The initializable Add must be an accessible instance method. + + + Cannot initialize type '{0}' with a collection initializer because it does not implement 'System.Collections.IEnumerable' + + + Error reading Win32 manifest file '{0}' -- '{1}' + + + Ignoring /win32manifest for module because it only applies to assemblies + + + Ignoring /win32manifest for module because it only applies to assemblies + + + '{0}' does not contain a definition for '{1}' and the best extension method overload '{2}' requires a receiver of type '{3}' + + + The range variable '{0}' has already been declared + + + The range variable '{0}' conflicts with a previous declaration of '{0}' + + + Cannot assign {0} to a range variable + + + Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Consider explicitly specifying the type of the range variable '{2}'. + + + Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'? + + + Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. + + + The name '{0}' is not in scope on the left side of 'equals'. Consider swapping the expressions on either side of 'equals'. + + + The name '{0}' is not in scope on the right side of 'equals'. Consider swapping the expressions on either side of 'equals'. + + + Cannot pass the range variable '{0}' as an out or ref parameter + + + Multiple implementations of the query pattern were found for source type '{0}'. Ambiguous call to '{1}'. + + + The type of one of the expressions in the {0} clause is incorrect. Type inference failed in the call to '{1}'. + + + The type of the expression in the {0} clause is incorrect. Type inference failed in the call to '{1}'. + + + An expression of type '{0}' is not allowed in a subsequent from clause in a query expression with source type '{1}'. Type inference failed in the call to '{2}'. + + + An expression tree may not contain an unsafe pointer operation + + + An expression tree may not contain an anonymous method expression + + + An anonymous method expression cannot be converted to an expression tree + + + Range variable '{0}' cannot be assigned to -- it is read only + + + The range variable '{0}' cannot have the same name as a method type parameter + + + The contextual keyword 'var' cannot be used in a range variable declaration + + + The best overloaded Add method '{0}' for the collection initializer has some invalid arguments + + + An expression tree lambda may not contain a ref, in or out parameter + + + An expression tree lambda may not contain a method with variable arguments + + + An expression tree lambda may not contain a method group + + + The best overloaded method match '{0}' for the collection initializer element cannot be used. Collection initializer 'Add' methods cannot have ref or out parameters. + + + Non-invocable member '{0}' cannot be used like a method. + + + Member '{0}' implements interface member '{1}' in type '{2}'. There are multiple matches for the interface member at run-time. It is implementation dependent which method will be called. + + + Member implements interface member with multiple matches at run-time + + + This warning can be generated when two interface methods are differentiated only by whether a particular parameter is marked with ref or with out. It is best to change your code to avoid this warning because it is not obvious or guaranteed which method is ... + + + Member '{1}' overrides '{0}'. There are multiple override candidates at run-time. It is implementation dependent which method will be called. Please use a newer runtime. + + + Member overrides base member with multiple override candidates at run-time + + + Object and collection initializer expressions may not be applied to a delegate creation expression + + + '{0}' is of type '{1}'. The type specified in a constant declaration must be sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, bool, string, an enum-type, or a reference-type. + + + Source file '{0}' could not be found. + + + Source file '{0}' specified multiple times + + + Source file specified multiple times + + + Missing file specification for '{0}' option + + + Command-line syntax error: Missing '{0}' for '{1}' option + + + Unrecognized option: '{0}' + + + No source files specified. + + + No source files specified + + + Expected a script (.csx file) but none specified + + + Error opening response file '{0}' + + + Cannot open '{0}' for writing -- '{1}' + + + Invalid image base number '{0}' + + + '{0}' is a binary file instead of a text file + + + Code page '{0}' is invalid or not installed + + + Algorithm '{0}' is not supported + + + Cannot specify /main if building a module or library + + + Invalid target type for /target: must specify 'exe', 'winexe', 'library', or 'module' + + + File name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + + + Ignoring /noconfig option because it was specified in a response file + + + Ignoring /noconfig option because it was specified in a response file + + + Invalid file section alignment '{0}' + + + Invalid output name: {0} + + + Invalid debug information format: {0} + + + 'id#' syntax is no longer supported. Use '$id' instead. + + + Invalid name for a preprocessing symbol; '{0}' is not a valid identifier + + + Invalid name for a preprocessing symbol; not a valid identifier + + + Cannot create short filename '{0}' when a long filename with the same short filename already exists + + + A /reference option that declares an extern alias can only have one filename. To specify multiple aliases or filenames, use multiple /reference options. + + + Command-line syntax error: Missing ':<number>' for '{0}' option + + + The /pdb option requires that the /debug option also be used + + + An expression tree lambda may not contain a COM call with ref omitted on arguments + + + Command-line syntax error: Invalid Guid format '{0}' for option '{1}' + + + Command-line syntax error: Missing Guid for option '{1}' + + + Methods with variable arguments are not CLS-compliant + + + Methods with variable arguments are not CLS-compliant + + + Argument type '{0}' is not CLS-compliant + + + Argument type is not CLS-compliant + + + Return type of '{0}' is not CLS-compliant + + + Return type is not CLS-compliant + + + Type of '{0}' is not CLS-compliant + + + Type is not CLS-compliant + + + A public, protected, or protected internal variable must be of a type that is compliant with the Common Language Specification (CLS). + + + Identifier '{0}' differing only in case is not CLS-compliant + + + Identifier differing only in case is not CLS-compliant + + + Overloaded method '{0}' differing only in ref or out, or in array rank, is not CLS-compliant + + + Overloaded method differing only in ref or out, or in array rank, is not CLS-compliant + + + Overloaded method '{0}' differing only by unnamed array types is not CLS-compliant + + + Overloaded method differing only by unnamed array types is not CLS-compliant + + + This error occurs if you have an overloaded method that takes a jagged array and the only difference between the method signatures is the element type of the array. To avoid this error, consider using a rectangular array rather than a jagged array; use an ... + + + Identifier '{0}' is not CLS-compliant + + + Identifier is not CLS-compliant + + + '{0}': base type '{1}' is not CLS-compliant + + + Base type is not CLS-compliant + + + A base type was marked as not having to be compliant with the Common Language Specification (CLS) in an assembly that was marked as being CLS compliant. Either remove the attribute that specifies the assembly is CLS compliant or remove the attribute that i ... + + + '{0}': CLS-compliant interfaces must have only CLS-compliant members + + + CLS-compliant interfaces must have only CLS-compliant members + + + '{0}': only CLS-compliant members can be abstract + + + Only CLS-compliant members can be abstract + + + You must specify the CLSCompliant attribute on the assembly, not the module, to enable CLS compliance checking + + + You must specify the CLSCompliant attribute on the assembly, not the module, to enable CLS compliance checking + + + Added modules must be marked with the CLSCompliant attribute to match the assembly + + + Added modules must be marked with the CLSCompliant attribute to match the assembly + + + '{0}' cannot be marked as CLS-compliant because the assembly does not have a CLSCompliant attribute + + + Type or member cannot be marked as CLS-compliant because the assembly does not have a CLSCompliant attribute + + + '{0}' has no accessible constructors which use only CLS-compliant types + + + Type has no accessible constructors which use only CLS-compliant types + + + Arrays as attribute arguments is not CLS-compliant + + + Arrays as attribute arguments is not CLS-compliant + + + You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly + + + You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly + + + '{0}' cannot be marked as CLS-compliant because it is a member of non-CLS-compliant type '{1}' + + + Type cannot be marked as CLS-compliant because it is a member of non-CLS-compliant type + + + CLS compliance checking will not be performed on '{0}' because it is not visible from outside this assembly + + + CLS compliance checking will not be performed because it is not visible from outside this assembly + + + '{0}' does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute + + + Type or member does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute + + + CLSCompliant attribute has no meaning when applied to parameters. Try putting it on the method instead. + + + CLSCompliant attribute has no meaning when applied to parameters + + + CLSCompliant attribute has no meaning when applied to return types. Try putting it on the method instead. + + + CLSCompliant attribute has no meaning when applied to return types + + + Constraint type '{0}' is not CLS-compliant + + + Constraint type is not CLS-compliant + + + CLS-compliant field '{0}' cannot be volatile + + + CLS-compliant field cannot be volatile + + + '{0}' is not CLS-compliant because base interface '{1}' is not CLS-compliant + + + Type is not CLS-compliant because base interface is not CLS-compliant + + + 'await' requires that the type {0} have a suitable 'GetAwaiter' method + + + Cannot await '{0}' + + + 'await' requires that the return type '{0}' of '{1}.GetAwaiter()' have suitable 'IsCompleted', 'OnCompleted', and 'GetResult' members, and implement 'INotifyCompletion' or 'ICriticalNotifyCompletion' + + + 'await' requires that the type '{0}' have a suitable 'GetAwaiter' method. Are you missing a using directive for 'System'? + + + Cannot await 'void' + + + 'await' cannot be used as an identifier within an async method or lambda expression + + + '{0}' does not implement '{1}' + + + Since '{0}' is an async method that returns '{1}', a return keyword must not be followed by an object expression + + + The return type of an async method must be void, Task, Task<T>, a task-like type, IAsyncEnumerable<T>, or IAsyncEnumerator<T> + + + A generic task-like return type was expected, but the type '{0}' found in 'AsyncMethodBuilder' attribute was not suitable. It must be an unbound generic type of arity one, and its containing type (if any) must be non-generic. + + + Cannot return an expression of type 'void' + + + __arglist is not allowed in the parameter list of async methods + + + 'await' cannot be used in an expression containing the type '{0}' + + + Async methods cannot have unsafe parameters or return types + + + Async methods cannot have ref, in or out parameters + + + The 'await' operator can only be used when contained within a method or lambda expression marked with the 'async' modifier + + + The 'await' operator can only be used within an async {0}. Consider marking this {0} with the 'async' modifier. + + + The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<{0}>'. + + + The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'. + + + Cannot await in the body of a finally clause + + + Cannot await in a catch clause + + + Cannot await in the filter expression of a catch clause + + + Cannot await in the body of a lock statement + + + The 'await' operator cannot be used in a static script variable initializer. + + + Cannot await in an unsafe context + + + The 'async' modifier can only be used in methods that have a body. + + + Parameters or locals of type '{0}' cannot be declared in async methods or async lambda expressions. + + + foreach statement cannot operate on enumerators of type '{0}' in async or iterator methods because '{0}' is a ref struct. + + + Security attribute '{0}' cannot be applied to an Async method. + + + Async methods are not allowed in an Interface, Class, or Structure which has the 'SecurityCritical' or 'SecuritySafeCritical' attribute. + + + The 'await' operator may only be used in a query expression within the first collection expression of the initial 'from' clause or within the collection expression of a 'join' clause + + + This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. + + + Async method lacks 'await' operators and will run synchronously + + + Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. + + + Because this call is not awaited, execution of the current method continues before the call is completed + + + The current method calls an async method that returns a Task or a Task<TResult> and doesn't apply the await operator to the result. The call to the async method starts an asynchronous task. However, because no await operator is applied, the program continu ... + + + 'MethodImplOptions.Synchronized' cannot be applied to an async method + + + CallerLineNumberAttribute cannot be applied because there are no standard conversions from type '{0}' to type '{1}' + + + CallerFilePathAttribute cannot be applied because there are no standard conversions from type '{0}' to type '{1}' + + + CallerMemberNameAttribute cannot be applied because there are no standard conversions from type '{0}' to type '{1}' + + + The CallerLineNumberAttribute may only be applied to parameters with default values + + + The CallerFilePathAttribute may only be applied to parameters with default values + + + The CallerMemberNameAttribute may only be applied to parameters with default values + + + The CallerLineNumberAttribute applied to parameter '{0}' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerLineNumberAttribute will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerFilePathAttribute applied to parameter '{0}' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerFilePathAttribute will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerMemberNameAttribute will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + Program does not contain a static 'Main' method suitable for an entry point + + + An array initializer of length '{0}' is expected + + + A nested array initializer is expected + + + Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. + + + Unexpected use of an aliased name + + + Unexpected use of a generic name + + + Unexpected use of an unbound generic name + + + Expressions and statements can only occur in a method body + + + An array access may not have a named argument specifier + + + This language feature ('{0}') is not yet implemented. + + + Default values are not valid in this context. + + + Error opening icon file {0} -- {1} + + + Error opening Win32 manifest file {0} -- {1} + + + Error building Win32 resources -- {0} + + + Optional parameters must appear after all required parameters + + + Cannot inherit interface '{0}' with the specified type parameters because it causes method '{1}' to contain overloads which differ only on ref and out + + + Partial declarations of '{0}' must have the same type parameter names and variance modifiers in the same order + + + Invalid variance: The type parameter '{1}' must be {3} valid on '{0}'. '{1}' is {2}. + + + Invalid variance: The type parameter '{1}' must be {3} valid on '{0}' unless language version '{4}' or greater is used. '{1}' is {2}. + + + '{0}': cannot derive from the dynamic type + + + '{0}': cannot implement a dynamic interface '{1}' + + + Constraint cannot be the dynamic type + + + Constraint cannot be a dynamic type '{0}' + + + One or more types required to compile a dynamic expression cannot be found. Are you missing a reference? + + + Name '{0}' exceeds the maximum length allowed in metadata. + + + Attributes are not valid in this context. + + + Attributes on lambda expressions require a parenthesized parameter list. + + + 'extern alias' is not valid in this context + + + Using '{0}' to test compatibility with '{1}' is essentially identical to testing compatibility with '{2}' and will succeed for all non-null values + + + Using 'is' to test compatibility with 'dynamic' is essentially identical to testing compatibility with 'Object' + + + Cannot use 'yield' in top-level script code + + + Cannot declare namespace in script code + + + Assembly and module attributes are not allowed in this context + + + Delegate '{0}' has no invoke method or an invoke method with a return type or parameter types that are not supported. + + + The entry point of the program is global code; ignoring '{0}' entry point. + + + The entry point of the program is global code; ignoring entry point + + + The second operand of an 'is' or 'as' operator may not be static type '{0}' + + + The second operand of an 'is' or 'as' operator may not be a static type + + + Inconsistent accessibility: event type '{1}' is less accessible than event '{0}' + + + Named argument specifications must appear after all fixed arguments have been specified. Please use language version {0} or greater to allow non-trailing named arguments. + + + Named argument specifications must appear after all fixed arguments have been specified in a dynamic invocation. + + + The best overload for '{0}' does not have a parameter named '{1}' + + + The delegate '{0}' does not have a parameter named '{1}' + + + Named argument '{0}' cannot be specified multiple times + + + Named argument '{0}' specifies a parameter for which a positional argument has already been given + + + Named argument '{0}' is used out-of-position but is followed by an unnamed argument + + + Cannot specify default parameter value in conjunction with DefaultParameterAttribute or OptionalAttribute + + + Default parameter value for '{0}' must be a compile-time constant + + + A ref or out parameter cannot have a default value + + + Cannot specify a default value for the 'this' parameter + + + Cannot specify a default value for a parameter array + + + A value of type '{0}' cannot be used as a default parameter because there are no standard conversions to type '{1}' + + + A value of type '{0}' cannot be used as default parameter for nullable parameter '{1}' because '{0}' is not a simple type + + + '{0}' is of type '{1}'. A default parameter value of a reference type other than string can only be initialized with null + + + The default value specified for parameter '{0}' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The default value specified will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + Error signing output with public key from file '{0}' -- {1} + + + Error signing output with public key from container '{0}' -- {1} + + + The typeof operator cannot be used on the dynamic type + + + The typeof operator cannot be used on a nullable reference type + + + An expression tree may not contain a dynamic operation + + + Async lambda expressions cannot be converted to expression trees + + + Cannot define a class or member that utilizes 'dynamic' because the compiler required type '{0}' cannot be found. Are you missing a reference? + + + Cannot pass null for friend assembly name + + + Key file '{0}' is missing the private key needed for signing + + + Public signing was specified and requires a public key, but no public key was specified. + + + Public signing is not supported for netmodules. + + + Delay signing was specified and requires a public key, but no public key was specified + + + Delay signing was specified and requires a public key, but no public key was specified + + + The specified version string does not conform to the required format - major[.minor[.build[.revision]]] + + + The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation + + + The specified version string does not conform to the required format - major.minor.build.revision (without wildcards) + + + The specified version string does not conform to the recommended format - major.minor.build.revision + + + The specified version string does not conform to the recommended format - major.minor.build.revision + + + Executables cannot be satellite assemblies; culture should always be empty + + + There is no argument given that corresponds to the required parameter '{0}' of '{1}' + + + The command line switch '{0}' is not yet implemented and was ignored. + + + Command line switch is not yet implemented + + + Failed to emit module '{0}': {1} + + + Cannot use fixed local '{0}' inside an anonymous method, lambda expression, or query expression + + + An expression tree may not contain a named argument specification + + + An expression tree may not contain a call or invocation that uses optional arguments + + + An expression tree may not contain an indexed property + + + Indexed property '{0}' has non-optional arguments which must be provided + + + Indexed property '{0}' must have all arguments optional + + + Instance of type '{0}' cannot be used inside a nested function, query expression, iterator block or async method + + + First argument to a security attribute must be a valid SecurityAction + + + Security attribute '{0}' has an invalid SecurityAction value '{1}' + + + SecurityAction value '{0}' is invalid for security attributes applied to an assembly + + + SecurityAction value '{0}' is invalid for security attributes applied to a type or a method + + + SecurityAction value '{0}' is invalid for PrincipalPermission attribute + + + An expression tree may not contain '{0}' + + + Unable to resolve file path '{0}' specified for the named argument '{1}' for PermissionSet attribute + + + Error reading file '{0}' specified for the named argument '{1}' for PermissionSet attribute: '{2}' + + + The type name '{0}' could not be found in the global namespace. This type has been forwarded to assembly '{1}' Consider adding a reference to that assembly. + + + The type name '{0}' could not be found in the namespace '{1}'. This type has been forwarded to assembly '{2}' Consider adding a reference to that assembly. + + + The type name '{0}' could not be found. This type has been forwarded to assembly '{1}'. Consider adding a reference to that assembly. + + + Assemblies '{0}' and '{1}' refer to the same metadata but only one is a linked reference (specified using /link option); consider removing one of the references. + + + The best overloaded Add method '{0}' for the collection initializer element is obsolete. + + + The best overloaded Add method for the collection initializer element is obsolete + + + The best overloaded Add method '{0}' for the collection initializer element is obsolete. {1} + + + The best overloaded Add method for the collection initializer element is obsolete + + + The best overloaded Add method '{0}' for the collection initializer element is obsolete. {1} + + + Security attribute '{0}' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations. + + + Cannot use an expression of type '{0}' as an argument to a dynamically dispatched operation. + + + Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type. + + + Cannot use a method group as an argument to a dynamically dispatched operation. Did you intend to invoke the method? + + + The call to method '{0}' needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access. + + + Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed + + + The indexer access needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access. + + + The dynamically dispatched call to method '{0}' may fail at runtime because one or more applicable overloads are conditional methods. + + + Dynamically dispatched call may fail at runtime because one or more applicable overloads are conditional methods + + + '{0}' has no applicable method named '{1}' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax. + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + + + The CallerMemberNameAttribute will have no effect; it is overridden by the CallerFilePathAttribute + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerLineNumberAttribute. + + + The CallerMemberNameAttribute will have no effect; it is overridden by the CallerLineNumberAttribute + + + The CallerFilePathAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerLineNumberAttribute. + + + The CallerFilePathAttribute will have no effect; it is overridden by the CallerLineNumberAttribute + + + Expression must be implicitly convertible to Boolean or its type '{0}' must define operator '{1}'. + + + '{0}' cannot implement '{1}' because '{2}' is a Windows Runtime event and '{3}' is a regular .NET event. + + + Call System.IDisposable.Dispose() on allocated instance of {0} before all references to it are out of scope. + + + Call System.IDisposable.Dispose() on allocated instance before all references to it are out of scope + + + Allocated instance of {0} is not disposed along all exception paths. Call System.IDisposable.Dispose() before all references to it are out of scope. + + + Allocated instance is not disposed along all exception paths + + + Object '{0}' can be disposed more than once. + + + Object can be disposed more than once + + + Interop type '{0}' cannot be embedded. Use the applicable interface instead. + + + Type '{0}' cannot be embedded because it is a nested type. Consider setting the 'Embed Interop Types' property to false. + + + Type '{0}' cannot be embedded because it has a generic argument. Consider setting the 'Embed Interop Types' property to false. + + + Embedded interop struct '{0}' can contain only public instance fields. + + + A Windows Runtime event may not be passed as an out or ref parameter. + + + Source interface '{0}' is missing method '{1}' which is required to embed event '{2}'. + + + Interface '{0}' has an invalid source interface which is required to embed event '{1}'. + + + Interop type '{0}' cannot be embedded because it is missing the required '{1}' attribute. + + + Cannot embed interop types from assembly '{0}' because it is missing the '{1}' attribute. + + + Cannot embed interop types from assembly '{0}' because it is missing either the '{1}' attribute or the '{2}' attribute. + + + Cannot embed interop type '{0}' found in both assembly '{1}' and '{2}'. Consider setting the 'Embed Interop Types' property to false. + + + Embedding the interop type '{0}' from assembly '{1}' causes a name clash in the current assembly. Consider setting the 'Embed Interop Types' property to false. + + + A reference was created to embedded interop assembly '{0}' because of an indirect reference to that assembly created by assembly '{1}'. Consider changing the 'Embed Interop Types' property on either assembly. + + + A reference was created to embedded interop assembly because of an indirect assembly reference + + + You have added a reference to an assembly using /link (Embed Interop Types property set to True). This instructs the compiler to embed interop type information from that assembly. However, the compiler cannot embed interop type information from that assemb ... + + + Type '{0}' from assembly '{1}' cannot be used across assembly boundaries because it has a generic type argument that is an embedded interop type. + + + Cannot find the interop type that matches the embedded interop type '{0}'. Are you missing an assembly reference? + + + Module name '{0}' stored in '{1}' must match its filename. + + + Invalid module name: {0} + + + Invalid '{0}' value: '{1}'. + + + AppConfigPath must be absolute. + + + Attribute '{0}' from module '{1}' will be ignored in favor of the instance appearing in source + + + Attribute will be ignored in favor of the instance appearing in source + + + Attribute '{0}' given in a source file conflicts with option '{1}'. + + + A fixed buffer may only have one dimension. + + + Referenced assembly '{0}' does not have a strong name. + + + Referenced assembly does not have a strong name + + + Invalid signature public key specified in AssemblySignatureKeyAttribute. + + + Type '{0}' exported from module '{1}' conflicts with type declared in primary module of this assembly. + + + Type '{0}' exported from module '{1}' conflicts with type '{2}' exported from module '{3}'. + + + Forwarded type '{0}' conflicts with type declared in primary module of this assembly. + + + Type '{0}' forwarded to assembly '{1}' conflicts with type '{2}' forwarded to assembly '{3}'. + + + Type '{0}' forwarded to assembly '{1}' conflicts with type '{2}' exported from module '{3}'. + + + Referenced assembly '{0}' has different culture setting of '{1}'. + + + Referenced assembly has different culture setting + + + Agnostic assembly cannot have a processor specific module '{0}'. + + + Assembly and module '{0}' cannot target different processors. + + + Referenced assembly '{0}' targets a different processor. + + + Referenced assembly targets a different processor + + + Cryptographic failure while creating hashes. + + + Reference to '{0}' netmodule missing. + + + Module '{0}' is already defined in this assembly. Each module must have a unique filename. + + + Cannot read config file '{0}' -- '{1}' + + + Cannot continue since the edit includes a reference to an embedded type: '{0}'. + + + Member '{0}' added during the current debug session can only be accessed from within its declaring assembly '{1}'. + + + Compilation options '{0}' and '{1}' can't both be specified at the same time. + + + Linked netmodule metadata must provide a full PE image: '{0}'. + + + /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe + + + <path list> + + + <text> + + + null propagating operator + + + expression-bodied method + + + expression-bodied property + + + expression-bodied indexer + + + auto property initializer + + + <namespace> + + + byref locals and returns + + + readonly references + + + ref structs + + + ref conditional expression + + + ref reassignment + + + ref for-loop variables + + + ref foreach iteration variables + + + extensible fixed statement + + + Compilation (C#): + + + Syntax node is not within syntax tree + + + Location must be provided in order to provide minimal type qualification. + + + SyntaxTreeSemanticModel must be provided in order to provide minimal type qualification. + + + Can't reference compilation of type '{0}' from {1} compilation. + + + Syntax tree already present + + + Submission can only include script code. + + + Submission can have at most one syntax tree. + + + SyntaxTree is not part of the compilation, so it cannot be removed + + + tree must have a root node with SyntaxKind.CompilationUnit + + + Type argument cannot be null + + + Wrong number of type arguments + + + Name conflict for name {0} + + + LookupOptions has an invalid combination of options + + + items: must be non-empty + + + Use Microsoft.CodeAnalysis.CSharp.SyntaxFactory.Identifier or Microsoft.CodeAnalysis.CSharp.SyntaxFactory.VerbatimIdentifier to create identifier tokens. + + + Use Microsoft.CodeAnalysis.CSharp.SyntaxFactory.Literal to create character literal tokens. + + + Use Microsoft.CodeAnalysis.CSharp.SyntaxFactory.Literal to create numeric literal tokens. + + + This method can only be used to create tokens - {0} is not a token kind. + + + Generic parameter is definition when expected to be reference {0} + + + Called GetDeclarationName for a declaration node that can possibly contain multiple variable declarators. + + + Position is not within syntax tree with full span {0} + + + The language name '{0}' is invalid. + + + The language name is invalid + + + Transparent identifier member access failed for field '{0}' of '{1}'. Does the data being queried implement the query pattern? + + + The parameter has multiple distinct default values. + + + The field has multiple distinct constant values. + + + Within cref attributes, nested types of generic types should be qualified. + + + Within cref attributes, nested types of generic types should be qualified + + + Not a C# symbol. + + + Unnecessary using directive. + + + Unused extern alias. + + + Elements cannot be null. + + + LIB environment variable + + + /LIB option + + + /REFERENCEPATH option + + + directory does not exist + + + path is too long or invalid + + + No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options. + + + No value for RuntimeMetadataVersion found + + + Expected a {0} SemanticModel. + + + lambda expression + + + Feature '{0}' is not available in C# 1. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 2. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 3. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 4. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 5. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 6. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 7.0. Please use language version {1} or greater. + + + Feature '{0}' is experimental and unsupported; use '/features:{1}' to enable. + + + 'experimental' + + + Position must be within span of the syntax tree. + + + Syntax node to be speculated cannot belong to a syntax tree from the current compilation. + + + Chaining speculative semantic model is not supported. You should create a speculative model from the non-speculative ParentModel. + + + Microsoft (R) Visual C# Compiler + + + {0} version {1} + + + Copyright (C) Microsoft Corporation. All rights reserved. + + + Supported language versions: + + + Visual C# Compiler Options + + - OUTPUT FILES - + -out:<file> Specify output file name (default: base name of + file with main class or first file) + -target:exe Build a consol ... + + + '{0}': a class with the ComImport attribute cannot specify field initializers. + + + Local name '{0}' is too long for PDB. Consider shortening or compiling without /debug. + + + Local name is too long for PDB + + + Anonymous function converted to a void returning delegate cannot return a value + + + Async lambda expression converted to a '{0}' returning delegate cannot return a value + + + An instance of analyzer {0} cannot be created from {1} : {2}. + + + An analyzer instance cannot be created + + + The assembly {0} does not contain any analyzers. + + + Assembly does not contain any analyzers + + + Unable to load Analyzer assembly {0} : {1} + + + Unable to load Analyzer assembly + + + Skipping some types in analyzer assembly {0} due to a ReflectionTypeLoadException : {1}. + + + Error reading ruleset file {0} - {1} + + + Error reading debug information for '{0}' + + + Operation caused a stack overflow. + + + Expected identifier or numeric literal. + + + Expected identifier or numeric literal + + + Only auto-implemented properties can have initializers. + + + Instance properties in interfaces cannot have initializers. + + + Auto-implemented properties must have get accessors. + + + Auto-implemented properties must override all accessors of the overridden property. + + + Structs without explicit constructors cannot contain members with initializers. + + + Cannot emit debug information for a source text without encoding. + + + Block bodies and expression bodies cannot both be provided. + + + Control cannot fall out of switch from final case label ('{0}') + + + Type arguments are not allowed in the nameof operator. + + + An expression tree lambda may not contain a null propagating operator. + + + An expression tree lambda may not contain a dictionary initializer. + + + An extension Add method is not supported for a collection initializer in an expression lambda. + + + nameof operator + + + dictionary initializer + + + Missing close delimiter '}' for interpolated expression started with '{'. + + + A single-line comment may not be used in an interpolated string. + + + An expression is too long or complex to compile + + + Expression does not have a name. + + + Sub-expression cannot be used in an argument to nameof. + + + An alias-qualified name is not an expression. + + + Type parameters are not allowed on a method group as an argument to 'nameof'. + + + SearchCriteria is expected. + + + Assembly culture strings may not contain embedded NUL characters. + + + using static + + + interpolated strings + + + alternative interpolated verbatim strings + + + await in catch blocks and finally blocks + + + binary literals + + + digit separators + + + local functions + + + A '{0}' character must be escaped (by doubling) in an interpolated string. + + + A '{0}' character may only be escaped by doubling '{0}{0}' in an interpolated string. + + + A format specifier may not contain trailing whitespace. + + + Empty format specifier. + + + There is an error in a referenced assembly '{0}'. + + + Expression or declaration statement expected. + + + Extension method groups are not allowed as an argument to 'nameof'. + + + Alignment value {0} has a magnitude greater than {1} and may result in a large formatted string. + + + Unused extern alias + + + Unnecessary using directive + + + Skip loading types in analyzer assembly that fail due to a ReflectionTypeLoadException + + + Alignment value has a magnitude that may result in a large formatted string + + + Length of String constant resulting from concatenation exceeds System.Int32.MaxValue. Try splitting the string into multiple constants. + + + Tuple must contain at least two elements. + + + Debug entry point must be a definition of a method declared in the current compilation. + + + #load is only allowed in scripts + + + Cannot use #load after first token in file + + + Could not find file. + + + SyntaxTree resulted from a #load directive and cannot be removed or replaced directly. + + + Source file references are not supported. + + + The pathmap option was incorrectly formatted. + + + Invalid real literal. + + + Auto-implemented properties cannot return by reference + + + Properties which return by reference must have a get accessor + + + Properties which return by reference cannot have set accessors + + + '{0}' must match by reference return of overridden member '{1}' + + + '{0}' must match by init-only of overridden member '{1}' + + + By-reference returns may only be used in methods that return by reference + + + By-value returns may only be used in methods that return by value + + + The return expression must be of type '{0}' because this method returns by reference + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implement '{1}' because it does not have matching return by reference. + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implement '{1}'. + + + The body of '{0}' cannot be an iterator block because '{0}' returns by reference + + + Lambda expressions that return by reference cannot be converted to expression trees + + + An expression tree lambda may not contain a call to a method, property, or indexer that returns by reference + + + An expression cannot be used in this context because it may not be passed or returned by reference + + + Cannot return '{0}' by reference because it was initialized to a value that cannot be returned by reference + + + Cannot return by reference a member of '{0}' because it was initialized to a value that cannot be returned by reference + + + Local '{0}' is returned by reference but was initialized to a value that cannot be returned by reference + + + Local is returned by reference but was initialized to a value that cannot be returned by reference + + + A member of '{0}' is returned by reference but was initialized to a value that cannot be returned by reference + + + A member is returned by reference but was initialized to a value that cannot be returned by reference + + + Cannot return '{0}' by reference because it is read-only + + + Cannot return the range variable '{0}' by reference + + + Cannot return '{0}' by reference because it is a '{1}' + + + Cannot return fields of '{0}' by reference because it is a '{1}' + + + A readonly field cannot be returned by writable reference + + + A static readonly field cannot be returned by writable reference + + + Members of readonly field '{0}' cannot be returned by writable reference + + + Fields of static readonly field '{0}' cannot be returned by writable reference + + + Cannot return a parameter by reference '{0}' because it is not a ref parameter + + + Cannot return by reference a member of parameter '{0}' because it is not a ref or out parameter + + + Cannot return a parameter by reference '{0}' because it is scoped to the current method + + + Cannot return by reference a member of parameter '{0}' because it is scoped to the current method + + + Cannot return a parameter by reference '{0}' through a ref parameter; it can only be returned in a return statement + + + Cannot return by reference a member of parameter '{0}' through a ref parameter; it can only be returned in a return statement + + + This returns a parameter by reference '{0}' through a ref parameter; but it can only safely be returned in a return statement + + + This returns a parameter by reference through a ref parameter; but it can only safely be returned in a return statement + + + This returns by reference a member of parameter '{0}' through a ref parameter; but it can only safely be returned in a return statement + + + This returns by reference a member of parameter through a ref parameter; but it can only safely be returned in a return statement + + + This returns a parameter by reference '{0}' but it is not a ref parameter + + + This returns a parameter by reference but it is not a ref parameter + + + This returns a parameter by reference '{0}' but it is scoped to the current method + + + This returns a parameter by reference but it is scoped to the current method + + + This returns by reference a member of parameter '{0}' that is not a ref or out parameter + + + This returns by reference a member of parameter that is not a ref or out parameter + + + This returns by reference a member of parameter '{0}' that is scoped to the current method + + + This returns by reference a member of parameter that is scoped to the current method + + + Cannot return local '{0}' by reference because it is not a ref local + + + Cannot return a member of local '{0}' by reference because it is not a ref local + + + This returns local '{0}' by reference but it is not a ref local + + + This returns local by reference but it is not a ref local + + + This returns a member of local '{0}' by reference but it is not a ref local + + + This returns a member of local by reference but it is not a ref local + + + Struct members cannot return 'this' or other instance members by reference + + + Struct member returns 'this' or other instance members by reference + + + Struct member returns 'this' or other instance members by reference + + + Expression cannot be used in this context because it may indirectly expose variables outside of their declaration scope + + + Cannot use variable '{0}' in this context because it may expose referenced variables outside of their declaration scope + + + Use of variable '{0}' in this context may expose referenced variables outside of their declaration scope + + + Use of variable in this context may expose referenced variables outside of their declaration scope + + + Cannot use a result of '{0}' in this context because it may expose variables referenced by parameter '{1}' outside of their declaration scope + + + Cannot use a member of result of '{0}' in this context because it may expose variables referenced by parameter '{1}' outside of their declaration scope + + + Use of result of '{0}' in this context may expose variables referenced by parameter '{1}' outside of their declaration scope + + + Use of result in this context may expose variables referenced by parameter outside of their declaration scope + + + Use of member of result of '{0}' in this context may expose variables referenced by parameter '{1}' outside of their declaration scope + + + Use of member of result in this context may expose variables referenced by parameter outside of their declaration scope + + + This combination of arguments to '{0}' is disallowed because it may expose variables referenced by parameter '{1}' outside of their declaration scope + + + This combination of arguments to '{0}' may expose variables referenced by parameter '{1}' outside of their declaration scope + + + This combination of arguments may expose variables referenced by parameter outside of their declaration scope + + + Branches of a ref conditional operator cannot refer to variables with incompatible declaration scopes + + + The branches of the ref conditional operator refer to variables with incompatible declaration scopes + + + The branches of the ref conditional operator refer to variables with incompatible declaration scopes + + + A result of a stackalloc expression of type '{0}' cannot be used in this context because it may be exposed outside of the containing method + + + A result of a stackalloc expression of type '{0}' in this context may be exposed outside of the containing method + + + A result of a stackalloc expression of this type in this context may be exposed outside of the containing method + + + Cannot initialize a by-value variable with a reference + + + Cannot initialize a by-reference variable with a value + + + The expression must be of type '{0}' because it is being assigned by reference + + + A declaration of a by-reference variable must have an initializer + + + Cannot use ref local '{0}' inside an anonymous method, lambda expression, or query expression + + + Iterators cannot have by-reference locals + + + Async methods cannot have by-reference locals + + + 'await' cannot be used in an expression containing a call to '{0}' because it returns by reference + + + 'await' cannot be used in an expression containing a ref conditional operator + + + Both conditional operator values must be ref values or neither may be a ref value + + + The expression must be of type '{0}' to match the alternative ref value + + + An expression tree may not contain a reference to a local function + + + Cannot pass argument with dynamic type to params parameter '{0}' of local function '{1}'. + + + Syntax tree should be created from a submission. + + + Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals. + + + It is not legal to use nullable type '{0}?' in a pattern; use the underlying type '{0}' instead. + + + It is not legal to use nullable reference type '{0}?' in an is-type expression; use the underlying type '{0}' instead. + + + It is not legal to use nullable reference type '{0}?' in an as expression; use the underlying type '{0}' instead. + + + Invalid operand for pattern match; value required, but found '{0}'. + + + An error occurred while writing the output file: {0}. + + + Tuple element names must be unique. + + + Tuple element name '{0}' is only allowed at position {1}. + + + Tuple element name '{0}' is disallowed at any position. + + + Member '{0}' was not found on type '{1}' from assembly '{2}'. + + + tuples + + + No suitable 'Deconstruct' instance or extension method was found for type '{0}', with {1} out parameters and a void return type. + + + Deconstruct assignment requires an expression with a type on the right-hand-side. + + + The switch expression must be a value; found '{0}'. + + + The switch case is unreachable. It has already been handled by a previous case or it is impossible to match. + + + stdin argument '-' is specified, but input has not been redirected from the standard input stream. + + + The pattern is unreachable. It has already been handled by a previous arm of the switch expression or it is impossible to match. + + + An expression of type '{0}' cannot be handled by a pattern of type '{1}'. + + + An expression of type '{0}' cannot be handled by a pattern of type '{1}'. Please use language version '{2}' or greater to match an open type with a constant pattern. + + + Attribute '{0}' is ignored when public signing is specified. + + + Attribute is ignored when public signing is specified. + + + Option '{0}' must be an absolute path. + + + Tuple with {0} elements cannot be converted to type '{1}'. + + + out variable declaration + + + Reference to an implicitly-typed out variable '{0}' is not permitted in the same argument list. + + + Cannot infer the type of implicitly-typed out variable '{0}'. + + + Cannot infer the type of implicitly-typed deconstruction variable '{0}'. + + + Cannot infer the type of implicitly-typed discard. + + + Cannot deconstruct a tuple of '{0}' elements into '{1}' variables. + + + Cannot deconstruct dynamic objects. + + + Deconstruction must contain at least two variables. + + + The tuple element name '{0}' is ignored because a different name or no name is specified by the target type '{1}'. + + + The tuple element name is ignored because a different name or no name is specified by the assignment target. + + + The tuple element name '{0}' is ignored because a different name or no name is specified on the other side of the tuple == or != operator. + + + The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator. + + + Predefined type '{0}' must be a struct. + + + 'new' cannot be used with tuple type. Use a tuple literal expression instead. + + + Deconstruction 'var (...)' form disallows a specific type for 'var'. + + + Cannot define a class or member that utilizes tuples because the compiler required type '{0}' cannot be found. Are you missing a reference? + + + Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names. + + + An expression tree may not contain an out argument variable declaration. + + + An expression tree may not contain a discard. + + + An expression tree may not contain an 'is' pattern-matching operator. + + + An expression tree may not contain a tuple literal. + + + An expression tree may not contain a tuple conversion. + + + /sourcelink switch is only supported when emitting PDB. + + + /embed switch is only supported when emitting a PDB. + + + Invalid instrumentation kind: {0} + + + Invalid hash algorithm name: '{0}' + + + The syntax 'var (...)' as an lvalue is reserved. + + + { or ; or => expected + + + A throw expression is not allowed in this context. + + + A declaration is not allowed in this context. + + + A foreach loop must declare its iteration variables. + + + Tuple element names are not permitted on the left of a deconstruction. + + + To cast a negative value, you must enclose the value in parentheses. + + + An expression tree may not contain a throw-expression. + + + An expression tree may not contain a with-expression. + + + Invalid assembly name: {0} + + + For type '{0}' to be used as an AsyncMethodBuilder for type '{1}', its Task property should return type '{1}' instead of type '{2}'. + + + Module '{0}' in assembly '{1}' is forwarding the type '{2}' to multiple assemblies: '{3}' and '{4}'. + + + It is not legal to use the type 'dynamic' in a pattern. + + + Provided documentation mode is unsupported or invalid: '{0}'. + + + Provided source code kind is unsupported or invalid: '{0}' + + + Provided language version is unsupported or invalid: '{0}'. + + + Invalid name for a preprocessing symbol; '{0}' is not a valid identifier + + + Feature '{0}' is not available in C# 7.1. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 7.2. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 7.3. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 8.0. Please use language version {1} or greater. + + + Specified language version '{0}' cannot have leading zeroes + + + A value of type 'void' may not be assigned. + + + '{0}' is for evaluation purposes only and is subject to change or removal in future updates. + + + Type is for evaluation purposes only and is subject to change or removal in future updates. + + + Compiler version: '{0}'. Language version: {1}. + + + async main + + + Tuple element name '{0}' is inferred. Please use language version {1} or greater to access an element by its inferred name. + + + To use '@$' instead of '$@' for an interpolated verbatim string, please use language version '{0}' or greater. + + + Field-targeted attributes on auto-properties are not supported in language version {0}. Please use language version {1} or greater. + + + Field-targeted attributes on auto-properties are not supported in this version of the language. + + + A tuple may not contain a value of type 'void'. + + + nullable reference types + + + warning action enable + + + Converting null literal or possible null value to non-nullable type. + + + Converting null literal or possible null value to non-nullable type. + + + Possible null reference assignment. + + + Possible null reference assignment. + + + Dereference of a possibly null reference. + + + Dereference of a possibly null reference. + + + Possible null reference return. + + + Possible null reference return. + + + Possible null reference argument for parameter '{0}' in '{1}'. + + + Possible null reference argument. + + + Thrown value may be null. + + + Thrown value may be null. + + + Unboxing a possibly null value. + + + Unboxing a possibly null value. + + + Nullability of reference types in type doesn't match overridden member. + + + Nullability of reference types in type doesn't match overridden member. + + + Nullability of reference types in return type doesn't match overridden member. + + + Nullability of reference types in return type doesn't match overridden member. + + + Nullability of return type doesn't match overridden member (possibly because of nullability attributes). + + + Nullability of return type doesn't match overridden member (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter '{0}' doesn't match overridden member. + + + Nullability of reference types in type of parameter doesn't match overridden member. + + + Nullability of type of parameter '{0}' doesn't match overridden member (possibly because of nullability attributes). + + + Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter '{0}' doesn't match partial method declaration. + + + Nullability of reference types in type of parameter doesn't match partial method declaration. + + + Nullability of reference types in return type doesn't match partial method declaration. + + + Nullability of reference types in return type doesn't match partial method declaration. + + + Nullability of reference types in type of '{0}' doesn't match implicitly implemented member '{1}'. + + + Nullability of reference types in type doesn't match implicitly implemented member. + + + Nullability of reference types in return type of '{0}' doesn't match implicitly implemented member '{1}'. + + + Nullability of reference types in return type doesn't match implicitly implemented member. + + + Nullability of reference types in type of parameter '{0}' of '{1}' doesn't match implicitly implemented member '{2}'. + + + Nullability of reference types in type of parameter doesn't match implicitly implemented member. + + + Nullability of reference types in return type of '{0}' doesn't match implicitly implemented member '{1}' (possibly because of nullability attributes). + + + Nullability of reference types in return type doesn't match implicitly implemented member (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter '{0}' of '{1}' doesn't match implicitly implemented member '{2}' (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). + + + Nullability of reference types in type doesn't match implemented member '{0}'. + + + Nullability of reference types in type doesn't match implemented member. + + + Nullability of reference types in return type doesn't match implemented member '{0}'. + + + Nullability of reference types in return type doesn't match implemented member. + + + Nullability of reference types in type of parameter '{0}' doesn't match implemented member '{1}'. + + + Nullability of reference types in type of parameter doesn't match implemented member. + + + Nullability of reference types in return type doesn't match implemented member '{0}' (possibly because of nullability attributes). + + + Nullability of reference types in return type doesn't match implemented member (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter '{0}' doesn't match implemented member '{1}' (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter doesn't match implemented member (possibly because of nullability attributes). + + + Non-nullable {0} '{1}' must contain a non-null value when exiting constructor. Consider declaring the {0} as nullable. + + + Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + + + Nullability of reference types in value of type '{0}' doesn't match target type '{1}'. + + + Nullability of reference types in value doesn't match target type. + + + Call to non-readonly member '{0}' from a 'readonly' member results in an implicit copy of '{1}'. + + + Call to non-readonly member from a 'readonly' member results in an implicit copy. + + + Static member '{0}' cannot be marked 'readonly'. + + + Auto-implemented 'set' accessor '{0}' cannot be marked 'readonly'. + + + Auto-implemented property '{0}' cannot be marked 'readonly' because it has a 'set' accessor. + + + Cannot specify 'readonly' modifiers on both property or indexer '{0}' and its accessor. Remove one of them. + + + Cannot specify 'readonly' modifiers on both accessors of property or indexer '{0}'. Instead, put a 'readonly' modifier on the property itself. + + + Field-like event '{0}' cannot be 'readonly'. + + + Both partial method declarations must be readonly or neither may be readonly + + + '{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor + + + Argument of type '{0}' cannot be used for parameter '{2}' of type '{1}' in '{3}' due to differences in the nullability of reference types. + + + Argument cannot be used for parameter due to differences in the nullability of reference types. + + + Argument of type '{0}' cannot be used as an output of type '{1}' for parameter '{2}' in '{3}' due to differences in the nullability of reference types. + + + Argument cannot be used as an output for parameter due to differences in the nullability of reference types. + + + A possible null value may not be used for a type marked with [NotNull] or [DisallowNull] + + + A possible null value may not be used for a type marked with [NotNull] or [DisallowNull] + + + Parameter '{0}' must have a non-null value when exiting with '{1}'. + + + Parameter must have a non-null value when exiting in some condition. + + + Parameter '{0}' must have a non-null value when exiting. + + + Parameter must have a non-null value when exiting. + + + Parameter '{0}' must have a non-null value when exiting because parameter '{1}' is non-null. + + + Parameter must have a non-null value when exiting because parameter referenced by NotNullIfNotNull is non-null. + + + Return value must be non-null because parameter '{0}' is non-null. + + + Return value must be non-null because parameter is non-null. + + + Member '{0}' must have a non-null value when exiting. + + + Member must have a non-null value when exiting. + + + Member '{0}' cannot be used in this attribute. + + + Member cannot be used in this attribute. + + + Member '{0}' must have a non-null value when exiting with '{1}'. + + + Member must have a non-null value when exiting in some condition. + + + A method marked [DoesNotReturn] should not return. + + + A method marked [DoesNotReturn] should not return. + + + Method '{0}' lacks `[DoesNotReturn]` annotation to match implemented or overridden member. + + + Method lacks `[DoesNotReturn]` annotation to match implemented or overridden member. + + + Nullability of reference types in return type of '{0}' doesn't match the target delegate '{1}' (possibly because of nullability attributes). + + + Nullability of reference types in return type doesn't match the target delegate (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter '{0}' of '{1}' doesn't match the target delegate '{2}' (possibly because of nullability attributes). + + + Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes). + + + Cannot convert null literal to non-nullable reference type. + + + Cannot convert null literal to non-nullable reference type. + + + Cannot use a nullable reference type in object creation. + + + Nullable value type may be null. + + + Nullable value type may be null. + + + The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. Nullability of type argument '{3}' doesn't match constraint type '{1}'. + + + The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type. + + + The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. + + + The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. + + + Explicit application of 'System.Runtime.CompilerServices.NullableAttribute' is not allowed. + + + A nullable type parameter must be known to be a value type or non-nullable reference type unless language version '{0}' or greater is used. Consider changing the language version or adding a 'class', 'struct', or type constraint. + + + Invalid '{0}' value: '{1}' for C# {2}. Please use language version '{3}' or greater. + + + A void or int returning entry point cannot be async + + + An expression of type '{0}' cannot be handled by a pattern of type '{1}' in C# {2}. Please use language version {3} or greater. + + + The local function '{0}' is declared but never used + + + Local function is declared but never used + + + Local function '{0}' must declare a body because it is not marked 'static extern'. + + + Unable to read debug information of method '{0}' (token 0x{1:X8}) from assembly '{2}' + + + {0} is not a valid C# conversion expression + + + Cannot pass argument with dynamic type to generic local function '{0}' with inferred type arguments. + + + leading digit separator + + + Do not use '{0}'. This is reserved for compiler usage. + + + The type name '{0}' is reserved to be used by the compiler. + + + The first parameter of the 'in' extension method '{0}' must be a concrete (non-generic) value type. + + + Instance fields of readonly structs must be readonly. + + + Auto-implemented instance properties in readonly structs must be readonly. + + + Field-like events are not allowed in readonly structs. + + + ref extension methods + + + Conversion of a stackalloc expression of type '{0}' to type '{1}' is not possible. + + + The first parameter of a 'ref' extension method '{0}' must be a value type or a generic type constrained to struct. + + + An in parameter cannot have the Out attribute. + + + {0} is not a valid C# compound assignment operation + + + Filter expression is a constant 'false', consider removing the catch clause + + + Filter expression is a constant 'false' + + + Filter expression is a constant 'false', consider removing the try-catch block + + + Filter expression is a constant 'false'. + + + A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation. Parenthesize the conditional expression. + + + Arguments with 'in' modifier cannot be used in dynamically dispatched expressions. + + + Tuple types used as operands of an == or != operator must have matching cardinalities. But this operator has tuple types of cardinality {0} on the left and {1} on the right. + + + The left-hand side of a ref assignment must be a ref variable. + + + Cannot ref-assign '{1}' to '{0}' because '{1}' has a narrower escape scope than '{0}'. + + + Cannot ref-assign '{1}' to '{0}' because '{1}' can only escape the current method through a return statement. + + + This ref-assigns '{1}' to '{0}' but '{1}' can only escape the current method through a return statement. + + + This ref-assigns a value that can only escape the current method through a return statement. + + + This ref-assigns '{1}' to '{0}' but '{1}' has a narrower escape scope than '{0}'. + + + This ref-assigns a value that has a narrower escape scope than the target. + + + Cannot ref-assign '{1}' to '{0}' because '{1}' has a wider value escape scope than '{0}' allowing assignment through '{0}' of values with narrower escapes scopes than '{1}'. + + + This ref-assigns '{1}' to '{0}' but '{1}' has a wider value escape scope than '{0}' allowing assignment through '{0}' of values with narrower escapes scopes than '{1}'. + + + This ref-assigns a value that has a wider value escape scope than the target allowing assignment through the target of values with narrower escapes scopes. + + + enum generic type constraints + + + delegate generic type constraints + + + unmanaged generic type constraints + + + The 'new()' constraint cannot be used with the 'unmanaged' constraint + + + The type '{2}' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter '{1}' in the generic type or method '{0}' + + + Type parameter '{1}' has the 'unmanaged' constraint so '{1}' cannot be used as a constraint for '{0}' + + + stackalloc initializer + + + "Invalid rank specifier: expected ']' + + + declaration of expression variables in member initializers and queries + + + Pattern missing + + + recursive patterns + + + null pointer constant pattern + + + default type parameter constraints + + + Matching the tuple type '{0}' requires '{1}' subpatterns, but '{2}' subpatterns are present. + + + A property subpattern requires a reference to the property or field to be matched, e.g. '{{ Name: {0} }}' + + + A default literal 'default' is not valid as a pattern. Use another literal (e.g. '0' or 'null') as appropriate. To match everything, use a discard pattern '_'. + + + No best type was found for the switch expression. + + + There is no target type for the default literal. + + + The delegate type could not be inferred. + + + The contextual keyword 'var' cannot be used as an explicit lambda return type + + + A single-element deconstruct pattern requires some other syntax for disambiguation. It is recommended to add a discard designator '_' after the close paren ')'. + + + The syntax 'var' for a pattern is not permitted to refer to a type, but '{0}' is in scope here. + + + The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '{0}' is not covered. + + + The switch expression does not handle all possible values of its input type (it is not exhaustive). + + + The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '{0}' is not covered. However, a pattern with a 'when' clause might successfully match this value. + + + The switch expression does not handle all possible values of its input type (it is not exhaustive). + + + The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. For example, the pattern '{0}' is not covered. + + + The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. + + + The name '_' refers to the constant, not the discard pattern. Use 'var _' to discard the value, or '@_' to refer to a constant by that name. + + + Do not use '_' for a case constant. + + + The name '_' refers to the type '{0}', not the discard pattern. Use '@_' for the type, or 'var _' to discard. + + + Do not use '_' to refer to the type in an is-type expression. + + + An expression tree may not contain a switch expression. + + + Invalid object creation + + + indexing movable fixed buffers + + + __arglist cannot have an argument passed by 'in' or 'out' + + + SyntaxTree is not part of the compilation + + + An out variable cannot be declared as a ref local + + + Multiple analyzer config files cannot be in the same directory ('{0}'). + + + coalescing assignment + + + Cannot create constructed generic type from another constructed generic type. + + + Cannot create constructed generic type from non-generic type. + + + unconstrained type parameters in null coalescing operator + + + Nullability in constraints for type parameter '{0}' of method '{1}' doesn't match the constraints for type parameter '{2}' of interface method '{3}'. Consider using an explicit interface implementation instead. + + + Nullability in constraints for type parameter doesn't match the constraints for type parameter in implicitly implemented interface method'. + + + The type '{2}' cannot be used as type parameter '{1}' in the generic type or method '{0}'. Nullability of type argument '{2}' doesn't match 'class' constraint. + + + The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint. + + + Unexpected character sequence '...' + + + index operator + + + range operator + + + static local functions + + + name shadowing in nested functions + + + lambda discard parameters + + + MemberNotNull attribute + + + native-sized integers + + + Cannot use a collection of dynamic type in an asynchronous foreach + + + Expected 'enable', 'disable', or 'restore' + + + Expected 'warnings', 'annotations', or end of directive + + + The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source. + + + The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source. + + + Object or collection initializer implicitly dereferences possibly null member '{0}'. + + + Object or collection initializer implicitly dereferences possibly null member. + + + Expression tree cannot contain value of ref struct or restricted type '{0}'. + + + 'else' cannot start a statement. + + + An expression tree may not contain a null coalescing assignment + + + Invalid option '{0}' for /nullable; must be 'disable', 'enable', 'warnings' or 'annotations' + + + Parentheses are required around the switch governing expression. + + + The name '{0}' does not identify tuple element '{1}'. + + + The name '{0}' does not match the corresponding 'Deconstruct' parameter '{1}'. + + + An expression of type '{0}' can never match the provided pattern. + + + An expression of type '{0}' always matches the provided pattern. + + + The input always matches the provided pattern. + + + The given expression never matches the provided pattern. + + + The given expression never matches the provided pattern. + + + The given expression always matches the provided constant. + + + The given expression always matches the provided constant. + + + The given expression always matches the provided pattern. + + + The given expression always matches the provided pattern. + + + Feature '{0}' is not available in C# 8.0. Please use language version {1} or greater. + + + Pattern-matching is not permitted for pointer types. + + + Element names are not permitted when pattern-matching via 'System.Runtime.CompilerServices.ITuple'. + + + The discard pattern is not permitted as a case label in a switch statement. Use 'case var _:' for a discard pattern, or 'case @_:' for a constant named '_'. + + + Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type. + + + Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type. + + + '{0}' does not implement interface member '{1}'. Nullability of reference types in interface implemented by the base type doesn't match. + + + Type does not implement interface member. Nullability of reference types in interface implemented by the base type doesn't match. + + + '{0}' is already listed in the interface list on type '{1}' with different nullability of reference types. + + + Interface is already listed in the interface list with different nullability of reference types. + + + '{0}' is explicitly implemented more than once. + + + A using variable cannot be used directly within a switch section (consider using braces). + + + A goto cannot jump to a location after a using declaration. + + + A goto cannot jump to a location before a using declaration within the same block. + + + using declarations + + + pattern-based disposal + + + The feature '{0}' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. + + + default interface implementation + + + Target runtime doesn't support default interface implementation. + + + '{0}' cannot implement interface member '{1}' in type '{2}' because the target runtime doesn't support default interface implementation. + + + The modifier '{0}' is not valid for this item in C# {1}. Please use language version '{2}' or greater. + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implicitly implement a non-public member in C# {3}. Please use language version '{4}' or greater. + + + Interface member '{0}' does not have a most specific implementation. Neither '{1}', nor '{2}' are most specific. + + + '{0}' cannot implement interface member '{1}' in type '{2}' because feature '{3}' is not available in C# {4}. Please use language version '{5}' or greater. + + + Target runtime doesn't support 'protected', 'protected internal', or 'private protected' accessibility for a member of an interface. + + + Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false. + + + The switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern '{0}' is not covered. + + + The switch expression does not handle some null inputs. + + + The switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern '{0}' is not covered. However, a pattern with a 'when' clause might successfully match this value. + + + The switch expression does not handle some null inputs. + + + Attribute '{0}' is not valid on event accessors. It is only valid on '{1}' declarations. + + + obsolete on property accessor + + + The EnumeratorCancellationAttribute applied to parameter '{0}' will have no effect. The attribute is only effective on a parameter of type CancellationToken in an async-iterator method returning IAsyncEnumerable + + + The EnumeratorCancellationAttribute will have no effect. The attribute is only effective on a parameter of type CancellationToken in an async-iterator method returning IAsyncEnumerable + + + Async-iterator '{0}' has one or more parameters of type 'CancellationToken' but none of them is decorated with the 'EnumeratorCancellation' attribute, so the cancellation token parameter from the generated 'IAsyncEnumerable<>.GetAsyncEnumerator' will be un ... + + + Async-iterator member has one or more parameters of type 'CancellationToken' but none of them is decorated with the 'EnumeratorCancellation' attribute, so the cancellation token parameter from the generated 'IAsyncEnumerable<>.GetAsyncEnumerator' will be u ... + + + The attribute [EnumeratorCancellation] cannot be used on multiple parameters + + + Method '{0}' specifies a 'class' constraint for type parameter '{1}', but corresponding type parameter '{2}' of overridden or explicitly implemented method '{3}' is not a reference type. + + + Method '{0}' specifies a 'struct' constraint for type parameter '{1}', but corresponding type parameter '{2}' of overridden or explicitly implemented method '{3}' is not a non-nullable value type. + + + Method '{0}' specifies a 'default' constraint for type parameter '{1}', but corresponding type parameter '{2}' of overridden or explicitly implemented method '{3}' is constrained to a reference type or a value type. + + + The 'default' constraint is valid on override and explicit interface implementation methods only. + + + constraints for override and explicit interface implementation methods + + + Partial method declarations of '{0}' have inconsistent nullability in constraints for type parameter '{1}' + + + Partial method declarations have inconsistent nullability in constraints for type parameter + + + stackalloc in nested expressions + + + The type '{2}' cannot be used as type parameter '{1}' in the generic type or method '{0}'. Nullability of type argument '{2}' doesn't match 'notnull' constraint. + + + The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint. + + + notnull generic type constraint + + + Duplicate null suppression operator ('!') + + + The 'parameter null-checking' feature is not supported. + + + Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false. + + + Command-line syntax error: '{0}' is not a valid value for the '{1}' option. The value must be of the form '{2}'. + + + function pointers + + + &method group + + + '{0}' is not a valid calling convention specifier for a function pointer. + + + Type '{0}' is not defined. + + + Type '{0}' must be public to be used as a calling convention. + + + Method '{0}' will not be used as an entry point because a synchronous entry point '{1}' was found. + + + Internal error in the C# compiler. + + + static anonymous function + + + A static anonymous function cannot contain a reference to 'this' or 'base'. + + + A static anonymous function cannot contain a reference to '{0}'. + + + asynchronous using + + + parenthesized pattern + + + or pattern + + + and pattern + + + not pattern + + + type pattern + + + relational pattern + + + Enums, classes, and structures cannot be declared in an interface that has an 'in' or 'out' type parameter. + + + '{0}': extern event cannot have initializer + + + Invocation of implicit Index Indexer cannot name the argument. + + + Invocation of implicit Range Indexer cannot name the argument. + + + The type '{0}' may not be used as the target type of new() + + + Use of new() is not valid in this context + + + There is no target type for '{0}' + + + target-typed object creation + + + An expression tree may not contain a pattern System.Index or System.Range indexer access + + + An expression tree may not contain a from-end index ('^') expression. + + + An expression tree may not contain a range ('..') expression. + + + Generator '{0}' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type '{1}' with message '{2}' + + + Generator '{0}' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type '{1}' with message '{2}' + + + Generator failed to generate source. + + + Generator failed to initialize. + + + Generator threw the following exception: + '{0}'. + + + Generator threw the following exception: + '{0}'. + + + records + + + init-only setters + + + The receiver of a `with` expression must have a non-void type. + + + The receiver type '{0}' is not a valid record type and is not a struct type. + + + Init-only property or indexer '{0}' can only be assigned in an object initializer, or on 'this' or 'base' in an instance constructor or an 'init' accessor. + + + A variable may not be declared within a 'not' or 'or' pattern. + + + Relational patterns may not be used for a value of type '{0}'. + + + Relational patterns may not be used for a floating-point NaN. + + + pattern matching ReadOnly/Span<char> on constant string + + + extended partial methods + + + constant interpolated strings + + + Partial method '{0}' must have accessibility modifiers because it has a non-void return type. + + + Partial method '{0}' must have accessibility modifiers because it has 'out' parameters. + + + Partial method '{0}' must have an implementation part because it has accessibility modifiers. + + + Partial method '{0}' must have accessibility modifiers because it has a 'virtual', 'override', 'sealed', 'new', or 'extern' modifier. + + + Both partial method declarations must have identical accessibility modifiers. + + + Both partial method declarations must have identical combinations of 'virtual', 'override', 'sealed', and 'new' modifiers. + + + Both partial method declarations must have the same return type. + + + Partial method declarations must have matching ref return values. + + + Partial method declarations '{0}' and '{1}' have signature differences. + + + Partial method declarations have signature differences. + + + top-level statements + + + Cannot use local variable or local function '{0}' declared in a top-level statement in this context. + + + Only one compilation unit can have top-level statements. + + + Top-level statements must precede namespace and type declarations. + + + Cannot specify /main if there is a compilation unit with top-level statements. + + + Program using top-level statements must be an executable. + + + '{0}' is not a valid function pointer return type modifier. Valid modifiers are 'ref' and 'ref readonly'. + + + A return type can only have one '{0}' modifier. + + + '{0}' cannot be used as a modifier on a function pointer parameter. + + + Function pointer '{0}' does not take {1} arguments + + + No overload for '{0}' matches function pointer '{1}' + + + Ref mismatch between '{0}' and function pointer '{1}' + + + Cannot create a function pointer for '{0}' because it is not a static method + + + '&' on method groups cannot be used in expression trees + + + Calling convention of '{0}' is not compatible with '{1}'. + + + Cannot convert method group to function pointer (Are you missing a '&'?) + + + Cannot use an extension method with a receiver as the target of a '&' operator. + + + The type of a local declared in a fixed statement cannot be a function pointer type. + + + The calling convention of '{0}' is not supported by the language. + + + The target runtime doesn't support extensible or runtime-environment default calling conventions. + + + Given {0} parameter types and {1} parameter ref kinds. These arrays must have the same length. + + + 'RefKind.Out' is not a valid ref kind for a return type. + + + Passing '{0}' is not valid unless '{1}' is 'SignatureCallingConvention.Unmanaged'. + + + Cannot use '{0}' as a calling convention modifier. + + + Cannot convert &method group '{0}' to delegate type '{1}'. + + + Cannot convert &method group '{0}' to non-function pointer type '{1}'. + + + 'managed' calling convention cannot be combined with unmanaged calling convention specifiers. + + + Feature '{0}' is not available in C# 9.0. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 10.0. Please use language version {1} or greater. + + + Feature '{0}' is not available in C# 11.0. Please use language version {1} or greater. + + + Unexpected argument list. + + + A constructor declared in a record with parameter list must have 'this' constructor initializer. + + + Only a single record partial declaration may have a parameter list + + + Records may only inherit from object or another record + + + Only records may inherit from records. + + + Record member '{0}' must be a readable instance property or field of type '{1}' to match positional parameter '{2}'. + + + No accessible copy constructor found in base type '{0}'. + + + A copy constructor in a record must call a copy constructor of the base, or a parameterless object constructor if the record inherits from object. + + + target-typed conditional expression + + + Conditional expression is not valid in language version {0} because a common type was not found between '{1}' and '{2}'. To use a target-typed conversion, upgrade to language version {3} or greater. + + + '{0}' does not override expected method from 'object'. + + + covariant returns + + + '{0}': Target runtime doesn't support covariant return types in overrides. Return type must be '{2}' to match overridden member '{1}' + + + '{0}': Target runtime doesn't support covariant types in overrides. Type must be '{2}' to match overridden member '{1}' + + + '{0}' cannot be sealed because containing record is not sealed. + + + '{0}' does not override expected method from '{1}'. + + + Constant value '{0}' may overflow '{1}' at runtime (use 'unchecked' syntax to override) + + + Constant value may overflow at runtime (use 'unchecked' syntax to override) + + + Members named 'Clone' are disallowed in records. + + + Types and aliases should not be named 'record'. + + + Types and aliases should not be named 'record'. + + + '{0}' must allow overriding because the containing record is not sealed. + + + Record member '{0}' must be public. + + + Record member '{0}' must return '{1}'. + + + Record member '{0}' must be protected. + + + '{0}' does not override expected property from '{1}'. + + + Record member '{0}' may not be static. + + + A copy constructor '{0}' must be public or protected because the record is not sealed. + + + Record member '{0}' must be private. + + + Operator '{0}' cannot be used here due to precedence. Use parentheses to disambiguate. + + + Operator cannot be used here due to precedence. + + + module initializers + + + Module initializer method '{0}' must be accessible at the module level + + + Module initializer method '{0}' must be static, and non-virtual, must have no parameters, and must return 'void' + + + Module initializer method '{0}' must not be generic and must not be contained in a generic type + + + A module initializer must be an ordinary member method + + + extension GetAsyncEnumerator + + + extension GetEnumerator + + + 'UnmanagedCallersOnly' can only be applied to ordinary static non-abstract, non-virtual methods or static local functions. + + + '{0}' is not a valid calling convention type for 'UnmanagedCallersOnly'. + + + Cannot use '{0}' as a {1} type on a method attributed with 'UnmanagedCallersOnly'. + + + Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. + + + '{0}' is attributed with 'UnmanagedCallersOnly' and cannot be called directly. Obtain a function pointer to this method. + + + '{0}' is attributed with 'UnmanagedCallersOnly' and cannot be converted to a delegate type. Obtain a function pointer to this method. + + + Application entry points cannot be attributed with 'UnmanagedCallersOnly'. + + + Module initializer cannot be attributed with 'UnmanagedCallersOnly'. + + + '{0}' defines 'Equals' but not 'GetHashCode' + + + Record defines 'Equals' but not 'GetHashCode'. + + + 'init' accessors cannot be marked 'readonly'. Mark '{0}' readonly instead. + + + discards + + + Mixed declarations and expressions in deconstruction + + + record structs + + + with on structs + + + with on anonymous types + + + async method builder override + + + positional fields in records + + + parameterless struct constructors + + + struct field initializers + + + ref fields + + + variance safety for static interface members + + + Record equality contract property '{0}' must have a get accessor. + + + The assembly '{0}' containing type '{1}' references .NET Framework, which is not supported. + + + The loaded assembly references .NET Framework, which is not supported. + + + The analyzer assembly '{0}' references version '{1}' of the compiler, which is newer than the currently running version '{2}'. + + + The analyzer assembly references a newer version of the compiler than the currently running version. + + + The type '{0}' may not be used for a field of a record. + + + A function pointer cannot be called with named arguments. + + + file-scoped namespace + + + Source file can only contain one file-scoped namespace declaration. + + + Source file can not contain both file-scoped and normal namespace declarations. + + + File-scoped namespace must precede all other members in a file. + + + Parameter '{0}' is unread. Did you forget to use it to initialize the property with that name? + + + Parameter is unread. Did you forget to use it to initialize the property with that name? + + + The primary constructor conflicts with the synthesized copy constructor. + + + lambda attributes + + + lambda return type + + + inferred delegate type + + + auto default struct fields + + + The #line directive value is missing or out of range + + + The #line directive end position must be greater than or equal to the start position + + + The #line span directive requires space before the first parenthesis, before the character offset, and before the file name + + + Comparison of function pointers might yield an unexpected result, since pointers to the same function may be distinct. + + + Do not compare function pointer values + + + Using a function pointer type in a 'typeof' in an attribute is not supported. + + + The CallerArgumentExpressionAttribute may only be applied to parameters with default values + + + CallerArgumentExpressionAttribute cannot be applied because there are no standard conversions from type '{0}' to type '{1}' + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerArgumentExpressionAttribute will have no effect because it applies to a member that is used in contexts that do not allow optional arguments + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + + + The CallerArgumentExpressionAttribute will have no effect; it is overridden by the CallerFilePathAttribute + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerLineNumberAttribute. + + + The CallerArgumentExpressionAttribute will have no effect; it is overridden by the CallerLineNumberAttribute + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerMemberNameAttribute. + + + The CallerArgumentExpressionAttribute will have no effect; it is overridden by the CallerMemberNameAttribute + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect. It is applied with an invalid parameter name. + + + The CallerArgumentExpressionAttribute is applied with an invalid parameter name. + + + The CallerArgumentExpressionAttribute applied to parameter '{0}' will have no effect because it's self-referential. + + + The CallerArgumentExpressionAttribute applied to parameter will have no effect because it's self-refential. + + + sealed ToString in record + + + Inheriting from a record with a sealed 'Object.ToString' is not supported in C# {0}. Please use language version '{1}' or greater. + + + list pattern + + + List patterns may not be used for a value of type '{0}'. + + + List patterns may not be used for a value of type '{0}'. No suitable 'Length' or 'Count' property was found. + + + The 'scoped' modifier can be used for refs and ref struct values only. + + + The 'scoped' modifier of parameter '{0}' doesn't match overridden or implemented member. + + + The 'scoped' modifier of parameter '{0}' doesn't match overridden or implemented member. + + + The 'scoped' modifier of parameter doesn't match overridden or implemented member. + + + The 'scoped' modifier of parameter '{0}' doesn't match target '{1}'. + + + The 'scoped' modifier of parameter '{0}' doesn't match target '{1}'. + + + The 'scoped' modifier of parameter doesn't match target. + + + The 'scoped' modifier of parameter '{0}' doesn't match partial method declaration. + + + A fixed field must not be a ref field. + + + A ref field cannot refer to a ref struct. + + + A ref field can only be declared in a ref struct. + + + Auto-implemented property '{0}' is read before being explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Auto-implemented property is read before being explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Field '{0}' is read before being explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Field is read before being explicitly assigned, causing a preceding implicit assignment of 'default'. + + + The 'this' object is read before all of its fields have been assigned, causing preceding implicit assignments of 'default' to non-explicitly assigned fields. + + + The 'this' object is read before all of its fields have been assigned, causing preceding implicit assignments of 'default' to non-explicitly assigned fields. + + + Control is returned to caller before auto-implemented property '{0}' is explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Control is returned to caller before auto-implemented property is explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Control is returned to caller before field '{0}' is explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Control is returned to caller before field is explicitly assigned, causing a preceding implicit assignment of 'default'. + + + Use of possibly unassigned field '{0}'. Consider updating to language version '{1}' to auto-default the field. + + + Use of possibly unassigned auto-implemented property '{0}'. Consider updating to language version '{1}' to auto-default the property. + + + Use of possibly unassigned field '{0}'. Consider updating to language version '{1}' to auto-default the field. + + + Use of possibly unassigned field. Consider updating the language version to auto-default the field. + + + Use of possibly unassigned auto-implemented property '{0}'. Consider updating to language version '{1}' to auto-default the property. + + + Use of possibly unassigned auto-implemented property. Consider updating the language version to auto-default the property. + + + Slice patterns may not be used for a value of type '{0}'. + + + Slice patterns may only be used once and directly inside a list pattern. + + + The positional member '{0}' found corresponding to this parameter is hidden. + + + interpolated string handlers + + + Interpolated string handler method '{0}' is malformed. It does not return 'void' or 'bool'. + + + Interpolated string handler method '{0}' has inconsistent return type. Expected to return '{1}'. + + + Identifier or a simple member access expected. + + + extended property patterns + + + global using directive + + + A global using directive cannot be used in a namespace declaration. + + + A global using directive must precede all non-global using directives. + + + null is not a valid parameter name. To get access to the receiver of an instance method, use the empty string as the parameter name. + + + '{0}' is not an instance method, the receiver cannot be an interpolated string handler argument. + + + '{0}' is not a valid parameter name from '{1}'. + + + '{0}' is not an interpolated string handler type. + + + Parameter '{0}' occurs after '{1}' in the parameter list, but is used as an argument for interpolated string handler conversions. This will require the caller to reorder parameters with named arguments at the call site. Consider putting the interpolated st ... + + + Parameter to interpolated string handler conversion occurs after handler parameter + + + InterpolatedStringHandlerArgumentAttribute arguments cannot refer to the parameter the attribute is used on. + + + The InterpolatedStringHandlerArgumentAttribute applied to parameter '{0}' is malformed and cannot be interpreted. Construct an instance of '{1}' manually. + + + Parameter '{0}' is an argument to the interpolated string handler conversion on parameter '{1}', but the corresponding argument is specified after the interpolated string expression. Reorder the arguments to move '{0}' before '{1}'. + + + Parameter '{0}' is not explicitly provided, but is used as an argument to the interpolated string handler conversion on parameter '{1}'. Specify the value of '{0}' before '{1}'. + + + An expression tree may not contain an interpolated string handler conversion. + + + An interpolated string handler construction cannot use dynamic. Manually construct an instance of '{0}'. + + + The parameterless struct constructor must be 'public'. + + + static abstract members in interfaces + + + Target runtime doesn't support static abstract members in interfaces. + + + The interface '{0}' cannot be used as type argument. Static member '{1}' does not have a most specific implementation in the interface. + + + The parameter of a unary operator must be the containing type, or its type parameter constrained to it. + + + The parameter type for ++ or -- operator must be the containing type, or its type parameter constrained to it. + + + The return type for ++ or -- operator must either match the parameter type, or be derived from the parameter type, or be the containing type's type parameter constrained to it unless the parameter type is a different type parameter. + + + One of the parameters of a binary operator must be the containing type, or its type parameter constrained to it. + + + The first operand of an overloaded shift operator must have the same type as the containing type or its type parameter constrained to it + + + A static virtual or abstract interface member can be accessed only on a type parameter. + + + An expression tree may not contain an access of static virtual or abstract interface member + + + '{0}' does not implement static interface member '{1}'. '{2}' cannot implement the interface member because it is not static. + + + '{0}' cannot implement interface member '{1}' in type '{2}' because the target runtime doesn't support static abstract members in interfaces. + + + Explicit implementation of a user-defined operator '{0}' must be declared static + + + User-defined conversion in an interface must convert to or from a type parameter on the enclosing type constrained to the enclosing type + + + 'UnmanagedCallersOnly' method '{0}' cannot implement interface member '{1}' in type '{2}' + + + The using directive for '{0}' appeared previously as global using + + + The using directive appeared previously as global using + + + The AsyncMethodBuilder attribute is disallowed on anonymous methods without an explicit return type. + + + At least one top-level statement must be non-empty. + + + Line does not start with the same whitespace as the closing line of the raw string literal. + + + Raw string literals are not allowed in preprocessor directives. + + + Raw string literal delimiter must be on its own line. + + + The raw string literal does not start with enough quote characters to allow this many consecutive quote characters as content. + + + The interpolated raw string literal does not start with enough '$' characters to allow this many consecutive opening braces as content. + + + The interpolated raw string literal does not start with enough '$' characters to allow this many consecutive closing braces as content. + + + Not enough quotes for raw string literal. + + + The interpolation must end with the same number of closing braces as the number of '$' characters that the raw string literal started with. + + + Sequence of '@' characters is not allowed. A verbatim string or identifier can only have one '@' character and a raw string cannot have any. + + + String must start with quote character: " + + + Unterminated raw string literal. + + + raw string literals + + + Multi-line raw string literals are only allowed in verbatim interpolated strings. + + + Multi-line raw string literals must contain at least one line of content. + + + Newlines inside a non-verbatim interpolated string are not supported in C# {0}. Please use language version {1} or greater. + + + generic attributes + + + InterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site. + + + InterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site. + + + A lambda expression with attributes cannot be converted to an expression tree + + + A constructor declared in a 'record struct' with parameter list must have a 'this' initializer that calls the primary constructor or an explicitly declared constructor. + + + A 'struct' with field initializers must include an explicitly declared constructor. + + + A string 'null' constant is not supported as a pattern for '{0}'. Use an empty string instead. + + + Cannot update because an inferred delegate type has changed. + + + The operation may overflow '{0}' at runtime (use 'unchecked' syntax to override) + + + The operation may overflow at runtime (use 'unchecked' syntax to override) + + + Cannot use 'ref', 'in', or 'out' in the signature of a method attributed with 'UnmanagedCallersOnly'. + + + newlines in interpolations + + + Interpolated string handler conversions that reference the instance being indexed cannot be used in indexer member initializers. + + + '{0}' cannot be made nullable. + + + The type name '{0}' only contains lower-cased ascii characters. Such names may become reserved for the language. + + + The type name only contains lower-cased ascii characters. Such names may become reserved for the language. + + + Types and aliases cannot be named 'required'. + + + required members + + + '{0}' must be required because it overrides required member '{1}' + + + Required member '{0}' cannot be hidden by '{1}'. + + + Required member '{0}' cannot be less visible or have a setter less visible than the containing type '{1}'. + + + Do not use 'System.Runtime.CompilerServices.RequiredMemberAttribute'. Use the 'required' keyword on required fields and properties instead. + + + Required member '{0}' must be settable. + + + Required member '{0}' must be set in the object initializer or attribute constructor. + + + Required member '{0}' must be assigned a value, it cannot use a nested member or collection initializer. + + + The required members list for '{0}' is malformed and cannot be interpreted. + + + The required members list for the base type '{0}' is malformed and cannot be interpreted. To use this constructor, apply the 'SetsRequiredMembers' attribute. + + + Line contains different whitespace than the closing line of the raw string literal: '{0}' versus '{1}' + + + Keyword 'enum' cannot be used as a constraint. Did you mean 'struct, System.Enum'? + + + Keyword 'delegate' cannot be used as a constraint. Did you mean 'System.Delegate'? + + + Unexpected keyword 'record'. Did you mean 'record struct' or 'record class'? + + + checked user-defined operators + + + User-defined operator '{0}' cannot be declared checked + + + An 'implicit' user-defined conversion operator cannot be declared checked + + + The operator '{0}' requires a matching non-checked version of the operator to also be defined + + + The input string cannot be converted into the equivalent UTF-8 byte representation. {0} + + + UTF-8 string literals + + + An expression tree may not contain UTF-8 string conversion or literal. + + + This constructor must add 'SetsRequiredMembers' because it chains to a constructor that has that attribute. + + + '{2}' cannot satisfy the 'new()' constraint on parameter '{1}' in the generic type or or method '{0}' because '{2}' has required members. + + + File-local type '{0}' cannot be used in a member signature in non-file-local type '{1}'. + + + File-local type '{0}' cannot use accessibility modifiers. + + + File-local type '{0}' cannot be used as a base type of non-file-local type '{1}'. + + + File-local type '{0}' must be defined in a top level type; '{0}' is a nested type. + + + File-local type '{0}' cannot be used because the containing file path cannot be converted into the equivalent UTF-8 byte representation. {1} + + + File-local type '{0}' cannot be used in a 'global using static' directive. + + + Types and aliases cannot be named 'file'. + + + File-local type '{0}' must be declared in a file with a unique path. Path '{1}' is used in multiple files. + + + unsigned right shift + + + relaxed shift operator + + + '{0}' requires compiler feature '{1}', which is not supported by this version of the C# compiler. + + + Required member '{0}' should not be attributed with 'ObsoleteAttribute' unless the containing type is obsolete or all constructors are obsolete. + + + Members attributed with 'ObsoleteAttribute' should not be required unless the containing type is obsolete or all constructors are obsolete. + + + Ref returning properties cannot be required. + + + Unexpected keyword 'unchecked' + + + '{0}' does not implement interface member '{1}'. '{2}' cannot implicitly implement an inaccessible member. + + + Required members are not allowed on the top level of a script or submission. + + + One of the parameters of an equality, or inequality operator declared in interface '{0}' must be a type parameter on '{0}' constrained to '{0}' + + + Operator '{0}' cannot be applied to operands of type '{1}' and '{2}' that are not UTF-8 byte representations + + + Implicitly typed lambda parameter '{0}' cannot have a default value. + + + Parameter {0} has default value '{1:10}' in lambda but '{2:10}' in the target delegate type. + + + The default parameter value does not match in the target delegate type. + + + file types + + + Cannot use a numeric constant or relational pattern on '{0}' because it inherits from or extends 'INumberBase<T>'. Consider using a type pattern to narrow to a specifc numeric type. + + + array access + + + pointer element access + + + Types and aliases cannot be named 'scoped'. + + + UnscopedRefAttribute cannot be applied to this parameter because it is unscoped by default. + + + UnscopedRefAttribute can only be applied to struct instance methods and properties, and cannot be applied to constructors or init-only members. + + + UnscopedRefAttribute cannot be applied to an interface implementation. + + + Target runtime doesn't support ref fields. + + + Do not use 'System.Runtime.CompilerServices.ScopedRefAttribute'. Use the 'scoped' keyword instead. + + + Analyzer reference '{0}' specified multiple times + + + Analyzer reference specified multiple times + + + The namespace '{1}' already contains a definition for '{0}' in this file. + + + UnscopedRefAttribute cannot be applied to parameters that have a 'scoped' modifier. + + + 'readonly' is not supported as a parameter modifier. Did you mean 'in'? + + + The 'scoped' modifier cannot be used with discard. + + + A deconstruction variable cannot be declared as a ref local + + + lambda optional parameters + + + lambda params array + + + Parameter {0} has params modifier in lambda but not in target delegate type. + + + Parameter has params modifier in lambda but not in target delegate type. + + + + DiagnosticAnalyzer for C# compiler's syntax/semantic/compilation diagnostics. + + + + + Determines if is of a specified kind. + + The source token. + The syntax kind to test for. + if the token is of the specified kind; otherwise, . + + + + Determines if is of a specified kind. + + The source trivia. + The syntax kind to test for. + if the trivia is of the specified kind; otherwise, . + + + + Determines if is of a specified kind. + + The source node. + The syntax kind to test for. + if the node is of the specified kind; otherwise, . + + + + Determines if is of a specified kind. + + The source node or token. + The syntax kind to test for. + if the node or token is of the specified kind; otherwise, . + + + + + + + Returns the index of the first node of a specified kind in the node list. + + Node list. + The to find. + Returns non-negative index if the list contains a node which matches , -1 otherwise. + + + + True if the list has at least one node of the specified kind. + + + + + Returns the index of the first node of a specified kind in the node list. + + Node list. + The to find. + Returns non-negative index if the list contains a node which matches , -1 otherwise. + + + + True if the list has at least one node of the specified kind. + + + + + Returns the index of the first trivia of a specified kind in the trivia list. + + Trivia list. + The to find. + Returns non-negative index if the list contains a trivia which matches , -1 otherwise. + + + + True if the list has at least one trivia of the specified kind. + + + + + Returns the index of the first token of a specified kind in the token list. + + Token list. + The to find. + Returns non-negative index if the list contains a token which matches , -1 otherwise. + + + + Tests whether a list contains a token of a particular kind. + + + The to test for. + Returns true if the list contains a token which matches + + + + An array of child bound nodes. + + Note that any of the child nodes may be null. + + + diff --git a/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.dll b/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.dll new file mode 100644 index 00000000..436aaedd Binary files /dev/null and b/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.dll differ diff --git a/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.xml b/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.xml new file mode 100644 index 00000000..b4114196 --- /dev/null +++ b/SpaceWarpPatcherLibraries/Microsoft.CodeAnalysis.xml @@ -0,0 +1,40432 @@ + + + + Microsoft.CodeAnalysis + + + + + Represents a non source code file. + + + + + Path to the file. + + + + + Returns a with the contents of this file, or null if + there were errors reading the file. + + + + + Errors encountered when trying to read the additional file. Always empty if + has not been called. + + + + + If is set, then will be null. + The only arity in that case will be encoded in the symbol. + + + + + + + + + This is base class for a bag used to accumulate information while binding is performed. + Including diagnostic messages and dependencies in the form of "used" assemblies. + + + + + An information that should be reported at a call site of a symbol. + + + + + Diagnostic info that should be reported at the use site of the symbol, or null if there is none. + + + + + When not-null, this is primary dependency of the use-site, usually the assembly defining the used symbol. + Never a core library. Usually it is not included into the . + Null if is an error. + + + + + The set of other assemblies the use site will depend upon, excluding a core library. + Empty if is an error. + + + + + A helper used to combine information from multiple s related to the same + use site. + + + + + A helper used to efficiently cache in the symbol. + + + + + Either + - null (meaning no diagnostic info and dependencies), or + - a , or + - dependencies as a , or + - a tuple of a and a . + + + + + Diagnostic info that should be reported at the use site of the symbol, or null if there is none. + + + + + The set of assemblies the use site will depend upon, excluding assembly for core library. + Empty or null if is an error. + + + + + Case-insensitive operations (mostly comparison) on unicode strings. + + + + + ToLower implements the Unicode lowercase mapping + as described in ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt. + VB uses these mappings for case-insensitive comparison. + + + If is upper case, then this returns its Unicode lower case equivalent. Otherwise, is returned unmodified. + + + + This class seeks to perform the lowercase Unicode case mapping. + + + + + Returns a StringComparer that compares strings according to Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + + These are also the rules used for VB identifier comparison. + + + + + Returns a StringComparer that compares strings according to Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + + These are also the rules used for VB identifier comparison. + + + + + Determines if two strings are equal according to Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + First identifier to compare + Second identifier to compare + true if the identifiers should be considered the same. + + These are also the rules used for VB identifier comparison. + + + + + Determines if two strings are equal according to Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + First identifier to compare + Second identifier to compare + true if the identifiers should be considered the same. + + These are also the rules used for VB identifier comparison. + + + + + Determines if the string 'value' end with string 'possibleEnd'. + + + + + + + + Determines if the string 'value' starts with string 'possibleStart'. + + + + + + + + Compares two strings according to the Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + First identifier to compare + Second identifier to compare + -1 if < , 1 if > , 0 if they are equal. + + These are also the rules used for VB identifier comparison. + + + + + Compares two strings according to the Unicode rules for case-insensitive + identifier comparison (lower-case mapping). + + First identifier to compare + Second identifier to compare + -1 if < , 1 if > , 0 if they are equal. + + These are also the rules used for VB identifier comparison. + + + + + Gets a case-insensitive hash code for Unicode identifiers. + + identifier to get the hash code for + The hash code for the given identifier + + These are also the rules used for VB identifier comparison. + + + + + Convert a string to lower case per Unicode + + + + + + + In-place convert string in StringBuilder to lower case per Unicode rules + + + + + + Constructs and caches already created pseudo-methods. + Every compiled module is supposed to have one of this, created lazily + (multidimensional arrays are not common). + + + + + Acquires an array constructor for a given array type + + + + + Acquires an element getter method for a given array type + + + + + Acquires an element setter method for a given array type + + + + + Acquires an element referencer method for a given array type + + + + + Maps {array type, method kind} tuples to implementing pseudo-methods. + + + + + lazily fetches or creates a new array method. + + + + + "newobj ArrayConstructor" is equivalent of "newarr ElementType" + when working with multidimensional arrays + + + + + "call ArrayGet" is equivalent of "ldelem ElementType" + when working with multidimensional arrays + + + + + "call ArrayAddress" is equivalent of "ldelema ElementType" + when working with multidimensional arrays + + + + + "call ArraySet" is equivalent of "stelem ElementType" + when working with multidimensional arrays + + + + + Represents a parameter in an array pseudo-method. + + NOTE: It appears that only number of indices is used for verification, + types just have to be Int32. + Even though actual arguments can be native ints. + + + + + Represents the "value" parameter of the Set pseudo-method. + + NOTE: unlike index parameters, type of the value parameter must match + the actual element type. + + + + + Base of all array methods. They have a lot in common. + + + + + Block is not reachable or reachability analysis + has not been performed. + + + + + Block can be reached either falling through + from previous block or from branch. + + + + + Block is reachable from try or catch but + finally prevents falling through. + + + + + Returns true if this block has a branch label + and is not a "nop" branch. + + + + + Instructions that are not branches. + + + + + The block contains only the final branch or nothing at all + + + + + Updates position of the current block to account for shorter sizes of previous blocks. + + + + + + If possible, changes the branch code of the current block to the short version and + updates the delta correspondingly. + + Position delta created by previous block size reductions. + + + + replaces branches with more compact code if possible. + * same branch as in the next ===> nop + * branch to the next block ===> nop + * branch to ret block ===> ret + * cond branch over uncond branch ===> flip condition, skip next block + * cond branch to equivalent ===> pop args + nop + + + + + Blocks are identical if: + 1) have same regular instructions + 2) lead to unconditional control transfer (no fall through) + 3) branch with the same instruction to the same label + + + + + Returns reversed branch operation for the current block. + If no reverse opcode can be obtained Nop is returned. + + + + + Abstract Execution state. + If we know something interesting about IL stream we put it here. + + + + + Eval stack's high watermark. + + + + + Current evaluation stack depth. + + + + + Record effects of that currently emitted instruction on the eval stack. + + + + + In some cases we have to get a final IL offset during emit phase, for example for + proper emitting sequence points. The problem is that before the builder is realized we + don't know the actual IL offset, but only {block/offset-in-the-block} pair. + + Thus, whenever we need to mark some IL position we allocate a new marker id, store it + in allocatedILMarkers and reference this IL marker in the entity requiring the IL offset. + + IL markers will be 'materialized' when the builder is realized; the resulting offsets + will be put into allocatedILMarkers array. Note that only markers from reachable blocks + are materialized, the rest will have offset -1. + + + + + Realizes method body. + No more data can be added to the builder after this call. + + + + + Gets all scopes that contain variables. + + + + + Gets all scopes that contain variables. + + + + + IL opcodes emitted by this builder. + This includes branch instructions that end blocks except if they are fall-through NOPs. + + This count allows compilers to see if emitting a particular statement/expression + actually produced any instructions. + + Example: a label will not result in any code so when emitting debugging information + an extra NOP may be needed if we want to decorate the label with sequence point. + + + + + Marks blocks that are reachable. + + + + + Marks blocks that are recursively reachable from the given block. + + + + + If a label points to a block that does nothing other than passing to block X, + replaces target label's block with block X. + + + + + + Drops blocks that are not reachable + Returns true if any blocks were dropped + + + + + Marks all blocks unreachable. + + + + + Rewrite any block marked as BlockedByFinally as an "infinite loop". + + + Matches the code generated by the native compiler in + ILGENREC::AdjustBlockedLeaveTargets. + + + + + Returns true if the block has the signature of the special + labeled block that follows a complete try/catch or try/finally. + + + + + Returns true if any branches were optimized (that does not include shortening) + We need this because optimizing a branch may result in unreachable code that needs to be eliminated. + + === Example: + + x = 1; + + if (blah) + { + global = 1; + } + else + { + throw null; + } + + return x; + + === rewrites into + + push 1; + + if (blah) + { + global = 1; + ret; + } + else + { + throw null; + } + + // this ret unreachable now! + // even worse - empty stack is assumed thus the ret is illegal. + ret; + + + + + + Define a sequence point with the given syntax tree and span within it. + + + + + Defines a hidden sequence point. + The effect of this is that debugger will not associate following code + with any source (until it sees a lexically following sequence point). + + This is used for synthetic code that is reachable through labels. + + If such code is not separated from previous sequence point by the means of a hidden sequence point + It looks as a part of the statement that previous sequence point specifies. + As a result, when user steps through the code and goes through a jump to such label, + it will appear as if the jump landed at the beginning of the previous statement. + + NOTE: Also inserted as the first statement of a method that would not otherwise have a leading + sequence point so that step-into will find the method body. + + + + + Define a hidden sequence point at the first statement of + the method so that step-into will find the method body. + + + + + This is called when starting emitting a method for which there is some source. + It is done in case the first sequence point is a hidden point. + Even though hidden points do not have syntax, they need to associate with some document. + + + + + Marks the end of filter condition and start of the actual filter handler. + + + + + Puts local variable into current scope. + + + + + Puts local constant into current scope. + + + + + Mark current IL position with a label + + + + + Primary method for emitting string switch jump table + + switch case labels + fall through label for the jump table + Local holding the value to switch on. + This value has already been loaded onto the execution stack. + + Local holding the hash value of the key for emitting + hash table switch. Hash value has already been computed and loaded into keyHash. + This parameter is null if emitting non hash table switch. + + + Delegate to emit string compare call and conditional branch based on the compare result. + + + Delegate to compute string hash consistent with value of keyHash. + + + + + Primary method for emitting integer switch jump table. + + switch case labels + fall through label for the jump table. + Local or parameter holding the value to switch on. + This value has already been loaded onto the execution stack. + + Primitive type code of switch key. + + + + Finishes filter condition (and starts actual handler portion of the handler). + Returns the last block of the condition. + + + + + Generates code that creates an instance of multidimensional array + + + + + Generates code that loads an element of a multidimensional array + + + + + Generates code that loads an address of an element of a multidimensional array. + + + + + Generates code that stores an element of a multidimensional array. + + + + + Contains information about a label. + + + + + Sometimes we need to know if a label is targeted by conditional branches. + For example optimizer can do optimizations of branches into outer try scopes only + if they are unconditional (because there are no conditional Leave opcodes) + + + + + Used when we see a branch, but label is not yet marked. + + + + + Used when label is marked to the code. + + + + + Gets all scopes that contain variables. + + + + + Returns an ExceptionHandlerRegion for each exception handler clause + beneath the root scope. Each ExceptionHandlerRegion indicates the type + of clause (catch or finally) and the bounds of the try block and clause block. + + + + + Base class for IL scopes where a scope contains IL blocks and other nested + scopes. A scope may represent a scope for variable declarations, an exception + handler clause, or an entire exception handler (multiple clauses). + + + + + Recursively calculates the start and end of the given scope. + Only scopes with locals are actually dumped to the list. + + + + + Recursively calculates the start and end of the given scope. + Only scopes with locals are actually dumped to the list. + + + + + Free any basic blocks owned by this scope or sub-scopes. + + + + + Class that collects content of the scope (blocks, nested scopes, variables etc). + There is one for every opened scope. + + + + + A scope for a single try, catch, or finally clause. If the clause + is a catch clause, ExceptionType will be set. + + + + + A scope for an entire exception handler (a try block with either several + catches or a finally block). Unlike other scopes, this scope contains + nested scopes only, no IL blocks (although nested ExceptionHandlerScopes + for the clauses will contain IL blocks). + + + + + Compares scopes by their start (ascending) and then size (descending). + + + + + Unique identification of an emitted entity (method, lambda, closure) used for debugging purposes (EnC). + + + When used for a synthesized method the ordinal and generation numbers are included its name. + For user defined methods the ordinal is included in Custom Debug Information record attached to the method. + + + + + The index of the method in member list of the containing type, or if undefined. + + + + + The EnC generation the method was defined in (0 is the baseline build). + + + + + These opcodes represent control transfer. + They should not appear inside basic blocks. + + + + + Opcodes that represents a branch to a label. + + + + + Handles storage of items referenced via tokens in metadata. When items are stored + they are uniquely "associated" with fake tokens, which are basically sequential numbers. + IL gen will use these fake tokens during codegen and later, when actual values + are known, the method bodies will be patched. + To support these two scenarios we need two maps - Item-->uint, and uint-->Item. (The second is really just a list). + + + + Gets a field that may be used to lazily cache an array created to store the specified data. + This is used to cache an array created with the data passed to . + + + + Gets the or corresponding to this token. + + + + + Debug information maintained for each lambda. + + + The information is emitted to PDB in Custom Debug Information record for a method containing the lambda. + + + + + The syntax offset of the syntax node declaring the lambda (lambda expression) or its body (lambda in a query). + + + + + The ordinal of the closure frame the lambda belongs to, or + if the lambda is static, or + if the lambda is closed over "this" pointer only. + + + + + We need a CCI representation for local constants because they are emitted as locals in + PDB scopes to improve the debugging experience (see LocalScopeProvider.GetConstantsInScope). + + + + + Id that associates an emitted user-defined or long-lived synthesized local variable + with a syntax node that defined it. If a syntax node defines multiple variables it + provides information necessary to identify which one of these variables is it. + + + + + We calculate a "syntax offset" for each user-defined and long-lived synthesized variable. + Every such variable symbol has to be associated with a syntax node (its declarator). + In usual cases this is the textual distance of the declarator from the start of the method body. + It gets a bit complicated when the containing method body is not contiguous (constructors). + If the variable is in the body of the constructor the definition of syntax offset is the same. + If the variable is defined in a constructor initializer or in a member initializer + (this is only possible when declaration expressions or closures in primary constructors are involved) + then the distance is a negative sum of the widths of all the initializers that succeed the declarator + of the variable in the emitted constructor body plus the relative offset of the declarator from + the start of the containing initializer. + + + + + If a single node is a declarator for multiple variables of the same synthesized kind (it can only happen for synthesized variables) + we calculate additional number "ordinal" for such variable. We assign the ordinals to the synthesized variables with the same kind + and syntax offset in the order as they appear in the lowered bound tree. It is important that a valid EnC edit can't change + the ordinal of a synthesized variable. If it could it would need to be assigned a different kind or associated with a different declarator node. + + + + . + + + + Creates a new LocalDefinition. + + Local symbol, used by edit and continue only, null otherwise. + Name associated with the slot. + Type associated with the slot. + Slot position in the signature. + Local kind. + Local id. + Value to emit in the attributes field in the PDB. + Specifies whether slot type should have pinned modifier and whether slot should have byref constraint. + The synthesized dynamic attributes of the local. + Tuple element names of the local. + + + + At this level there are two kinds of local variables: + + + Locals - have identities by which consuming code refers to them. + Typical use is a local variable or a compiler generated temp that can be accessed in multiple operations. + Any object can be used as identity. Reference equality is used. + + + Temps - do not have identity. They are borrowed and returned to the free list. + Typical use is a scratch temporary or spilling storage. + + + + + + + Structure that represents a local signature (as in ECMA-335, Partition I, §8.6.1.3 Local signatures). + + + + + Retrieve a local slot by its symbol. + + + + + Release a local slot by its symbol. + Slot is not associated with symbol after this. + + + + + Gets a local slot. + + + + + Frees a local slot. + + + + + An expression that creates an array instance in metadata. Only for use in custom attributes. + + + + + An expression that represents a (name, value) pair and that is typically used in method calls, custom attributes and object initializers. + + + + + The name of the parameter or property or field that corresponds to the argument. + + + + + The value of the argument. + + + + + True if the named argument provides the value of a field. + + + + + An expression that results in a System.Type instance. + + + + + The type that will be represented by the System.Type instance. + + + + + Holds on to the method body data. + + + + + This is a list of the using directives that were in scope for this method body. + + + + + True if there's a stackalloc somewhere in the method. + + + + + This class represents the PermissionSetAttribute specified in source which needs fixup during codegen. + + + PermissionSetAttribute needs fixup when it contains an assignment to the 'File' property as a single named attribute argument. + Fixup performed is ported from SecurityAttributes::FixUpPermissionSetAttribute at ndp\clr\src\vm\securityattributes.cpp. + It involves following steps: + 1) Verifying that the specified file name resolves to a valid path: This is done during binding. + 2) Reading the contents of the file into a byte array. + 3) Convert each byte in the file content into two bytes containing hexadecimal characters (see method ). + 4) Replacing the 'File = fileName' named argument with 'Hex = hexFileContent' argument, where hexFileContent is the converted output from step 3) above. + + + + + Zero or more positional arguments for the attribute constructor. + + + + + A reference to the constructor that will be used to instantiate this custom attribute during execution (if the attribute is inspected via Reflection). + + + + + Zero or more named arguments that specify values for fields and properties of the attribute. + + + + + The number of positional arguments. + + + + + The number of named arguments. + + + + + The type of the attribute. For example System.AttributeUsageAttribute. + + + + + Exception class to enable generating ERR_PermissionSetAttributeFileReadError while reading the file for PermissionSetAttribute fixup. + + + + + TypeDefinition that represents <PrivateImplementationDetails> class. + The main purpose of this class so far is to contain mapped fields and their types. + + + + + Gets a field that can be used to cache an array allocated to store data from a corresponding call. + + The data that will be used to initialize the field. + The type of the field, e.g. int[]. + The emit context to use with the array type to extract its element type. + The field to use to cache an array for this data and alignment. + + + + Gets a field that can be used to to store data directly in an RVA field. + + The data for the field. + + The alignment value is the necessary alignment for addresses for the underlying element type of the array. + The data is stored by using a type whose size is equal to the total size of the blob. If a built-in system + type has an appropriate size and .pack, it can be used. Otherwise, a type is generated of the same size as + the data, and that type needs its .pack set to the alignment required for the underlying data. While that + .pack value isn't required by anything else in the compiler (the compiler always aligns RVA fields at 8-byte + boundaries, which accomodates any element type that's relevant), it is necessary for IL rewriters. Such rewriters + also need to ensure an appropriate alignment is maintained for the RVA field, and while they could also simplify + by choosing a worst-case alignment as does the compiler, they may instead use the .pack value as the alignment + to use for that field, since it's an opaque blob with no other indication as to what kind of data is + stored and what alignment might be required. + + The field. This may have been newly created or may be an existing field previously created for the same data and alignment. + + + + Simple struct type with explicit size and no members. + + + + + Definition of a simple field mapped to a metadata block + + + + + Definition of a field for storing an array caching the data from a metadata block. + + + + + Just a default implementation of a type definition. + + + + + Represents a sequence point before translation by #line/ExternalSource directives. + + + + + Some features of the compiler (such as anonymous types, pay-as-you-go, NoPIA, ...) + rely on all referenced symbols to go through translate mechanism. Because by default + symbol translator does not translate some of indirectly referenced symbols, such as + type argument, we have to force translation here + + This class provides unified implementation for this functionality. + + + + + Scope of user-defined variable hoisted to state machine. + + + + + Maintains a list of sequence points in a space efficient way. Most of the time sequence points + occur in the same syntax tree, so optimize for that case. Store a sequence point as an offset, and + position in a syntax tree, then translate to CCI format only on demand. + + Use a ArrayBuilder{RawSequencePoint} to create. + + + + + Create a SequencePointList with the raw sequence points from an ArrayBuilder. + A linked list of instances for each syntax tree is created (almost always of length one). + + + + + Get all the sequence points, possibly mapping them using #line/ExternalSource directives, and mapping + file names to debug documents with the given mapping function. + + Function that maps file paths to CCI debug documents + where sequence points should be deposited + + + + Represents the combination of an IL offset and a source text span. + + + + + A local whose type is represented by a metadata signature instead of a type symbol. + + + Used when emitting a new version of a method during EnC for variables that are no longer used. + + + + + This temp is not interesting to the expression compiler. However, it + may be replaced by an interesting local in a later stage. + + + + + Debug information maintained for each state machine. + Facilitates mapping of state machine states from a compilation to the previous one (or to a metadata baseline) during EnC. + + + + + The number of the first state that has not been used in any of the previous versions of the state machine, + or null if we are not generating EnC delta. + + For 1st generation EnC delta, this is calculated by examining the stored in the baseline metadata. + For subsequent generations, the number is updated to account for newly generated states in that generation. + + + + + The number of the first state that has not been used in any of the previous versions of the state machine, + or null if we are not generating EnC delta, or the state machine has no decreasing states. + + For 1st generation EnC delta, this is calculated by examining the stored in the baseline metadata. + For subsequent generations, the number is updated to account for newly generated states in that generation. + + + + + Class for emitting the switch jump table for switch statements with integral governing type + + + + + Switch key for the jump table + + + + + Primitive type of the switch key + + + + + Fall through label for the jump table + + + + + Integral case labels sorted and indexed by their ConstantValue + + + + + Degenerate buckets here are buckets with contiguous range of constants + leading to the same label. Like: + + case 0: + case 1: + case 2: + case 3: + DoOneThing(); + break; + + case 4: + case 5: + case 6: + case 7: + DoAnotherThing(); + break; + + NOTE: A trivial bucket with only one case constant is by definition degenerate. + + + + + Try to merge with the nextBucket. + If merge results in a better bucket than two original ones, merge and return true. + Else don't merge and return false. + + + + + Switch key for the jump table + + + + + Switch case labels + + + + + Fall through label for the jump table + + + + + Delegate to emit string compare call and conditional branch based on the compare result. + + Key to compare + Case constant to compare the key against + Target label to branch to if key = stringConstant + + + + Delegate to compute string hash code. + This piece is language-specific because VB treats "" and null as equal while C# does not. + + + + + Delegate to emit string compare call + + + + + Delegate to emit string hash + + + + + Local storing the key hash value, used for emitting hash table based string switch. + + + + + Dispenser of unique ordinals for synthesized variable names that have the same kind and syntax offset. + + + + + Handles storage of items referenced via tokens in metadata (strings or Symbols). + When items are stored they are uniquely "associated" with fake token, which is basically + a sequential number. + IL gen will use these fake tokens during codegen and later, when actual token values are known + the method bodies will be patched. + To support these two scenarios we need two maps - Item-->uint, and uint-->Item. (the second is really just a list). + This map supports tokens of type and . + + + + + Returns an index of a slot that stores specified hoisted local variable in the previous generation. + + + + + Number of slots reserved for hoisted local variables. + + + Some of the slots might not be used anymore (a variable might have been deleted or its type changed). + Still, new hoisted variables are assigned slots starting with . + + + + + Returns true and an index of a slot that stores an awaiter of a specified type in the previous generation, if any. + + + + + Number of slots reserved for awaiters. + + + Some of the slots might not be used anymore (the type of an awaiter might have changed). + Still, new awaiters are assigned slots starting with . + + + + + The id of the method, or null if the method wasn't assigned one. + + + + + Finds a closure in the previous generation that corresponds to the specified syntax. + + + See LambdaFrame.AssertIsLambdaScopeSyntax for kinds of syntax nodes that represent closures. + + + + + Finds a lambda in the previous generation that corresponds to the specified syntax. + The is either a lambda syntax ( is false), + or lambda body syntax ( is true). + + + + + State number to be used for next state of the state machine, + or if none of the previous versions of the method was a state machine with an increasing state + + True if the state number increases with progress, false if it decreases (e.g. states for iterator try-finally blocks, or iterator states of async iterators). + + + + For a given node associated with entering a state of a state machine in the new compilation, + returns the ordinal of the corresponding state in the previous version of the state machine. + + + True if there is a corresponding node in the previous code version that matches the given . + + + is an await expression, yield return statement, or try block syntax node. + + + + + First state of an async iterator state machine that is used to resume the machine after yield return. + Initial state is not used to resume state machine that yielded. State numbers decrease as the iterator makes progress. + + + + + Initial iterator state of an async iterator. + Distinct from so that DisposeAsync can throw in latter case. + + + + + First state of an iterator state machine. State numbers decrease for subsequent finalize states. + + + + + First state in async state machine that is used to resume the machine after await. + State numbers increase as the async computation makes progress. + + + + + Initial iterator state of an iterator. + + + + + First state in iterator state machine that is used to resume the machine after yield return. + Initial state is not used to resume state machine that yielded. State numbers increase as the iterator makes progress. + + + + + Maps an array builder to immutable array. + + + + The array to map + The mapping delegate + If the items's length is 0, this will return an empty immutable array + + + + Maps an array builder to immutable array. + + + + + The sequence to map + The mapping delegate + The extra input used by mapping delegate + If the items's length is 0, this will return an empty immutable array. + + + + Maps an array builder to immutable array. + + + + + The sequence to map + The mapping delegate + The extra input used by mapping delegate + If the items's length is 0, this will return an empty immutable array. + + + + Create BitArray with at least the specified number of bits. + + + + + return a bit array with all bits set from index 0 through bitCount-1 + + + + + + + Make a copy of a bit array. + + + + + + Invert all the bits in the vector. + + + + + Is the given bit array null? + + + + + Modify this bit vector by bitwise AND-ing each element with the other bit vector. + For the purposes of the intersection, any bits beyond the current length will be treated as zeroes. + Return true if any changes were made to the bits of this bit vector. + + + + + Modify this bit vector by '|'ing each element with the other bit vector. + + + True if any bits were set as a result of the union. + + + + + The CachingLookup class provides a convenient representation of an ILookup that is based + upon a potentially slow lookup, and caches lookup results so that subsequent lookups are + fast. Internally a ConcurrentDictionary is used to cache lookup results. The client provides + two delegates to perform lookups: One that maps a key to a IEnumerable of values, and one + that provides all keys. + + The client must provide an IEqualityComparer used for comparing keys. Failed lookups are + cached, but that has the disadvantage that every different failed lookup will consume a + small amount of extra memory. However, that memory can be reclaimed by forcing a full + population of the cache. + + Thread safe. + + + + + Create a CachingLookup. + + A function that takes a key, and returns an IEnumerable of values that + correspond to that key. If no values correspond, the function may either return null or an empty + IEnumerable. + A function that returns an IEnumerable of all keys that have associated values. + A IEqualityComparer used to compare keys. + + + + Does this key have one or more associated values? + + + + + Get the values associated with a key. + + Key to look up. + All values associated with key. Returns an empty IEnumerable if + no values are associated. Never returns null. + + + + Get the number of distinct keys. + Forces a full population of the cache. + + + + + Enumerate all the keys. + Forces a full population of the cache. + + + + + Add the values from all keys to a flat array. + Forces a full population of the cache. + + + + + + Create an instance of the concurrent dictionary. + + The concurrent dictionary + + + + Create a dictionary instance suitable for use as the fully populated map. + + A new, empty dictionary, suitable for use as the fully populated map. + + + + Use the underlying (possibly slow) functions to get the values associated with a key. + + + + + Add a new value with the given key to the given concurrent map. + + The concurrent map to augment. + The key of the new entry. + The added entry. If there was a race, and another thread beat this one, then this returns the previously added entry. + + + + Determines if the given map is fully populated. + + The map to test. + true if the map is fully populated. + + + + Create the fully populated map from an existing map and the key generator. + + The existing map which may be null or a ConcurrentDictionary. + + + + + Fully populate the underlying dictionary. Once this returns, the dictionary is guaranteed + to have every key in it. + + + + + A MultiDictionary that allows only adding, and preserves the order of values added to the + dictionary. Thread-safe for reading, but not for adding. + + + Always uses the default comparer. + + + + + Add a value to the dictionary. + + + + + Get all values associated with K, in the order they were added. + Returns empty read-only array if no values were present. + + + + + Get a collection of all the keys. + + + + + Each value is either a single V or an . + Never null. + + + + + A set of ints that is small, thread-safe and lock free. + Several assumptions have been made that allow it to be small and fast: + 1. Deletes never happen. + 2. The size is small. In dogfooding experiments, 89% had 4 or fewer elements and + 98% had 8 or fewer elements. The largest size was 17. + 3. As a result of assumption 2, linear look-up is good enough. + 4. One value, in this case int.MinValue, is used as a sentinel and may never appear in the set. + + + + + Determine if the given integer appears in the set. + + The value to look up. + true if appears in the set. false otherwise. + + + + Insert the given value into the set. + + The value to insert + true if was added. false if it was already present. + + + + If the given slot is unoccupied, then try to replace it with a new value. + + The slot to examine. + The new value to insert if the slot is unoccupied. + An out param indicating whether the slot was successfully updated. + true if the value in the slot either now contains, or already contained . false otherwise. + + + + Provides methods for creating a segmented dictionary that is immutable; meaning it cannot be changed once it is + created. + + + + + Represents a segmented dictionary that is immutable; meaning it cannot be changed once it is created. + + + There are different scenarios best for and others + best for . + + In general, is applicable in scenarios most like + the scenarios where is applicable, and + is applicable in scenarios most like the scenarios where + is applicable. + + The following table summarizes the performance characteristics of + : + + + + Operation + Complexity + Complexity + Comments + + + Item + O(1) + O(log n) + Directly index into the underlying segmented dictionary + + + Add() + O(n) + O(log n) + Requires creating a new segmented dictionary + + + + This type is backed by segmented arrays to avoid using the Large Object Heap without impacting algorithmic + complexity. + + The type of the keys in the dictionary. + The type of the values in the dictionary. + + This type has a documented contract of being exactly one reference-type field in size. Our own + class depends on it, as well as others externally. + + IMPORTANT NOTICE FOR MAINTAINERS AND REVIEWERS: + + This type should be thread-safe. As a struct, it cannot protect its own fields from being changed from one + thread while its members are executing on other threads because structs can change in place simply by + reassigning the field containing this struct. Therefore it is extremely important that ⚠⚠ Every member + should only dereference this ONCE ⚠⚠. If a member needs to reference the + field, that counts as a dereference of this. Calling other instance members + (properties or methods) also counts as dereferencing this. Any member that needs to use this more + than once must instead assign this to a local variable and use that for the rest of the code instead. + This effectively copies the one field in the struct to a local variable so that it is insulated from other + threads. + + + + + The immutable collection this builder is based on. + + + + + The current mutable collection this builder is operating on. This field is initialized to a copy of + the first time a change is made. + + + + + The return value from the implementation of is + . This is the return value for most instances of this + enumerator. + + + + + The return value from the implementation of is + . This is the return value for instances of this + enumerator created by the implementation in + . + + + + + Private helper class for use only by . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The immutable collection this builder is based on. + + + + + The current mutable collection this builder is operating on. This field is initialized to a copy of + the first time a change is made. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Private helper class for use only by . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a segmented list that is immutable; meaning it cannot be changed once it is created. + + + There are different scenarios best for and others + best for . + + The following table summarizes the performance characteristics of + : + + + + Operation + Complexity + Complexity + Comments + + + Item + O(1) + O(log n) + Directly index into the underlying segmented list + + + Add() + Currently O(n), but could be O(1) with a relatively large constant + O(log n) + Currently requires creating a new segmented list, but could be modified to only clone the segments with changes + + + Insert() + O(n) + O(log n) + Requires creating a new segmented list and cloning all impacted segments + + + + This type is backed by segmented arrays to avoid using the Large Object Heap without impacting algorithmic + complexity. + + The type of the value in the list. + + This type has a documented contract of being exactly one reference-type field in size. Our own + class depends on it, as well as others externally. + + IMPORTANT NOTICE FOR MAINTAINERS AND REVIEWERS: + + This type should be thread-safe. As a struct, it cannot protect its own fields from being changed from one + thread while its members are executing on other threads because structs can change in place simply by + reassigning the field containing this struct. Therefore it is extremely important that ⚠⚠ Every member + should only dereference this ONCE ⚠⚠. If a member needs to reference the + field, that counts as a dereference of this. Calling other instance members + (properties or methods) also counts as dereferencing this. Any member that needs to use this more + than once must instead assign this to a local variable and use that for the rest of the code instead. + This effectively copies the one field in the struct to a local variable so that it is insulated from other + threads. + + + + + The immutable collection this builder is based on. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Private helper class for use only by . + + + + + The immutable collection this builder is based on. + + + + + The current mutable collection this builder is operating on. This field is initialized to a copy of + the first time a change is made. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Swaps the values in the two references if the first is greater than the second. + + + Swaps the values in the two references, regardless of whether the two references are the same. + + + Helper methods for use in array/span sorting routines. + + + + Returns the integer (floor) log of the specified value, base 2. + Note that by convention, input value 0 returns 0 since Log(0) is undefined. + Does not directly use any hardware intrinsics, nor does it incur branching. + + The value. + + + How many ints must be allocated to represent n bits. Returns (n+31)/32, but avoids overflow. + + + Returns approximate reciprocal of the divisor: ceil(2**64 / divisor). + This should only be used on 64-bit. + + + Performs a mod operation using the multiplier pre-computed with . + + PERF: This improves performance in 64-bit scenarios at the expense of performance in 32-bit scenarios. Since + we only build a single AnyCPU binary, we opt for improved performance in the 64-bit scenario. + + + + + Provides static methods to invoke members on value types that explicitly implement the + member. + + + Normally, invocation of explicit interface members requires boxing or copying the value type, which is + especially problematic for operations that mutate the value. Invocation through these helpers behaves like a + normal call to an implicitly implemented member. + + + + + Provides static methods to invoke members on value types that explicitly implement + the member. + + + Normally, invocation of explicit interface members requires boxing or copying the value type, which is + especially problematic for operations that mutate the value. Invocation through these helpers behaves like a + normal call to an implicitly implemented member. + + + + + Provides static methods to invoke members on value types that explicitly implement the + member. + + + Normally, invocation of explicit interface members requires boxing or copying the value type, which is + especially problematic for operations that mutate the value. Invocation through these helpers behaves like a + normal call to an implicitly implemented member. + + + + + Provides static methods to invoke members on value types that explicitly implement + the member. + + + Normally, invocation of explicit interface members requires boxing or copying the value type, which is + especially problematic for operations that mutate the value. Invocation through these helpers behaves like a + normal call to an implicitly implemented member. + + + + + Provides static methods to invoke members on value types that explicitly implement the + member. + + + Normally, invocation of explicit interface members requires boxing or copying the value type, which is + especially problematic for operations that mutate the value. Invocation through these helpers behaves like a + normal call to an implicitly implemented member. + + + + + Used internally to control behavior of insertion into a or . + + + + + The default insertion behavior. + + + + + Specifies that an existing entry with the same key should be overwritten if encountered. + + + + + Specifies that if an existing entry with the same key is encountered, an exception should be thrown. + + + + + Returns a by-ref to type that is a null reference. + + + + + Returns if a given by-ref to type is a null reference. + + + This check is conceptually similar to (void*)(&source) == nullptr. + + + + + A combination of and + . + + + + + Calculates the maximum number of elements of size which can fit into an array + which has the following characteristics: + + The array can be allocated in the small object heap. + The array length is a power of 2. + + + The size of the elements in the array. + The segment size to use for small object heap segmented arrays. + + + + Calculates a shift which can be applied to an absolute index to get the page index within a segmented array. + + The number of elements in each page of the segmented array. Must be a power of 2. + The shift to apply to the absolute index to get the page index within a segmented array. + + + + Calculates a mask, which can be applied to an absolute index to get the index within a page of a segmented + array. + + The number of elements in each page of the segmented array. Must be a power of 2. + The bit mask to obtain the index within a page from an absolute index within a segmented array. + + + Equality comparer for hashsets of hashsets + + + Destination array is not long enough to copy all the items in the collection. Check array index and length. + + + Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table. + + + The given key '{0}' was not present in the dictionary. + + + Destination array was not long enough. Check the destination index, length, and the array's lower bounds. + + + Source array was not long enough. Check the source index, length, and the array's lower bounds. + + + The lower bound of target array must be zero. + + + Only single dimensional arrays are supported for the requested action. + + + The value "{0}" is not of type "{1}" and cannot be used in this generic collection. + + + An item with the same key has already been added. Key: {0} + + + Target array type is not compatible with the type of items in the collection. + + + 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. + + + Number was less than the array's lower bound in the first dimension. + + + Larger than collection size. + + + Count must be positive and count must refer to a location within the string/array/collection. + + + Index was out of range. Must be non-negative and less than the size of the collection. + + + Index must be within the bounds of the List. + + + Non-negative number required. + + + capacity was less than the current size. + + + Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. + + + Collection was modified; enumeration operation may not execute. + + + Enumeration has either not started or has already finished. + + + Failed to compare two elements in the array. + + + Mutating a key collection derived from a dictionary is not allowed. + + + Mutating a value collection derived from a dictionary is not allowed. + + + The specified arrays must have the same number of dimensions. + + + Collection was of a fixed size. + + + Object is not a array with the same number of elements as the array to compare it to. + + + 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}'. + + + Cannot find the old value + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of value stored by the list. + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, + as it may run multiple times when races occur with other threads. + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of value stored by the list. + The type of argument passed to the . + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, as it may run multiple times + when races occur with other threads. + The argument to pass to . + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Assigns a field or variable containing an immutable list to the specified value and returns the previous + value. + + The type of value stored by the list. + The field or local variable to change. + The new value to assign. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable list to the specified value if it is currently equal to + another specified value. Returns the previous value. + + The type of value stored by the list. + The field or local variable to change. + The new value to assign. + The value to check equality for before assigning. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable list to the specified value if it is has not yet been + initialized. + + The type of value stored by the list. + The field or local variable to change. + The new value to assign. + if the field was assigned the specified value; otherwise, + if it was previously initialized. + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of value stored by the set. + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, + as it may run multiple times when races occur with other threads. + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of value stored by the set. + The type of argument passed to the . + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, as it may run multiple times + when races occur with other threads. + The argument to pass to . + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Assigns a field or variable containing an immutable set to the specified value and returns the + previous value. + + The type of value stored by the set. + The field or local variable to change. + The new value to assign. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable set to the specified value if it is currently + equal to another specified value. Returns the previous value. + + The type of value stored by the set. + The field or local variable to change. + The new value to assign. + The value to check equality for before assigning. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable set to the specified value if it is has not yet + been initialized. + + The type of value stored by the set. + The field or local variable to change. + The new value to assign. + if the field was assigned the specified value; otherwise, + if it was previously initialized. + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of key stored by the dictionary. + The type of value stored by the dictionary. + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, + as it may run multiple times when races occur with other threads. + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation + function. The transformation is retried as many times as necessary to win the optimistic locking race. + + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The type of argument passed to the . + + The variable or field to be changed, which may be accessed by multiple threads. + + + A function that mutates the value. This function should be side-effect free, as it may run multiple times + when races occur with other threads. + The argument to pass to . + + if the location's value is changed by applying the result of the + function; otherwise, if the location's value remained + the same because the last invocation of returned the existing value. + + + + + Assigns a field or variable containing an immutable dictionary to the specified value and returns the + previous value. + + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The field or local variable to change. + The new value to assign. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable dictionary to the specified value if it is currently + equal to another specified value. Returns the previous value. + + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The field or local variable to change. + The new value to assign. + The value to check equality for before assigning. + The prior value at the specified . + + + + Assigns a field or variable containing an immutable dictionary to the specified value if it is has not yet + been initialized. + + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The field or local variable to change. + The new value to assign. + if the field was assigned the specified value; otherwise, + if it was previously initialized. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Defines a fixed-size collection with the same API surface and behavior as an "SZArray", which is a + single-dimensional zero-based array commonly represented in C# as T[]. The implementation of this + collection uses segmented arrays to avoid placing objects on the Large Object Heap. + + The type of elements stored in the array. + + + + The number of elements in each page of the segmented array of type . + + + The segment size is calculated according to , performs the IL operation + defined by . ECMA-335 defines this operation with the following note: + + sizeof returns the total size that would be occupied by each element in an array of this type – + including any padding the implementation chooses to add. Specifically, array elements lie sizeof + bytes apart. + + + + + The bit shift to apply to an array index to get the page index within . + + + + + The bit mask to apply to an array index to get the index within a page of . + + + + + Represents a collection of keys and values. + + + This collection has the same performance characteristics as , but + uses segmented arrays to avoid allocations in the Large Object Heap. + + The type of the keys in the dictionary. + The type of the values in the dictionary. + + + + doesn't devirtualize on .NET Framework, so we always ensure + is initialized to a non- value. + + + + + Ensures that the dictionary can hold up to 'capacity' entries without any further expansion of its backing storage + + + + + Sets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries + + + This method can be used to minimize the memory overhead + once it is known that no new elements will be added. + + To allocate minimum size storage array, execute the following statements: + + dictionary.Clear(); + dictionary.TrimExcess(); + + + + + Sets the capacity of this dictionary to hold up 'capacity' entries without any further expansion of its backing storage + + + This method can be used to minimize the memory overhead + once it is known that no new elements will be added. + + + + + 0-based index of next entry in chain: -1 means end of chain + also encodes whether this entry _itself_ is part of the free list by changing sign and subtracting 3, + so -2 means end of free list, -3 means index 0 but on free list, -4 means index 1 but on free list, etc. + + + + Cutoff point for stackallocs. This corresponds to the number of ints. + + + + When constructing a hashset from an existing collection, it may contain duplicates, + so this is used as the max acceptable excess ratio of capacity to count. Note that + this is only used on the ctor and not to automatically shrink if the hashset has, e.g, + a lot of adds followed by removes. Users must explicitly shrink by calling TrimExcess. + This is set to 3 because capacity is acceptable as 2x rounded up to nearest prime. + + + + + doesn't devirtualize on .NET Framework, so we always ensure + is initialized to a non- value. + + + + Initializes the SegmentedHashSet from another SegmentedHashSet with the same element type and equality comparer. + + + Removes all elements from the object. + + + Determines whether the contains the specified element. + The element to locate in the object. + true if the object contains the specified element; otherwise, false. + + + Gets the index of the item in , or -1 if it's not in the set. + + + Gets a reference to the specified hashcode's bucket, containing an index into . + + + Gets the number of elements that are contained in the set. + + + Adds the specified element to the . + The element to add to the set. + true if the element is added to the object; false if the element is already present. + + + Searches the set for a given value and returns the equal value it finds, if any. + The value to search for. + The value from the set that the search found, or the default value of when the search yielded no match. + A value indicating whether the search was successful. + + This can be useful when you want to reuse a previously stored reference instead of + a newly constructed one (so that more sharing of references can occur) or to look up + a value that has more complete data than the value you currently have, although their + comparer functions indicate they are equal. + + + + Modifies the current object to contain all elements that are present in itself, the specified collection, or both. + The collection to compare to the current object. + + + Modifies the current object to contain only elements that are present in that object and in the specified collection. + The collection to compare to the current object. + + + Removes all elements in the specified collection from the current object. + The collection to compare to the current object. + + + Modifies the current object to contain only elements that are present either in that object or in the specified collection, but not both. + The collection to compare to the current object. + + + Determines whether a object is a subset of the specified collection. + The collection to compare to the current object. + true if the object is a subset of ; otherwise, false. + + + Determines whether a object is a proper subset of the specified collection. + The collection to compare to the current object. + true if the object is a proper subset of ; otherwise, false. + + + Determines whether a object is a proper superset of the specified collection. + The collection to compare to the current object. + true if the object is a superset of ; otherwise, false. + + + Determines whether a object is a proper superset of the specified collection. + The collection to compare to the current object. + true if the object is a proper superset of ; otherwise, false. + + + Determines whether the current object and a specified collection share common elements. + The collection to compare to the current object. + true if the object and share at least one common element; otherwise, false. + + + Determines whether a object and the specified collection contain the same elements. + The collection to compare to the current object. + true if the object is equal to ; otherwise, false. + + + Copies the elements of a object to an array, starting at the specified array index. + The destination array. + The zero-based index in array at which copying begins. + + + Removes all elements that match the conditions defined by the specified predicate from a collection. + + + Gets the object that is used to determine equality for the values in the set. + + + Ensures that this hash set can hold the specified number of elements without growing. + + + + Sets the capacity of a object to the actual number of elements it contains, + rounded up to a nearby, implementation-specific value. + + + + Returns an object that can be used for equality testing of a object. + + + + Initializes buckets and slots arrays. Uses suggested capacity by finding next prime + greater than or equal to capacity. + + + + Adds the specified element to the set if it's not already contained. + The element to add to the set. + The index into of the element. + true if the element is added to the object; false if the element is already present. + + + + Checks if this contains of other's elements. Iterates over other's elements and + returns false as soon as it finds an element in other that's not in this. + Used by SupersetOf, ProperSupersetOf, and SetEquals. + + + + + Implementation Notes: + If other is a hashset and is using same equality comparer, then checking subset is + faster. Simply check that each element in this is in other. + + Note: if other doesn't use same equality comparer, then Contains check is invalid, + which is why callers must take are of this. + + If callers are concerned about whether this is a proper subset, they take care of that. + + + + + If other is a hashset that uses same equality comparer, intersect is much faster + because we can use other's Contains + + + + + Iterate over other. If contained in this, mark an element in bit array corresponding to + its position in _slots. If anything is unmarked (in bit array), remove it. + + This attempts to allocate on the stack, if below StackAllocThreshold. + + + + + if other is a set, we can assume it doesn't have duplicate elements, so use this + technique: if can't remove, then it wasn't present in this set, so add. + + As with other methods, callers take care of ensuring that other is a hashset using the + same equality comparer. + + + + + + Implementation notes: + + Used for symmetric except when other isn't a SegmentedHashSet. This is more tedious because + other may contain duplicates. SegmentedHashSet technique could fail in these situations: + 1. Other has a duplicate that's not in this: SegmentedHashSet technique would add then + remove it. + 2. Other has a duplicate that's in this: SegmentedHashSet technique would remove then add it + back. + In general, its presence would be toggled each time it appears in other. + + This technique uses bit marking to indicate whether to add/remove the item. If already + present in collection, it will get marked for deletion. If added from other, it will + get marked as something not to remove. + + + + + + + Determines counts that can be used to determine equality, subset, and superset. This + is only used when other is an IEnumerable and not a SegmentedHashSet. If other is a SegmentedHashSet + these properties can be checked faster without use of marking because we can assume + other has no duplicates. + + The following count checks are performed by callers: + 1. Equals: checks if unfoundCount = 0 and uniqueFoundCount = _count; i.e. everything + in other is in this and everything in this is in other + 2. Subset: checks if unfoundCount >= 0 and uniqueFoundCount = _count; i.e. other may + have elements not in this and everything in this is in other + 3. Proper subset: checks if unfoundCount > 0 and uniqueFoundCount = _count; i.e + other must have at least one element not in this and everything in this is in other + 4. Proper superset: checks if unfound count = 0 and uniqueFoundCount strictly less + than _count; i.e. everything in other was in this and this had at least one element + not contained in other. + + An earlier implementation used delegates to perform these checks rather than returning + an ElementCount struct; however this was changed due to the perf overhead of delegates. + + + Allows us to finish faster for equals and proper superset + because unfoundCount must be 0. + + + + Checks if equality comparers are equal. This is used for algorithms that can + speed up if it knows the other item has unique elements. I.e. if they're using + different equality comparers, then uniqueness assumption between sets break. + + + + + 0-based index of next entry in chain: -1 means end of chain + also encodes whether this entry _itself_ is part of the free list by changing sign and subtracting 3, + so -2 means end of free list, -3 means index 0 but on free list, -4 means index 1 but on free list, etc. + + + + + Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and + manipulate lists. + + + This collection has the same performance characteristics as , but uses segmented + arrays to avoid allocations in the Large Object Heap. + + The type of elements in the list. + + + + Extension methods associated with ConsList. + + + + + The collection of extension methods for the type + + + + + If the given key is not found in the dictionary, add it with the given value and return the value. + Otherwise return the existing value associated with that key. + + + + + A simple class to implement IGrouping. + + + + + A dictionary that maps strings to all known spellings of that string. Can be used to + efficiently store the set of known type names for a module for both VB and C# while also + answering questions like "do you have a type called Goo" in either a case sensitive or + insensitive manner. + + + + + The collection of extension methods for the type + + + + + Converts a sequence to an immutable array. + + Elemental type of the sequence. + The sequence to convert. + An immutable copy of the contents of the sequence. + If items is null (default) + If the sequence is null, this will throw + + + + Converts a sequence to an immutable array. + + Elemental type of the sequence. + The sequence to convert. + An immutable copy of the contents of the sequence. + If the sequence is null, this will return an empty array. + + + + Converts a sequence to an immutable array. + + Elemental type of the sequence. + The sequence to convert. + An immutable copy of the contents of the sequence. + If the sequence is null, this will return the default (null) array. + + + + Converts an array to an immutable array. The array must not be null. + + + The sequence to convert + + + + + Converts a array to an immutable array. + + + The sequence to convert + + If the sequence is null, this will return the default (null) array. + + + + Converts an array to an immutable array. + + + The sequence to convert + If the array is null, this will return an empty immutable array. + + + + Reads bytes from specified . + + The stream. + Read-only content of the stream. + + + + Maps an immutable array to another immutable array. + + + + The array to map + The mapping delegate + If the items's length is 0, this will return an empty immutable array + + + + Maps an immutable array to another immutable array. + + + + + The sequence to map + The mapping delegate + The extra input used by mapping delegate + If the items's length is 0, this will return an empty immutable array. + + + + Maps an immutable array to another immutable array. + + + + + The sequence to map + The mapping delegate + The extra input used by mapping delegate + If the items's length is 0, this will return an empty immutable array. + + + + Maps a subset of immutable array to another immutable array. + + Type of the source array items + Type of the transformed array items + The array to transform + The condition to use for filtering the array content. + A transform function to apply to each element that is not filtered out by . + If the items's length is 0, this will return an empty immutable array. + + + + Maps and flattens a subset of immutable array to another immutable array. + + Type of the source array items + Type of the transformed array items + The array to transform + The condition to use for filtering the array content. + A transform function to apply to each element that is not filtered out by . + If the items's length is 0, this will return an empty immutable array. + + + + Maps an immutable array through a function that returns ValueTasks, returning the new ImmutableArray. + + + + + Zips two immutable arrays together through a mapping function, producing another immutable array. + + If the items's length is 0, this will return an empty immutable array. + + + + Creates a new immutable array based on filtered elements by the predicate. The array must not be null. + + The array to process + The delegate that defines the conditions of the element to search for. + + + + Creates a new immutable array based on filtered elements by the predicate. The array must not be null. + + The array to process + The delegate that defines the conditions of the element to search for. + + + + Casts the immutable array of a Type to an immutable array of its base type. + + + + + Determines whether this instance and another immutable array are equal. + + + + + The comparer to determine if the two arrays are equal. + True if the two arrays are equal + + + + Returns an empty array if the input array is null (default) + + + + + Returns an empty array if the input nullable value type is null or the underlying array is null (default) + + + + + Returns an array of distinct elements, preserving the order in the original array. + If the array has no duplicates, the original array is returned. The original array must not be null. + + + + + A representation of a string of characters that requires O(1) extra space to concatenate two ropes. + + + + + A rope can wrap a simple string. + + + + + A rope can be formed from the concatenation of two ropes. + + + + + Two ropes are "the same" if they represent the same sequence of characters. + + + + + A rope that wraps a simple string. + + + + + A rope that represents the concatenation of two ropes. + + + + + Dictionary designed to hold small number of items. + Compared to the regular Dictionary, average overhead per-item is roughly the same, but + unlike regular dictionary, this one is based on an AVL tree and as such does not require + rehashing when items are added. + It does require rebalancing, but that is allocation-free. + + Major caveats: + 1) There is no Remove method. (can be added, but we do not seem to use Remove that much) + 2) foreach [keys|values|pairs] may allocate a small array. + 3) Performance is no longer O(1). At a certain count it becomes slower than regular Dictionary. + In comparison to regular Dictionary on my machine: + On trivial number of elements (5 or so) it is more than 2x faster. + The break even count is about 120 elements for read and 55 for write operations (with unknown initial size). + At UShort.MaxValue elements, this dictionary is 6x slower to read and 4x slower to write + + Generally, this dictionary is a win if number of elements is small, not known beforehand or both. + + If the size of the dictionary is known at creation and it is likely to contain more than 10 elements, + then regular Dictionary is a better choice. + + + + + Gets a mutable reference to a stored in a using variable. + + + This supporting method allows , a non-copyable + implementing , to be used with using statements while still allowing them to + be passed by reference in calls. The following two calls are equivalent: + + + using var array = TemporaryArray<T>.Empty; + + // Using the 'Unsafe.AsRef' method + Method(ref Unsafe.AsRef(in array)); + + // Using this helper method + Method(ref array.AsRef()); + + + ⚠ Do not move or rename this method without updating the corresponding + RS0049 + analyzer. + + The type of element stored in the temporary array. + A read-only reference to a temporary array which is part of a using statement. + A mutable reference to the temporary array. + + + + Provides temporary storage for a collection of elements. This type is optimized for handling of small + collections, particularly for cases where the collection will eventually be discarded or used to produce an + . + + + This type stores small collections on the stack, with the ability to transition to dynamic storage if/when + larger number of elements are added. + + The type of elements stored in the collection. + + + + The number of elements the temporary can store inline. Storing more than this many elements requires the + array transition to dynamic storage. + + + + + The first inline element. + + + This field is only used when is . In other words, this type + stores elements inline or stores them in , but does not use both approaches + at the same time. + + + + + The second inline element. + + + + + + The third inline element. + + + + + + The fourth inline element. + + + + + + The number of inline elements held in the array. This value is only used when is + . + + + + + A builder used for dynamic storage of collections that may exceed the limit for inline elements. + + + This field is initialized to non- the first time the + needs to store more than four elements. From that point, is used instead of inline + elements, even if items are removed to make the result smaller than four elements. + + + + + Create an with the elements currently held in the temporary array, and clear + the array. + + + + + + Transitions the current from inline storage to dynamic storage storage. An + instance is taken from the shared pool, and all elements currently in inline + storage are added to it. After this point, dynamic storage will be used instead of inline storage. + + + + + Throws . + + + This helper improves the ability of the JIT to inline callers. + + + + + A helper class that contains a topological sort algorithm. + + + + + Produce a topological sort of a given directed acyclic graph, given a set of nodes which include all nodes + that have no predecessors. Any nodes not in the given set, but reachable through successors, will be added + to the result. This is an iterative rather than recursive implementation, so it is unlikely to cause a stack + overflow. + + The type of the node + Any subset of the nodes that includes all nodes with no predecessors + A function mapping a node to its set of successors + A list of all reachable nodes, in which each node always precedes its successors + true if successful; false if not successful due to cycles in the graph + + + + Implements a readonly collection over a set of existing collections. This can be used to + prevent having to copy items from one collection over to another (thus bloating space). + + Note: this is a *collection*, not a *set*. There is no removal of duplicated elements. This + allows us to be able to efficiently do operations like CopyTo, Count, etc. in O(c) time + instead of O(n) (where 'c' is the number of collections and 'n' is the number of elements). + If you have a few collections with many elements in them, then this is an appropriate + collection for you. + + + + + Represents a single EditorConfig file, see https://editorconfig.org for details about the format. + + + + + Key that indicates if this config is a global config + + + + + Key that indicates the precedence of this config when is true + + + + + Filename that indicates this file is a user provided global config + + + + + A set of keys that are reserved for special interpretation for the editorconfig specification. + All values corresponding to reserved keys in a (key,value) property pair are always lowercased + during parsing. + + + This list was retrieved from https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties + at 2018-04-21 19:37:05Z. New keys may be added to this list in newer versions, but old ones will + not be removed. + + + + + A set of values that are reserved for special use for the editorconfig specification + and will always be lower-cased by the parser. + + + + + The directory the editorconfig was contained in, with all directory separators + replaced with '/'. + + + + + The path passed to during construction. + + + + + Comparer for sorting files by path length. + + + + + Gets whether this editorconfig is a topmost editorconfig. + + + + + Gets whether this editorconfig is a global editorconfig. + + + + + Get the global level of this config, used to resolve conflicting keys + + + A user can explicitly set the global level via the . + When no global level is explicitly set, we use a heuristic: + + + Any file matching the is determined to be a user supplied global config and gets a level of 100 + + + Any other file gets a default level of 0 + + + + This value is unused when is false. + + + + + Parses an editor config file text located at the given path. No parsing + errors are reported. If any line contains a parse error, it is dropped. + + + + + Parses an editor config file text located at the given path. No parsing + errors are reported. If any line contains a parse error, it is dropped. + + + + + Represents a named section of the editorconfig file, which consists of a name followed by a set + of key-value pairs. + + + + + Used to compare s of sections. Specified by editorconfig to + be a case-sensitive comparison. + + + + + Used to compare s of sections. Specified by editorconfig to + be a case-sensitive comparison. + + + + + Used to compare keys in . The editorconfig spec defines property + keys as being compared case-insensitively according to Unicode lower-case rules. + + + + + For regular files, the name as present directly in the section specification of the editorconfig file. For sections in + global configs, this is the unescaped full file path. + + + + + Keys and values for this section. All keys are lower-cased according to the + EditorConfig specification and keys are compared case-insensitively. Values are + lower-cased if the value appears in + or if the corresponding key is in . Otherwise, + the values are the literal values present in the source. + + + + + Takes a and creates a matcher that + matches the given language. Returns null if the section name is + invalid. + + + + + Test if a section name is an absolute path with no special chars + + + + + ::= | + ::= "*" | "**" | "?" | | | + ::= any unicode character + ::= "{" "}" + ::= | "," + ]]> + + + + + Compile a globbing character class of the form [...]. Returns true if + the character class was successfully compiled. False if there was a syntax + error. The starting character is expected to be directly after the '['. + + + + + Parses choice defined by the following grammar: + ::= "{" "}" + ::= | "," + ]]> + + + + + Parses range defined by the following grammar. + ::= "{" ".." "}" + ::= "-" | + ::= | + ::= 0-9 + ]]> + + + + + Call after getting from + + + + + Returns false if there are no more characters in the lex stream. + Otherwise, produces the next character in the stream and returns true. + + + + + Returns the string representation of a decimal integer, or null if + the current lexeme is not an integer. + + + + + Holds results from . + + + + + Options that customize diagnostic severity as reported by the compiler. + + + + + Options that do not have any special compiler behavior and are passed to analyzers as-is. + + + + + Any produced diagnostics while applying analyzer configuration. + + + + + Represents a set of , and can compute the effective analyzer options for a given source file. This is used to + collect all the files for that would apply to a compilation. + + + + + The list of s in this set. This list has been sorted per . + This does not include any of the global configs that were merged into . + + + + + s for each section. The entries in the outer array correspond to entries in , and each inner array + corresponds to each . + + + + + Gets an that contain the options that apply globally + + + + + Returns a for a source file. This computes which rules applies to this file, and correctly applies + precedence rules if there are multiple rules for the same file. + + The path to a file such as a source file or additional file. Must be non-null. + This method is safe to call from multiple threads. + + + + Merge any partial global configs into a single global config, and remove the partial configs + + An of containing a mix of regular and unmerged partial global configs + Diagnostics produced during merge will be added to this bag + A that contains the merged partial configs, or null if there were no partial configs + + + + Builds a global analyzer config from a series of partial configs + + + + + Represents a combined global analyzer config. + + + We parse all s as individual files, according to the editorconfig spec. + + However, when viewing the configs as an if multiple files have the + is_global property set to true we combine those files and treat them as a single + 'logical' global config file. This type represents that combined file. + + + + + Describes a command line analyzer assembly specification. + + + + + Assembly file path. + + + + + The base class for representing command line arguments to a + . + + + + + Drop to an interactive loop. If a script is specified in executes the script first. + + + + + Directory used to resolve relative paths stored in the arguments. + + + Except for paths stored in , all + paths stored in the properties of this class are resolved and + absolute. This is the directory that relative paths specified on + command line were resolved against. + + + + + A list of pairs of paths. This stores the value of the command-line compiler + option /pathMap:X1=Y1;X2=Y2... which causes a prefix of X1 followed by a path + separator to be replaced by Y1 followed by a path separator, and so on for each following pair. + + + This option is used to help get build-to-build determinism even when the build + directory is different from one build to the next. The prefix matching is case sensitive. + + + + + Sequence of absolute paths used to search for references. + + + + + Sequence of absolute paths used to search for sources specified as #load directives. + + + + + Sequence of absolute paths used to search for key files. + + + + + If true, use UTF-8 for output. + + + + + Compilation name or null if not specified. + + + + + Gets the emit options. + + + + + Name of the output file or null if not specified. + + + + + Path of the output ref assembly or null if not specified. + + + + + Path of the PDB file or null if same as output binary path with .pdb extension. + + + + + Path of the file containing information linking the compilation to source server that stores + a snapshot of the source code included in the compilation. + + + + + Absolute path of the .ruleset file or null if not specified. + + + + + True to emit PDB information (to a standalone PDB file or embedded into the PE file). + + + + + Absolute path of the output directory (could only be null if there is an error reported). + + + + + Absolute path of the documentation comment XML file or null if not specified. + + + + + Absolute path of the directory to place generated files in, or null to not emit any generated files. + + + + + Options controlling the generation of a SARIF log file containing compilation or + analysis diagnostics, or null if no log file is desired. + + + + + Options controlling the generation of a SARIF log file containing compilation or + analysis diagnostics, or null if no log file is desired. + + + + + An absolute path of the app.config file or null if not specified. + + + + + Errors while parsing the command line arguments. + + + + + References to metadata supplied on the command line. + Includes assemblies specified via /r and netmodules specified via /addmodule. + + + + + References to analyzers supplied on the command line. + + + + + A set of paths to EditorConfig-compatible analyzer config files. + + + + + A set of additional non-code text files that can be used by analyzers. + + + + + A set of files to embed in the PDB. + + + + + Report additional information related to analyzers, such as analyzer execution time. + + + + + Skip execution of s. + + + + + If true, prepend the command line header logo during + . + + + + + If true, append the command line help during + + + + + + If true, append the compiler version during + + + + + + If true, prepend the compiler-supported language versions during + + + + + + The path to a Win32 resource. + + + + + The path to a .ico icon file. + + + + + The path to a Win32 manifest file to embed + into the output portable executable (PE) file. + + + + + If true, do not embed any Win32 manifest, including + one specified by or any + default manifest. + + + + + Resources specified as arguments to the compilation. + + + + + Encoding to be used for source files or 'null' for autodetect/default. + + + + + Hash algorithm to use to calculate source file debug checksums and PDB checksum. + + + + + Arguments following a script file or separator "--". Null if the command line parser is not interactive. + + + + + Source file paths. + + + Includes files specified directly on command line as well as files matching patterns specified + on command line using '*' and '?' wildcards or /recurse option. + + + + + Full path of a log of file paths accessed by the compiler, or null if file logging should be suppressed. + + + Two log files will be created: + One with path and extension ".read" logging the files read, + and second with path and extension ".write" logging the files written to during compilation. + + + + + If true, prints the full path of the file containing errors or + warnings in diagnostics. + + + + + Options to the . + + + + + + Options to the . + + + + + Specify the preferred output language name. + + + + + Returns a full path of the file that the compiler will generate the assembly to if compilation succeeds. + + + The method takes rather than using the value of + since the latter might be unspecified, in which case actual output path can't be determined for C# command line + without creating a compilation and finding an entry point. VB does not allow to + be unspecified. + + + + + Returns a full path of the PDB file that the compiler will generate the debug symbols to + if is true and the compilation succeeds. + + + The method takes rather than using the value of + since the latter might be unspecified, in which case actual output path can't be determined for C# command line + without creating a compilation and finding an entry point. VB does not allow to + be unspecified. + + + + + Returns true if the PDB is generated to a PDB file, as opposed to embedded to the output binary and not generated at all. + + + + + Resolves metadata references stored in using given file resolver and metadata provider. + + to use for assembly name and relative path resolution. + Yields resolved metadata references or . + is null. + + + + Resolves metadata references stored in using given file resolver and metadata provider. + If a non-null diagnostic bag is provided, it catches exceptions that may be generated while reading the metadata file and + reports appropriate diagnostics. + Otherwise, if is null, the exceptions are unhandled. + + + called by CommonCompiler with diagnostics and message provider + + + + + Resolves analyzer references stored in using given file resolver. + + Load an assembly from a file path + Yields resolved or . + + + + Enumerates files in the specified directory and subdirectories whose name matches the given pattern. + + Full path of the directory to enumerate. + File name pattern. May contain wildcards '*' (matches zero or more characters) and '?' (matches any character). + Specifies whether to search the specified only, or all its subdirectories as well. + Sequence of file paths. + + + + Parses a command line. + + A collection of strings representing the command line arguments. + The base directory used for qualifying file locations. + The directory to search for mscorlib, or null if not available. + A string representing additional reference paths. + a object representing the parsed command line. + + + + Determines if a is equal to the provided option name + + + Prefer this over the Equals methods on . The + implementation allocates a . + The 99% case here is that we are dealing with an ASCII string that matches the input hence + it's worth special casing that here and falling back to the more complicated comparison + when dealing with non-ASCII input + + + + + Trims all '.' and whitespace from the end of the path + + + + + Splits specified on + treating two consecutive separators as if they were a single non-separating character. + E.g. "a,,b,c" split on ',' yields ["a,b", "c"]. + + + + + Returns false if any of the client arguments are invalid and true otherwise. + + + The original args to the client. + + + The original args minus the client args, if no errors were encountered. + + + Only defined if no errors were encountered. + True if '/shared' was an argument, false otherwise. + + + Only defined if no errors were encountered. + The value to the '/keepalive' argument if one was specified, null otherwise. + + + Only defined if errors were encountered. + The error message for the encountered error. + + + Only specified if is true and the session key + was provided. Can be null + + + + + See + + + + + Remove the extraneous quotes and slashes from the argument. This function is designed to have + compat behavior with the native compiler. + + + Mimics the function RemoveQuotes from the native C# compiler. The native VB equivalent of this + function is called RemoveQuotesAndSlashes. It has virtually the same behavior except for a few + quirks in error cases. + + + + + Split a string by a set of separators, taking quotes into account. + + + + + Tries to parse a UInt64 from string in either decimal, octal or hex format. + + The string value. + The result if parsing was successful. + true if parsing was successful, otherwise false. + + + + Tries to parse a UInt16 from string in either decimal, octal or hex format. + + The string value. + The result if parsing was successful. + true if parsing was successful, otherwise false. + + + + Sort so that more specific keys precede less specific. + When mapping a path we find the first key in the array that is a prefix of the path. + If multiple keys are prefixes of the path we want to use the longest (more specific) one for the mapping. + + + + + Describes a command line metadata reference (assembly or netmodule) specification. + + + + + Metadata file path or an assembly display name. + + + + + Metadata reference properties. + + + + + Describes a source file specification stored on command line arguments. + + + + + Resolved absolute path of the source file (does not contain wildcards). + + + Although this path is absolute it may not be normalized. That is, it may contain ".." and "." in the middle. + + + + + True if the input has been redirected from the standard input stream. + + + + + True if the file should be treated as a script file. + + + + + Base class for csc.exe, csi.exe, vbc.exe and vbi.exe implementations. + + + + + This implementation of will delay the creation + of the PE / PDB file until the compiler determines the compilation has succeeded. This prevents + the compiler from deleting output from the previous compilation when a new compilation + fails. The method must be called to retrieve all diagnostics. + + + + + Looks for metadata references among the assembly file references given to the compilation when constructed. + When scripts are included into a project we don't want #r's to reference other assemblies than those + specified explicitly in the project references. + + + + + Fallback encoding that is lazily retrieved if needed. If is + evaluated and stored, the value is used if a PDB is created for this compilation. + + + + + The set of source file paths that are in the set of embedded paths. + This is used to prevent reading source files that are embedded twice. + + + + + The used to access the file system inside this instance. + + + + + Print compiler version + + + + + + The type of the compiler class for version information in /help and /version. + We don't simply use this.GetType() because that would break mock subclasses. + + + + + The version of this compiler with commit hash, used in logo and /version output. + + + + + Tool name used, along with assembly version, for error logging. + + + + + Tool version identifier used for error logging. + + + + + Resolves metadata references stored in command line arguments and reports errors for those that can't be resolved. + + + + + Reads content of a source file. + + Source file information. + Storage for diagnostics. + File content or null on failure. + + + + Reads content of a source file. + + Source file information. + Storage for diagnostics. + If given opens successfully, set to normalized absolute path of the file, null otherwise. + File content or null on failure. + + + + Read all analyzer config files from the given paths. + + + + + Returns the fallback encoding for parsing source files, if used, or null + if not used + + + + + Read a UTF-8 encoded file and return the text as a string. + + + + Returns true if there were any errors, false otherwise. + + + Returns true if there were any errors, false otherwise. + + + Returns true if there were any errors, false otherwise. + + + + Returns true if there are any error diagnostics in the bag which cannot be suppressed and + are guaranteed to break the build. + Only diagnostics which have default severity error and are tagged as NotConfigurable fall in this bucket. + This includes all compiler error diagnostics and specific analyzer error diagnostics that are marked as not configurable by the analyzer author. + + + + + Returns true if the bag has any diagnostics with effective Severity=Error. Also returns true for warnings or informationals + or warnings promoted to error via /warnaserror which are not suppressed. + + + + + csc.exe and vbc.exe entry point. + + + + + Perform source generation, if the compiler supports it. + + The compilation before any source generation has occurred. + The to use when parsing any generated sources. + The generators to run + A provider that returns analyzer config options. + Any additional texts that should be passed to the generators when run. + Any diagnostics that were produced during generation. + A compilation that represents the original compilation with any additional, generated texts added to it. + + + + Perform all the work associated with actual compilation + (parsing, binding, compile, emit), resulting in diagnostics + and analyzer output. + + + + + Returns the name with which the assembly should be output + + + + + When overridden by a derived class, this property can override the current thread's + CurrentUICulture property for diagnostic message resource lookups. + + + + + Looks for metadata references among the assembly file references given to the compilation when constructed. + When scripts are included into a project we don't want #r's to reference other assemblies than those + specified explicitly in the project references. + + + + + Special informational diagnostic for each programmatic reported by a . + + + + + The path which contains the compiler binaries and response files. + + + + + The path in which the compilation takes place. This is also referred to as "baseDirectory" in + the code base. + + + + + The path which contains mscorlib. This can be null when specified by the user or running in a + CoreClr environment. + + + + + The temporary directory a compilation should use instead of . The latter + relies on global state individual compilations should ignore. + + + + + Base class for logging compiler diagnostics. + + + + + Options controlling the generation of a SARIF log file containing compilation or analyzer diagnostics. + + + + + Absolute path of the error log file. + + + + + Version of the SARIF format used in the error log. + + + + + Initializes a new instance of the class. + + Absolute path of the error log file. + Version of the SARIF format used in the error log. + + + + Compares descriptors by the values that we write to a SARIF log and nothing else. + + We cannot just use 's built-in implementation + of for two reasons: + + 1. is part of that built-in + equatability, but we do not write it out, and so descriptors differing only + by MessageFormat (common) would lead to duplicate rule metadata entries in + the log. + + 2. is *not* part of that built-in + equatability, but we do write them out, and so descriptors differing only + by CustomTags (rare) would cause only one set of tags to be reported in the + log. + + + + + Base class for the and classes. + The SarifV2ErrorLogger produces the standardized SARIF v2.1.0. The SarifV1ErrorLogger produces + the non-standardized SARIF v1.0.0. It is retained (and in fact, is retained as the default) + for compatibility with previous versions of the compiler. Customers who want to integrate + with standardized SARIF tooling should specify /errorlog:logFilePath;version=2 on the command + line to produce SARIF v2.1.0. + + + + + Used for logging compiler diagnostics to a stream in the unstandardized SARIF + (Static Analysis Results Interchange Format) v1.0.0 format. + https://github.com/sarif-standard/sarif-spec + https://rawgit.com/sarif-standard/sarif-spec/main/Static%20Analysis%20Results%20Interchange%20Format%20(SARIF).html + + + To log diagnostics in the standardized SARIF v2.1.0 format, use the SarifV2ErrorLogger. + + + + + Represents a distinct set of s and provides unique string keys + to distinguish them. + + The first added with a given + value is given that value as its unique key. Subsequent adds with the same ID will have .NNN + appended to their with an auto-incremented numeric value. + + + + + The total number of descriptors in the set. + + + + + Adds a descriptor to the set if not already present. + + + The unique key assigned to the given descriptor. + + + + + Converts the set to a list of (key, descriptor) pairs sorted by key. + + + + + Used for logging compiler diagnostics to a stream in the standardized SARIF + (Static Analysis Results Interchange Format) v2.1.0 format. + http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html + + + + + Represents a distinct set of s and provides unique integer indices + to distinguish them. + + + + + The total number of descriptors in the set. + + + + + Adds a descriptor to the set if not already present. + + + The unique key assigned to the given descriptor. + + + + + Converts the set to a list, sorted by index. + + + + + Specifies the version of the SARIF log file to produce. + + + + + The original, non-standardized version of the SARIF format. + + + + + The first standardized version of the SARIF format. + + + + + The default SARIF version, which is v1.0.0 for compatibility with + previous versions of the compiler. + + + + + The latest supported SARIF version. + + + + + Try to parse the SARIF log file version from a string. + + + + + Used for logging all the paths which are "touched" (used) in any way + in the process of compilation. + + + + + Adds a fully-qualified path to the Logger for a read file. + Semantics are undefined after a call to . + + + + + Adds a fully-qualified path to the Logger for a written file. + Semantics are undefined after a call to . + + + + + Adds a fully-qualified path to the Logger for a read and written + file. Semantics are undefined after a call to + . + + + + + Writes all of the paths the TouchedFileLogger to the given + TextWriter in upper case. After calling this method the + logger is in an undefined state. + + + + + Writes all of the paths the TouchedFileLogger to the given + TextWriter in upper case. After calling this method the + logger is in an undefined state. + + + + + The compilation object is an immutable representation of a single invocation of the + compiler. Although immutable, a compilation is also on-demand, and will realize and cache + data as necessary. A compilation can produce a new compilation from existing compilation + with the application of small deltas. In many cases, it is more efficient than creating a + new compilation from scratch, as the new compilation can reuse information from the old + compilation. + + + The compilation object is an immutable representation of a single invocation of the + compiler. Although immutable, a compilation is also on-demand, and will realize and cache + data as necessary. A compilation can produce a new compilation from existing compilation + with the application of small deltas. In many cases, it is more efficient than creating a + new compilation from scratch, as the new compilation can reuse information from the old + compilation. + + + + + Describes the kind of real signing that is being done during Emit. In the case of public signing + this value will be . + + + + + This form of signing occurs in memory using the APIs. This is the default + form of signing and will be used when a strong name key is provided in a file on disk. + + + + + This form of signing occurs using the COM APIs. This form of signing + requires the unsigned PE to be written to disk before it can be signed (typically by writing it + out to the %TEMP% folder). This signing is used when the key in a key container, the signing + requires a counter signature or customers opted in via the UseLegacyStrongNameProvider feature + flag. + + + + + This type abstracts away the legacy COM based signing implementation for PE streams. Under the hood + a temporary file must be created on disk (at the last possible moment), emitted to, signed on disk + and then copied back to the original . Only when legacy signing is enabled though. + + + + + The that is being emitted into. This value should _never_ be + disposed. It is either returned from the instance in + which case it is owned by that. Or it is just an alias for the value that is stored + in in which case it will be disposed from there. + + + + + Create the stream which should be used for Emit. This should only be called one time. + + + + + Abstraction that allows the caller to delay the creation of the values + until they are actually needed. + + + + + Returns an existing open stream or null if no stream has been open. + + + + + This method will be called once during Emit at the time the Compilation needs + to create a stream for writing. It will not be called in the case of + user errors in code. Shall not be called when returns non-null. + + + + + Returns a . If one cannot be gotten or created then a diagnostic will + be added to + + + + + Returns true if this is a case sensitive compilation, false otherwise. Case sensitivity + affects compilation features such as name lookup as well as choosing what names to emit + when there are multiple different choices (for example between a virtual method and an + override). + + + + + Used for test purposes only to emulate missing members. + + + + + Used for test purposes only to emulate missing members. + + + + + Gets the source language ("C#" or "Visual Basic"). + + + + + This method generates a string that represents the input content to the compiler which impacts + the output of the build. This string is effectively a content key for a + with these values that can be used to identify the outputs. + + The returned string has the following properties: + + + + + The format is undefined. Consumers should assume the format and content can change between + compiler versions. + + + + + It is designed to be human readable and diffable. This is to help developers + understand the difference between two compilations which is impacting the deterministic + output + + + + + It is *not* in a minimal form. If used as a key in say a content addressable storage consumers + should first pass it through a strong hashing function. + + + + + Compilations which do not use the /deterministic option can still use this API but + the results will change on every invocation. + + + The set of inputs that impact deterministic output are described in the following document + - https://github.com/dotnet/roslyn/blob/main/docs/compilers/Deterministic%20Inputs.md + + There are a few dark corners of determinism that are not captured with this key as they are + considered outside the scope of this work: + + + + + Environment variables: clever developers can subvert determinism by manipulation of + environment variables that impact program execution. For example changing normal library + loading by manipulating the %LIBPATH% environment variable. Doing so can cause a change + in deterministic output of compilation by changing compiler, runtime or generator + dependencies. + + + + + Manipulation of strong name keys: strong name keys are read "on demand" by the compiler + and both normal compilation and this key can have non-deterministic output if they are + manipulated at the correct point in program execution. That is an existing limitation + of compilation that is tracked by https://github.com/dotnet/roslyn/issues/57940 + + + + This API can throw exceptions in a few cases like invalid file paths. + + + + + Checks options passed to submission compilation constructor. + Throws an exception if the options are not applicable to submissions. + + + + + Creates a new compilation equivalent to this one with different symbol instances. + + + + + Returns a new compilation with a given event queue. + + + + + Returns a new compilation with a given semantic model provider. + + + + + Gets a new for the specified syntax tree. + + The specified syntax tree. + + True if the SemanticModel should ignore accessibility rules when answering semantic questions. + + + + + Gets a for the given . + If is non-null, it attempts to use + to get a semantic model. Otherwise, it creates a new semantic model using . + + + + + + + + Creates a new for the given . + Unlike the and , + it does not attempt to use the to get a semantic model, but instead always creates a new semantic model. + + + + + + + + Returns a new INamedTypeSymbol representing an error type with the given name and arity + in the given optional container. + + + + + Returns a new INamespaceSymbol representing an error (missing) namespace with the given name. + + + + + Simple assembly name, or null if not specified. + + + The name is used for determining internals-visible-to relationship with referenced assemblies. + + If the compilation represents an assembly the value of is its simple name. + + Unless specifies otherwise the module name + written to metadata is with an extension based upon . + + + + + Creates a compilation with the specified assembly name. + + The new assembly name. + A new compilation. + + + + Gets the options the compilation was created with. + + + + + Creates a new compilation with the specified compilation options. + + The new options. + A new compilation. + + + + True if the compilation represents an interactive submission. + + + + + The previous submission, if any, or null. + + + + + Gets or allocates a runtime submission slot index for this compilation. + + Non-negative integer if this is a submission and it or a previous submission contains code, negative integer otherwise. + + + + The type object that represents the type of submission result the host requested. + + + + + The type of the globals object or null if not specified for this compilation. + + + + + Gets the syntax trees (parsed from source code) that this compilation was created with. + + + + + Creates a new compilation with additional syntax trees. + + The new syntax trees. + A new compilation. + + + + Creates a new compilation with additional syntax trees. + + The new syntax trees. + A new compilation. + + + + Creates a new compilation without the specified syntax trees. Preserves metadata info for use with trees + added later. + + The new syntax trees. + A new compilation. + + + + Creates a new compilation without the specified syntax trees. Preserves metadata info for use with trees + added later. + + The new syntax trees. + A new compilation. + + + + Creates a new compilation without any syntax trees. Preserves metadata info for use with + trees added later. + + + + + Creates a new compilation with an old syntax tree replaced with a new syntax tree. + Reuses metadata from old compilation object. + + The new tree. + The old tree. + A new compilation. + + + + Returns true if this compilation contains the specified tree. False otherwise. + + A syntax tree. + + + + Optional semantic model provider for this compilation. + + + + + The event queue that this compilation was created with. + + + + + If this value is not 0, we might be about to enqueue more events into . + In this case, we need to wait for the count to go to zero before completing the queue. + + This is necessary in cases where multi-step operations that impact the queue occur. For + example when a thread of execution is storing cached data on a symbol before pushing + an event to the queue. If another thread were to come in between those two steps, see the + cached data it could mistakenly believe the operation was complete and cause the queue + to close. This counter ensures that the queue will remain open for the duration of a + complex operation. + + + + + Metadata references passed to the compilation constructor. + + + + + Unique metadata references specified via #r directive in the source code of this compilation. + + + + + All reference directives used in this compilation. + + + + + Maps values of #r references to resolved metadata references. + + + + + All metadata references -- references passed to the compilation + constructor as well as references specified via #r directives. + + + + + Creates a metadata reference for this compilation. + + + Optional aliases that can be used to refer to the compilation root namespace via extern alias directive. + + + Embed the COM types from the reference so that the compiled + application no longer requires a primary interop assembly (PIA). + + + + + Creates a new compilation with the specified references. + + + The new references. + + A new compilation. + + + + Creates a new compilation with the specified references. + + The new references. + A new compilation. + + + + Creates a new compilation with the specified references. + + + + + Creates a new compilation with additional metadata references. + + The new references. + A new compilation. + + + + Creates a new compilation with additional metadata references. + + The new references. + A new compilation. + + + + Creates a new compilation without the specified metadata references. + + The new references. + A new compilation. + + + + Creates a new compilation without the specified metadata references. + + The new references. + A new compilation. + + + + Creates a new compilation without any metadata references. + + + + + Creates a new compilation with an old metadata reference replaced with a new metadata + reference. + + The new reference. + The old reference. + A new compilation. + + + + Gets the or for a metadata reference used to create this + compilation. + + The target reference. + + Assembly or module symbol corresponding to the given reference or null if there is none. + + + + + Gets the that corresponds to the assembly symbol. + + The target symbol. + + + + Assembly identities of all assemblies directly referenced by this compilation. + + + Includes identities of references passed in the compilation constructor + as well as those specified via directives in source code. + + + + + The that represents the assembly being created. + + + + + Gets the for the module being created by compiling all of + the source code. + + + + + The root namespace that contains all namespaces and types defined in source code or in + referenced metadata, merged into a single namespace hierarchy. + + + + + Gets the corresponding compilation namespace for the specified module or assembly namespace. + + + + + Returns the Main method that will serves as the entry point of the assembly, if it is + executable (and not a script). + + + + + Get the symbol for the predefined type from the Cor Library referenced by this + compilation. + + + + + Get the symbol for the predefined type member from the COR Library referenced by this compilation. + + + + + Returns true if the type is System.Type. + + + + + Lookup member declaration in well known type used by this Compilation. + + + + + Lookup well-known type used by this Compilation. + + + + + Returns true if the specified type is equal to or derives from System.Attribute well-known type. + + + + + The INamedTypeSymbol for the .NET System.Object type, which could have a TypeKind of + Error if there was no COR Library in this Compilation. + + + + + The TypeSymbol for the type 'dynamic' in this Compilation. + + If the compilation is a VisualBasic compilation. + + + + A symbol representing the script globals type. + + + + + A symbol representing the implicit Script class. This is null if the class is not + defined in the compilation. + + + + + Resolves a symbol that represents script container (Script class). Uses the + full name of the container class stored in to find the symbol. + + The Script class symbol or null if it is not defined. + + + + Returns a new ArrayTypeSymbol representing an array type tied to the base types of the + COR Library in this Compilation. + + + + + Returns a new ArrayTypeSymbol representing an array type tied to the base types of the + COR Library in this Compilation. + + This overload is for backwards compatibility. Do not remove. + + + + Returns a new IPointerTypeSymbol representing a pointer type tied to a type in this + Compilation. + + If the compilation is a VisualBasic compilation. + + + + Returns a new IFunctionPointerTypeSymbol representing a function pointer type tied to types in this + Compilation. + + If the compilation is a VisualBasic compilation. + + If: + * is passed as the returnRefKind. + * parameterTypes and parameterRefKinds do not have the same length. + + + If returnType is , or if parameterTypes or parameterRefKinds are default, + or if any of the types in parameterTypes are null. + + + + Returns a new INamedTypeSymbol representing a native integer. + + If the compilation is a VisualBasic compilation. + + + + Gets the type within the compilation's assembly and all referenced assemblies (other than + those that can only be referenced via an extern alias) using its canonical CLR metadata name. + This lookup follows the following order: + + If the type is found in the compilation's assembly, that type is returned. + + Next, the core library (the library that defines System.Object and has no assembly references) is searched. + If the type is found there, that type is returned. + + + Finally, all remaining referenced non-extern assemblies are searched. If one and only one type matching the provided metadata name is found, that + single type is returned. Accessibility is ignored for this check. + + + + Null if the type can't be found or there was an ambiguity during lookup. + + + Since VB does not have the concept of extern aliases, it considers all referenced assemblies. + + + In C#, if the core library is referenced as an extern assembly, it will be searched. All other extern-aliased assemblies will not be searched. + + + Because accessibility to the current assembly is ignored when searching for types that match the provided metadata name, if multiple referenced + assemblies define the same type symbol (as often happens when users copy well-known types from the BCL or other sources) then this API will return null, + even if all but one of those symbols would be otherwise inaccessible to user-written code in the current assembly. For fine-grained control over ambiguity + resolution, consider using instead and filtering the results for the symbol required. + + + Assemblies can contain multiple modules. Within each assembly, the search is performed based on module's position in the module list of that assembly. When + a match is found in one module in an assembly, no further modules within that assembly are searched. + + Type forwarders are ignored, and not considered part of the assembly where the TypeForwardAttribute is written. + + Ambiguities are detected on each nested level. For example, if A+B is requested, and there are multiple As but only one of them has a B nested + type, the lookup will be considered ambiguous and null will be returned. + + + + + + Gets all types with the compilation's assembly and all referenced assemblies that have the + given canonical CLR metadata name. Accessibility to the current assembly is ignored when + searching for matching type names. + + Empty array if no types match. Otherwise, all types that match the name, current assembly first if present. + + + Assemblies can contain multiple modules. Within each assembly, the search is performed based on module's position in the module list of that assembly. When + a match is found in one module in an assembly, no further modules within that assembly are searched. + + Type forwarders are ignored, and not considered part of the assembly where the TypeForwardAttribute is written. + + + + + Returns a new INamedTypeSymbol with the given element types and + (optional) element names, locations, and nullable annotations. + + + + + Returns a new INamedTypeSymbol with the given element types, names, and locations. + + This overload is for backwards compatibility. Do not remove. + + + + Check that if any names are provided, and their number matches the expected cardinality. + Returns a normalized version of the element names (empty array if all the names are null). + + + + + Returns a new INamedTypeSymbol with the given underlying type and + (optional) element names, locations, and nullable annotations. + The underlying type needs to be tuple-compatible. + + + + + Returns a new INamedTypeSymbol with the given underlying type and element names and locations. + The underlying type needs to be tuple-compatible. + + This overload is for backwards compatibility. Do not remove. + + + + Returns a new anonymous type symbol with the given member types, names, source locations, and nullable annotations. + Anonymous type members will be readonly by default. Writable properties are + supported in VB and can be created by passing in in the + appropriate locations in . + + + + + Returns a new anonymous type symbol with the given member types, names, and source locations. + Anonymous type members will be readonly by default. Writable properties are + supported in VB and can be created by passing in in the + appropriate locations in . + + This overload is for backwards compatibility. Do not remove. + + + + Creates an whose is for a binary operator. Built-in operators are commonly created for + symbols like bool int.operator ==(int v1, int v2) which the language implicitly supports, even if such + a symbol is not explicitly defined for that type in either source or metadata. + + The binary operator name. Should be one of the names from . + The return type of the binary operator. + The type of the left operand of the binary operator. + The type of the right operand of the binary operator. + + + + Creates an whose is for a unary operator. Built-in operators are commonly created for + symbols like bool int.operator -(int value) which the language implicitly supports, even if such a + symbol is not explicitly defined for that type in either source or metadata. + + The unary operator name. Should be one of the names from . + The return type of the unary operator. + The type the operator applies to. + + + + Classifies a conversion from to according + to this compilation's programming language. + + Source type of value to be converted + Destination type of value to be converted + A that classifies the conversion from the + type to the type. + + + + Returns true if there is an implicit (C#) or widening (VB) conversion from + to . Returns false if + either or is null, or + if no such conversion exists. + + + + + Checks if is accessible from within . An optional qualifier of type + is used to resolve protected access for instance members. All symbols are + required to be from this compilation or some assembly referenced () by this + compilation. is required to be an or . + + + Submissions can reference symbols from previous submissions and their referenced assemblies, even + though those references are missing from . + See https://github.com/dotnet/roslyn/issues/27356. + This implementation works around that by permitting symbols from previous submissions as well. + It is advised to avoid the use of this API within the compilers, as the compilers have additional + requirements for access checking that are not satisfied by this implementation, including the + avoidance of infinite recursion that could result from the use of the ISymbol APIs here, the detection + of use-site diagnostics, and additional returned details (from the compiler's internal APIs) that are + helpful for more precisely diagnosing reasons for accessibility failure. + + + + + Gets the diagnostics produced during the parsing stage. + + + + + Gets the diagnostics produced during symbol declaration. + + + + + Gets the diagnostics produced during the analysis of method bodies and field initializers. + + + + + Gets all the diagnostics for the compilation, including syntax, declaration, and + binding. Does not include any diagnostics that might be produced during emit, see + . + + + + + Unique metadata assembly references that are considered to be used by this compilation. + For example, if a type declared in a referenced assembly is referenced in source code + within this compilation, the reference is considered to be used. Etc. + The returned set is a subset of references returned by API. + The result is undefined if the compilation contains errors. + + + + + Filter out warnings based on the compiler options (/nowarn, /warn and /warnaserror) and the pragma warning directives. + 'incoming' is freed. + + Bag to which filtered diagnostics will be added. + Diagnostics to be filtered. + True if there are no unsuppressed errors (i.e., no errors which fail compilation). + + + + Filter out warnings based on the compiler options (/nowarn, /warn and /warnaserror) and the pragma warning directives. + + True if there are no unsuppressed errors (i.e., no errors which fail compilation). + + + + Create a stream filled with default win32 resources. + + + + + There are two ways to sign PE files + 1. By directly signing the + 2. Write the unsigned PE to disk and use CLR COM APIs to sign. + The preferred method is #1 as it's more efficient and more resilient (no reliance on %TEMP%). But + we must continue to support #2 as it's the only way to do the following: + - Access private keys stored in a key container + - Do proper counter signature verification for AssemblySignatureKey attributes + + + + + Constructs the module serialization properties out of the compilation options of this compilation. + + + + + The value is not used by Windows loader, but the OS appcompat infrastructure uses it to identify apps. + It is useful for us to have a mechanism to identify the compiler that produced the binary. + This is the appropriate value to use for that. That is what it was invented for. + We don't want to have the high bit set for this in case some users perform a signed comparison to + determine if the value is less than some version. The C++ linker is at 0x0B. + We'll start our numbering at 0x30 for C#, 0x50 for VB. + + + + + Return true if the compilation contains any code or types. + + + + + Report declaration diagnostics and compile and synthesize method bodies. + + True if successful. + + + + Update resources. + + True if successful. + + + + Generate XML documentation comments. + + True if successful. + + + + Reports all unused imports/usings so far (and thus it must be called as a last step of Emit) + + + + + Signals the event queue, if any, that we are done compiling. + There should not be more compiling actions after this step. + NOTE: once we signal about completion to analyzers they will cancel and thus in some cases we + may be effectively cutting off some diagnostics. + It is not clear if behavior is desirable. + See: https://github.com/dotnet/roslyn/issues/11470 + + What tree to complete. null means complete all trees. + + + + Emit the IL for the compiled source code into the specified stream. + + Stream to which the compilation will be written. + Stream to which the metadata-only output will be written. + Stream to which the compilation's debug info will be written. Null to forego PDB generation. + Stream to which the compilation's XML documentation will be written. Null to forego XML generation. + Stream from which the compilation's Win32 resources will be read (in RES format). + Null to indicate that there are none. The RES format begins with a null resource entry. + Note that the caller is responsible for disposing this stream, if provided. + List of the compilation's managed resources. Null to indicate that there are none. + Emit options. + + Debug entry-point of the assembly. The method token is stored in the generated PDB stream. + + When a program launches with a debugger attached the debugger places the first breakpoint to the start of the debug entry-point method. + The CLR starts executing the static Main method of type. When the first breakpoint is hit + the debugger steps thru the code statement by statement until user code is reached, skipping methods marked by , + and taking other debugging attributes into consideration. + + By default both entry points in an executable program (, , ) + are the same method (Main). A non-executable program has no entry point. Runtimes that implement a custom loader may specify debug entry-point + to force the debugger to skip over complex custom loader logic executing at the beginning of the .exe and thus improve debugging experience. + + Unlike ordinary entry-point which is limited to a non-generic static method of specific signature, there are no restrictions on the + method other than having a method body (extern, interface, or abstract methods are not allowed). + + + Stream containing information linking the compilation to a source control. + + + Texts to embed in the PDB. + Only supported when emitting Portable PDBs. + + To cancel the emit process. + + + + This overload is only intended to be directly called by tests that want to pass . + The map is used for storing a list of methods and their associated IL. + + + + + Emit the differences between the compilation and the previous generation + for Edit and Continue. The differences are expressed as added and changed + symbols, and are emitted as metadata, IL, and PDB deltas. A representation + of the current compilation is returned as an EmitBaseline for use in a + subsequent Edit and Continue. + + + + + Emit the differences between the compilation and the previous generation + for Edit and Continue. The differences are expressed as added and changed + symbols, and are emitted as metadata, IL, and PDB deltas. A representation + of the current compilation is returned as an EmitBaseline for use in a + subsequent Edit and Continue. + + + + + Emit the differences between the compilation and the previous generation + for Edit and Continue. The differences are expressed as added and changed + symbols, and are emitted as metadata, IL, and PDB deltas. A representation + of the current compilation is returned as an EmitBaseline for use in a + subsequent Edit and Continue. + + + + + Check compilation options and create . + + if successful. + + + + The compiler needs to define an ordering among different partial class in different syntax trees + in some cases, because emit order for fields in structures, for example, is semantically important. + This function defines an ordering among syntax trees in this compilation. + + + + + Compare two source locations, using their containing trees, and then by Span.First within a tree. + Can be used to get a total ordering on declarations, for example. + + + + + Compare two source locations, using their containing trees, and then by Span.First within a tree. + Can be used to get a total ordering on declarations, for example. + + + + + Compare two source locations, using their containing trees, and then by Span.First within a tree. + Can be used to get a total ordering on declarations, for example. + + + + + Return the lexically first of two locations. + + + + + Return the lexically first of multiple locations. + + + + + Return true if there is a source declaration symbol name that meets given predicate. + + + + + Return source declaration symbols whose name meets given predicate. + + + + + Return true if there is a source declaration symbol name that matches the provided name. + This may be faster than when predicate is just a simple string check. + is case sensitive or not depending on the target language. + + + + + Return source declaration symbols whose name matches the provided name. This may be + faster than when predicate is just a simple string check. is case sensitive or not depending on the target language. + + + + + Given a reporting unreferenced s, returns + the actual instances that were not referenced. + + + + + Returns the required language version found in a , if any is found. + Returns null if none is found. + + + + + The list of RetargetingAssemblySymbol objects created for this Compilation. + RetargetingAssemblySymbols are created when some other compilation references this one, + but the other references provided are incompatible with it. For example, compilation C1 + references v1 of Lib.dll and compilation C2 references C1 and v2 of Lib.dll. In this + case, in context of C2, all types from v1 of Lib.dll leaking through C1 (through method + signatures, etc.) must be retargeted to the types from v2 of Lib.dll. This is what + RetargetingAssemblySymbol is responsible for. In the example above, modules in C2 do not + reference C1.AssemblySymbol, but reference a special RetargetingAssemblySymbol created + for C1 by ReferenceManager. + + WeakReference is used to allow RetargetingAssemblySymbol to be collected when they become unused. + + Guarded by . + + + + + Adds given retargeting assembly for this compilation into the cache. + must be locked while calling this method. + + + + + Adds cached retargeting symbols into the given list. + must be locked while calling this method. + + + + + Indicates the reasons why a candidate (or set of candidate) symbols were not considered + correct in SemanticInfo. Higher values take precedence over lower values, so if, for + example, there a symbol with a given name that was inaccessible, and other with the wrong + arity, only the inaccessible one would be reported in the SemanticInfo. + + + + + No CandidateSymbols. + + + + + Only a type or namespace was valid in the given location, but the candidate symbols was + of the wrong kind. + + + + + Only an event was valid in the given location, but the candidate symbols was + of the wrong kind. + + + + + The candidate symbol must be a WithEvents member, but it was not. + + + + + Only an attribute type was valid in the given location, but the candidate symbol was + of the wrong kind. + + + + + The candidate symbol takes a different number of type parameters that was required. + + + + + The candidate symbol existed, but was not allowed to be created in a new expression. + For example, interfaces, static classes, and unconstrained type parameters. + + + + + The candidate symbol existed, but was not allowed to be referenced. For example, the + "get_XXX" method used to implement a property named "XXX" may not be directly + referenced. Similarly, the type "System.Void" can not be directly referenced. + Also occurs if "this" is used in a context (static method or field initializer) + where "this" is not available. + + + + + The candidate symbol had an accessibility modifier (private, protected, ...) that made + it inaccessible. + + + + + The candidate symbol was in a place where a value was required, but was not a value + (e.g., was a type or namespace). + + + + + The candidate symbol was in a place where a variable (or sometimes, a property) was + required, but was not allowed there because it isn't a symbol that can be assigned to. + For example, the left hand side of an assignment, or a ref or out parameter. + + + + + The candidate symbol was used in a way that an invocable member (method, or variable of + delegate type) was required, but the candidate symbol was not invocable. + + + + + The candidate symbol must be an instance variable, but was used as static, or the + reverse. + + + + + Overload resolution did not choose a method. The candidate symbols are the methods there + were considered during overload resolution (which may or may not be applicable methods). + + + + + Method could not be selected statically. + The candidate symbols are the methods there were considered during overload resolution + (which may or may not be applicable methods). + + + + + Multiple ambiguous symbols were available with the same name. This can occur if "using" + statements bring multiple namespaces into scope, and the same type is available in + multiple. This can also occur if multiple properties of the same name are available in a + multiple interface inheritance situation. + + + + + CandidateSymbols are members of a group of results. This is used when there isn't a problem, + but there is more than one result, for example nameof(int.ToString). + + + + + Maps an async/iterator method to the synthesized state machine type that implements the method. + + + + + Represents compilation options common to C# and VB. + + + + + The kind of assembly generated when emitted. + + + + + Name of the primary module, or null if a default name should be used. + + + The name usually (but not necessarily) includes an extension, e.g. "MyModule.dll". + + If is null the actual name written to metadata + is derived from the name of the compilation () + by appending a default extension for . + + + + + The full name of a global implicit class (script class). This class implicitly encapsulates top-level statements, + type declarations, and member declarations. Could be a namespace qualified name. + + + + + The full name of a type that declares static Main method. Must be a valid non-generic namespace-qualified name. + Null if any static Main method is a candidate for an entry point. + + + + + Specifies public key used to generate strong name for the compilation assembly, or empty if not specified. + + + If specified the values of and + must be null. If is true the assembly is marked as fully signed + but only signed with the public key (aka "OSS signing"). + + + + + The name of the file containing the public and private keys to use to generate strong name of the + compilation assembly and to sign it. + + + + To sign the output supply either one of or . + but not both. If both are specified is ignored. + + + If is also set, must be the absolute + path to key file. + + + + + + The CSP container containing the key with which to sign the output. + + + + To sign the output supply either one of or . + but not both. If both are specified is ignored. + + + This setting is obsolete and only supported on Microsoft Windows platform. + Use to generate assemblies with strong name and + a signing tool (Microsoft .NET Framework Strong Name Utility (sn.exe) or equivalent) to sign them. + + + + + + Mark the compilation assembly as delay-signed. + + + If true the resulting assembly is marked as delay signed. + + If false and , , or is specified + or attribute System.Reflection.AssemblyKeyFileAttribute or System.Reflection.AssemblyKeyNameAttribute is applied to the + compilation assembly in source the resulting assembly is signed accordingly to the specified values/attributes. + + If null the semantics is specified by the value of attribute System.Reflection.AssemblyDelaySignAttribute + applied to the compilation assembly in source. If the attribute is not present the value defaults to "false". + + + + + Mark the compilation assembly as fully signed, but only sign with the public key. + + + + If true, the assembly is marked as signed, but is only signed with the public key. + + + The key must be provided through either an absolute path in + or directly via . + + + + + + Whether bounds checking on integer arithmetic is enforced by default or not. + + + + + Specifies which version of the common language runtime (CLR) can run the assembly. + + + + + Specifies whether or not optimizations should be performed on the output IL. + This is independent of whether or not PDB information is generated. + + + + + Global warning report option + + + + + Global warning level (a non-negative integer). + + + + + Specifies whether building compilation may use multiple threads. + + + + + Specifies whether the compilation should be deterministic. + + + + + Used for time-based version generation when contains a wildcard. + If equal to default() the actual current local time will be used. + + + + + Emit mode that favors debuggability. + + + + + Specifies whether to import members with accessibility other than public or protected by default. + Default value is . The value specified is not going to + affect correctness of analysis performed by compilers because all members needed for correctness + are going to be imported regardless. This setting can force compilation to import members that it + normally doesn't. + + + + + Apply additional disambiguation rules during resolution of referenced assemblies. + + + + + Modifies the incoming diagnostic, for example escalating its severity, or discarding it (returning null) based on the compilation options. + + + The modified diagnostic, or null + + + + Warning report option for each warning. + + + + + Provider to retrieve options for particular syntax trees. + + + + + Whether diagnostics suppressed in source, i.e. is true, should be reported. + + + + + Resolves paths to metadata references specified in source via #r directives. + Null if the compilation can't contain references to metadata other than those explicitly passed to its factory (such as #r directives in sources). + + + + + Gets the resolver for resolving XML document references for the compilation. + Null if the compilation is not allowed to contain XML file references, such as XML doc comment include tags and permission sets stored in an XML file. + + + + + Gets the resolver for resolving source document references for the compilation. + Null if the compilation is not allowed to contain source file references, such as #line pragmas and #load directives. + + + + + Provides strong name and signature the source assembly. + Null if assembly signing is not supported. + + + + + Used to compare assembly identities. May implement unification and portability policies specific to the target platform. + if not specified. + + + + + Gets the default nullable context state in this compilation. + + + This context does not apply to files that are marked as generated. Nullable is off + by default in those locations. + + + + + A set of strings designating experimental compiler features that are to be enabled. + + + + + Gets the source language ("C#" or "Visual Basic"). + + + + + Creates a new options instance with the specified general diagnostic option. + + + + + Creates a new options instance with the specified diagnostic-specific options. + + + + + Creates a new options instance with the specified diagnostic-specific options. + + + + + Creates a new options instance with the specified suppressed diagnostics reporting option. + + + + + Creates a new options instance with the concurrent build property set accordingly. + + + + + Creates a new options instance with the deterministic property set accordingly. + + + + + Creates a new options instance with the specified output kind. + + + + + Creates a new options instance with the specified platform. + + + + + Creates a new options instance with the specified public sign setting. + + + + + Creates a new options instance with optimizations enabled or disabled. + + + + + Performs validation of options compatibilities and generates diagnostics if needed + + + + + Errors collection related to an incompatible set of compilation options + + + + + Represents the possible compilation stages for which it is possible to get diagnostics + (errors). + + + + + Provides information about statements which transfer control in and out of a region. This + information is returned from a call to . + + + + + The set of statements inside the region what are the + destination of branches outside the region. + + + + + The set of statements inside a region that jump to locations outside + the region. + + + + + Indicates whether a region completes normally. Return true if and only if the end of the + last statement in a region is reachable or the region contains no statements. + + + + + The set of return statements found within a region. + + + + + Returns true if and only if analysis was successful. Analysis can fail if the region does not properly span a single expression, + a single statement, or a contiguous series of statements within the enclosing block. + + + + + Provides information about how data flows into and out of a region. This information is + returned from a call to + , or one of its language-specific overloads, + where you pass the first and last statements of the region as parameters. + "Inside" means those statements or ones between them. "Outside" are any other statements of the same method. + + + + + The set of local variables that are declared within a region. Note + that the region must be bounded by a method's body or a field's initializer, so + parameter symbols are never included in the result. + + + + + The set of local variables which are assigned a value outside a region + that may be used inside the region. + + + + + The set of local variables which are assigned a value inside a region + that may be used outside the region. + + + + + + The set of local variables which are definitely assigned a value when a region is + entered. + + + + + + + The set of local variables which are definitely assigned a value when a region is + exited. + + + + + + The set of local variables for which a value is always assigned inside + a region. + + + + + The set of local variables that are read inside a region. + + + + + The set of local variables that are written inside a region. + + + + + The set of the local variables that are read outside a region. + + + + + The set of local variables that are written outside a region. + + + + + The set of the local variables that have been referenced in anonymous + functions within a region and therefore must be moved to a field of a frame class. + + + + + The set of variables that are captured inside a region. + + + + + The set of variables that are captured outside a region. + + + + + The set of non-constant local variables and parameters that have had their + address (or the address of one of their fields) taken. + + + + + The set of local functions that are used. + + + + + Returns true if and only if analysis was successful. Analysis can fail if the region does not + properly span a single expression, a single statement, or a contiguous series of + statements within the enclosing block. + + + + + The string returned from this function represents the inputs to the compiler which impact determinism. It is + meant to be inline with the specification here: + + - https://github.com/dotnet/roslyn/blob/main/docs/compilers/Deterministic%20Inputs.md + + Options which can cause compilation failure, but doesn't impact the result of a successful + compilation should be included. That is because it is interesting to describe error states + not just success states. Think about caching build failures as well as build successes. + + When an option is omitted, say if there is no value for a public crypto key, we should emit + the property with a null value vs. omitting the property. Either approach would produce + correct results the preference is to be declarative that an option is omitted. + + + + + The default is to include all inputs to the compilation which impact the output of the + compilation: binaries or diagnostics. + + + + + Ignore all file paths, but still include file names, in the deterministic key. + + + This is useful for scenarios where the consumer is interested in the content of the + being the same but aren't concerned precisely with the file + path of the content. A typical example of this type of consumer is one that operates + in CI where the path changes frequently. + + + + + Ignore the versions of the tools contributing to the build (compiler and runtime) + + + Compiler output is not guaranteed to be deterministically equivalent between versions + but very often is for wide ranges of versions. This option is useful for consumers + who are comfortable ignoring the versions when looking at compiler output. + + + + + The result of the Compilation.Emit method. + + + + + True if the compilation successfully produced an executable. + If false then the diagnostics should include at least one error diagnostic + indicating the cause of the failure. + + + + + A list of all the diagnostics associated with compilations. This include parse errors, declaration errors, + compilation errors, and emitting errors. + + + + + Name of the anonymous type field. + + + + + True if the anonymous type field was marked as 'Key' in VB. + + + + + is case insensitive. + + + + + Represents additional info needed by async method implementation methods + (MoveNext methods) to properly emit necessary PDB data for async debugging. + + + + + IL offset of catch handler or -1 + + + + + Set of IL offsets where await operators yield control + + + + + Set of IL offsets where await operators are to be resumed + + + + + Symbol changes when emitting EnC delta. + + + + + Previous EnC generation baseline, or null if this is not EnC delta. + + + + + True if this module is an EnC update. + + + + + EnC generation. 0 if the module is not an EnC delta, 1 if it is the first EnC delta, etc. + + + + + If this module represents an assembly, name of the assembly used in AssemblyDef table. Otherwise name of the module same as . + + + + + Name of the module. Used in ModuleDef table. + + + + + Public types defined in other modules making up this assembly and to which other assemblies may refer to via this assembly + followed by types forwarded to another assembly. + + + + + Used to distinguish which style to pick while writing native PDB information. + + + The PDB content for custom debug information is different between Visual Basic and CSharp. + E.g. C# always includes a CustomMetadata Header (MD2) that contains the namespace scope counts, where + as VB only outputs namespace imports into the namespace scopes. + C# defines forwards in that header, VB includes them into the scopes list. + + Currently the compiler doesn't allow mixing C# and VB method bodies. Thus this flag can be per module. + It is possible to move this flag to per-method basis but native PDB CDI forwarding would need to be adjusted accordingly. + + + + + Linked assembly names to be stored to native PDB (VB only). + + + + + Project level imports (VB only, TODO: C# scripts). + + + + + Default namespace (VB only). + + + + + Additional top-level types injected by the Expression Evaluators. + + + + + Anonymous types defined in the compilation. + + + + + Top-level embedded types (e.g. attribute types that are not present in referenced assemblies). + + + + + Top-level named types defined in source. + + + + + A list of the files that constitute the assembly. Empty for netmodule. These are not the source language files that may have been + used to compile the assembly, but the files that contain constituent modules of a multi-module assembly as well + as any external resources. It corresponds to the File table of the .NET assembly file format. + + + + + Builds symbol definition to location map used for emitting token -> location info + into PDB to be consumed by WinMdExp.exe tool (only applicable for /t:winmdobj) + + + + + Builds a list of types, and their documents, that would otherwise not be referenced by any document info + of any methods in those types, or any nested types. This data is helpful for navigating to the source of + types that have no methods in one or more of the source files they are contained in. + + For example: + + First.cs: + + partial class Outer + { + partial class Inner + { + public void Method() + { + } + } + } + + + /// Second.cs: + + partial class Outer + { + partial class Inner + { + } + } + + + When navigating to the definition of "Outer" we know about First.cs because of the MethodDebugInfo for Outer.Inner.Method() + but there would be no document information for Second.cs so this method would return that information. + + When navigating to "Inner" we likewise know about First.cs because of the MethodDebugInfo, and we know about Second.cs because + of the document info for its containing type, so this method would not return information for Inner. In fact this method + will never return information for any nested type. + + + + + + + Number of debug documents in the module. + Used to determine capacities of lists and indices when emitting debug info. + + + + + An approximate number of method definitions that can + provide a basis for approximating the capacities of + various databases used during Emit. + + + + + CorLibrary assembly referenced by this module. + + + + + Returns User Strings referenced from the IL in the module. + + + + + Assembly reference aliases (C# only). + + + + + Common base class for C# and VB PE module builder. + + + + + Returns all top-level (not nested) types defined in the module. + + + + + Captures the set of synthesized definitions that should be added to a type + during emit process. + + + + + Returns null if there are no compiler generated types. + + + + + Returns null if there are no synthesized fields. + + + + + Returns null if there are no synthesized properties. + + + + + Returns null if there are no synthesized methods. + + + + + Debugging information associated with the specified method that is emitted by the compiler to support Edit and Continue. + + + + + Deserializes Edit and Continue method debug information from specified blobs. + + Local variable slot map. + Lambda and closure map. + Invalid data. + + + + Deserializes Edit and Continue method debug information from specified blobs. + + Local variable slot map. + Lambda and closure map. + State machine suspension points, if the method is the MoveNext method of the state machine. + Invalid data. + + + Invalid data. + + + Invalid data. + + + + Constructs a deleted definition + + The old definition of the member + + Cache of type definitions used in signatures of deleted members. Used so that if a method 'C M(C c)' is deleted + we use the same instance for the method return type, and the parameter type. + + + + + Represents a type referenced from a deleted member (as distinct from a type that has been deleted). This is also + why it doesn't inherit from + + + + + Type definitions containing any changes (includes added types). + + + + + Cache of type definitions used in signatures of deleted members. Used so that if a method 'C M(C c)' is deleted + we use the same instance for the method return type, and the parameter type. + + + + + Return tokens for all updated debuggable methods. + + + + + Return tokens for all updated or added types. + + + + + CustomAttributes point to their target via the Parent column so we cannot simply output new rows + in the delta or we would end up with duplicates, but we also don't want to do complex logic to determine + which attributes have changes, so we just emit them all. + This means our logic for emitting CustomAttributes is to update any existing rows, either from the original + compilation or subsequent deltas, and only add more if we need to. The EncLog table is the thing that tells + the runtime which row a CustomAttributes row is (ie, new or existing) + + + + + Add an item from a previous generation + that has been updated in this generation. + + + + + Represents a module from a previous compilation. Used in Edit and Continue + to emit the differences in a subsequent compilation. + + + + + In C#, this is the set of anonymous types only; in VB, this is the set of anonymous types and delegates. + + + + + In C#, the set of anonymous delegates with name fully determined by signature; + in VB, this set is unused and empty. + + + + + In C#, the set of anonymous delegates with name indexed by source order; + in VB, this set is unused and empty. + + + + + A map of the assembly identities of the baseline compilation to the identities of the original metadata AssemblyRefs. + Only includes identities that differ between these two. + + + + + Creates an from the metadata of the module before editing + and from a function that maps from a method to an array of local names. + + The metadata of the module before editing. + + A function that for a method handle returns Edit and Continue debug information emitted by the compiler into the PDB. + The function shall throw if the debug information can't be read for the specified method. + This exception and are caught and converted to an emit diagnostic. Other exceptions are passed through. + + An for the module. + is not a PE image. + is null. + is null. + Error reading module metadata. + Module metadata is invalid. + Module has been disposed. + + + + Creates an from the metadata of the module before editing + and from a function that maps from a method to an array of local names. + + The metadata of the module before editing. + + A function that for a method handle returns Edit and Continue debug information emitted by the compiler into the PDB. + The function shall throw if the debug information can't be read for the specified method. + This exception and are caught and converted to an emit diagnostic. Other exceptions are passed through. + + + A function that for a method handle returns the signature of its local variables. + The function shall throw if the information can't be read for the specified method. + This exception and are caught and converted to an emit diagnostic. Other exceptions are passed through. + + + True if the baseline PDB is portable. + + An for the module. + + Only the initial baseline is created using this method; subsequent baselines are created + automatically when emitting the differences in subsequent compilations. + + When an active method (one for which a frame is allocated on a stack) is updated the values of its local variables need to be preserved. + The mapping of local variable names to their slots in the frame is not included in the metadata and thus needs to be provided by + . + + The is only needed for the initial generation. The mapping for the subsequent generations + is carried over through . The compiler assigns slots to named local variables (including named temporary variables) + it the order in which they appear in the source code. This property allows the compiler to reconstruct the local variable mapping + for the initial generation. A subsequent generation may add a new variable in between two variables of the previous generation. + Since the slots of the previous generation variables need to be preserved the only option is to add these new variables to the end. + The slot ordering thus no longer matches the syntax ordering. It is therefore necessary to pass + to the next generation (rather than e.g. create new s from scratch based on metadata produced by subsequent compilations). + + is null. + is null. + is null. + Error reading module metadata. + Module metadata is invalid. + Module has been disposed. + + + + The original metadata of the module. + + + + + Metadata generation ordinal. Zero for + full metadata and non-zero for delta. + + + + + Unique Guid for this delta, or default(Guid) + if full metadata. + + + + + The latest generation number of each symbol added via edit. + + + + + EnC metadata for methods added or updated since the initial generation, indexed by method row id. + + + + + Reads EnC debug information of a method from the initial baseline PDB. + The function shall throw if the debug information can't be read for the specified method. + This exception and are caught and converted to an emit diagnostic. Other exceptions are passed through. + The function shall return an empty if the method that corresponds to the specified handle + has no debug information. + + + + + A function that for a method handle returns the signature of its local variables. + The function shall throw if the information can't be read for the specified method. + This exception and are caught and converted to an emit diagnostic. Other exceptions are passed through. + The function shall return a nil if the method that corresponds to the specified handle + has no local variables. + + + + + Handles of methods with sequence points that have been updated in this delta. + + + + + Handles of types that were changed (updated or inserted) in this delta. + + + + + When invoked on a node that represents an anonymous function or a query clause [1] + with a of another anonymous function or a query clause of the same kind [2], + returns the body of the [1] that positionally corresponds to the specified . + + E.g. join clause declares left expression and right expression -- each of these expressions is a lambda body. + JoinClause1.GetCorrespondingLambdaBody(JoinClause2.RightExpression) returns JoinClause1.RightExpression. + + + + + Given a node that represents a variable declaration, lambda or a closure scope return the position to be used to calculate + the node's syntax offset with respect to its containing member. + + + + + No change to symbol or members. + + + + + No change to symbol but may contain changed symbols. + + + + + Symbol updated. + + + + + Symbol added. + + + + + Maps definitions being emitted to the corresponding definitions defined in the previous generation (metadata or source). + + + + + Contains all symbols explicitly updated/added to the source and + their containing types and namespaces. + + + + + A set of symbols whose name emitted to metadata must include a "#{generation}" suffix to avoid naming collisions with existing types. + Populated based on semantic edits with . + + + + + A set of symbols, from the old compilation, that have been deleted from the new compilation + keyed by the containing type from the new compilation. + Populated based on semantic edits with . + + + + + True if the symbol is a source symbol added during EnC session. + The symbol may be declared in any source compilation in the current solution. + + + + + Returns true if the symbol or some child symbol has changed and needs to be compiled. + + + + + Calculate the set of changes up to top-level types. The result + will be used as a filter when traversing the module. + + Note that these changes only include user-defined source symbols, not synthesized symbols since those will be + generated during lowering of the changed user-defined symbols. + + + + + Return the symbol that contains this symbol as far + as changes are concerned. For instance, an auto property + is considered the containing symbol for the backing + field and the accessor methods. By default, the containing + symbol is simply Symbol.ContainingSymbol. + + + + + Merges synthesized or deleted members generated during lowering, or emit, of the current compilation with aggregate + synthesized or deleted members from all previous source generations (gen >= 1). + + + Suppose {S -> {A, B, D}, T -> {E, F}} are all synthesized members in previous generations, + and {S' -> {A', B', C}, U -> {G, H}} members are generated in the current compilation. + + Where X matches X' via this matcher, i.e. X' is from the new compilation and + represents the same metadata entity as X in the previous compilation. + + Then the resulting collection shall have the following entries: + {S' -> {A', B', C, D}, U -> {G, H}, T -> {E, F}} + + + + + Represents compilation emit options. + + + + + True to emit an assembly excluding executable code such as method bodies. + + + + + Tolerate errors, producing a PE stream and a success result even in the presence of (some) errors. + + + + + Unless set (private) members that don't affect the language semantics of the resulting assembly will be excluded + when emitting metadata-only assemblies as primary output (with on). + If emitting a secondary output, this flag is required to be false. + + + + + Type of instrumentation that should be added to the output binary. + + + + + Subsystem version + + + + + Specifies the size of sections in the output file. + + + Valid values are 0, 512, 1024, 2048, 4096 and 8192. + If the value is 0 the file alignment is determined based upon the value of . + + + + + True to enable high entropy virtual address space for the output binary. + + + + + Specifies the preferred base address at which to load the output DLL. + + + + + Debug information format. + + + + + Assembly name override - file name and extension. If not specified the compilation name is used. + + + By default the name of the output assembly is . Only in rare cases it is necessary + to override the name. + + CAUTION: If this is set to a (non-null) value other than the existing compilation output name, then internals-visible-to + and assembly references may not work as expected. In particular, things that were visible at bind time, based on the + name of the compilation, may not be visible at runtime and vice-versa. + + + + + The name of the PDB file to be embedded in the PE image, or null to use the default. + + + If not specified the file name of the source module with an extension changed to "pdb" is used. + + + + + A crypto hash algorithm used to calculate PDB Checksum stored in the PE/COFF File. + If not specified (the value is default(HashAlgorithmName)) the checksum is not calculated. + + + + + Runtime metadata version. + + + + + The encoding used to parse source files that do not have a Byte Order Mark. If specified, + is stored in the emitted PDB in order to allow recreating the original compilation. + + + + + If is not specified, the encoding used to parse source files + that do not declare their encoding via Byte Order Mark and are not UTF-8 encoded. + + + + + Sets the byte alignment for portable executable file sections. + + Can be one of the following values: 0, 512, 1024, 2048, 4096, 8192 + + + + Error type symbols should be replaced with an object of this class + in the translation layer for emit. + + + + + For the name we will use a word "Error" followed by a guid, generated on the spot. + + + + + A fake containing assembly for an ErrorType object. + + + + + For the name we will use a word "Error" followed by a guid, generated on the spot. + + + + + Specifies a kind of instrumentation to be applied in generated code. + + + + + No instrumentation. + + + + + Instruments the binary to add test coverage. + + + + + Represents additional info needed by iterator method implementation methods + (MoveNext methods) to properly emit necessary PDB data for iterator debugging. + + + + + This is only used for testing. + + + + + This is only used for testing. + + + + + This is only used for testing. + + + + + Returns null if member doesn't belong to an embedded NoPia type. + + + + + Describes a symbol edit between two compilations. + For example, an addition of a method, an update of a method, removal of a type, etc. + + + + + The type of edit. + + + + + The symbol from the earlier compilation, + or null if the edit represents an addition. + + + + + The symbol from the later compilation, or the symbol of the containing type + from the later compilation if the edit represents a deletion. + + + + + A map from syntax node in the later compilation to syntax node in the previous compilation, + or null if is false and the map is not needed or + the source of the current method is the same as the source of the previous method. + + + The map does not need to map all syntax nodes in the active method, only those syntax nodes + that declare a local or generate a long lived local. + + + + + True if the edit is an update of the active method and local values + should be preserved; false otherwise. + + + + + Initializes an instance of . + + The type of edit. + + The symbol from the earlier compilation, or null if the edit represents an addition. + + + The symbol from the later compilation, or null if the edit represents a deletion. + + + A map from syntax node in the later compilation to syntax node in the previous compilation, + or null if is false and the map is not needed or + the source of the current method is the same as the source of the previous method. + + + True if the edit is an update of an active method and local values should be preserved; false otherwise. + + + or is null and the edit isn't a or , respectively. + + + is not a valid kind. + + + + + No change. + + + + + Symbol is updated. + + + + + Symbol is inserted. + + + + + Symbol is deleted. + + + + + Existing symbol is replaced by its new version. + + + + + Information associated with method body of a state machine MoveNext method. + + + + + Original async/iterator method transformed into MoveNext() + + + + + Represents an invalid operation with one or more child operations. + + Current usage: + (1) C# invalid expression or invalid statement. + (2) VB invalid expression or invalid statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a block containing a sequence of operations and local declarations. + + Current usage: + (1) C# "{ ... }" block statement. + (2) VB implicit block statement for method bodies and other block scoped statements. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operations contained within the block. + + + + + Local declarations contained within the block. + + + + + Represents a variable declaration statement. + + + Current Usage: + (1) C# local declaration statement + (2) C# fixed statement + (3) C# using statement + (4) C# using declaration + (5) VB Dim statement + (6) VB Using statement + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Variable declaration in the statement. + + + In C#, this will always be a single declaration, with all variables in . + + + + + Represents a switch operation with a value to be switched upon and switch cases. + + Current usage: + (1) C# switch statement. + (2) VB Select Case statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Locals declared within the switch operation with scope spanning across all . + + + + + Value to be switched upon. + + + + + Cases of the switch. + + + + + Exit label for the switch statement. + + + + + Represents a loop operation. + + Current usage: + (1) C# 'while', 'for', 'foreach' and 'do' loop statements + (2) VB 'While', 'ForTo', 'ForEach', 'Do While' and 'Do Until' loop statements + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of the loop. + + + + + Body of the loop. + + + + + Declared locals. + + + + + Loop continue label. + + + + + Loop exit/break label. + + + + + Represents a for each loop. + + Current usage: + (1) C# 'foreach' loop statement + (2) VB 'For Each' loop statement + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Refers to the operation for declaring a new local variable or reference an existing variable or an expression. + + + + + Collection value over which the loop iterates. + + + + + Optional list of comma separated next variables at loop bottom in VB. + This list is always empty for C#. + + + + + Whether this for each loop is asynchronous. + Always false for VB. + + + + + Represents a for loop. + + Current usage: + (1) C# 'for' loop statement + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + List of operations to execute before entry to the loop. For C#, this comes from the first clause of the for statement. + + + + + Locals declared within the loop Condition and are in scope throughout the , + and . + They are considered to be declared per iteration. + + + + + Condition of the loop. For C#, this comes from the second clause of the for statement. + + + + + List of operations to execute at the bottom of the loop. For C#, this comes from the third clause of the for statement. + + + + + Represents a for to loop with loop control variable and initial, limit and step values for the control variable. + + Current usage: + (1) VB 'For ... To ... Step' loop statement + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Refers to the operation for declaring a new local variable or reference an existing variable or an expression. + + + + + Operation for setting the initial value of the loop control variable. This comes from the expression between the 'For' and 'To' keywords. + + + + + Operation for the limit value of the loop control variable. This comes from the expression after the 'To' keyword. + + + + + Operation for the step value of the loop control variable. This comes from the expression after the 'Step' keyword, + or inferred by the compiler if 'Step' clause is omitted. + + + + + true if arithmetic operations behind this loop are 'checked'. + + + + + Optional list of comma separated next variables at loop bottom. + + + + + Represents a while or do while loop. + + Current usage: + (1) C# 'while' and 'do while' loop statements. + (2) VB 'While', 'Do While' and 'Do Until' loop statements. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Condition of the loop. This can only be null in error scenarios. + + + + + True if the is evaluated at start of each loop iteration. + False if it is evaluated at the end of each loop iteration. + + + + + True if the loop has 'Until' loop semantics and the loop is executed while is false. + + + + + Additional conditional supplied for loop in error cases, which is ignored by the compiler. + For example, for VB 'Do While' or 'Do Until' loop with syntax errors where both the top and bottom conditions are provided. + The top condition is preferred and exposed as and the bottom condition is ignored and exposed by this property. + This property should be null for all non-error cases. + + + + + Represents an operation with a label. + + Current usage: + (1) C# labeled statement. + (2) VB label statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Label that can be the target of branches. + + + + + Operation that has been labeled. In VB, this is always null. + + + + + Represents a branch operation. + + Current usage: + (1) C# goto, break, or continue statement. + (2) VB GoTo, Exit ***, or Continue *** statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Label that is the target of the branch. + + + + + Kind of the branch. + + + + + Represents an empty or no-op operation. + + Current usage: + (1) C# empty statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a return from the method with an optional return value. + + Current usage: + (1) C# return statement and yield statement. + (2) VB Return statement. + + + + This node is associated with the following operation kinds: + + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Value to be returned. + + + + + Represents a of operations that are executed while holding a lock onto the . + + Current usage: + (1) C# lock statement. + (2) VB SyncLock statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operation producing a value to be locked. + + + + + Body of the lock, to be executed while holding the lock. + + + + + Represents a try operation for exception handling code with a body, catch clauses and a finally handler. + + Current usage: + (1) C# try statement. + (2) VB Try statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Body of the try, over which the handlers are active. + + + + + Catch clauses of the try. + + + + + Finally handler of the try. + + + + + Exit label for the try. This will always be null for C#. + + + + + Represents a of operations that are executed while using disposable . + + Current usage: + (1) C# using statement. + (2) VB Using statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Declaration introduced or resource held by the using. + + + + + Body of the using, over which the resources of the using are maintained. + + + + + Locals declared within the with scope spanning across this entire . + + + + + Whether this using is asynchronous. + Always false for VB. + + + + + Represents an operation that drops the resulting value and the type of the underlying wrapped . + + Current usage: + (1) C# expression statement. + (2) VB expression statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Underlying operation with a value and type. + + + + + Represents a local function defined within a method. + + Current usage: + (1) C# local function statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Local function symbol. + + + + + Body of the local function. + + + This can be null in error scenarios, or when the method is an extern method. + + + + + An extra body for the local function, if both a block body and expression body are specified in source. + + + This is only ever non-null in error situations. + + + + + Represents an operation to stop or suspend execution of code. + + Current usage: + (1) VB Stop statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an operation that stops the execution of code abruptly. + + Current usage: + (1) VB End Statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an operation for raising an event. + + Current usage: + (1) VB raise event statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Reference to the event to be raised. + + + + + Arguments of the invocation, excluding the instance argument. Arguments are in evaluation order. + + + If the invocation is in its expanded form, then params/ParamArray arguments would be collected into arrays. + Default values are supplied for optional arguments missing in source. + + + + + Represents a textual literal numeric, string, etc. + + Current usage: + (1) C# literal expression. + (2) VB literal expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a type conversion. + + Current usage: + (1) C# conversion expression. + (2) VB conversion expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Value to be converted. + + + + + Operator method used by the operation, null if the operation does not use an operator method. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the , if any. + Null if is resolved statically, or is null. + + + + + Gets the underlying common conversion information. + + + If you need conversion information that is language specific, use either + or + . + + + + + False if the conversion will fail with a at runtime if the cast fails. This is true for C#'s + as operator and for VB's TryCast operator. + + + + + True if the conversion can fail at runtime with an overflow exception. This corresponds to C# checked and unchecked blocks. + + + + + Represents an invocation of a method. + + Current usage: + (1) C# method invocation expression. + (2) C# collection element initializer. + For example, in the following collection initializer: new C() { 1, 2, 3 }, we will have + 3 nodes, each of which will be a call to the corresponding Add method + with either 1, 2, 3 as the argument. + (3) VB method invocation expression. + (4) VB collection element initializer. + Similar to the C# example, New C() From {1, 2, 3} will have 3 + nodes with 1, 2, and 3 as their arguments, respectively. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Method to be invoked. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the . + Null if is resolved statically, or is an instance method. + + + + + 'This' or 'Me' instance to be supplied to the method, or null if the method is static. + + + + + True if the invocation uses a virtual mechanism, and false otherwise. + + + + + Arguments of the invocation, excluding the instance argument. Arguments are in evaluation order. + + + If the invocation is in its expanded form, then params/ParamArray arguments would be collected into arrays. + Default values are supplied for optional arguments missing in source. + + + + + Represents a reference to an array element. + + Current usage: + (1) C# array element reference expression. + (2) VB array element reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Array to be indexed. + + + + + Indices that specify an individual element. + + + + + Represents a reference to a declared local variable. + + Current usage: + (1) C# local reference expression. + (2) VB local reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced local variable. + + + + + True if this reference is also the declaration site of this variable. This is true in out variable declarations + and in deconstruction operations where a new variable is being declared. + + + + + Represents a reference to a parameter. + + Current usage: + (1) C# parameter reference expression. + (2) VB parameter reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced parameter. + + + + + Represents a reference to a member of a class, struct, or interface. + + Current usage: + (1) C# member reference expression. + (2) VB member reference expression. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Instance of the type. Null if the reference is to a static/shared member. + + + + + Referenced member. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the . + Null if is resolved statically, or is an instance member. + + + + + Represents a reference to a field. + + Current usage: + (1) C# field reference expression. + (2) VB field reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced field. + + + + + If the field reference is also where the field was declared. + + + This is only ever true in CSharp scripts, where a top-level statement creates a new variable + in a reference, such as an out variable declaration or a deconstruction declaration. + + + + + Represents a reference to a method other than as the target of an invocation. + + Current usage: + (1) C# method reference expression. + (2) VB method reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced method. + + + + + Indicates whether the reference uses virtual semantics. + + + + + Represents a reference to a property. + + Current usage: + (1) C# property reference expression. + (2) VB property reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced property. + + + + + Arguments of the indexer property reference, excluding the instance argument. Arguments are in evaluation order. + + + If the invocation is in its expanded form, then params/ParamArray arguments would be collected into arrays. + Default values are supplied for optional arguments missing in source. + + + + + Represents a reference to an event. + + Current usage: + (1) C# event reference expression. + (2) VB event reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Referenced event. + + + + + Represents an operation with one operand and a unary operator. + + Current usage: + (1) C# unary operation expression. + (2) VB unary operation expression. + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of unary operation. + + + + + Operand. + + + + + if this is a 'lifted' unary operator. When there is an + operator that is defined to work on a value type, 'lifted' operators are + created to work on the versions of those + value types. + + + + + if overflow checking is performed for the arithmetic operation. + + + + + Operator method used by the operation, null if the operation does not use an operator method. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the , if any. + Null if is resolved statically, or is null. + + + + + Represents an operation with two operands and a binary operator that produces a result with a non-null type. + + Current usage: + (1) C# binary operator expression. + (2) VB binary operator expression. + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of binary operation. + + + + + Left operand. + + + + + Right operand. + + + + + if this is a 'lifted' binary operator. When there is an + operator that is defined to work on a value type, 'lifted' operators are + created to work on the versions of those + value types. + + + + + if this is a 'checked' binary operator. + + + + + if the comparison is text based for string or object comparison in VB. + + + + + Operator method used by the operation, null if the operation does not use an operator method. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the + or corresponding true/false operator, if any. + Null if operators are resolved statically, or are not used. + + + + + Represents a conditional operation with: + (1) to be tested, + (2) operation to be executed when is true and + (3) operation to be executed when the is false. + + Current usage: + (1) C# ternary expression "a ? b : c" and if statement. + (2) VB ternary expression "If(a, b, c)" and If Else statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Condition to be tested. + + + + + Operation to be executed if the is true. + + + + + Operation to be executed if the is false. + + + + + Is result a managed reference + + + + + Represents a coalesce operation with two operands: + (1) , which is the first operand that is unconditionally evaluated and is the result of the operation if non null. + (2) , which is the second operand that is conditionally evaluated and is the result of the operation if is null. + + Current usage: + (1) C# null-coalescing expression "Value ?? WhenNull". + (2) VB binary conditional expression "If(Value, WhenNull)". + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operation to be unconditionally evaluated. + + + + + Operation to be conditionally evaluated if evaluates to null/Nothing. + + + + + Conversion associated with when it is not null/Nothing. + Identity if result type of the operation is the same as type of . + Otherwise, if type of is nullable, then conversion is applied to an + unwrapped , otherwise to the itself. + + + + + Represents an anonymous function operation. + + Current usage: + (1) C# lambda expression. + (2) VB anonymous delegate expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Symbol of the anonymous function. + + + + + Body of the anonymous function. + + + + + Represents creation of an object instance. + + Current usage: + (1) C# new expression. + (2) VB New expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Constructor to be invoked on the created instance. + + + + + Object or collection initializer, if any. + + + + + Arguments of the object creation, excluding the instance argument. Arguments are in evaluation order. + + + If the invocation is in its expanded form, then params/ParamArray arguments would be collected into arrays. + Default values are supplied for optional arguments missing in source. + + + + + Represents a creation of a type parameter object, i.e. new T(), where T is a type parameter with new constraint. + + Current usage: + (1) C# type parameter object creation expression. + (2) VB type parameter object creation expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Object or collection initializer, if any. + + + + + Represents the creation of an array instance. + + Current usage: + (1) C# array creation expression. + (2) VB array creation expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Sizes of the dimensions of the created array instance. + + + + + Values of elements of the created array instance. + + + + + Represents an implicit/explicit reference to an instance. + + Current usage: + (1) C# this or base expression. + (2) VB Me, MyClass, or MyBase expression. + (3) C# object or collection or 'with' expression initializers. + (4) VB With statements, object or collection initializers. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The kind of reference that is being made. + + + + + Represents an operation that tests if a value is of a specific type. + + Current usage: + (1) C# "is" operator expression. + (2) VB "TypeOf" and "TypeOf IsNot" expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Value to test. + + + + + Type for which to test. + + + + + Flag indicating if this is an "is not" type expression. + True for VB "TypeOf ... IsNot ..." expression. + False, otherwise. + + + + + Represents an await operation. + + Current usage: + (1) C# await expression. + (2) VB await expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Awaited operation. + + + + + Represents a base interface for assignments. + + Current usage: + (1) C# simple, compound and deconstruction assignment expressions. + (2) VB simple and compound assignment expressions. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Target of the assignment. + + + + + Value to be assigned to the target of the assignment. + + + + + Represents a simple assignment operation. + + Current usage: + (1) C# simple assignment expression. + (2) VB simple assignment expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Is this a ref assignment + + + + + Represents a compound assignment that mutates the target with the result of a binary operation. + + Current usage: + (1) C# compound assignment expression. + (2) VB compound assignment expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Conversion applied to before the operation occurs. + + + + + Conversion applied to the result of the binary operation, before it is assigned back to + . + + + + + Kind of binary operation. + + + + + if this assignment contains a 'lifted' binary operation. + + + + + if overflow checking is performed for the arithmetic operation. + + + + + Operator method used by the operation, null if the operation does not use an operator method. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the , if any. + Null if is resolved statically, or is null. + + + + + Represents a parenthesized operation. + + Current usage: + (1) VB parenthesized expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operand enclosed in parentheses. + + + + + Represents a binding of an event. + + Current usage: + (1) C# event assignment expression. + (2) VB Add/Remove handler statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Reference to the event being bound. + + + + + Handler supplied for the event. + + + + + True for adding a binding, false for removing one. + + + + + Represents a conditionally accessed operation. Note that is used to refer to the value + of within . + + Current usage: + (1) C# conditional access expression (? or ?. operator). + (2) VB conditional access expression (? or ?. operator). + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operation that will be evaluated and accessed if non null. + + + + + Operation to be evaluated if is non null. + + + + + Represents the value of a conditionally-accessed operation within . + For a conditional access operation of the form someExpr?.Member, this operation is used as the InstanceReceiver for the right operation Member. + See https://github.com/dotnet/roslyn/issues/21279#issuecomment-323153041 for more details. + + Current usage: + (1) C# conditional access instance expression. + (2) VB conditional access instance expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an interpolated string. + + Current usage: + (1) C# interpolated string expression. + (2) VB interpolated string expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Constituent parts of interpolated string, each of which is an . + + + + + Represents a creation of anonymous object. + + Current usage: + (1) C# "new { ... }" expression + (2) VB "New With { ... }" expression + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Property initializers. + Each initializer is an , with an + as the target whose Instance is an with kind. + + + + + Represents an initialization for an object or collection creation. + + Current usage: + (1) C# object or collection initializer expression. + (2) VB object or collection initializer expression. + For example, object initializer "{ X = x }" within object creation "new Class() { X = x }" and + collection initializer "{ x, y, 3 }" within collection creation "new MyList() { x, y, 3 }". + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Object member or collection initializers. + + + + + Represents an initialization of member within an object initializer with a nested object or collection initializer. + + Current usage: + (1) C# nested member initializer expression. + For example, given an object creation with initializer "new Class() { X = x, Y = { x, y, 3 }, Z = { X = z } }", + member initializers for Y and Z, i.e. "Y = { x, y, 3 }", and "Z = { X = z }" are nested member initializers represented by this operation. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Initialized member reference or an invalid operation for error cases. + + + + + Member initializer. + + + + + Obsolete interface that used to represent a collection element initializer. It has been replaced by + and , as appropriate. + + Current usage: + None. This API has been obsoleted in favor of and . + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an operation that gets a string value for the name. + + Current usage: + (1) C# nameof expression. + (2) VB NameOf expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Argument to the name of operation. + + + + + Represents a tuple with one or more elements. + + Current usage: + (1) C# tuple expression. + (2) VB tuple expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Tuple elements. + + + + + Natural type of the tuple, or null if tuple doesn't have a natural type. + Natural type can be different from depending on the + conversion context, in which the tuple is used. + + + + + Represents an object creation with a dynamically bound constructor. + + Current usage: + (1) C# "new" expression with dynamic argument(s). + (2) VB late bound "New" expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Object or collection initializer, if any. + + + + + Dynamically bound arguments, excluding the instance argument. + + + + + Represents a reference to a member of a class, struct, or module that is dynamically bound. + + Current usage: + (1) C# dynamic member reference expression. + (2) VB late bound member reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Instance receiver, if it exists. + + + + + Referenced member. + + + + + Type arguments. + + + + + The containing type of the referenced member, if different from type of the . + + + + + Represents a invocation that is dynamically bound. + + Current usage: + (1) C# dynamic invocation expression. + (2) C# dynamic collection element initializer. + For example, in the following collection initializer: new C() { do1, do2, do3 } where + the doX objects are of type dynamic, we'll have 3 with do1, do2, and + do3 as their arguments. + (3) VB late bound invocation expression. + (4) VB dynamic collection element initializer. + Similar to the C# example, New C() From {do1, do2, do3} will generate 3 + nodes with do1, do2, and do3 as their arguments, respectively. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Dynamically or late bound operation. + + + + + Dynamically bound arguments, excluding the instance argument. + + + + + Represents an indexer access that is dynamically bound. + + Current usage: + (1) C# dynamic indexer access expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Dynamically indexed operation. + + + + + Dynamically bound arguments, excluding the instance argument. + + + + + Represents an unrolled/lowered query operation. + For example, for a C# query expression "from x in set where x.Name != null select x.Name", the Operation tree has the following shape: + ITranslatedQueryExpression + IInvocationExpression ('Select' invocation for "select x.Name") + IInvocationExpression ('Where' invocation for "where x.Name != null") + IInvocationExpression ('From' invocation for "from x in set") + + Current usage: + (1) C# query expression. + (2) VB query expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Underlying unrolled operation. + + + + + Represents a delegate creation. This is created whenever a new delegate is created. + + Current usage: + (1) C# delegate creation expression. + (2) VB delegate creation expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The lambda or method binding that this delegate is created from. + + + + + Represents a default value operation. + + Current usage: + (1) C# default value expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an operation that gets for the given . + + Current usage: + (1) C# typeof expression. + (2) VB GetType expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Type operand. + + + + + Represents an operation to compute the size of a given type. + + Current usage: + (1) C# sizeof expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Type operand. + + + + + Represents an operation that creates a pointer value by taking the address of a reference. + + Current usage: + (1) C# address of expression + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Addressed reference. + + + + + Represents an operation that tests if a value matches a specific pattern. + + Current usage: + (1) C# is pattern expression. For example, "x is int i". + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Underlying operation to test. + + + + + Pattern. + + + + + Represents an or operation. + Note that this operation is different from an as it mutates the , + while unary operator expression does not mutate it's operand. + + Current usage: + (1) C# increment expression or decrement expression. + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + if this is a postfix expression. if this is a prefix expression. + + + + + if this is a 'lifted' increment operator. When there + is an operator that is defined to work on a value type, 'lifted' operators are + created to work on the versions of those + value types. + + + + + if overflow checking is performed for the arithmetic operation. + + + + + Target of the assignment. + + + + + Operator method used by the operation, null if the operation does not use an operator method. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the , if any. + Null if is resolved statically, or is null. + + + + + Represents an operation to throw an exception. + + Current usage: + (1) C# throw expression. + (2) C# throw statement. + (2) VB Throw statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Instance of an exception being thrown. + + + + + Represents a assignment with a deconstruction. + + Current usage: + (1) C# deconstruction assignment expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a declaration expression operation. Unlike a regular variable declaration and , this operation represents an "expression" declaring a variable. + + Current usage: + (1) C# declaration expression. For example, + (a) "var (x, y)" is a deconstruction declaration expression with variables x and y. + (b) "(var x, var y)" is a tuple expression with two declaration expressions. + (c) "M(out var x);" is an invocation expression with an out "var x" declaration expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Underlying expression. + + + + + Represents an argument value that has been omitted in an invocation. + + Current usage: + (1) VB omitted argument in an invocation expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an initializer for a field, property, parameter or a local variable declaration. + + Current usage: + (1) C# field, property, parameter or local variable initializer. + (2) VB field(s), property, parameter or local variable initializer. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Local declared in and scoped to the . + + + + + Underlying initializer value. + + + + + Represents an initialization of a field. + + Current usage: + (1) C# field initializer with equals value clause. + (2) VB field(s) initializer with equals value clause or AsNew clause. Multiple fields can be initialized with AsNew clause in VB. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Initialized fields. There can be multiple fields for Visual Basic fields declared with AsNew clause. + + + + + Represents an initialization of a local variable. + + Current usage: + (1) C# local variable initializer with equals value clause. + (2) VB local variable initializer with equals value clause or AsNew clause. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents an initialization of a property. + + Current usage: + (1) C# property initializer with equals value clause. + (2) VB property initializer with equals value clause or AsNew clause. Multiple properties can be initialized with 'WithEvents' declaration with AsNew clause in VB. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Initialized properties. There can be multiple properties for Visual Basic 'WithEvents' declaration with AsNew clause. + + + + + Represents an initialization of a parameter at the point of declaration. + + Current usage: + (1) C# parameter initializer with equals value clause. + (2) VB parameter initializer with equals value clause. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Initialized parameter. + + + + + Represents the initialization of an array instance. + + Current usage: + (1) C# array initializer. + (2) VB array initializer. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Values to initialize array elements. + + + + + Represents a single variable declarator and initializer. + + + Current Usage: + (1) C# variable declarator + (2) C# catch variable declaration + (3) VB single variable declaration + (4) VB catch variable declaration + + + In VB, the initializer for this node is only ever used for explicit array bounds initializers. This node corresponds to + the VariableDeclaratorSyntax in C# and the ModifiedIdentifierSyntax in VB. + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Symbol declared by this variable declaration + + + + + Optional initializer of the variable. + + + If this variable is in an , the initializer may be located + in the parent operation. Call + to check in all locations. It is only possible to have initializers in both locations in VB invalid code scenarios. + + + + + Additional arguments supplied to the declarator in error cases, ignored by the compiler. This only used for the C# case of + DeclaredArgumentSyntax nodes on a VariableDeclaratorSyntax. + + + + + Represents a declarator that declares multiple individual variables. + + + Current Usage: + (1) C# VariableDeclaration + (2) C# fixed declarations + (3) VB Dim statement declaration groups + (4) VB Using statement variable declarations + + + The initializer of this node is applied to all individual declarations in . There cannot + be initializers in both locations except in invalid code scenarios. + In C#, this node will never have an initializer. + This corresponds to the VariableDeclarationSyntax in C#, and the VariableDeclaratorSyntax in Visual Basic. + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Individual variable declarations declared by this multiple declaration. + + + All will have at least 1 , + even if the declaration group only declares 1 variable. + + + + + Optional initializer of the variable. + + + In C#, this will always be null. + + + + + Array dimensions supplied to an array declaration in error cases, ignored by the compiler. This is only used for the C# case of + RankSpecifierSyntax nodes on an ArrayTypeSyntax. + + + + + Represents an argument to a method invocation. + + Current usage: + (1) C# argument to an invocation expression, object creation expression, etc. + (2) VB argument to an invocation expression, object creation expression, etc. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of argument. + + + + + Parameter the argument matches. This can be null for __arglist parameters. + + + + + Value supplied for the argument. + + + + + Information of the conversion applied to the argument value passing it into the target method. Applicable only to VB Reference arguments. + + + + + Information of the conversion applied to the argument value after the invocation. Applicable only to VB Reference arguments. + + + + + Represents a catch clause. + + Current usage: + (1) C# catch clause. + (2) VB Catch clause. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Optional source for exception. This could be any of the following operation: + 1. Declaration for the local catch variable bound to the caught exception (C# and VB) OR + 2. Null, indicating no declaration or expression (C# and VB) + 3. Reference to an existing local or parameter (VB) OR + 4. Other expression for error scenarios (VB) + + + + + Type of the exception handled by the catch clause. + + + + + Locals declared by the and/or clause. + + + + + Filter operation to be executed to determine whether to handle the exception. + + + + + Body of the exception handler. + + + + + Represents a switch case section with one or more case clauses to match and one or more operations to execute within the section. + + Current usage: + (1) C# switch section for one or more case clause and set of statements to execute. + (2) VB case block with a case statement for one or more case clause and set of statements to execute. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Clauses of the case. + + + + + One or more operations to execute within the switch section. + + + + + Locals declared within the switch case section scoped to the section. + + + + + Represents a case clause. + + Current usage: + (1) C# case clause. + (2) VB Case clause. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of the clause. + + + + + Label associated with the case clause, if any. + + + + + Represents a default case clause. + + Current usage: + (1) C# default clause. + (2) VB Case Else clause. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a case clause with a pattern and an optional guard operation. + + Current usage: + (1) C# pattern case clause. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Label associated with the case clause. + + + + + Pattern associated with case clause. + + + + + Guard associated with the pattern case clause. + + + + + Represents a case clause with range of values for comparison. + + Current usage: + (1) VB range case clause of the form "Case x To y". + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Minimum value of the case range. + + + + + Maximum value of the case range. + + + + + Represents a case clause with custom relational operator for comparison. + + Current usage: + (1) VB relational case clause of the form "Case Is op x". + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Case value. + + + + + Relational operator used to compare the switch value with the case value. + + + + + Represents a case clause with a single value for comparison. + + Current usage: + (1) C# case clause of the form "case x" + (2) VB case clause of the form "Case x". + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Case value. + + + + + Represents a constituent part of an interpolated string. + + Current usage: + (1) C# interpolated string content. + (2) VB interpolated string content. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a constituent string literal part of an interpolated string operation. + + Current usage: + (1) C# interpolated string text. + (2) VB interpolated string text. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Text content. + + + + + Represents a constituent interpolation part of an interpolated string operation. + + Current usage: + (1) C# interpolation part. + (2) VB interpolation part. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Expression of the interpolation. + + + + + Optional alignment of the interpolation. + + + + + Optional format string of the interpolation. + + + + + Represents a pattern matching operation. + + Current usage: + (1) C# pattern. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The input type to the pattern-matching operation. + + + + + The narrowed type of the pattern-matching operation. + + + + + Represents a pattern with a constant value. + + Current usage: + (1) C# constant pattern. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Constant value of the pattern operation. + + + + + Represents a pattern that declares a symbol. + + Current usage: + (1) C# declaration pattern. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The type explicitly specified, or null if it was inferred (e.g. using var in C#). + + + + + True if the pattern is of a form that accepts null. + For example, in C# the pattern `var x` will match a null input, + while the pattern `string x` will not. + + + + + Symbol declared by the pattern, if any. + + + + + Represents a comparison of two operands that returns a bool type. + + Current usage: + (1) C# tuple binary operator expression. + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of binary operation. + + + + + Left operand. + + + + + Right operand. + + + + + Represents a method body operation. + + Current usage: + (1) C# method body + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Method body corresponding to BaseMethodDeclarationSyntax.Body or AccessorDeclarationSyntax.Body + + + + + Method body corresponding to BaseMethodDeclarationSyntax.ExpressionBody or AccessorDeclarationSyntax.ExpressionBody + + + + + Represents a method body operation. + + Current usage: + (1) C# method body for non-constructor + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a constructor method body operation. + + Current usage: + (1) C# method body for constructor declaration + + + + This node is associated with the following operation kinds: + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Local declarations contained within the . + + + + + Constructor initializer, if any. + + + + + Represents a discard operation. + + Current usage: C# discard expressions + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The symbol of the discard operation. + + + + + Represents a coalesce assignment operation with a target and a conditionally-evaluated value: + (1) is evaluated for null. If it is null, is evaluated and assigned to target. + (2) is conditionally evaluated if is null, and the result is assigned into . + The result of the entire expression is, which is only evaluated once. + + Current usage: + (1) C# null-coalescing assignment operation Target ??= Value. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a range operation. + + Current usage: + (1) C# range expressions + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Left operand. + + + + + Right operand. + + + + + true if this is a 'lifted' range operation. When there is an + operator that is defined to work on a value type, 'lifted' operators are + created to work on the versions of those + value types. + + + + + Factory method used to create this Range value. Can be null if appropriate + symbol was not found. + + + + + Represents the ReDim operation to re-allocate storage space for array variables. + + Current usage: + (1) VB ReDim statement. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Individual clauses of the ReDim operation. + + + + + Modifier used to preserve the data in the existing array when you change the size of only the last dimension. + + + + + Represents an individual clause of an to re-allocate storage space for a single array variable. + + Current usage: + (1) VB ReDim clause. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operand whose storage space needs to be re-allocated. + + + + + Sizes of the dimensions of the created array instance. + + + + + Represents a C# recursive pattern. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The type accepted for the recursive pattern. + + + + + The symbol, if any, used for the fetching values for subpatterns. This is either a Deconstruct + method, the type System.Runtime.CompilerServices.ITuple, or null (for example, in + error cases or when matching a tuple type). + + + + + This contains the patterns contained within a deconstruction or positional subpattern. + + + + + This contains the (symbol, property) pairs within a property subpattern. + + + + + Symbol declared by the pattern. + + + + + Represents a discard pattern. + + Current usage: C# discard pattern + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a switch expression. + + Current usage: + (1) C# switch expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Value to be switched upon. + + + + + Arms of the switch expression. + + + + + True if the switch expressions arms cover every possible input value. + + + + + Represents one arm of a switch expression. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The pattern to match. + + + + + Guard (when clause expression) associated with the switch arm, if any. + + + + + Result value of the enclosing switch expression when this arm matches. + + + + + Locals declared within the switch arm (e.g. pattern locals and locals declared in the guard) scoped to the arm. + + + + + Represents an element of a property subpattern, which identifies a member to be matched and the + pattern to match it against. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The member being matched in a property subpattern. This can be a + in non-error cases, or an in error cases. + + + + + The pattern to which the member is matched in a property subpattern. + + + + + Represents a standalone VB query Aggregate operation with more than one item in Into clause. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a C# fixed statement. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Locals declared. + + + + + Variables to be fixed. + + + + + Body of the fixed, over which the variables are fixed. + + + + + Represents a creation of an instance of a NoPia interface, i.e. new I(), where I is an embedded NoPia interface. + + Current usage: + (1) C# NoPia interface instance creation expression. + (2) VB NoPia interface instance creation expression. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Object or collection initializer, if any. + + + + + Represents a general placeholder when no more specific kind of placeholder is available. + A placeholder is an expression whose meaning is inferred from context. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a reference through a pointer. + + Current usage: + (1) C# pointer indirection reference expression. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Pointer to be dereferenced. + + + + + Represents a of operations that are executed with implicit reference to the for member references. + + Current usage: + (1) VB With statement. + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Body of the with. + + + + + Value to whose members leading-dot-qualified references within the with body bind. + + + + + Represents using variable declaration, with scope spanning across the parent . + + Current Usage: + (1) C# using declaration + (1) C# asynchronous using declaration + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The variables declared by this using declaration. + + + + + True if this is an asynchronous using declaration. + + + + + Represents a negated pattern. + + Current usage: + (1) C# negated pattern. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The negated pattern. + + + + + Represents a binary ("and" or "or") pattern. + + Current usage: + (1) C# "and" and "or" patterns. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Kind of binary pattern; either or . + + + + + The pattern on the left. + + + + + The pattern on the right. + + + + + Represents a pattern comparing the input with a given type. + + Current usage: + (1) C# type pattern. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The type explicitly specified, or null if it was inferred (e.g. using var in C#). + + + + + Represents a pattern comparing the input with a constant value using a relational operator. + + Current usage: + (1) C# relational pattern. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The kind of the relational operator. + + + + + Constant value of the pattern operation. + + + + + Represents cloning of an object instance. + + Current usage: + (1) C# with expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Operand to be cloned. + + + + + Clone method to be invoked on the value. This can be null in error scenarios. + + + + + With collection initializer. + + + + + Represents an interpolated string converted to a custom interpolated string handler type. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The construction of the interpolated string handler instance. This can be an for valid code, and + or for invalid code. + + + + + True if the last parameter of is an out parameter that will be checked before executing the code in + . False otherwise. + + + + + True if the AppendLiteral or AppendFormatted calls in nested return . When that is true, each part + will be conditional on the return of the part before it, only being executed when the Append call returns true. False otherwise. + + + when this is true and is true, then the first part in nested is conditionally + run. If this is true and is false, then the first part is unconditionally run. +
+ Just because this is true or false does not guarantee that all Append calls actually do return boolean values, as there could be dynamic calls or errors. + It only governs what the compiler was expecting, based on the first calls it did see. +
+
+ + + The interpolated string expression or addition operation that makes up the content of this string. This is either an + or an operation. + + + + + Represents an addition of multiple interpolated string literals being converted to an interpolated string handler type. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The interpolated string expression or addition operation on the left side of the operator. This is either an + or an operation. + + + + + The interpolated string expression or addition operation on the right side of the operator. This is either an + or an operation. + + + + + Represents a call to either AppendLiteral or AppendFormatted as part of an interpolated string handler conversion. + + + This node is associated with the following operation kinds: + + + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + If this interpolated string is subject to an interpolated string handler conversion, the construction of the interpolated string handler instance. + This can be an or for valid code, and for invalid code. + + + + + Represents an argument from the method call, indexer access, or constructor invocation that is creating the containing + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The index of the argument of the method call, indexer, or object creation containing the interpolated string handler conversion this placeholder is referencing. + -1 if is anything other than . + + + + + The component this placeholder represents. + + + + + Represents an invocation of a function pointer. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Invoked pointer. + + + + + Arguments of the invocation. Arguments are in evaluation order. + + + + + Represents a C# list pattern. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The Length or Count property that is used to fetch the length value. + Returns null if no such property is found. + + + + + The indexer that is used to fetch elements. + Returns null for an array input. + + + + + Returns subpatterns contained within the list pattern. + + + + + Symbol declared by the pattern, if any. + + + + + Represents a C# slice pattern. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The range indexer or the Slice method used to fetch the slice value. + + + + + The pattern that the slice value is matched with, if any. + + + + + Represents a reference to an implicit System.Index or System.Range indexer over a non-array type. + + Current usage: + (1) C# implicit System.Index or System.Range indexer reference expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Instance of the type to be indexed. + + + + + System.Index or System.Range value. + + + + + The Length or Count property that might be used to fetch the length value. + + + + + Symbol for the underlying indexer or a slice method that is used to implement the implicit indexer. + + + + + Represents a UTF-8 encoded byte representation of a string. + + Current usage: + (1) C# UTF-8 string literal expression. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The underlying string value. + + + + + Represents the application of an attribute. + + Current usage: + (1) C# attribute application. + (2) VB attribute application. + + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The operation representing the attribute. This can be a in non-error cases, or an in error cases. + + + + + This creates a block that can be used for temporary, internal applications that require a block composed of + statements from another block. Blocks created by this API violate IOperation tree constraints and should + never be exposed from a public API. + + + + Deep clone given IOperation + + + + Represents a visitor that visits only the single IOperation + passed into its Visit method. + + + + + Represents a visitor that visits only the single IOperation + passed into its Visit method with an additional argument of the type specified by the + parameter and produces a value of the type specified by + the parameter. + + + The type of the additional argument passed to this visitor's Visit method. + + + The type of the return value of this visitor's Visit method. + + + + + Kinds of arguments. + + + + + Represents unknown argument kind. + + + + + Argument value is explicitly supplied. + + + + + Argument is a param array created by compilers for the matching C# params or VB ParamArray parameter. + Note, the value is a an array creation expression that encapsulates all the elements, if any. + + + + + Argument is a default value supplied automatically by the compilers. + + + + + Kind of binary operator. + + + + + Represents unknown or error operator kind. + + + + + Represents the '+' operator. + + + + + Represents the '-' operator. + + + + + Represents the '*' operator. + + + + + Represents the '/' operator. + + + + + Represents the VB '\' integer divide operator. + + + + + Represents the C# '%' operator and VB 'Mod' operator. + + + + + Represents the VB '^' exponentiation operator. + + + + + Represents the operator. + + + + + Represents the >']]> operator. + + + + + Represents the C# operator and VB 'And' operator. + + + + + Represents the C# operator and VB 'Or' operator. + + + + + Represents the C# '^' operator and VB 'Xor' operator. + + + + + Represents the C# operator and VB 'AndAlso' operator. + + + + + Represents the C# operator and VB 'OrElse' operator. + + + + + Represents the VB operator for string concatenation. + + + + + Represents the C# '==' operator and VB 'Is' operator and '=' operator for non-object typed operands. + + + + + Represents the VB '=' operator for object typed operands. + + + + + Represents the C# '!=' operator and VB 'IsNot' operator and ']]> operator for non-object typed operands. + + + + + Represents the VB ']]> operator for object typed operands. + + + + + Represents the operator. + + + + + Represents the operator. + + + + + Represents the =']]> operator. + + + + + Represents the ']]> operator. + + + + + Represents the VB 'Like' operator. + + + + + Represents the >>']]> operator. + + + + + Kind of the branch for an + + + + + Represents unknown branch kind. + + + + + Represents a continue branch kind. + + + + + Represents a break branch kind. + + + + + Represents a goto branch kind. + + + + + Kinds of cases. + + + + + Represents unknown case kind. + + + + + Indicates an in C# or VB. + + + + + Indicates an in VB. + + + + + Indicates an in VB. + + + + + Indicates an in C# or VB. + + + + + Indicates an in C#. + + + + + Represents the common, language-agnostic elements of a conversion. + + + We reserve the right to change this struct in the future. + + + + + Returns true if the conversion exists, as defined by the target language. + + + The existence of a conversion does not necessarily imply that the conversion is valid. + For example, an ambiguous user-defined conversion may exist but may not be valid. + + + + + Returns true if the conversion is an identity conversion. + + + + + Returns true if the conversion is an nullable conversion. + + + + + Returns true if the conversion is a numeric conversion. + + + + + Returns true if the conversion is a reference conversion. + + + + + Returns true if the conversion is an implicit (C#) or widening (VB) conversion. + + + + + Returns true if the conversion is a user-defined conversion. + + + + + Returns the method used to perform the conversion for a user-defined conversion if is true. + Otherwise, returns null. + + + + + Type parameter which runtime type will be used to resolve virtual invocation of the , if any. + Null if is resolved statically, or is null. + + + + + Kind of reference for an . + + + + + Reference to an instance of the containing type. Used for this and base in C# code, and Me, + MyClass, MyBase in VB code. + + + + + Reference to the object being initialized in C# or VB object or collection initializer, + anonymous type creation initializer, or to the object being referred to in a VB With statement, + or the C# 'with' expression initializer. + + + + + Reference to the value being matching in a property subpattern. + + + + + Reference to the interpolated string handler instance created as part of a parent interpolated string handler conversion. + + + + + Kind of placeholder for an . + + + + + This is a placeholder for an argument from the containing method call, indexer access, or object creation. + The corresponding argument index is accessed in . + + + + + This is a placeholder for the receiver of the containing method call, indexer access, or object creation. + + + + + This is a placeholder for the trailing bool out parameter of the interpolated string handler type. This bool + controls whether the conditional evaluation for the rest of the interpolated string should be run after the + constructor returns. + + + + + Element type of the collection + + + + + The conversion from the type of the to the . + + + + + The conversion from the to the iteration variable type. + + + + + Kinds of loop operations. + + + + + Represents unknown loop kind. + + + + + Represents an in C# or VB. + + + + + Indicates an in C#. + + + + + Indicates an in VB. + + + + + Indicates an in C# or VB. + + + + + Helper function to simplify the access to the function pointer signature of an FunctionPointerInvocationOperation + + + + + This will check whether context around the operation has any error such as syntax or semantic error + + + + + Returns all the descendant operations of the given in evaluation order. + + Operation whose descendants are to be fetched. + + + + Returns all the descendant operations of the given including the given in evaluation order. + + Operation whose descendants are to be fetched. + + + + Gets all the declared local variables in the given . + + Variable declaration group + + + + Gets all the declared local variables in the given . + + Variable declaration + + + + Gets the variable initializer for the given , checking to see if there is a parent initializer + if the single variable initializer is null. + + Single variable declaration to retrieve initializer for. + + + + Get an optional argument name for a named argument to the given at the given . + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument name for a named argument to the given at the given . + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument name for a named argument to the given at the given . + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument name for a named argument to the given at the given . + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument for an argument at the given to the given . + Returns a non-null argument for C#. + Always returns null for VB as cannot be specified for an argument in VB. + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument for an argument at the given to the given . + Returns a non-null argument for C#. + Always returns null for VB as cannot be specified for an argument in VB. + + Dynamic or late bound operation. + Argument index. + + + + Get an optional argument for an argument at the given to the given . + Returns a non-null argument for C#. + Always returns null for VB as cannot be specified for an argument in VB. + + Dynamic or late bound operation. + Argument index. + + + + Gets the root operation for the tree containing the given . + + Operation whose root is requested. + + + + Gets either a loop or a switch operation that corresponds to the given branch operation. + + The branch operation for which a corresponding operation is looked up + The corresponding operation or null in case not found (e.g. no loop or switch syntax, or the branch is not a break or continue) + is null + The operation is a part of Control Flow Graph + + + + Use this to create IOperation when we don't have proper specific IOperation yet for given language construct + + + + + Represents a that descends an entire tree + visiting each IOperation and its child IOperation nodes in depth-first order. + + + + + Represents a that descends an entire tree + visiting each IOperation and its child IOperation nodes in depth-first order. Returns null. + + + + + Kind of unary operator + + + + + Represents unknown or error operator kind. + + + + + Represents the C# '~' operator. + + + + + Represents the C# '!' operator and VB 'Not' operator. + + + + + Represents the unary '+' operator. + + + + + Represents the unary '-' operator. + + + + + Represents the C# 'true' operator and VB 'IsTrue' operator. + + + + + Represents the C# 'false' operator and VB 'IsFalse' operator. + + + + + Represents the C# '^' operator. + + + + + Gets symbol information about a syntax node. + + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Gets type information about a syntax node. + + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + If "nameSyntax" resolves to an alias name, return the IAliasSymbol corresponding + to A. Otherwise return null. + + + Name to get alias info for. + A cancellation token that can be used to cancel the + process of obtaining the alias information. + + + + Binds the name in the context of the specified location and sees if it resolves to an + alias name. If it does, return the AliasSymbol corresponding to it. Otherwise, return null. + + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a name. This syntax + node need not and typically does not appear in the source code referred to by the + SemanticModel instance. + Indicates whether to binding the name as a full expression, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The passed in name is interpreted as a stand-alone name, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Gets the symbol associated with a declaration syntax node. + + + A syntax node that is a declaration. This can be any type + derived from MemberDeclarationSyntax, TypeDeclarationSyntax, EnumDeclarationSyntax, + NamespaceDeclarationSyntax, ParameterSyntax, TypeParameterSyntax, or the alias part of a + UsingDirectiveSyntax + The cancellation token. + The symbol declared by the node or null if the node is not a declaration. + + + + Gets a list of method or indexed property symbols for a syntax node. + + + The syntax node to get semantic information for. + The cancellation token. + + + + Analyze control-flow within a part of a method body. + + + + + Analyze control-flow within a part of a method body. + + + + + Analyze data-flow within a part of a method body. + + + + + Analyze data-flow within a part of a method body. + note (for C#): ConstructorInitializerSyntax and PrimaryConstructorBaseTypeSyntax are treated by this API as regular statements + + + + + It is unknown if the is automatically generated. + + + + + The is not automatically generated. + + + + + The is marked as automatically generated. + + + + + Represents the set of symbols that are imported to a particular position in a source file. Each import has a + reference to the location the import directive was declared at. For the import, the + location can be found using either or on the itself. For + or the location is found through or respectively. + + + + Scopes returned will always have at least one non-empty property value in them. + Symbols may be imported, but may not necessarily be available at that location (for example, an alias + symbol hidden by another symbol). + + In C# there will be an for every containing namespace-declarations that include any + import directives. There will also be an for the containing compilation-unit if it + includes any import directives or if there are global import directives pulled in from other files. + + + In Visual Basic there will commonly be one or two s returned for any position. This will + commonly be a scope for the containing compilation unit if it includes any import directives. As well as a scope + representing any imports specified at the project level. + + + Elements of any property have no defined order. Even if they represent items from a single document, they are + not guaranteed to be returned in any specific file-oriented order. + + There is no guarantee that the same scope instances will be returned from successive calls to . + + + + + + Aliases defined at this level of the chain. This corresponds to using X = TypeOrNamespace; in C# or + Imports X = TypeOrNamespace in Visual Basic. This will include global aliases if present for both + languages. + + May be , will never be . + + + + Extern aliases defined at this level of the chain. This corresponds to extern alias X; in C#. It + will be empty in Visual Basic. + + May be , will never be . + + + + Types or namespaces imported at this level of the chain. This corresponds to using Namespace; or + using static Type; in C#, or Imports TypeOrNamespace in Visual Basic. This will include + global namespace or type imports for both languages. + + May be , will never be . + + + + Xml namespaces imported at this level of the chain. This corresponds to Imports <xmlns:prefix = + "name"> in Visual Basic. It will be empty in C#. + + May be , will never be . + + + + Represents an that has been imported, and the location the import was + declared at. This corresponds to using Namespace; or using static Type; in C#, or Imports + TypeOrNamespace in Visual Basic. + + + + + Location in source where the using directive or Imports clause was declared. May be null for + Visual Basic for a project-level import directive, or for a C# global using provided directly through . + + + + + Represents an imported xml namespace name. This corresponds to Imports <xmlns:prefix = "name"> in + Visual Basic. It does not exist for C#. + + + + + Location in source where the Imports clause was declared. May be null for a project-level import + directive. + + + + + Simple POCO implementation of the import scope, usable by both C# and VB. + + + + + Represents the state of the nullable analysis at a specific point in a file. Bits one and + two correspond to whether the nullable feature is enabled. Bits three and four correspond + to whether the context was inherited from the global context. + + + + + Nullable warnings and annotations are explicitly turned off at this location. + + + + + Nullable warnings are enabled and will be reported at this file location. + + + + + Nullable annotations are enabled and will be shown when APIs defined at + this location are used in other contexts. + + + + + The nullable feature is fully enabled. + + + + + The nullable warning state is inherited from the project default. + + The project default can change depending on the file type. Generated + files have nullable off by default, regardless of the project-level + default setting. + + + + + + The nullable annotation state is inherited from the project default. + + The project default can change depending on the file type. Generated + files have nullable off by default, regardless of the project-level + default setting. + + + + + + The current state of both warnings and annotations are inherited from + the project default. + + This flag is set by default at the start of all files. + + The project default can change depending on the file type. Generated + files have nullable off by default, regardless of the project-level + default setting. + + + + + + Returns whether nullable warnings are enabled for this context. + + + + + Returns whether nullable annotations are enabled for this context. + + + + + Returns whether the nullable warning state was inherited from the project default for this file type. + + + + + Returns whether the nullable annotation state was inherited from the project default for this file type. + + + + + Represents the default state of nullable analysis in this compilation. + + + + + The nullable analysis feature is disabled. + + + + + Nullable warnings are enabled and will be reported by default. + + + + + Nullable annotations are enabled and will be shown when APIs + defined in this project are used in other contexts. + + + + + The nullable analysis feature is fully enabled. + + + + + Returns whether nullable warnings are enabled. + + + + + Returns whether nullable annotations are enabled. + + + + + Determines the level of optimization of the generated code. + + + + + Disables all optimizations and instruments the generated code to improve debugging experience. + + The compiler prefers debuggability over performance. Do not use for code running in a production environment. + + + JIT optimizations are disabled via assembly level attribute (). + Edit and Continue is enabled. + Slots for local variables are not reused, lifetime of local variables is extended to make the values available during debugging. + + + Corresponds to command line argument /optimize-. + + + + + + Enables all optimizations, debugging experience might be degraded. + + The compiler prefers performance over debuggability. Use for code running in a production environment. + + + JIT optimizations are enabled via assembly level attribute (). + Edit and Continue is disabled. + Sequence points may be optimized away. As a result it might not be possible to place or hit a breakpoint. + User-defined locals might be optimized away. They might not be available while debugging. + + + Corresponds to command line argument /optimize+. + + + + + + Represents parse options common to C# and VB. + + + + + Specifies whether to parse as regular code files, script files or interactive code. + + + + + Gets the specified source code kind, which is the value that was specified in + the call to the constructor, or modified using the method. + + + + + Gets a value indicating whether the documentation comments are parsed and analyzed. + + + + + Gets the source language ("C#" or "Visual Basic"). + + + + + Errors collection related to an incompatible set of parse options + + + + + Creates a new options instance with the specified source code kind. + + + + + Performs validation of options compatibilities and generates diagnostics if needed + + + + + Creates a new options instance with the specified documentation mode. + + + + + Enable some experimental language features for testing. + + + + + Returns the experimental features. + + + + + Names of defined preprocessor symbols. + + + + + AnyCPU (default) compiles the assembly to run on any platform. + + + + + x86 compiles the assembly to be run by the 32-bit, x86-compatible common language runtime. + + + + + x64 compiles the assembly to be run by the 64-bit common language runtime on a computer that supports the AMD64 or EM64T instruction set. + + + + + Itanium compiles the assembly to be run by the 64-bit common language runtime on a computer with an Itanium processor. + + + + + Compiles your assembly to run on any platform. Your application runs in 32-bit mode on systems that support both 64-bit and 32-bit applications. + + + + + Compiles your assembly to run on a computer that has an Advanced RISC Machine (ARM) processor. + + + + + Compiles your assembly to run on a computer that has an Advanced RISC Machine 64 bit (ARM64) processor. + + + + + The symbol that was referred to by the identifier, if any. + + + + + Returns true if this preprocessing symbol is defined at the identifier position. + + + + + This represents the set of document names for the #line / #ExternalSource directives + that we need to emit into the PDB (in the order specified in the array). + + + + + Allows asking semantic questions about a tree of syntax nodes in a Compilation. Typically, + an instance is obtained by a call to GetBinding on a Compilation or Compilation. + + + An instance of SemanticModel caches local symbols and semantic information. Thus, it + is much more efficient to use a single instance of SemanticModel when asking multiple + questions about a syntax tree, because information from the first question may be reused. + This also means that holding onto an instance of SemanticModel for a long time may keep a + significant amount of memory from being garbage collected. + + + When an answer is a named symbol that is reachable by traversing from the root of the symbol + table, (that is, from an AssemblySymbol of the Compilation), that symbol will be returned + (i.e. the returned value will be reference-equal to one reachable from the root of the + symbol table). Symbols representing entities without names (e.g. array-of-int) may or may + not exhibit reference equality. However, some named symbols (such as local variables) are + not reachable from the root. These symbols are visible as answers to semantic questions. + When the same SemanticModel object is used, the answers exhibit reference-equality. + + + + + + Gets the source language ("C#" or "Visual Basic"). + + + + + The compilation this model was obtained from. + + + + + The compilation this model was obtained from. + + + + + The syntax tree this model was obtained from. + + + + + The syntax tree this model was obtained from. + + + + + Gets the operation corresponding to the expression or statement syntax node. + + The expression or statement syntax node. + An optional cancellation token. + + + + + Returns true if this is a SemanticModel that ignores accessibility rules when answering semantic questions. + + + + + Gets symbol information about a syntax node. + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + Gets symbol information about a syntax node. + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Binds the node in the context of the specified location and get semantic information + such as type, symbols and diagnostics. This method is used to get semantic information + about an expression that did not actually appear in the source code. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a parsed expression. This syntax + node need not and typically does not appear in the source code referred to SemanticModel + instance. + Indicates whether to binding the expression as a full expressions, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The semantic information for the topmost node of the expression. + The passed in expression is interpreted as a stand-alone expression, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Gets type information about a syntax node. + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + Gets type information about a syntax node. + + The syntax node to get semantic information for. + A cancellation token that can be used to cancel the + process of obtaining the semantic info. + + + + If "nameSyntax" resolves to an alias name, return the IAliasSymbol corresponding + to A. Otherwise return null. + + Name to get alias info for. + A cancellation token that can be used to cancel the + process of obtaining the alias information. + + + + If "nameSyntax" resolves to an alias name, return the IAliasSymbol corresponding + to A. Otherwise return null. + + Name to get alias info for. + A cancellation token that can be used to cancel the + process of obtaining the alias information. + + + + Returns true if this is a speculative semantic model created with any of the TryGetSpeculativeSemanticModel methods. + + + + + If this is a speculative semantic model, returns the original position at which the speculative model was created. + Otherwise, returns 0. + + + + + If this is a speculative semantic model, then returns its parent semantic model. + Otherwise, returns null. + + + + + If this is a speculative semantic model, then returns its parent semantic model. + Otherwise, returns null. + + + + + If this is an instance of semantic model that cannot be exposed to external consumers, then returns the containing public semantic model. + Otherwise, returns this instance of the semantic model. + + + + + Binds the name in the context of the specified location and sees if it resolves to an + alias name. If it does, return the AliasSymbol corresponding to it. Otherwise, return null. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a name. This syntax + node need not and typically does not appear in the source code referred to by the + SemanticModel instance. + Indicates whether to binding the name as a full expression, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The passed in name is interpreted as a stand-alone name, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Binds the name in the context of the specified location and sees if it resolves to an + alias name. If it does, return the AliasSymbol corresponding to it. Otherwise, return null. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + A syntax node that represents a name. This syntax + node need not and typically does not appear in the source code referred to by the + SemanticModel instance. + Indicates whether to binding the name as a full expression, + or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then + expression should derive from TypeSyntax. + The passed in name is interpreted as a stand-alone name, as if it + appeared by itself somewhere within the scope that encloses "position". + + + + Get all of the syntax errors within the syntax tree associated with this + object. Does not get errors involving declarations or compiling method bodies or initializers. + + Optional span within the syntax tree for which to get diagnostics. + If no argument is specified, then diagnostics for the entire tree are returned. + A cancellation token that can be used to cancel the + process of obtaining the diagnostics. + + + + Get all of the declaration errors within the syntax tree associated with this + object. Does not get errors involving incorrect syntax, compiling method bodies or initializers. + + Optional span within the syntax tree for which to get diagnostics. + If no argument is specified, then diagnostics for the entire tree are returned. + A cancellation token that can be used to cancel the + process of obtaining the diagnostics. + The declaration errors for a syntax tree are cached. The first time this method + is called, all declarations are analyzed for diagnostics. Calling this a second time + will return the cached diagnostics. + + + + + Get all of the method body and initializer errors within the syntax tree associated with this + object. Does not get errors involving incorrect syntax or declarations. + + Optional span within the syntax tree for which to get diagnostics. + If no argument is specified, then diagnostics for the entire tree are returned. + A cancellation token that can be used to cancel the + process of obtaining the diagnostics. + The method body errors for a syntax tree are not cached. The first time this method + is called, all method bodies are analyzed for diagnostics. Calling this a second time + will repeat this work. + + + + + Get all the errors within the syntax tree associated with this object. Includes errors + involving compiling method bodies or initializers, in addition to the errors returned by + GetDeclarationDiagnostics. + + Optional span within the syntax tree for which to get diagnostics. + If no argument is specified, then diagnostics for the entire tree are returned. + A cancellation token that can be used to cancel the + process of obtaining the diagnostics. + + Because this method must semantically bind all method bodies and initializers to check + for diagnostics, it may take a significant amount of time. Unlike + GetDeclarationDiagnostics, diagnostics for method bodies and initializers are not + cached, any semantic information used to obtain the diagnostics is discarded. + + + + + Gets the symbol associated with a declaration syntax node. + + A syntax node that is a declaration. This can be any type + derived from MemberDeclarationSyntax, TypeDeclarationSyntax, EnumDeclarationSyntax, + NamespaceDeclarationSyntax, ParameterSyntax, TypeParameterSyntax, or the alias part of a + UsingDirectiveSyntax + The cancellation token. + The symbol declared by the node or null if the node is not a declaration. + + + + Gets the symbol associated with a declaration syntax node. + + A syntax node that is a declaration. This can be any type + derived from MemberDeclarationSyntax, TypeDeclarationSyntax, EnumDeclarationSyntax, + NamespaceDeclarationSyntax, ParameterSyntax, TypeParameterSyntax, or the alias part of a + UsingDirectiveSyntax + The cancellation token. + The symbol declared by the node or null if the node is not a declaration. + + + + Gets the symbol associated with a declaration syntax node. Unlike , + this method returns all symbols declared by a given declaration syntax node. Specifically, in the case of field declaration syntax nodes, + which can declare multiple symbols, this method returns all declared symbols. + + A syntax node that is a declaration. This can be any type + derived from MemberDeclarationSyntax, TypeDeclarationSyntax, EnumDeclarationSyntax, + NamespaceDeclarationSyntax, ParameterSyntax, TypeParameterSyntax, or the alias part of a + UsingDirectiveSyntax + The cancellation token. + The symbols declared by the node. + + + + Gets the symbol associated with a declaration syntax node. Unlike , + this method returns all symbols declared by a given declaration syntax node. Specifically, in the case of field declaration syntax nodes, + which can declare multiple symbols, this method returns all declared symbols. + + A syntax node that is a declaration. This can be any type + derived from MemberDeclarationSyntax, TypeDeclarationSyntax, EnumDeclarationSyntax, + NamespaceDeclarationSyntax, ParameterSyntax, TypeParameterSyntax, or the alias part of a + UsingDirectiveSyntax + The cancellation token. + The symbols declared by the node. + + + + Gets the available named symbols in the context of the specified location and optional container. Only + symbols that are accessible and visible from the given location are returned. + + The character position for determining the enclosing declaration scope and + accessibility. + The container to search for symbols within. If null then the enclosing declaration + scope around position is used. + The name of the symbol to find. If null is specified then symbols + with any names are returned. + Consider (reduced) extension methods. + A list of symbols that were found. If no symbols were found, an empty list is returned. + + The "position" is used to determine what variables are visible and accessible. Even if "container" is + specified, the "position" location is significant for determining which members of "containing" are + accessible. + + Labels are not considered (see ). + + Non-reduced extension methods are considered regardless of the value of . + + + + + Backing implementation of . + + + + + Gets the available base type members in the context of the specified location. Akin to + calling with the container set to the immediate base type of + the type in which occurs. However, the accessibility rules + are different: protected members of the base type will be visible. + + Consider the following example: + + public class Base + { + protected void M() { } + } + + public class Derived : Base + { + void Test(Base b) + { + b.M(); // Error - cannot access protected member. + base.M(); + } + } + + Protected members of an instance of another type are only accessible if the instance is known + to be "this" instance (as indicated by the "base" keyword). + + The character position for determining the enclosing declaration scope and + accessibility. + The name of the symbol to find. If null is specified then symbols + with any names are returned. + A list of symbols that were found. If no symbols were found, an empty list is returned. + + The "position" is used to determine what variables are visible and accessible. + + Non-reduced extension methods are considered, but reduced extension methods are not. + + + + + Backing implementation of . + + + + + Gets the available named static member symbols in the context of the specified location and optional container. + Only members that are accessible and visible from the given location are returned. + + Non-reduced extension methods are considered, since they are static methods. + + The character position for determining the enclosing declaration scope and + accessibility. + The container to search for symbols within. If null then the enclosing declaration + scope around position is used. + The name of the symbol to find. If null is specified then symbols + with any names are returned. + A list of symbols that were found. If no symbols were found, an empty list is returned. + + The "position" is used to determine what variables are visible and accessible. Even if "container" is + specified, the "position" location is significant for determining which members of "containing" are + accessible. + + Essentially the same as filtering instance members out of the results of an analogous call. + + + + + Backing implementation of . + + + + + Gets the available named namespace and type symbols in the context of the specified location and optional container. + Only members that are accessible and visible from the given location are returned. + + The character position for determining the enclosing declaration scope and + accessibility. + The container to search for symbols within. If null then the enclosing declaration + scope around position is used. + The name of the symbol to find. If null is specified then symbols + with any names are returned. + A list of symbols that were found. If no symbols were found, an empty list is returned. + + The "position" is used to determine what variables are visible and accessible. Even if "container" is + specified, the "position" location is significant for determining which members of "containing" are + accessible. + + Does not return INamespaceOrTypeSymbol, because there could be aliases. + + + + + Backing implementation of . + + + + + Gets the available named label symbols in the context of the specified location and optional container. + Only members that are accessible and visible from the given location are returned. + + The character position for determining the enclosing declaration scope and + accessibility. + The name of the symbol to find. If null is specified then symbols + with any names are returned. + A list of symbols that were found. If no symbols were found, an empty list is returned. + + The "position" is used to determine what variables are visible and accessible. Even if "container" is + specified, the "position" location is significant for determining which members of "containing" are + accessible. + + + + + Backing implementation of . + + + + + Analyze control-flow within a part of a method body. + + The first node to be included within the analysis. + The last node to be included within the analysis. + An object that can be used to obtain the result of the control flow analysis. + The span is not with a method + body. + + The first and last nodes must be fully inside the same method body. + + + + + Analyze control-flow within a part of a method body. + + The first node to be included within the analysis. + The last node to be included within the analysis. + An object that can be used to obtain the result of the control flow analysis. + The span is not with a method + body. + + The first and last nodes must be fully inside the same method body. + + + + + Analyze control-flow within a part of a method body. + + The statement to be analyzed. + An object that can be used to obtain the result of the control flow analysis. + The span is not with a method + body. + + The statement must be fully inside the same method body. + + + + + Analyze control-flow within a part of a method body. + + The statement to be analyzed. + An object that can be used to obtain the result of the control flow analysis. + The span is not with a method + body. + + The statement must be fully inside the same method body. + + + + + Analyze data-flow within a part of a method body. + + The first node to be included within the analysis. + The last node to be included within the analysis. + An object that can be used to obtain the result of the data flow analysis. + The span is not with a method + body. + + The first and last nodes must be fully inside the same method body. + + + + + Analyze data-flow within a part of a method body. + + The first node to be included within the analysis. + The last node to be included within the analysis. + An object that can be used to obtain the result of the data flow analysis. + The span is not with a method + body. + + The first and last nodes must be fully inside the same method body. + + + + + Analyze data-flow within a part of a method body. + + The statement or expression to be analyzed. A ConstructorInitializerSyntax / PrimaryConstructorBaseTypeSyntax is treated here as a regular statement. + An object that can be used to obtain the result of the data flow analysis. + The statement or expression is not with a method + body or field or property initializer. + + The statement or expression must be fully inside a method body. + + + + + Analyze data-flow within a part of a method body. + + The statement or expression to be analyzed. + An object that can be used to obtain the result of the data flow analysis. + The statement or expression is not with a method + body or field or property initializer. + + The statement or expression must be fully inside a method body. + + + + + If the node provided has a constant value an Optional value will be returned with + HasValue set to true and with Value set to the constant. If the node does not have an + constant value, an Optional will be returned with HasValue set to false. + + + + + If the node provided has a constant value an Optional value will be returned with + HasValue set to true and with Value set to the constant. If the node does not have an + constant value, an Optional will be returned with HasValue set to false. + + + + + When getting information for a symbol that resolves to a method group or property group, + from which a method is then chosen; the chosen method or property is present in Symbol; + all methods in the group that was consulted are placed in this property. + + + + + When getting information for a symbol that resolves to a method group or property group, + from which a method is then chosen; the chosen method or property is present in Symbol; + all methods in the group that was consulted are placed in this property. + + + + + Given a position in the SyntaxTree for this SemanticModel returns the innermost Symbol + that the position is considered inside of. + + + + + Given a position in the SyntaxTree for this SemanticModel returns the innermost Symbol + that the position is considered inside of. + + + + + Given a position in the SyntaxTree for this SemanticModel returns the s at that + point. Scopes are ordered from closest to the passed in to the furthest. See + for a deeper description of what information is available for each scope. + + + + + Determines if the symbol is accessible from the specified location. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + The symbol that we are checking to see if it accessible. + + True if "symbol is accessible, false otherwise. + + This method only checks accessibility from the point of view of the accessibility + modifiers on symbol and its containing types. Even if true is returned, the given symbol + may not be able to be referenced for other reasons, such as name hiding. + + + + + Determines if the symbol is accessible from the specified location. + + A character position used to identify a declaration scope and + accessibility. This character position must be within the FullSpan of the Root syntax + node in this SemanticModel. + + The symbol that we are checking to see if it accessible. + + True if "symbol is accessible, false otherwise. + + This method only checks accessibility from the point of view of the accessibility + modifiers on symbol and its containing types. Even if true is returned, the given symbol + may not be able to be referenced for other reasons, such as name hiding. + + + + + Field-like events can be used as fields in types that can access private + members of the declaring type of the event. + + + Always false for VB events. + + + + + Field-like events can be used as fields in types that can access private + members of the declaring type of the event. + + + Always false for VB events. + + + + + If is an identifier name syntax node, return the corresponding + to it. + + The nameSyntax node to get semantic information for. + + + + If is an identifier name syntax node, return the corresponding + to it. + + The nameSyntax node to get semantic information for. + + + + Gets the for all the declarations whose span overlaps with the given . + + Span to get declarations. + Flag indicating whether should be computed for the returned declaration infos. + If false, then is always null. + Builder to add declarations. + Cancellation token. + + + + Takes a node and returns a set of declarations that overlap the node's span. + + + + + Gets a filter that determines whether or not a given syntax node and its descendants should be analyzed for the given + declared node and declared symbol. We have scenarios where certain syntax nodes declare multiple symbols, + for example record declarations, and we want to avoid duplicate syntax node callbacks for such nodes. + Note that the predicate returned by this method filters out both the node and all its descendants from analysis. + If you wish to skip analysis just for a specific node, but not its descendants, then add the required logic in + . + + + + + Determines if the given syntax node with the given containing symbol should be analyzed or not. + Note that only the given syntax node will be filtered out from analysis, this API will be invoked separately + for each of its descendants. If you wish to skip analysis of the node and all its descendants, then add the required + logic to . + + + + + Takes a Symbol and syntax for one of its declaring syntax reference and returns the topmost syntax node to be used by syntax analyzer. + + + + + Root of this semantic model + + + + + Root of this semantic model + + + + + Gets the at a position in the file. + + The position to get the context for. + + + + Provides semantic models for syntax trees in a compilation. + This provider can be attached to a compilation, see . + + + + + Gets a for the given that belongs to the given . + + + + + Resolves references to source documents specified in the source. + + + + + Normalizes specified source path with respect to base file path. + + The source path to normalize. May be absolute or relative. + Path of the source file that contains the (may also be relative), or null if not available. + Normalized path, or null if can't be normalized. The resulting path doesn't need to exist. + + + + Resolves specified path with respect to base file path. + + The path to resolve. May be absolute or relative. + Path of the source file that contains the (may also be relative), or null if not available. + Normalized path, or null if the file can't be resolved. + + + + Opens a that allows reading the content of the specified file. + + Path returned by . + is null. + is not a valid absolute path. + Error reading file . See for details. + + + + Reads the contents of and returns a . + + Path returned by . + + + + Describes the kind of binding to be performed in one of the SemanticModel + speculative binding methods. + + + + + Binds the given expression using the normal expression binding rules + that would occur during normal binding of expressions. + + + + + Binds the given expression as a type or namespace only. If this option + is selected, then the given expression must derive from TypeSyntax. + + + + + Represents subsystem version, see /subsystemversion command line + option for details and valid values. + + The following table lists common subsystem versions of Windows. + + Windows version Subsystem version + - Windows 2000 5.00 + - Windows XP 5.01 + - Windows Vista 6.00 + - Windows 7 6.01 + - Windows 8 Release Preview 6.02 + + + + + Major subsystem version + + + + + Minor subsystem version + + + + + Subsystem version not specified + + + + + Subsystem version: Windows 2000 + + + + + Subsystem version: Windows XP + + + + + Subsystem version: Windows Vista + + + + + Subsystem version: Windows 7 + + + + + Subsystem version: Windows 8 + + + + + Try parse subsystem version in "x.y" format. Note, no spaces are allowed in string representation. + + String to parse + the value if successfully parsed or None otherwise + true if parsed successfully, false otherwise + + + + Create a new instance of subsystem version with specified major and minor values. + + major subsystem version + minor subsystem version + subsystem version with provided major and minor + + + + Subsystem version default for the specified output kind and platform combination + + Output kind + Platform + Subsystem version + + + + True if the subsystem version has a valid value + + + + + Indicate what kinds of declaration symbols will be included + + + + + None + + + + + include namespace symbols + + + + + include type symbols + + + + + include member symbols such as method, event, property, field + + + + + include type and member + + + + + include all namespace, type and member + + + + + Array of potential candidate symbols if did not bind successfully. Note: all code in + this type should prefer referencing instead of this so that they uniformly + only see an non- array. + + + + + The symbol that was referred to by the syntax node, if any. Returns null if the given expression did not + bind successfully to a single symbol. If null is returned, it may still be that case that we have one or + more "best guesses" as to what symbol was intended. These best guesses are available via the property. + + + + + If the expression did not successfully resolve to a symbol, but there were one or more symbols that may have + been considered but discarded, this property returns those symbols. The reason that the symbols did not + successfully resolve to a symbol are available in the property. For example, + if the symbol was inaccessible, ambiguous, or used in the wrong context. + + Will never return a array. + + + + If the expression did not successfully resolve to a symbol, but there were one or more symbols that may have + been considered but discarded, this property describes why those symbol or symbols were not considered + suitable. + + + + + Get whether the given tree is generated. + + + + + Get diagnostic severity setting for a given diagnostic identifier in a given tree. + + + + + Get diagnostic severity set globally for a given diagnostic identifier + + + + + The type of the expression represented by the syntax node. For expressions that do not + have a type, null is returned. If the type could not be determined due to an error, then + an IErrorTypeSymbol is returned. + + + + + The top-level nullability information of the expression represented by the syntax node. + + + + + The type of the expression after it has undergone an implicit conversion. If the type + did not undergo an implicit conversion, returns the same as Type. + + + + + The top-level nullability of the expression after it has undergone an implicit conversion. + For most expressions, this will be the same as the type. It can change in situations such + as implicit user-defined conversions that have a nullable return type. + + + + + Resolves references to XML documents specified in source code. + + + + + Resolves specified XML reference with respect to base file path. + + The reference path to resolve. May be absolute or relative path. + Path of the source file that contains the (may also be relative), or null if not available. + Path to the XML artifact, or null if the file can't be resolved. + + + + Opens a that allows reading the content of the specified file. + + Path returned by . + is null. + is not a valid absolute path. + Error reading file . See for details. + + + + The IEEE floating-point spec doesn't specify which bit pattern an implementation + is required to use when producing NaN values. Indeed, the spec does recommend + "diagnostic" information "left to the implementer’s discretion" be placed in the + undefined bits. It is therefore likely that NaNs produced on different platforms + will differ even for the same arithmetic such as 0.0 / 0.0. To ensure that the + compiler behaves in a deterministic way, we force NaN values to use the + IEEE "canonical" form with the diagnostic bits set to zero and the sign bit set + to one. Conversion of this value to float produces the corresponding + canonical NaN of the float type (IEEE Std 754-2008 section 6.2.3). + + + + + Some string constant values can have large costs to realize. To compensate, we realize + constant values lazily, and hold onto a weak reference. If the next time we're asked for the constant + value the previous one still exists, we can avoid rerealizing it. But we don't want to root the constant + value if it's not being used. + + + + + Parses .RES a file into its constituent resource elements. + Mostly translated from cvtres.cpp. + + + + + Assume that 3 WORDs preceded this string and that they began 32-bit aligned. + Given the string length compute the number of bytes that should be written to end + the buffer on a 32-bit boundary + + + + + + assuming the length of bytes submitted began on a 32-bit boundary, + round up this length as necessary so that it ends at a 32-bit boundary. + + + + + + + compute number of chars needed to end up on a 32-bit boundary assuming that three + WORDS preceded this string. + + + + + + + Policy to be used when matching assembly reference to an assembly definition across platforms. + + + + + Converts to . + + Major, minor, build or revision number are less than 0 or greater than 0xFFFF. + + + Assembly portability policy, usually provided through an app.config file. + + + + Loads information from XML with app.config schema. + + The stream doesn't contain a well formed XML. + is null. + + Tries to find supportPortability elements in the given XML: + + + + + + + + + ]]> + + Keeps the stream open. + + + + + Returns true if the identity is a Framework 4.5 or lower assembly. + + + + + Represents a non source code file. + + + + + Path to the text. + + + + + Returns a with the contents of this file, or null if + there were errors reading the file. + + + + + this hold onto analyzer executor context which will be used later to put context information in analyzer exception if it occurs. + + + + + Stores the results of analyzer execution: + 1. Local and non-local diagnostics, per-analyzer. + 2. Analyzer execution times, if requested. + + + + + Analyzers corresponding to this analysis result. + + + + + Syntax diagnostics reported by the . + + + + + Semantic diagnostics reported by the . + + + + + Diagnostics in additional files reported by the . + + + + + Compilation diagnostics reported by the . + + + + + Analyzer telemetry info (register action counts and execution times). + + + + + Gets all the diagnostics reported by the given . + + + + + Gets all the diagnostics reported by all the . + + + + + Stores the results of analyzer execution: + 1. Local and non-local diagnostics, per-analyzer. + 2. Analyzer execution times, if requested. + + + + + Scope for analyzer execution. + This scope could either be the entire compilation for all analyzers (command line build) or + could be scoped to a specific tree/span and/or a subset of analyzers (CompilationWithAnalyzers). + + + + + Syntax trees on which we need to perform syntax analysis. + + + + + Non-source files on which we need to perform analysis. + + + + + True if we need to categorize diagnostics into local and non-local diagnostics and track the analyzer reporting each diagnostic. + + + + + True if we need to perform only syntax analysis for a single source or additional file. + + + + + True if we need to perform analysis for a single source or additional file. + + + + + Flag indicating if this is a partial analysis for the corresponding , + i.e. is true and/or is a subset of . + + + + + Stores the partial analysis state for analyzers executed on a specific compilation. + + + Stores the current partial analysis state for an analyzer. + + + + + Stores the partial analysis state for a specific event/symbol/tree for a specific analyzer. + + + + + Current state of analysis. + + + + + Set of completed actions. + + + + + Resets the from to . + This method must be invoked after successful analysis completion AND on analysis cancellation. + + + + + Per-analyzer analysis state map. + The integer value points to the index within the array. + + + + + Per-analyzer analysis state. + + + + + Compilation events corresponding to source tree, that are not completely processed for all analyzers. + Events are dropped as and when they are fully processed by all analyzers. + + + + + Compilation events corresponding to the compilation (compilation start and completed events), that are not completely processed for all analyzers. + + + + + Action counts per-analyzer. + + + + + Invoke this method at completion of event processing for the given analyzers. + It updates the analysis state of this event for each analyzer and if the event has been fully processed for all analyzers, then removes it from our event cache. + + + + + Gets pending events for given set of analyzers for the given syntax tree. + + + + + Gets pending events for given set of analyzers for the given syntax tree. + + + + + Gets all pending events for given set of analyzers. + + + Indicates if source events (symbol declared, compilation unit completed event) should be included. + Indicates if compilation wide events (compilation started and completed event) should be included. + Cancellation token. + + + + Returns true if we have any pending syntax analysis for given analysis scope. + + + + + Returns true if we have any pending symbol analysis for given analysis scope. + + + + + Attempts to start processing a compilation event for the given analyzer. + + + Returns false if the event has already been processed for the analyzer OR is currently being processed by another task. + If true, then it returns a non-null representing partial analysis state for the given event for the given analyzer. + + + + + Tries to mark the given event as fully analyzed for the given analyzer. + + + + + Tries to mark the given event as fully analyzed for the given analyzers. + + + + + Tries to mark the given event as fully analyzed for the unprocessed analyzers in the given analysisScope. + + + + + Checks if the given event has been fully analyzed for the given analyzer. + + + + + Attempts to start processing a symbol for the given analyzer's symbol actions. + + + Returns false if the symbol has already been processed for the analyzer OR is currently being processed by another task. + If true, then it returns a non-null representing partial analysis state for the given symbol for the given analyzer. + + + + + Attempts to start executing a symbol's end actions for the given analyzer. + + + Returns false if the symbol end actions have already been executed for the analyzer OR are currently being executed by another task. + If true, then it returns a non-null representing partial analysis state for the given symbol end actions for the given analyzer. + + + + + Tries to mark the given symbol as fully analyzed for the given analyzer. + + + + + Tries to mark the given symbol as fully analyzed for the unprocessed analyzers in the given analysisScope. + + + + + True if the given symbol is fully analyzed for the given analyzer. + + + + + Tries to mark the given symbol end actions as fully executed for the given analyzers. + + + + + Tries to mark the given symbol end actions as fully executed for the given analyzer. + + + + + True if the given symbol end analysis is complete for the given analyzer. + + + + + Attempts to start processing a symbol declaration for the given analyzer's syntax node and code block actions. + + + Returns false if the declaration has already been processed for the analyzer OR is currently being processed by another task. + If true, then it returns a non-null representing partial analysis state for the given declaration for the given analyzer. + + + + + True if the given symbol declaration is fully analyzed for all the analyzers. + + + + + True if the given symbol declaration is fully analyzed for the given analyzer. + + + + + Tries to mark the given symbol declaration as fully analyzed for the given analyzer. + + + + + Tries to mark the given symbol declaration as fully analyzed for the given analyzers. + + + + + Marks all the symbol declarations for the given symbol as fully analyzed for all the given analyzers. + + + + + Attempts to start processing a syntax tree or additional file for the given analyzer's syntax tree or additional file actions respectively. + + + Returns false if the file has already been processed for the analyzer OR is currently being processed by another task. + If true, then it returns a non-null representing partial syntax analysis state for the given tree for the given analyzer. + + + + + Tries to mark the given file as fully syntactically analyzed for the given analyzer. + + + + + Tries to mark the given file as fully syntactically analyzed for the given analyzers. + + + + + Tries to mark the given file as fully syntactically analyzed for the unprocessed analyzers in the given analysisScope. + + + + + State kind of per-analyzer tracking an analyzer's partial analysis state. + An analysis state object can be in one of the following states: + 1. Completely unprocessed: + 2. Currently being processed: + 3. Partially processed by one or more older requests that was either completed or cancelled: + 4. Fully processed: . + + + + + Ready for processing. + Indicates it is either completely unprocessed or partially processed by one or more older requests that was either completed or cancelled. + + + + + Currently being processed. + + + + + Fully processed. + + + + + Stores the partial analysis state for a specific symbol declaration for a specific analyzer. + + + + + Partial analysis state for code block actions executed on the declaration. + + + + + Partial analysis state for operation block actions executed on the declaration. + + NOTE: This state tracks operations actions registered inside operation block start context. + Operation actions registered outside operation block start context are tracked + with . + + + + + Partial analysis state for operation actions executed on the declaration. + + NOTE: This state tracks operations actions registered outside of operation block start context. + Operation actions registered inside operation block start context are tracked + with . + + + + + Stores the partial analysis state for syntax node actions executed on the declaration. + + + + + Stores the partial analysis state for operation actions executed on the declaration. + + + + + Stores the partial analysis state for code block actions or operation block actions executed on the declaration. + + + + + Stores the partial analysis state for code block actions executed on the declaration. + + + + + Stores the partial analysis state for operation block actions executed on the declaration. + + + + + Contains the counts of registered actions for an analyzer. + + + + + Count of registered compilation start actions. + + + + + Count of registered compilation end actions. + + + + + Count of registered compilation actions. + + + + + Count of registered syntax tree actions. + + + + + Count of registered additional file actions. + + + + + Count of registered semantic model actions. + + + + + Count of registered symbol actions. + + + + + Count of registered symbol start actions. + + + + + Count of registered symbol end actions. + + + + + Count of registered syntax node actions. + + + + + Count of code block start actions. + + + + + Count of code block end actions. + + + + + Count of code block actions. + + + + + Count of Operation actions. + + + + + Count of Operation block start actions. + + + + + Count of Operation block end actions. + + + + + Count of Operation block actions. + + + + + Returns true if there are any actions that need to run on executable code. + + + + + Returns true if there are any analyzer action callbacks that are driven by compilation events, + such as , , etc. + Many callbacks into the diagnostics analyzers are driven in the + by compilation events added to the . For these callbacks to be executed, + the analyzer driver host needs to force complete the events in the relevant part of the compilation, + i.e. relevant tree(s) or entire compilation. This force complete operation incurs a performance cost, + which can be avoided if the analyzer(s) to be executed, such as syntax-only analyzers, do not register any + actions which are driven by compilation events. + Note that is an exception as it is *always* generated as soon as the + is created. Any action callbacks driven off + do not need any force completion and hence do not need to be accounted by this boolean flag. + + This flag is primarily intended for performance improvements in certain analyzer execution code paths. + + + + Gets a value indicating whether the analyzer supports concurrent execution. + + + + + Contains telemetry info for a specific analyzer, such as count of registered actions, the total execution time, etc. + + + + + Count of registered compilation start actions. + + + + + Count of registered compilation end actions. + + + + + Count of registered compilation actions. + + + + + Count of registered syntax tree actions. + + + + + Count of registered additional file actions. + + + + + Count of registered semantic model actions. + + + + + Count of registered symbol actions. + + + + + Count of registered symbol start actions. + + + + + Count of registered symbol end actions. + + + + + Count of registered syntax node actions. + + + + + Count of registered code block start actions. + + + + + Count of registered code block end actions. + + + + + Count of registered code block actions. + + + + + Count of registered operation actions. + + + + + Count of registered operation block start actions. + + + + + Count of registered operation block end actions. + + + + + Count of registered operation block actions. + + + + + Count of registered suppression actions. + This is the same as count of s as each suppressor + has a single suppression action, i.e. . + + + + + Total execution time. + + + + + Gets a value indicating whether the analyzer supports concurrent execution. + + + + + Create telemetry info for a specific analyzer, such as count of registered actions, the total execution time, etc. + + + + + Comparer that should be used for all analyzer config keys. This is a case-insensitive comparison based + on Unicode case sensitivity rules for identifiers. + + + + + Get an analyzer config value for the given key, using the . + + + + + Enumerates unique keys of all available options in no specific order. + + Not implemented by the derived type. + + + + Provide options from an analyzer config file keyed on a source file. + + + + + Gets global options that do not apply to any specific file + + + + + Get options for a given . + + + + + Get options for a given + + + + + Driver to execute diagnostic analyzers for a given compilation. + It uses a of s to drive its analysis. + + + + + Stores for symbols declared in the compilation. + This allows us to avoid recomputing this data across analyzer execution for different analyzers + on the same symbols. This cached compilation data is strongly held by the associated + object. + + + + + Set of diagnostic suppressions that are suppressed via analyzer suppression actions. + + + + + Set of diagnostics that have already been processed for application of programmatic suppressions. + + + + + Flag indicating if the include any + which can suppress reported analyzer/compiler diagnostics. + + + + + Filtered diagnostic severities in the compilation, i.e. diagnostics with effective severity from this set should not be reported. + PERF: If all supported diagnostics for an analyzer are from this set, we completely skip executing the analyzer. + + + + + Unsuppressed analyzers that need to be executed. + + + + + Cache of additional analyzer actions to be executed per symbol per analyzer, which are registered in symbol start actions. + We cache the tuple: + 1. myActions: analyzer actions registered in the symbol start actions of containing namespace/type, which are to be executed for this symbol + 2. childActions: analyzer actions registered in this symbol's start actions, which are to be executed for member symbols. + + + + + Default analysis mode for generated code. + + + This mode should always guarantee that analyzer action callbacks are enabled for generated code, i.e. is set. + However, the default diagnostic reporting mode is liable to change in future. + + + + + Map from non-concurrent analyzers to the gate guarding callback into the analyzer. + + + + + Map from analyzers to their setting. + + + + + The set of registered analyzer actions. + + + + + + Set of unsuppressed analyzers that report non-configurable diagnostics that cannot be suppressed with end user configuration. + + + + + Set of analyzers that have registered symbol start analyzer actions. + + + + + True if all analyzers need to analyze and report diagnostics in generated code - we can assume all code to be non-generated code. + + + + + True if no analyzer needs generated code analysis - we can skip all analysis on a generated code symbol/tree. + + + + + Lazily populated dictionary indicating whether a source file is a generated code file or not - we populate it lazily to avoid realizing all syntax trees in the compilation upfront. + + + + + Lazily populated dictionary from tree to declared symbols with GeneratedCodeAttribute. + + + + + Lazily populated dictionary from tree to analyzers that are suppressed on the entire tree. + + + + + Lazily populated set of diagnostic IDs which are suppressed for some part of the compilation (tree/folder/entire compilation), + but the analyzer reporting the diagnostic is itself not suppressed for the entire compilation, i.e. the analyzer + belongs to . + + + + + Lazily populated dictionary from symbol to a bool indicating if it is a generated code symbol. + + + + + Lazily populated dictionary indicating whether a source file has any hidden regions - we populate it lazily to avoid realizing all syntax trees in the compilation upfront. + + + + + Symbol for . + + + + + Driver task which initializes all analyzers. + This task is initialized and executed only once at start of analysis. + + + + + Flag to indicate if the was successfully started. + + + + + Primary driver task which processes all events, runs analyzer actions and signals completion of at the end. + + + + + Number of worker tasks processing compilation events and executing analyzer actions. + + + + + Events queue for analyzer execution. + + + + + that is fed the diagnostics as they are computed. + + + + + Create an analyzer driver. + + The set of analyzers to include in the analysis + AnalyzerManager to manage analyzers for analyzer host's lifetime. + Filtered diagnostic severities in the compilation, i.e. diagnostics with effective severity from this set should not be reported. + Delegate to identify if the given trivia is a comment. + + + + Initializes the and related actions maps for the analyzer driver. + It kicks off the task for initialization. + Note: This method must be invoked exactly once on the driver. + + + + + Returns true if all analyzers need to analyze and report diagnostics in generated code - we can assume all code to be non-generated code. + + + + + Attaches a pre-populated event queue to the driver and processes all events in the queue. + + Compilation events to analyze. + Scope of analysis. + An optional object to track partial analysis state. + Cancellation token to abort analysis. + Driver must be initialized before invoking this method, i.e. method must have been invoked and must be non-null. + + + + Attaches event queue to the driver and start processing all events pertaining to the given analysis scope. + + Compilation events to analyze. + Scope of analysis. + Boolean flag indicating whether we should only process the already populated events or wait for . + Cancellation token to abort analysis. + Driver must be initialized before invoking this method, i.e. method must have been invoked and must be non-null. + + + + Create an and attach it to the given compilation. + + The compilation to which the new driver should be attached. + The set of analyzers to include in the analysis. + Options that are passed to analyzers. + AnalyzerManager to manage analyzers for the lifetime of analyzer host. + Delegate to add diagnostics generated for exceptions from third party analyzers. + Report additional information related to analyzers, such as analyzer execution time. + Filtered diagnostic severities in the compilation, i.e. diagnostics with effective severity from this set should not be reported. + Track diagnostic ids which are suppressed through options. + The new compilation with the analyzer driver attached. + A cancellation token that can be used to abort analysis. + A newly created analyzer driver + + Note that since a compilation is immutable, the act of creating a driver and attaching it produces + a new compilation. Any further actions on the compilation should use the new compilation. + + + + + Returns all diagnostics computed by the analyzers since the last time this was invoked. + If has been completed with all compilation events, then it waits for + task for the driver to finish processing all events and generate remaining analyzer diagnostics. + + + + + Returns an array of all s for all along + with a boolean value "HasAnyExternalSuppression" indicating if the diagnostic ID has any + external non-source suppression from editorconfig, ruleset, command line options, etc., + which disables the descriptor for either part of the compilation or the entire compilation. + Note that this flag doesn't account for source suppressions from pragma directives, + SuppressMessageAttributes, DiagnosticSuppressors, etc. which suppresses individual instances + of reported diagnostics. + + + + + Return a task that completes when the driver is initialized. + + + + + Return a task that completes when the driver is done producing diagnostics. + + + + + Tries to execute symbol action, symbol start/end actions and declaration actions for the given symbol. + + + indicating the current state of processing of the given compilation event. + + + + + Tries to execute symbol actions. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Tries to execute compilation unit actions. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Tries to execute compilation started actions. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Tries to execute compilation completed actions. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Tries to execute compilation actions. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Returns true if all the diagnostics that can be produced by this analyzer are suppressed through options. + + + + + GetSyntax() for the given SyntaxReference. + + + + + Topmost declaration node for analysis. + + + + + All member declarations within the declaration. + + + + + All descendant nodes for syntax node actions. + + + + + Flag indicating if this is a partial analysis. + + + + + Used to represent state of processing of a . + + + + + Subset of processed analyzers. + NOTE: This property is only non-null for . + + + + + Driver to execute diagnostic analyzers for a given compilation. + It uses a of s to drive its analysis. + + + + + Create an analyzer driver. + + The set of analyzers to include in the analysis + A delegate that returns the language-specific kind for a given syntax node + AnalyzerManager to manage analyzers for the lifetime of analyzer host. + Filtered diagnostic severities in the compilation, i.e. diagnostics with effective severity from this set should not be reported. + Delegate to identify if the given trivia is a comment. + + + + Tries to execute syntax node, code block and operation actions for all declarations for the given symbol. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + Tries to execute syntax node, code block and operation actions for the given declaration. + + + True, if successfully executed the actions for the given analysis scope OR no actions were required to be executed for the given analysis scope. + False, otherwise. + + + + + grouped by , and possibly other entities, such as , , etc. + + + + + Contains the core execution logic for callbacks into analyzers. + + + + + Pooled object that carries the info needed to process + a reported diagnostic from a syntax node action. + + + + + The values in this map convert to using . + + + + + Creates to execute analyzer actions with given arguments + + Compilation to be used in the analysis. + Analyzer options. + Optional delegate to add non-categorized analyzer diagnostics. + + Delegate which is invoked when an analyzer throws an exception. + Delegate can do custom tasks such as report the given analyzer exception diagnostic, report a non-fatal watson for the exception, etc. + + + Optional delegate which is invoked when an analyzer throws an exception as an exception filter. + Delegate can do custom tasks such as crash hosting process to create a dump. + + Delegate to determine if the given analyzer is compiler analyzer. + We need to special case the compiler analyzer at few places for performance reasons. + Analyzer manager to fetch supported diagnostics. + + Delegate to fetch the gate object to guard all callbacks into the analyzer. + It should return a unique gate object for the given analyzer instance for non-concurrent analyzers, and null otherwise. + All analyzer callbacks for non-concurrent analyzers will be guarded with a lock on the gate. + + Delegate to get a semantic model for the given syntax tree which can be shared across analyzers. + Delegate to identify if analysis should be skipped on generated code. + Delegate to identify if diagnostic reported while analyzing generated code should be suppressed. + Delegate to identify if the given location is in generated code. + Delegate to identify if the given analyzer is suppressed for the given tree. + Flag indicating whether we need to log analyzer execution time. + Optional delegate to add categorized local analyzer diagnostics. + Optional delegate to add categorized non-local analyzer diagnostics. + Optional thread-safe delegate to add diagnostic suppressions from suppressors. + Cancellation token. + + + + Creates to fetch . + + + Optional delegate which is invoked when an analyzer throws an exception. + Delegate can do custom tasks such as report the given analyzer exception diagnostic, report a non-fatal watson for the exception, etc. + + Analyzer manager to fetch supported diagnostics. + Cancellation token. + + + + Executes the for the given analyzer. + + Analyzer to get session wide analyzer actions. + Session scope to store register session wide analyzer actions. + + Note that this API doesn't execute any registered by the Initialize invocation. + Use API + to get execute these actions to get the per-compilation analyzer actions. + + + + + Executes the compilation start actions. + + whose compilation start actions are to be executed. + Compilation scope to store the analyzer actions. + + + + Executes the symbol start actions. + + Symbol whose symbol start actions are to be executed. + Analyzer whose symbol start actions are to be executed. + whose symbol start actions are to be executed. + Symbol scope to store the analyzer actions. + Flag indicating if the symbol being analyzed is generated code. + + + + Executes the given diagnostic suppressor. + + Suppressor to be executed. + Reported analyzer/compiler diagnostics that can be suppressed. + + + + Tries to executes compilation actions or compilation end actions. + + Compilation actions to be executed. + Analyzer whose actions are to be executed. + Compilation event. + Scope for analyzer execution. + An optional object to track analysis state. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute the symbol actions on the given symbol. + + Symbol actions to be executed. + Analyzer whose actions are to be executed. + Symbol event to be analyzed. + Delegate to get topmost declaration node for a symbol declaration reference. + Scope for analyzer execution. + An optional object to track analysis state. + Flag indicating if this is a generated code symbol. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute the symbol end actions on the given namespace or type containing symbol for the process member symbol for the given analyzer. + + Symbol whose actions are to be executed. + Completed member symbol. + Analyzer whose actions are to be executed. + Delegate to get topmost declaration node for a symbol declaration reference. + Flag indicating if the containing symbol being analyzed is generated code. + An optional object to track analysis state. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions. + + + + + Tries to execute the symbol end actions on the given symbol for the given analyzer. + + Symbol actions to be executed. + Analyzer whose actions are to be executed. + Symbol event to be analyzed. + Delegate to get topmost declaration node for a symbol declaration reference. + Flag indicating if the symbol being analyzed is generated code. + An optional object to track analysis state. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions. + + + + + Tries to execute the semantic model actions on the given semantic model. + + Semantic model actions to be executed. + Analyzer whose actions are to be executed. + Semantic model to analyze. + Compilation event for semantic model analysis. + Scope for analyzer execution. + An optional object to track analysis state. + Flag indicating if the syntax tree being analyzed is generated code. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute the syntax tree actions on the given syntax tree. + + Syntax tree actions to be executed. + Analyzer whose actions are to be executed. + Syntax tree to analyze. + Scope for analyzer execution. + An optional object to track analysis state. + Flag indicating if the syntax tree being analyzed is generated code. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute the additional file actions. + + Actions to be executed. + Analyzer whose actions are to be executed. + Additional file to analyze. + Scope for analyzer execution. + An optional object to track analysis state. + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute code block actions for the given analyzer for the given declaration. + + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute operation block actions for the given analyzer for the given declaration. + + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute syntax node actions for the given analyzer for the given declaration. + + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Tries to execute operation actions for the given analyzer for the given declaration. + + + True, if successfully executed the actions for the given analysis scope OR all the actions have already been executed for the given analysis scope. + False, if there are some pending actions that are currently being executed on another thread. + + + + + Represents analyzers stored in an analyzer assembly file. + + + Analyzer are read from the file, owned by the reference, and doesn't change + since the reference is accessed until the reference object is garbage collected. + + If you need to manage the lifetime of the analyzer reference (and the file stream) explicitly use . + + + + + Creates an AnalyzerFileReference with the given and . + + Full path of the analyzer assembly. + Loader for obtaining the from the + + + + Adds the of defined in this assembly reference of given . + + + + + Adds the of defined in this assembly reference of given . + + + + + Opens the analyzer dll with the metadata reader and builds a map of language -> analyzer type names. + + The PE image format is invalid. + IO error reading the metadata. + + + + Represents an in-memory analyzer reference image. + + + + + If a specific analyzer failed to load the namespace-qualified name of its type, null otherwise. + + + + + Error message. + + + + + Error code. + + + + + Exception that was thrown while loading the analyzer. May be null. + + + + + If is , returns the compiler version referenced by the analyzer assembly. Otherwise, returns null. + + + + + Manages properties of analyzers (such as registered actions, supported diagnostics) for analyzer host's lifetime + and executes the callbacks into the analyzers. + + It ensures the following for the lifetime of analyzer host: + 1) is invoked only once per-analyzer. + 2) is invoked only once per-analyzer. + 3) registered during Initialize are invoked only once per-compilation per-analyzer and analyzer options. + + + + + Map from (symbol, analyzer) to count of its member symbols whose symbol declared events are not yet processed. + + + + + Symbol declared events for symbols with pending symbol end analysis for given analyzer. + + + + + Task to compute HostSessionStartAnalysisScope for session wide analyzer actions, i.e. AnalyzerActions registered by analyzer's Initialize method. + These are run only once per every analyzer. + + + + + Task to compute HostCompilationStartAnalysisScope for per-compilation analyzer actions, i.e. AnalyzerActions registered by analyzer's CompilationStartActions. + + + + + Task to compute HostSymbolStartAnalysisScope for per-symbol analyzer actions, i.e. AnalyzerActions registered by analyzer's SymbolStartActions. + + + + + Supported diagnostic descriptors for diagnostic analyzer, if any. + + + + + Supported suppression descriptors for diagnostic suppressor, if any. + + + + + Compute and exception handler for the given . + + + + + Get all the analyzer actions to execute for the given analyzer against a given compilation. + The returned actions include the actions registered during method as well as + the actions registered during for the given compilation. + + + + + Get the per-symbol analyzer actions to be executed by the given analyzer. + These are the actions registered during the various RegisterSymbolStartAction method invocations for the given symbol on different analysis contexts. + + + + + Returns true if the given analyzer has enabled concurrent execution by invoking . + + + + + Returns for the given analyzer. + If an analyzer hasn't configured generated code analysis, returns . + + + + + Return of given . + + + + + Return of given . + + + + + Returns true if all the diagnostics that can be produced by this analyzer are suppressed through options. + + + + + Options passed to . + + + + + A set of additional non-code text files that can be used by analyzers. + + + + + A set of options keyed to or . + + + + + Creates analyzer options to be passed to . + + A set of additional non-code text files that can be used by analyzers. + A set of per-tree options that can be used by analyzers. + + + + Creates analyzer options to be passed to . + + A set of additional non-code text files that can be used by analyzers. + + + + Returns analyzer options with the given . + + + + + Tries to get configured severity for the given + for the given from bulk configuration analyzer config options, i.e. + 'dotnet_analyzer_diagnostic.category-%RuleCategory%.severity = %severity%' + or + 'dotnet_analyzer_diagnostic.severity = %severity%' + + + + + Represents an analyzer assembly reference that contains diagnostic analyzers. + + + Represents a logical location of the analyzer reference, not the content of the reference. + The content might change in time. A snapshot is taken when the compiler queries the reference for its analyzers. + + + + + Full path describing the location of the analyzer reference, or null if the reference has no location. + + + + + Path or name used in error messages to identity the reference. + + + Should not be null. + + + + + A unique identifier for this analyzer reference. + + + Should not be null. + Note that this and serve different purposes. An analyzer reference may not + have a path, but it always has an ID. Further, two analyzer references with different paths may + represent two copies of the same analyzer, in which case the IDs should also be the same. + + + + + Gets all the diagnostic analyzers defined in this assembly reference, irrespective of the language supported by the analyzer. + Use this method only if you need all the analyzers defined in the assembly, without a language context. + In most instances, either the analyzer reference is associated with a project or is being queried for analyzers in a particular language context. + If so, use method. + + + + + Gets all the diagnostic analyzers defined in this assembly reference for the given . + + Language name. + + + + Gets all the source generators defined in this assembly reference. + + + + + Gets all the generators defined in this assembly reference for the given . + + Language name. + + + + A queue whose enqueue and dequeue operations can be performed in parallel. + + The type of values kept by the queue. + + + + The number of unconsumed elements in the queue. + + + + + Adds an element to the tail of the queue. This method will throw if the queue + is completed. + + The queue is already completed. + The value to add. + + + + Tries to add an element to the tail of the queue. This method will return false if the queue + is completed. + + The value to add. + + + + Attempts to dequeue an existing item and return whether or not it was available. + + + + + Gets a value indicating whether the queue has completed. + + + + + Signals that no further elements will be enqueued. All outstanding and future + Dequeue Task will be cancelled. + + The queue is already completed. + + + + Same operation as except it will not + throw if the queue is already completed. + + Whether or not the operation succeeded. + + + + Gets a task that transitions to a completed state when or + is called. This transition will not happen synchronously. + + This Task will not complete until it has completed all existing values returned + from . + + + + + Gets a task whose result is the element at the head of the queue. If the queue + is empty, the returned task waits for an element to be enqueued. If + is called before an element becomes available, the returned task is cancelled. + + + + + Gets a task whose result is the element at the head of the queue. If the queue + is empty, the returned task waits for an element to be enqueued. If + is called before an element becomes available, the returned task is completed and + will be . + + + + + Cancels a if a given is canceled. + + The type of value returned by a successfully completed . + The to cancel. + The . + + + + + A state object for tracking cancellation and a TaskCompletionSource. + + The type of value returned from a task. + + We use this class so that we only allocate one object to support all continuations + required for cancellation handling, rather than a special closure and delegate for each one. + + + + + + Initializes a new instance of the class. + + The task completion source. + The cancellation token. + + + + Gets the cancellation token. + + + + + Gets the Task completion source. + + + + + Gets or sets the cancellation token registration. + + + + + Provider that caches semantic models for requested trees, with a strong reference to the model. + Clients using this provider are responsible for maintaining the lifetime of the entries in this cache, + and should invoke and to clear entries when appropriate. + For example, uses this provider to ensure that semantic model instances + are shared between the compiler and analyzers for improved analyzer execution performance. The underlying + executing analyzers clears per-tree entries in the cache whenever a + has been processed, indicating all relevant analyzers have executed on the corresponding syntax tree for the event. + Similarly, it clears the entire compilation wide cache whenever a has been processed, + indicating all relevant analyzers have executed on the entire compilation. + + + + + Wrapper over the core which holds a strong reference to key-value pairs for the lifetime of a compilation that this provider is associated with. + This ensures that values are never re-computed for equivalent keys while analyzing each compilation, improving overall analyzer performance. + + + + + The last event placed into a compilation's event queue. + + + + + The first event placed into a compilation's event queue. + + + + + Optional filter span for a synthesized CompilationUnitCompletedEvent generated for span-based semantic diagnostic computation. + Such synthesized events are used primarily for performance improvements when running compiler analyzer in span-based mode in the IDE, + such as computing diagnostics for the lightbulb for the current line. + Note that such a synthesized CompilationUnitCompletedEvent with non-null FilterSpan is not a true + compilation unit completed event, but just a stub event to drive span-based semantic model action callbacks + for analyzer execution. This event will eventually be followed by a true CompilationUnitCompletedEvent + with null FilterSpan when the entire compilation unit has actually completed. + See https://github.com/dotnet/roslyn/issues/56843 for details. + + + + + Pool of s used for analyzer execution. + + + + + Contains the partial analysis state per-analyzer. It tracks: + 1. Global set of pending compilation events. This is used to populate the event queue for analyzer execution. + 2. Per-analyzer set of pending compilation events, symbols, declarations, etc. Each of these pending entities has a state object to track partial analysis. + + + + + Builder for storing current, possibly partial, analysis results: + 1. Diagnostics reported by analyzers. + 2. AnalyzerTelemetryInfo. + + + + + Set of exception diagnostics reported for exceptions thrown by the analyzers. + + + + + Lock to track the set of active tasks computing tree diagnostics and task computing compilation diagnostics. + + + + + Used to generate a unique token for each tree diagnostics request. + The token is used to determine the priority of each request. + Each new tree diagnostic request gets an incremented token value and has higher priority over other requests for the same tree. + Compilation diagnostics requests always have the lowest priority. + + + + + Map from active tasks computing tree diagnostics to their token number. + + + + + Pool of event queues to serve each diagnostics request. + + + + + Underlying with a non-null , used to drive analyzer execution. + + + + + Analyzers to execute on the compilation. + + + + + Options to configure analyzer execution. + + + + + An optional cancellation token which can be used to cancel analysis. + Note: This token is only used if the API invoked to get diagnostics doesn't provide a cancellation token. + + + + + Creates a new compilation by attaching diagnostic analyzers to an existing compilation. + + The original compilation. + The set of analyzers to include in future analyses. + Options that are passed to analyzers. + A cancellation token that can be used to abort analysis. + + + + Creates a new compilation by attaching diagnostic analyzers to an existing compilation. + + The original compilation. + The set of analyzers to include in future analyses. + Options to configure analyzer execution. + + + + Returns diagnostics produced by all . + + + + + Returns diagnostics produced by all . + + + + + Returns diagnostics produced by given . + + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Executes all and returns the corresponding with all diagnostics and telemetry info. + + + + + Executes the given and returns the corresponding with all diagnostics and telemetry info. + + Analyzers whose analysis results are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns all diagnostics produced by compilation and by all . + + + + + Returns all diagnostics produced by compilation and by all . + + + + + Returns diagnostics produced by compilation actions of all . + + + + + Returns diagnostics produced by compilation actions of given . + + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns syntax diagnostics produced by all from analyzing the given . + Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, + and some diagnostics that would be reported for the tree by an analysis of the complete compilation + can be absent. + + Syntax tree to analyze. + Cancellation token. + + + + Returns syntax diagnostics produced by given from analyzing the given . + Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, + and some diagnostics that would be reported for the tree by an analysis of the complete compilation + can be absent. + + Syntax tree to analyze. + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns an populated with produced by all from analyzing the given . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Syntax tree to analyze. + Cancellation token. + + + + Returns an populated with produced by given from analyzing the given . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Syntax tree to analyze. + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns an populated with produced by all from analyzing the given additional . + The given must be part of for the for this CompilationWithAnalyzers instance. + Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent. + + Additional file to analyze. + Cancellation token. + + + + Returns an populated with produced by given from analyzing the given additional . + The given must be part of for the for this CompilationWithAnalyzers instance. + Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent. + + Additional file to analyze. + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns semantic diagnostics produced by all from analyzing the given , optionally scoped to a . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Semantic model representing the syntax tree to analyze. + An optional span within the tree to scope analysis. + Cancellation token. + + + + Returns semantic diagnostics produced by the given from analyzing the given , optionally scoped to a . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Semantic model representing the syntax tree to analyze. + An optional span within the tree to scope analysis. + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Returns an populated with produced by all from analyzing the given , optionally scoped to a . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Semantic model representing the syntax tree to analyze. + An optional span within the tree to scope analysis. + Cancellation token. + + + + Returns an populated with produced by the given from analyzing the given , optionally scoped to a . + Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent. + + Semantic model representing the syntax tree to analyze. + An optional span within the tree to scope analysis. + Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of . + Cancellation token. + + + + Core method for executing analyzers. + + + + + Given a set of compiler or generated , returns the effective diagnostics after applying the below filters: + 1) specified for the given . + 2) specified for the given . + 3) Diagnostic suppression through applied . + 4) Pragma directives for the given . + + + + + Given a set of compiler or generated , returns the effective diagnostics after applying the below filters: + 1) specified for the given . + 2) specified for the given . + 3) Diagnostic suppression through applied . + 4) Pragma directives for the given . + + + + + Returns true if all the diagnostics that can be produced by this analyzer are suppressed through options. + + Analyzer to be checked for suppression. + Compilation options. + + Optional delegate which is invoked when an analyzer throws an exception. + Delegate can do custom tasks such as report the given analyzer exception diagnostic, report a non-fatal watson for the exception, etc. + + + + + This method should be invoked when the analyzer host is disposing off the given . + It clears the cached internal state (supported descriptors, registered actions, exception handlers, etc.) for analyzers. + + Analyzers whose state needs to be cleared. + + + + Gets telemetry info for the given analyzer, such as count of registered actions, the total execution time (if is true), etc. + + + + + Gets the count of registered actions for the analyzer. + + + + + Gets the execution time for the given analyzer. + + + + + Options to configure analyzer execution within . + + + + + Options passed to s. + + + + + An optional delegate to be invoked when an analyzer throws an exception. + + + + + An optional delegate to be invoked when an analyzer throws an exception as an exception filter. + + + + + Flag indicating whether analysis can be performed concurrently on multiple threads. + + + + + Flag indicating whether analyzer execution time should be logged. + + + + + Flag indicating whether analyzer diagnostics with should be reported. + + + + + Creates a new . + + Options that are passed to analyzers. + Action to invoke if an analyzer throws an exception. + Flag indicating whether analysis can be performed concurrently on multiple threads. + Flag indicating whether analyzer execution time should be logged. + + + + Creates a new . + + Options that are passed to analyzers. + Action to invoke if an analyzer throws an exception. + Flag indicating whether analysis can be performed concurrently on multiple threads. + Flag indicating whether analyzer execution time should be logged. + Flag indicating whether analyzer diagnostics with should be reported. + + + + Creates a new . + + Options that are passed to analyzers. + Action to invoke if an analyzer throws an exception. + Action to invoke if an analyzer throws an exception as an exception filter. + Flag indicating whether analysis can be performed concurrently on multiple threads. + Flag indicating whether analyzer execution time should be logged. + Flag indicating whether analyzer diagnostics with should be reported. + + + + DiagnosticAnalyzer for compiler's syntax/semantic/compilation diagnostics. + + + + + Per-compilation DiagnosticAnalyzer for compiler's syntax/semantic/compilation diagnostics. + + + + + Context for initializing an analyzer. + Analyzer initialization can use an to register actions to be executed at any of: + + + compilation start, + + + compilation end, + + + completion of parsing a code document, + + + completion of semantic analysis of a code document, + + + completion of semantic analysis of a symbol, + + + start of semantic analysis of a method body or an expression appearing outside a method body, + + + completion of semantic analysis of a method body or an expression appearing outside a method body, or + + + completion of semantic analysis of a syntax node. + + + + + + + Register an action to be executed at compilation start. + A compilation start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Action to be executed at compilation start. + + + + Register an action to be executed for a complete compilation. + A compilation action reports s about the . + + Action to be executed at compilation end. + + + + Register an action to be executed at completion of semantic analysis of a document, + which will operate on the of the document. A semantic model action + reports s about the model. + + Action to be executed for a document's . + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + A symbol action reports s about s. + + Action to be executed for an . + Action will be executed only if an 's Kind matches one of the values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + A symbol action reports s about s. + + Action to be executed for an . + Action will be executed only if an 's Kind matches one of the values. + + + + Register an action to be executed at start of semantic analysis of an and its members with an appropriate Kind. + + Action to be executed. + Action will be executed only if an 's Kind matches the given . + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + A code block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at the start of semantic analysis of a code block. + + + + Register an action to be executed after semantic analysis of a method body or an expression appearing outside a method body. + A code block action reports s about code blocks. + + Action to be executed for a code block. + + + + Register an action to be executed at completion of parsing of a code document. + A syntax tree action reports s about the of a document. + + Action to be executed at completion of parsing of a document. + + + + Register an action to be executed for each non-code document. + An additional file action reports s about the of a document. + + Action to be executed for each non-code document. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + An operation block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Action to be executed at the start of semantic analysis of an operation block. + + + + Register an action to be executed after semantic analysis of a method body or an expression appearing outside a method body. + An operation block action reports s about operation blocks. + + Action to be executed for an operation block. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Enable concurrent execution of analyzer actions registered by this analyzer. + An analyzer that registers for concurrent execution can have better performance than a non-concurrent analyzer. + However, such an analyzer must ensure that its actions can execute correctly in parallel. + + + Even when an analyzer registers for concurrent execution, certain related actions are *never* executed concurrently. + For example, end actions registered on any analysis unit (compilation, code block, operation block, etc.) are by definition semantically dependent on analysis from non-end actions registered on the same analysis unit. + Hence, end actions are never executed concurrently with non-end actions operating on the same analysis unit. + + + + + Configure analysis mode of generated code for this analyzer. + Non-configured analyzers will default to an appropriate default mode for generated code. + It is recommended for the analyzer to invoke this API with the required setting. + + + + + Attempts to compute or get the cached value provided by the given for the given . + Note that the pair {, } acts as the key. + Reusing the same instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values. + + The type of the value associated with the key. + for which the value is queried. + Provider that computes the underlying value. + Value associated with the key. + Returns true on success, false otherwise. + + + + Flags to configure mode of generated code analysis. + + + + + Disable analyzer action callbacks and diagnostic reporting for generated code. + Analyzer driver will not make callbacks into the analyzer for entities (source files, symbols, etc.) that it classifies as generated code. + Additionally, any diagnostic reported by the analyzer with location in generated code will not be reported. + + + + + Enable analyzer action callbacks for generated code. + Analyzer driver will make callbacks into the analyzer for all entities (source files, symbols, etc.) in the compilation, including generated code. + + + + + Enable reporting diagnostics on generated code. + Analyzer driver will not suppress any analyzer diagnostic based on whether or not it's location is in generated code. + + + + + Context for a compilation start action. + A compilation start action can use a to register actions to be executed at any of: + + + compilation end, + + + completion of parsing a code document, + + + completion of semantic analysis of a code document, + + + completion of semantic analysis of a symbol, + + + start of semantic analysis of a method body or an expression appearing outside a method body, + + + completion of semantic analysis of a method body or an expression appearing outside a method body, or + + + completion of semantic analysis of a syntax node. + + + + + + + that is the subject of the analysis. + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Register an action to be executed at compilation end. + A compilation end action reports s about the . + + Action to be executed at compilation end. + + + + Register an action to be executed at completion of semantic analysis of a document, + which will operate on the of the document. A semantic model action + reports s about the model. + + Action to be executed for a document's . + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + A symbol action reports s about s. + + Action to be executed for an . + Action will be executed only if an 's Kind matches one of the values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + A symbol action reports s about s. + + Action to be executed for an . + Action will be executed only if an 's Kind matches one of the values. + + + + Register an action to be executed at start of semantic analysis of an and its members with an appropriate Kind. + + Action to be executed. + Action will be executed only if an 's Kind matches the given . + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + A code block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at the start of semantic analysis of a code block. + + + + Register an action to be executed at the end of semantic analysis of a method body or an expression appearing outside a method body. + A code block action reports s about code blocks. + + Action to be executed for a code block. + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + An operation block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Action to be executed at the start of semantic analysis of an operation block. + + + + Register an action to be executed after semantic analysis of a method body or an expression appearing outside a method body. + An operation block action reports s about operation blocks. + + Action to be executed for an operation block. + + + + Register an action to be executed at completion of parsing of a code document. + A syntax tree action reports s about the of a document. + + Action to be executed at completion of parsing of a document. + + + + Register an action to be executed for each non-code document. + An additional file action reports s about the of a document. + + Action to be executed for each non-code document. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Attempts to compute or get the cached value provided by the given for the given . + Note that the pair {, } acts as the key. + Reusing the same instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values. + + The type of the value associated with the key. + for which the value is queried. + Provider that computes the underlying value. + Value associated with the key. + Returns true on success, false otherwise. + + + + Attempts to compute or get the cached value provided by the given for the given . + Note that the pair {, } acts as the key. + Reusing the same instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values. + + The type of the value associated with the key. + instance for which the value is queried. + Provider that computes the underlying value. + Value associated with the key. + Returns true on success, false otherwise. + + + + Context for a compilation action or compilation end action. + A compilation action or compilation end action can use a to report s about a . + + + + + that is the subject of the analysis. + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a . + + to be reported. + + + + Attempts to compute or get the cached value provided by the given for the given . + Note that the pair {, } acts as the key. + Reusing the same instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values. + + The type of the value associated with the key. + for which the value is queried. + Provider that computes the underlying value. + Value associated with the key. + Returns true on success, false otherwise. + + + + Attempts to compute or get the cached value provided by the given for the given . + Note that the pair {, } acts as the key. + Reusing the same instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values. + + The type of the value associated with the key. + for which the value is queried. + Provider that computes the underlying value. + Value associated with the key. + Returns true on success, false otherwise. + + + + Context for a semantic model action. + A semantic model action operates on the of a code document, and can use a to report s about the model. + + + + + that is the subject of the analysis. + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Optional filter span for which to compute diagnostics. + + + + + Indicates if the underlying is generated code. + + + + + Report a about a . + + to be reported. + + + + Context for a symbol action. + A symbol action can use a to report s about an . + + + + + that is the subject of the analysis. + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Indicates if the is generated code. + + + + + Report a about an . + + to be reported. + + + + Context for a symbol start action to analyze a symbol and its members. + A symbol start/end action can use a to report s about code within a and its members. + + + + + that is the subject of the analysis. + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Register an action to be executed at end of semantic analysis of an and its members. + A symbol end action reports s about the code within a and its members. + + Action to be executed at compilation end. + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + A code block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at the start of semantic analysis of a code block. + + + + Register an action to be executed after semantic analysis of a method body or an expression appearing outside a method body. + A code block action reports s about code blocks. + + Action to be executed for a code block. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Enum type giving the syntax node kinds of the source language for which the action applies. + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at the start of semantic analysis of a method body or an expression appearing outside a method body. + An operation block start action can register other actions and/or collect state information to be used in diagnostic analysis, + but cannot itself report any s. + + Action to be executed at the start of semantic analysis of an operation block. + + + + Register an action to be executed after semantic analysis of a method body or an expression appearing outside a method body. + An operation block action reports s about operation blocks. + + Action to be executed for an operation block. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or code block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Context for a code block start action. + A code block start action can use a to register actions to be executed + at any of: + + + completion of semantic analysis of a method body or an expression appearing outside a method body, or + + + completion of semantic analysis of a syntax node. + + + + + + + Method body or expression subject to analysis. + + + + + for which the code block provides a definition or value. + + + + + that can provide semantic information about the s in the code block. + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Register an action to be executed at the end of semantic analysis of a method body or an expression appearing outside a method body. + A code block end action reports s about code blocks. + + Action to be executed at the end of semantic analysis of a code block. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Register an action to be executed at completion of semantic analysis of a with an appropriate Kind. + A syntax node action can report s about s, and can also collect + state information to be used by other syntax node actions or code block end actions. + + Action to be executed at completion of semantic analysis of a . + Action will be executed only if a 's Kind matches one of the syntax kind values. + + + + Context for a code block action or code block end action. + A code block action or code block end action can use a to report s about a code block. + + + + + Code block that is the subject of the analysis. + + + + + for which the code block provides a definition or value. + + + + + that can provide semantic information about the s in the code block. + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a code block. + + to be reported. + + + + Context for an operation block start action. + An operation block start action can use an to register actions to be executed + at any of: + + + completion of semantic analysis of a method body or an expression appearing outside a method body, or + + + completion of semantic analysis of an operation. + + + + + + + One or more operation blocks that are the subject of the analysis. + This includes all blocks associated with the , + such as method body, field/property/constructor/parameter initializer(s), attributes, etc. + + Note that the operation blocks are not in any specific order. + + + + for which the provides a definition or value. + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Register an action to be executed at the end of semantic analysis of a method body or an expression appearing outside a method body. + A code block end action reports s about code blocks. + + Action to be executed at the end of semantic analysis of a code block. + + + + Register an action to be executed at completion of semantic analysis of an operation with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or operation block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Register an action to be executed at completion of semantic analysis of an with an appropriate Kind. + An operation action can report s about s, and can also collect + state information to be used by other operation actions or operation block end actions. + + Action to be executed at completion of semantic analysis of an . + Action will be executed only if an 's Kind matches one of the operation kind values. + + + + Gets a for a given from this analysis context's . + + Operation block. + + + + Context for an operation block action or operation block end action. + An operation block action or operation block end action can use an to report s about an operation block. + + + + + One or more operation blocks that are the subject of the analysis. + This includes all blocks associated with the , + such as method body, field/property/constructor/parameter initializer(s), attributes, etc. + + Note that the operation blocks are not in any specific order. + + + + for which the provides a definition or value. + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a code block. + + to be reported. + + + + Gets a for a given from this analysis context's . + + Operation block. + + + + Context for a syntax tree action. + A syntax tree action can use a to report s about a for a code document. + + + + + that is the subject of the analysis. + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a . + + to be reported. + + + + Context for an additional file action. + An additional file action can use an to report s about a non-source document. + + + + + that is the subject of the analysis. + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Compilation being analyzed. + + + + + Report a diagnostic for the given . + A diagnostic in a non-source document should be created with a non-source , + which can be created using API. + + + + + Context for a syntax node action. + A syntax node action can use a to report s for a . + + + + + that is the subject of the analysis. + + + + + for the declaration containing the syntax node. + + + + + that can provide semantic information about the . + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a . + + to be reported. + + + + Context for an operation action. + An operation action can use an to report s for an . + + + + + that is the subject of the analysis. + + + + + for the declaration containing the operation. + + + + + containing the . + + + + + Options specified for the analysis. + + + + + Indicates if the is generated code. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a about a . + + to be reported. + + + + Gets a for the operation block containing the . + + + + + Context for suppressing analyzer and/or compiler non-error diagnostics reported for the compilation. + + + + + Analyzer and/or compiler non-error diagnostics reported for the compilation. + Each only receives diagnostics whose IDs were declared suppressible in its . + This may be a subset of the full set of reported diagnostics, as an optimization for + supporting incremental and partial analysis scenarios. + A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met: + 1. Diagnostic is not already suppressed in source via pragma/suppress message attribute. + 2. Diagnostic's is not . + 3. Diagnostic is not tagged with custom tag. + + + + + for the context. + + + + + Options specified for the analysis. + + + + + Token to check for requested cancellation of the analysis. + + + + + Report a for a reported diagnostic. + + + + + Gets a for the given , which is shared across all analyzers. + + + + + The base type for diagnostic analyzers. + + + + + Returns a set of descriptors for the diagnostics that this analyzer is capable of producing. + + + + + Called once at session start to register actions in the analysis context. + + + + + + Place this attribute onto a type to cause it to be considered a diagnostic analyzer. + + + + + The source languages to which this analyzer applies. See . + + + + + Attribute constructor used to specify automatic application of a diagnostic analyzer. + + One language to which the analyzer applies. + Additional languages to which the analyzer applies. See . + + + + Returns a new compilation with attached diagnostic analyzers. + + Compilation to which analyzers are to be added. + The set of analyzers to include in future analyses. + Options that are passed to analyzers. + A cancellation token that can be used to abort analysis. + + + + Returns a new compilation with attached diagnostic analyzers. + + Compilation to which analyzers are to be added. + The set of analyzers to include in future analyses. + Options to configure analyzer execution within . + + + + Queue to store analyzer diagnostics on the . + + + + + Simple diagnostics queue: maintains all diagnostics reported by all analyzers in a single queue. + + + + + Categorized diagnostics queue: maintains separate set of simple diagnostic queues for local semantic, local syntax and non-local diagnostics for every analyzer. + + + + + Scope for setting up analyzers for an entire session, automatically associating actions with analyzers. + + + + + Scope for setting up analyzers for a compilation, automatically associating actions with analyzers. + + + + + Scope for setting up analyzers for code within a symbol and its members. + + + + + Scope for setting up analyzers for a code block, automatically associating actions with analyzers. + + + + + Scope for setting up analyzers for an operation block, automatically associating actions with analyzers. + + + + + Scope for setting up analyzers for an entire session, capable of retrieving the actions. + + + + + Scope for setting up analyzers for a compilation, capable of retrieving the actions. + + + + + Scope for setting up analyzers for analyzing a symbol and its members. + + + + + Scope for setting up analyzers for a code block, capable of retrieving the actions. + + + + + Actions registered by a particular analyzer. + + + + + Append analyzer actions from to actions from this instance. + + Analyzer actions to append. + + + + The base type for diagnostic suppressors that can programmatically suppress analyzer and/or compiler non-error diagnostics. + + + + + Returns a set of descriptors for the suppressions that this suppressor is capable of producing. + + + + + Suppress analyzer and/or compiler non-error diagnostics reported for the compilation. + This may be a subset of the full set of reported diagnostics, as an optimization for + supporting incremental and partial analysis scenarios. + A diagnostic is considered suppressible by a DiagnosticSuppressor if *all* of the following conditions are met: + 1. Diagnostic is not already suppressed in source via pragma/suppress message attribute. + 2. Diagnostic's is not . + 3. Diagnostic is not tagged with custom tag. + + + + + Represents a source file or an additional file. + For source files, is non-null and is null. + For additional files, is non-null and is null. + + + + + Provides custom values associated with instances using the given computeValue delegate. + + + + + Provides custom values associated with instances using the given . + + Delegate to compute the value associated with a given instance. + Optional equality comparer to determine equivalent instances that have the same value. + If no comparer is provided, then is used by default. + + + + Programmatic suppression of a by a . + + + + + Creates a suppression of a with the given . + + + Descriptor for the suppression, which must be from + for the creating this suppression. + + + to be suppressed, which must be from + for the suppression context in which this suppression is being created. + + + + Descriptor for this suppression. + + + + + Diagnostic suppressed by this suppression. + + + + + Attempts to resolve the "Target" argument of the global SuppressMessageAttribute to symbols in compilation. + + Indicates if resolved "Target" argument is in Roslyn's format. + Resolved symbols for the the "Target" argument of the global SuppressMessageAttribute. + + + + An event for each declaration in the program (namespace, type, method, field, parameter, etc). + Note that some symbols may have multiple declarations (namespaces, partial types) and may therefore + have multiple events. + + + + + Provides custom values associated with instances using the given computeValue delegate. + + + + + Provides values associated with instances using the given . + + Delegate to compute the value associated with a given instance. + Optional equality comparer to determine equivalent instances that have the same value. + If no comparer is provided, then is used by default. + + + + Represents an analyzer reference that can't be resolved. + + + For error reporting only, can't be used to reference an analyzer assembly. + + + + + Contains information about the source of a programmatic diagnostic suppression produced by an . + + + + + Represents a set of filtered diagnostic severities. + Currently, we only support filtering out Hidden and Info severities during build. + + + + + Contains information about the source of diagnostic suppression. + + + + + of the suppressed diagnostic. + + + + + If the diagnostic was suppressed by an attribute, then returns that attribute. + Otherwise, returns null. + + + + + The base implementation for . This type provides caching and tracking of inputs given + to . + + + This type generally assumes that files on disk aren't changing, since it ensure that two calls to + will always return the same thing, per that interface's contract. + + + + + Implemented by derived types to actually perform the load for an assembly that doesn't have a cached result. + + + + + Returns the cached assembly for fullPath if we've done a load for this path before, or calls if + it needs to be loaded. This method skips the check in release builds that the path is an absolute path, hence the "Unchecked" in the name. + + + + + When overridden in a derived class, allows substituting an assembly path after we've + identified the context to load an assembly in, but before the assembly is actually + loaded from disk. This is used to substitute out the original path with the shadow-copied version. + + + + + Loads analyzer assemblies from their original locations in the file system. + Assemblies will only be loaded from the locations specified when the loader + is instantiated. + + + This type is meant to be used in scenarios where it is OK for the analyzer + assemblies to be locked on disk for the lifetime of the host; for example, + csc.exe and vbc.exe. In scenarios where support for updating or deleting + the analyzer on disk is required a different loader should be used. + + + + + Handles loading analyzer assemblies and their dependencies. + + Before an analyzer assembly is loaded with , + its location and the location of all of its dependencies must first be specified + by calls to . + + + To the extent possible, implementations should remain consistent in the face + of exceptions and allow the caller to handle them. This allows the caller to + decide how to surface issues to the user and whether or not they are fatal. For + example, if asked to load an a non-existent or inaccessible file a command line + tool may wish to exit immediately, while an IDE may wish to keep going and give + the user a chance to correct the issue. + + + + + Given the full path to an assembly on disk, loads and returns the + corresponding object. + + + Multiple calls with the same path should return the same + instance. + + is null. + is not a full path. + + + + Adds a file to consider when loading an analyzer or its dependencies. + + is null. + is not a full path. + + + + The base directory for shadow copies. Each instance of + gets its own + subdirectory under this directory. This is also the starting point + for scavenge operations. + + + + + The directory where this instance of + will shadow-copy assemblies, and the mutex created to mark that the owner of it is still active. + + + + + Used to generate unique names for per-assembly directories. Should be updated with . + + + + + Abstracts the ability to classify and load messages for error codes. Allows the error + infrastructure to be reused between C# and VB. + + + + + Caches the return values for . + + + + + Given an error code, get the severity (warning or error) of the code. + + + + + Load the message for the given error code. If the message contains + "fill-in" placeholders, those should be expressed in standard string.Format notation + and be in the string. + + + + + Get an optional localizable title for the given diagnostic code. + + + + + Get an optional localizable description for the given diagnostic code. + + + + + Get a localizable message format string for the given diagnostic code. + + + + + Get an optional help link for the given diagnostic code. + + + + + Get the diagnostic category for the given diagnostic code. + Default category is . + + + + + Get the text prefix (e.g., "CS" for C#) used on error messages. + + + + + Get the warning level for warnings (e.g., 1 or greater for C#). VB does not have warning + levels and always uses 1. Errors should return 0. + + + + + Type that defines error codes. For testing purposes only. + + + + + Create a simple language specific diagnostic for given error code. + + + + + Create a simple language specific diagnostic with no location for given info. + + + + + Create a simple language specific diagnostic for given error code. + + + + + Given a message identifier (e.g., CS0219), severity, warning as error and a culture, + get the entire prefix (e.g., "error CS0219: Warning as Error:" for C# or "error BC42024:" for VB) used on error messages. + + + + + Convert given symbol to string representation. + + + + + Given an error code (like 1234) return the identifier (CS1234 or BC1234). + + + + + Produces the filtering action for the diagnostic based on the options passed in. + + + A new with new effective severity based on the options or null if the + diagnostic has been suppressed. + + + + + Filter a based on the compilation options so that /nowarn and /warnaserror etc. take effect.options + + A with effective severity based on option or null if suppressed. + + + + Takes an exception produced while writing to a file stream and produces a diagnostic. + + + + + Represents a diagnostic, such as a compiler error or a warning, along with the location where it occurred. + + + A diagnostic (such as a compiler error or a warning), along with the location where it occurred. + + + + + The default warning level, which is also used for non-error diagnostics. + + + + + The warning level used for hidden and info diagnostics. Because these diagnostics interact with other editor features, we want them to always be produced unless /warn:0 is set. + + + + + The maximum warning level represented by a large value of 9999. + + + + + Creates a instance. + + A describing the diagnostic + An optional primary location of the diagnostic. If null, will return . + Arguments to the message of the diagnostic + The instance. + + + + Creates a instance. + + A describing the diagnostic. + An optional primary location of the diagnostic. If null, will return . + + An optional set of name-value pairs by means of which the analyzer that creates the diagnostic + can convey more detailed information to the fixer. If null, will return + . + + Arguments to the message of the diagnostic. + The instance. + + + + Creates a instance. + + A describing the diagnostic. + An optional primary location of the diagnostic. If null, will return . + + An optional set of additional locations related to the diagnostic. + Typically, these are locations of other items referenced in the message. + If null, will return an empty list. + + Arguments to the message of the diagnostic. + The instance. + + + + Creates a instance. + + A describing the diagnostic. + An optional primary location of the diagnostic. If null, will return . + + An optional set of additional locations related to the diagnostic. + Typically, these are locations of other items referenced in the message. + If null, will return an empty list. + + + An optional set of name-value pairs by means of which the analyzer that creates the diagnostic + can convey more detailed information to the fixer. If null, will return + . + + Arguments to the message of the diagnostic. + The instance. + + + + Creates a instance. + + A describing the diagnostic. + An optional primary location of the diagnostic. If null, will return . + Effective severity of the diagnostic. + + An optional set of additional locations related to the diagnostic. + Typically, these are locations of other items referenced in the message. + If null, will return an empty list. + + + An optional set of name-value pairs by means of which the analyzer that creates the diagnostic + can convey more detailed information to the fixer. If null, will return + . + + Arguments to the message of the diagnostic. + The instance. + + + + Creates a instance which is localizable. + + An identifier for the diagnostic. For diagnostics generated by the compiler, this will be a numeric code with a prefix such as "CS1001". + The category of the diagnostic. For diagnostics generated by the compiler, the category will be "Compiler". + The diagnostic message text. + The diagnostic's effective severity. + The diagnostic's default severity. + True if the diagnostic is enabled by default + The warning level, greater than 0 if severity is ; otherwise 0. + An optional short localizable title describing the diagnostic. + An optional longer localizable description for the diagnostic. + An optional hyperlink that provides more detailed information regarding the diagnostic. + An optional primary location of the diagnostic. If null, will return . + + An optional set of additional locations related to the diagnostic. + Typically, these are locations of other items referenced in the message. + If null, will return an empty list. + + + An optional set of custom tags for the diagnostic. See for some well known tags. + If null, will return an empty list. + + + An optional set of name-value pairs by means of which the analyzer that creates the diagnostic + can convey more detailed information to the fixer. If null, will return + . + + The instance. + + + + Creates a instance which is localizable. + + An identifier for the diagnostic. For diagnostics generated by the compiler, this will be a numeric code with a prefix such as "CS1001". + The category of the diagnostic. For diagnostics generated by the compiler, the category will be "Compiler". + The diagnostic message text. + The diagnostic's effective severity. + The diagnostic's default severity. + True if the diagnostic is enabled by default + The warning level, greater than 0 if severity is ; otherwise 0. + Flag indicating whether the diagnostic is suppressed by a source suppression. + An optional short localizable title describing the diagnostic. + An optional longer localizable description for the diagnostic. + An optional hyperlink that provides more detailed information regarding the diagnostic. + An optional primary location of the diagnostic. If null, will return . + + An optional set of additional locations related to the diagnostic. + Typically, these are locations of other items referenced in the message. + If null, will return an empty list. + + + An optional set of custom tags for the diagnostic. See for some well known tags. + If null, will return an empty list. + + + An optional set of name-value pairs by means of which the analyzer that creates the diagnostic + can convey more detailed information to the fixer. If null, will return + . + + The instance. + + + + Gets the diagnostic descriptor, which provides a description about a . + + + + + Gets the diagnostic identifier. For diagnostics generated by the compiler, this will be a numeric code with a prefix such as "CS1001". + + + + + Gets the category of diagnostic. For diagnostics generated by the compiler, the category will be "Compiler". + + + + + Get the culture specific text of the message. + + + + + Gets the default of the diagnostic's . + + + To get the effective severity of the diagnostic, use . + + + + + Gets the effective of the diagnostic. + + + To get the default severity of diagnostic's , use . + To determine if this is a warning treated as an error, use . + + + + + Gets the warning level. This is 0 for diagnostics with severity , + otherwise an integer greater than zero. + + + + + Returns true if the diagnostic has a source suppression, i.e. an attribute or a pragma suppression. + + + + + Gets the for suppressed diagnostics, i.e. = true. + Otherwise, returns null. + + + + + Returns true if this diagnostic is enabled by default by the author of the diagnostic. + + + + + Returns true if this is a warning treated as an error; otherwise false. + + + True implies = + and = . + + + + + Gets the primary location of the diagnostic, or if no primary location. + + + + + Gets an array of additional locations related to the diagnostic. + Typically these are the locations of other items referenced in the message. + + + + + Gets custom tags for the diagnostic. + + + + + Gets property bag for the diagnostic. it will return + if there is no entry. This can be used to put diagnostic specific information you want + to pass around. for example, to corresponding fixer. + + + + + Create a new instance of this diagnostic with the Location property changed. + + + + + Create a new instance of this diagnostic with the Severity property changed. + + + + + Create a new instance of this diagnostic with the suppression info changed. + + + + + Create a new instance of this diagnostic with the given programmatic suppression info. + + + + + Returns true if the diagnostic location (or any additional location) is within the given tree and intersects with the filterSpanWithinTree, if non-null. + + + + + Gets the default warning level for a diagnostic severity. Warning levels are used with the /warn:N + command line option to suppress diagnostics over a severity of interest. When N is 0, only error severity + messages are produced by the compiler. Values greater than 0 indicated that warnings up to and including + level N should also be included. + + + and are treated as warning + level 1. In other words, these diagnostics which typically interact with editor features are enabled unless + the special /warn:0 option is set. + + A value. + The default compiler warning level for . + + + + Returns true if a diagnostic is not configurable, i.e. cannot be suppressed or filtered or have its severity changed. + For example, compiler errors are always non-configurable. + + + + + Returns true if this is an error diagnostic which cannot be suppressed and is guaranteed to break the build. + Only diagnostics which have default severity error and are tagged as NotConfigurable fall in this bucket. + This includes all compiler error diagnostics and specific analyzer error diagnostics that are marked as not configurable by the analyzer author. + + + + + Returns true if this is a unsuppressed diagnostic with an effective error severity. + + + + + This type is attached to diagnostics for required language version and should only be used + on such diagnostics, as they are recognized by . + + + + + Represents a mutable bag of diagnostics. You can add diagnostics to the bag, + and also get all the diagnostics out of the bag (the bag implements + IEnumerable<Diagnostics>. Once added, diagnostics cannot be removed, and no ordering + is guaranteed. + + It is ok to Add diagnostics to the same bag concurrently on multiple threads. + It is NOT ok to Add concurrently with Clear or Free operations. + + The bag is optimized to be efficient when containing zero errors. + + + + Return true if the bag is completely empty - not even containing void diagnostics. + + + This exists for short-circuiting purposes. Use + to get a resolved Tuple(Of NamedTypeSymbol, ImmutableArray(Of Diagnostic)) (i.e. empty after eliminating void diagnostics). + + + + + Returns true if the bag has any diagnostics with DefaultSeverity=Error. Does not consider warnings or informationals + or warnings promoted to error via /warnaserror. + + + Resolves any lazy diagnostics in the bag. + + Generally, this should only be called by the creator (modulo pooling) of the bag (i.e. don't use bags to communicate - + if you need more info, pass more info). + + + + + Returns true if the bag has any non-lazy diagnostics with DefaultSeverity=Error. Does not consider warnings or informationals + or warnings promoted to error via /warnaserror. + + + Does not resolve any lazy diagnostics in the bag. + + Generally, this should only be called by the creator (modulo pooling) of the bag (i.e. don't use bags to communicate - + if you need more info, pass more info). + + + + + Add a diagnostic to the bag. + + + + + Add multiple diagnostics to the bag. + + + + + Add multiple diagnostics to the bag. + + + + + Add another DiagnosticBag to the bag. + + + + + Add another DiagnosticBag to the bag and free the argument. + + + + + Seal the bag so no further errors can be added, while clearing it and returning the old set of errors. + Return the bag to the pool. + + + + + Generally, this should only be called by the creator (modulo pooling) of the bag (i.e. don't use bags to communicate - + if you need more info, pass more info). + + + + + Using an iterator to avoid copying the list. If perf is a problem, + create an explicit enumerator type. + + + + + Get the underlying concurrent storage, creating it on demand if needed. + NOTE: Concurrent Adding to the bag is supported, but concurrent Clearing is not. + If one thread adds to the bug while another clears it, the scenario is + broken and we cannot do anything about it here. + + + + NOTE: Concurrent Adding to the bag is supported, but concurrent Clearing is not. + If one thread adds to the bug while another clears it, the scenario is + broken and we cannot do anything about it here. + + + + Provides a description about a + + + + + An unique identifier for the diagnostic. + + + + + A short localizable title describing the diagnostic. + + + + + An optional longer localizable description for the diagnostic. + + + + + An optional hyperlink that provides more detailed information regarding the diagnostic. + + + + + A localizable format message string, which can be passed as the first argument to when creating the diagnostic message with this descriptor. + + + + + + The category of the diagnostic (like Design, Naming etc.) + + + + + The default severity of the diagnostic. + + + + + Returns true if the diagnostic is enabled by default. + + + + + Custom tags for the diagnostic. + + + + + Create a DiagnosticDescriptor, which provides description about a . + NOTE: For localizable , and/or , + use constructor overload . + + A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001". + A short title describing the diagnostic. For example, for CA1001: "Types that own disposable fields should be disposable". + A format message string, which can be passed as the first argument to when creating the diagnostic message with this descriptor. + For example, for CA1001: "Implement IDisposable on '{0}' because it creates members of the following IDisposable types: '{1}'." + The category of the diagnostic (like Design, Naming etc.). For example, for CA1001: "Microsoft.Design". + Default severity of the diagnostic. + True if the diagnostic is enabled by default. + An optional longer description of the diagnostic. + An optional hyperlink that provides a more detailed description regarding the diagnostic. + Optional custom tags for the diagnostic. See for some well known tags. + + + + Create a DiagnosticDescriptor, which provides description about a . + + A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001". + A short localizable title describing the diagnostic. For example, for CA1001: "Types that own disposable fields should be disposable". + A localizable format message string, which can be passed as the first argument to when creating the diagnostic message with this descriptor. + For example, for CA1001: "Implement IDisposable on '{0}' because it creates members of the following IDisposable types: '{1}'." + The category of the diagnostic (like Design, Naming etc.). For example, for CA1001: "Microsoft.Design". + Default severity of the diagnostic. + True if the diagnostic is enabled by default. + An optional longer localizable description of the diagnostic. + An optional hyperlink that provides a more detailed description regarding the diagnostic. + Optional custom tags for the diagnostic. See for some well known tags. + Example descriptor for rule CA1001: + internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(RuleId, + new LocalizableResourceString(nameof(FxCopRulesResources.TypesThatOwnDisposableFieldsShouldBeDisposable), FxCopRulesResources.ResourceManager, typeof(FxCopRulesResources)), + new LocalizableResourceString(nameof(FxCopRulesResources.TypeOwnsDisposableFieldButIsNotDisposable), FxCopRulesResources.ResourceManager, typeof(FxCopRulesResources)), + FxCopDiagnosticCategory.Design, + DiagnosticSeverity.Warning, + isEnabledByDefault: true, + helpLinkUri: "http://msdn.microsoft.com/library/ms182172.aspx", + customTags: DiagnosticCustomTags.Microsoft); + + + + + Gets the effective severity of diagnostics created based on this descriptor and the given . + + Compilation options + + + + Returns true if diagnostic descriptor is not configurable, i.e. cannot be suppressed or filtered or have its severity changed. + For example, compiler errors are always non-configurable. + + + + + Returns true if diagnostic descriptor is a built-in compiler diagnostic or is not configurable. + + + + + Formats messages. + + + + + Formats the message using the optional . + + The diagnostic. + The formatter; or null to use the default formatter. + The formatted message. + + + + A DiagnosticInfo object has information about a diagnostic, but without any attached location information. + + + More specialized diagnostics with additional information (e.g., ambiguity errors) can derive from this class to + provide access to additional information about the error, such as what symbols were involved in the ambiguity. + + + + + The error code, as an integer. + + + + + Returns the effective severity of the diagnostic: whether this diagnostic is informational, warning, or error. + If IsWarningsAsError is true, then this returns , while returns . + + + + + Returns whether this diagnostic is informational, warning, or error by default, based on the error code. + To get diagnostic's effective severity, use . + + + + + Gets the warning level. This is 0 for diagnostics with severity , + otherwise an integer greater than zero. + + + + + Returns true if this is a warning treated as an error. + + + True implies = and + = . + + + + + Get the diagnostic category for the given diagnostic code. + Default category is . + + + + + If a derived class has additional information about other referenced symbols, it can + expose the locations of those symbols in a general way, so they can be reported along + with the error. + + + + + Get the message id (for example "CS1001") for the message. This includes both the error number + and a prefix identifying the source. + + + + + Get the text of the message in the given language. + + + + + For a DiagnosticInfo that is lazily evaluated, this method evaluates it + and returns a non-lazy DiagnosticInfo. + + + + + Describes how severe a diagnostic is. + + + + + Something that is an issue, as determined by some authority, + but is not surfaced through normal means. + There may be different mechanisms that act on these issues. + + + + + Information that does not indicate a problem (i.e. not prescriptive). + + + + + Something suspicious but allowed. + + + + + Something not allowed by the rules of the language or other authority. + + + + + Values for severity that are used internally by the compiler but are not exposed. + + + + + An unknown severity diagnostic is something whose severity has not yet been determined. + + + + + If an unknown diagnostic is resolved and found to be unnecessary then it is + treated as a "Void" diagnostic + + + + + Values for ErrorCode/ERRID that are used internally by the compiler but are not exposed. + + + + + The code has yet to be determined. + + + + + The code was lazily determined and does not need to be reported. + + + + + A diagnostic (such as a compiler error or a warning), along with the location where it occurred. + + + + + Get the information about the diagnostic: the code, severity, message, etc. + + + + + True if the DiagnosticInfo for this diagnostic requires (or required - this property + is immutable) resolution. + + + + + Usage is unexpected unless is true. + + + + + A program location in source code. + + + + + Represents a span of text in a source code file in terms of file name, line number, and offset within line. + However, the file is actually whatever was passed in when asked to parse; there may not really be a file. + + + + + Path, or null if the span represents an invalid value. + + + Path may be if not available. + + + + + Gets the span. + + + + + True if the is a mapped path. + + + A mapped path is a path specified in source via #line (C#) or #ExternalSource (VB) directives. + + + + + Initializes the instance. + + The file identifier - typically a relative or absolute path. + The start line position. + The end line position. + is null. + + + + Initializes the instance. + + The file identifier - typically a relative or absolute path. + The span. + is null. + + + + Gets the of the start of the span. + + + + + + Gets the of the end of the span. + + + + + + Returns true if the span represents a valid location. + + + + + Determines if two FileLinePositionSpan objects are equal. + + + The path is treated as an opaque string, i.e. a case-sensitive comparison is used. + + + + + Determines if two FileLinePositionSpan objects are equal. + + + + + Serves as a hash function for FileLinePositionSpan. + + The hash code. + + The path is treated as an opaque string, i.e. a case-sensitive hash is calculated. + + + + + Returns a that represents . + + The string representation of . + Path: (0,0)-(5,6) + + + + A localizable resource string that may possibly be formatted differently depending on culture. + + + + + Creates a localizable resource string with no formatting arguments. + + nameof the resource that needs to be localized. + for the calling assembly. + Type handling assembly's resource management. Typically, this is the static class generated for the resources file from which resources are accessed. + + + + Creates a localizable resource string that may possibly be formatted differently depending on culture. + + nameof the resource that needs to be localized. + for the calling assembly. + Type handling assembly's resource management. Typically, this is the static class generated for the resources file from which resources are accessed. + Optional arguments for formatting the localizable resource string. + + + + A string that may possibly be formatted differently depending on culture. + NOTE: Types implementing must be serializable. + + + + + FixedLocalizableString representing an empty string. + + + + + Fired when an exception is raised by any of the public methods of . + If the exception handler itself throws an exception, that exception is ignored. + + + + + Formats the value of the current instance using the optionally specified format. + + + + + Formats the value of the current instance using the optionally specified format. + Provides the implementation of ToString. ToString will provide a default value + if this method throws an exception. + + + + + Provides the implementation of GetHashCode. GetHashCode will provide a default value + if this method throws an exception. + + + + + + Provides the implementation of Equals. Equals will provide a default value + if this method throws an exception. + + + + + + Flag indicating if any methods on this type can throw exceptions from public entrypoints. + + + + + A program location in source code. + + + + + Location kind (None/SourceFile/MetadataFile). + + + + + Returns true if the location represents a specific location in a source code file. + + + + + Returns true if the location is in metadata. + + + + + The syntax tree this location is located in or null if not in a syntax tree. + + + + + Returns the metadata module the location is associated with or null if the module is not available. + + + Might return null even if returns true. The module symbol might not be available anymore, + for example, if the location is serialized and deserialized. + + + + + The location within the syntax tree that this location is associated with. + + + If returns False this method returns an empty which starts at position 0. + + + + + Gets the location in terms of path, line and column. + + + that contains path, line and column information. + + Returns an invalid span (see ) if the information is not available. + + The values are not affected by line mapping directives (#line in C# or #ExternalSource in VB). + + + + + Gets the location in terms of path, line and column after applying source line mapping directives + (#line in C# or #ExternalSource in VB). + + + that contains file, line and column information, + or an invalid span (see ) if not available. + + + + + A location of kind LocationKind.None. + + + + + Creates an instance of a for a span in a . + + + + + Creates an instance of a for a span in a file. + + + + + Creates an instance of a for a span in a file with a mapped file and span. + + + + + Specifies the kind of location (source vs. metadata). + + + + + Unspecified location. + + + + + The location represents a position in a source file. + + + + + The location represents a metadata file. + + + + + The location represents a position in an XML file. + + + + + The location in some external file. + + + + + A program location in metadata. + + + + + A class that represents no location at all. Useful for errors in command line options, for example. + + + + + + Describes how to report a warning diagnostic. + + + + + Report a diagnostic by default. + + + + + Report a diagnostic as an error. + + + + + Report a diagnostic as a warning even though /warnaserror is specified. + + + + + Report a diagnostic as an info. + + + + + Report a diagnostic as hidden. + + + + + Suppress a diagnostic. + + + + + A program location in source code. + + + + + Provides a description about a programmatic suppression of a by a . + + + + + An unique identifier for the suppression. + + + + + Identifier of the suppressed diagnostic, i.e. . + + + + + A localizable justification about the suppression. + + + + + Create a SuppressionDescriptor, which provides a justification about a programmatic suppression of a . + NOTE: For localizable , + use constructor overload . + + A unique identifier for the suppression. For example, suppression ID "SP1001". + Identifier of the suppressed diagnostic, i.e. . For example, compiler warning Id "CS0649". + Justification for the suppression. For example: "Suppress CS0649 on fields marked with YYY attribute as they are implicitly assigned.". + + + + Create a SuppressionDescriptor, which provides a localizable justification about a programmatic suppression of a . + + A unique identifier for the suppression. For example, suppression ID "SP1001". + Identifier of the suppressed diagnostic, i.e. . For example, compiler warning Id "CS0649". + Justification for the suppression. For example: "Suppress CS0649 on fields marked with YYY attribute as they are implicitly assigned.". + + + + Returns a flag indicating if the suppression is disabled for the given . + + Compilation options + + + + Indicates that the diagnostic is related to some unnecessary source code. + + + + + Indicates that the diagnostic is related to edit and continue. + + + + + Indicates that the diagnostic is related to build. + + + + + Indicates that the diagnostic is reported by the compiler. + + + + + Indicates that the diagnostic can be used for telemetry + + + + + Indicates that the diagnostic is not configurable, i.e. it cannot be suppressed or filtered or have its severity changed. + + + + + Indicates that the diagnostic is related to an exception thrown by a . + + + + + Indicates that the diagnostic is an obsolete diagnostic with a custom ID + specified by the 'DiagnosticId' property on 'ObsoleteAttribute'. + + + + + Indicates that the diagnostic is a compilation end diagnostic reported + from a compilation end action. + + + + + A program location in an XML file. + + + + + APIs for constructing documentation comment id's, and finding symbols that match ids. + + + + + Creates an id string used by external documentation comment files to identify declarations + of types, namespaces, methods, properties, etc. + + + + + Creates an id string used to reference type symbols (not strictly declarations, includes + arrays, pointers, type parameters, etc.) + + + + + Gets all declaration symbols that match the declaration id string + + + + + Try to get all the declaration symbols that match the declaration id string. + Returns true if at least one symbol matches. + + + + + Gets the first declaration symbol that matches the declaration id string, order undefined. + + + + + Gets the symbols that match the reference id string. + + + + + Try to get all symbols that match the reference id string. + Returns true if at least one symbol matches. + + + + + Gets the first symbol that matches the reference id string, order undefined. + + + + + WARN: This is a test hook - do not take a dependency on this. + + + + + + + + + + A class used to provide XML documentation to the compiler for members from metadata. A + custom implementation of this class should be returned from a DocumentationResolver to provide XML + documentation comments from custom caches or locations. + + + + + Fetches a documentation comment for the given member ID. + + The documentation member ID of the item to fetch. + The preferred culture to receive a comment in. Null if + there is no preference. This is a preference only, and providers may choose to provide + results from another culture if the preferred culture was unavailable. + A cancellation token for the search. + A DocumentationComment. + + + + DocumentationProviders are compared when determining whether an AssemblySymbol can be reused. + Hence, if multiple instances can represent the same documentation, it is imperative that + Equals (and GetHashCode) be overridden to capture this fact. Otherwise, it is possible to end + up with multiple AssemblySymbols for the same assembly, which plays havoc with the type hierarchy. + + + + + DocumentationProviders are compared when determining whether an AssemblySymbol can be reused. + Hence, if multiple instances can represent the same documentation, it is imperative that + GetHashCode (and Equals) be overridden to capture this fact. Otherwise, it is possible to end + up with multiple AssemblySymbols for the same assembly, which plays havoc with the type hierarchy. + + + + + A trivial DocumentationProvider which never returns documentation. + + + + + Used by the DocumentationCommentCompiler(s) to check doc comments for XML parse errors. + As a performance optimization, this class tries to re-use the same underlying instance + when possible. + + + + + Current text to validate. + + + + + We use to validate XML doc comments. Unfortunately it cannot be reset and thus can't be pooled. + Each time we need to validate a fragment of XML we "append" it to the underlying text reader, implemented by this class, + and advance the reader. By the end of the fragment validation, we keep the reader open in a state + that is ready for the next fragment validation unless the fragment was invalid, in which case we need to create a new XmlReader. + That is why pretends that the stream has extra spaces + at the end. That should be sufficient for to not reach the end of this reader before the next + fragment is appended, unless the current fragment is malformed in one way or another. + + + + + Specifies the different documentation comment processing modes. + + + Order matters: least processing to most processing. + + + + + Treats documentation comments as regular comments. + + + + + Parses documentation comments as structured trivia, but do not report any diagnostics. + + + + + Parses documentation comments as structured trivia and report diagnostics. + + + + + Represents text to be embedded in a PDB. + + + + + The maximum number of bytes in to write out uncompressed. + + This prevents wasting resources on compressing tiny files with little to negative gain + in PDB file size. + + Chosen as the point at which we start to see > 10% blob size reduction using all + current source files in corefx and roslyn as sample data. + + + + + The path to the file to embed. + + See remarks of + Empty file paths are disallowed, as the debugger finds source by looking up files by their name (and then verifying their signature) + + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + + + + The hash of the uncompressed bytes + that's saved to the PDB. + + + + + The content that will be written to the PDB. + + + Internal since this is an implementation detail. The only public + contract is that you can pass EmbeddedText instances to Emit. + It just so happened that doing this up-front was most practical + and efficient, but we don't want to be tied to it. + + For efficiency, the format of this blob is exactly as it is written + to the PDB,which prevents extra copies being made during emit. + + The first 4 bytes (little endian int32) indicate the format: + + 0: data that follows is uncompressed + Positive: data that follows is deflate compressed and value is original, uncompressed size + Negative: invalid at this time, but reserved to mark a different format in the future. + + + + + Constructs a for embedding the given . + + The file path (pre-normalization) to use in the PDB. + The source text to embed. + + is null. + is null. + + + empty. + cannot be embedded (see ). + + + + + Constructs an from stream content. + + The file path (pre-normalization) to use in the PDB. + The stream. + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + is null. + is null. + + + is empty. + doesn't support reading or seeking. + is not supported. + + An I/O error occurs. + Reads from the beginning of the stream. Leaves the stream open. + + + + Constructs an from bytes. + + The file path (pre-normalization) to use in the PDB. + The bytes. + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + is default-initialized. + is null. + + + is empty. + is not supported. + + An I/O error occurs. + Reads from the beginning of the stream. Leaves the stream open. + + + is null. + is empty. + + + + Creates the blob to be saved to the PDB. + + + + + Encoding to use when there is no byte order mark (BOM) on the stream. This encoder may throw a + if the stream contains invalid UTF-8 bytes. + + + + + Encoding to use when UTF-8 fails. We try to find the following, in order, if available: + 1. The default ANSI codepage + 2. CodePage 1252. + 3. Latin1. + + + + + Initializes an instance of from the provided stream. This version differs + from in two ways: + 1. It attempts to minimize allocations by trying to read the stream into a byte array. + 2. If is null, it will first try UTF-8 and, if that fails, it will + try CodePage 1252. If CodePage 1252 is not available on the system, then it will try Latin1. + + The stream containing encoded text. + + Specifies an encoding to be used if the actual encoding can't be determined from the stream content (the stream doesn't start with Byte Order Mark). + If not specified auto-detect heuristics are used to determine the encoding. If these heuristics fail the decoding is assumed to be Encoding.Default. + Note that if the stream starts with Byte Order Mark the value of is ignored. + + Indicates if the file can be embedded in the PDB. + Hash algorithm used to calculate document checksum. + + The stream content can't be decoded using the specified , or + is null and the stream appears to be a binary file. + + An IO error occurred while reading from the stream. + + + + Try to create a from the given stream using the given encoding. + + The input stream containing the encoded text. The stream will not be closed. + The expected encoding of the stream. The actual encoding used may be different if byte order marks are detected. + The checksum algorithm to use. + Throw if binary (non-text) data is detected. + Indicates if the text can be embedded in the PDB. + The decoded from the stream. + The decoder was unable to decode the stream with the given encoding. + Error reading from stream. + + + + Some streams are easily represented as bytes. + + The stream + The bytes, if available. + + True if the stream's bytes could easily be read, false otherwise. + + + + + Read the contents of a FileStream into a byte array. + + The FileStream with encoded text. + A byte array filled with the contents of the file. + True if a byte array could be created. + + + + Computes line starts faster given already computed line starts from text before the change. + + + + + A composite of a sequence of s. + + + + + Validates the arguments passed to against the published contract. + + True if should bother to proceed with copying. + + + + Reduces the number of segments toward the target number of segments, + if the number of segments is deemed to be too large (beyond the maximum). + + + + + Determines the segment size to use for call to CombineSegments, that will result in the segment count + being reduced to less than or equal to the target segment count. + + + + + Determines the segment count that would result if the segments of size less than or equal to + the specified segment size were to be combined. + + + + + Combines contiguous segments with lengths that are each less than or equal to the specified segment size. + + + + + Compute total text length and total size of storage buffers held + + + + + Trim excessive inaccessible text. + + + + + A optimized for very large sources. The text is stored as + a list of chunks (char arrays). + + + + + internal for unit testing + + + + + Called from to initialize the . Thereafter, + the collection is cached. + + A new representing the individual text lines. + + + + Append chunk to writer (may reuse char array) + + + + + Immutable representation of a line number and position within a SourceText instance. + + + + + A that represents position 0 at line 0. + + + + + Initializes a new instance of a with the given line and character. + + + The line of the line position. The first line in a file is defined as line 0 (zero based line numbering). + + + The character position in the line. + + or is less than zero. + + + + The line number. The first line in a file is defined as line 0 (zero based line numbering). + + + + + The character position within the line. + + + + + Determines whether two are the same. + + + + + Determines whether two are different. + + + + + Determines whether two are the same. + + The object to compare. + + + + Determines whether two are the same. + + The object to compare. + + + + Provides a hash function for . + + + + + Provides a string representation for . + + 0,10 + + + + Immutable span represented by a pair of line number and index within the line. + + + + + Creates . + + Start position. + End position. + precedes . + + + + Gets the start position of the span. + + + + + Gets the end position of the span. + + + + + Provides a string representation for . + + (0,0)-(5,6) + + + + Specifies a hash algorithms used for hashing source files. + + + + + No algorithm specified. + + + + + Secure Hash Algorithm 1. + + + + + Secure Hash Algorithm 2 with a hash size of 256 bits. + + + + + Hash algorithms supported by the debugger used for source file checksums stored in the PDB. + + + + + Defines a source hash algorithm constant we can re-use when creating source texts for open documents. + This ensures that both LSP and documents opened as a text buffer are created with the same checksum algorithm + so that we can compare their contents using checksums later on. + + + + + An abstraction of source text. + + + + + Constructs a from text in a string. + + Text. + + Encoding of the file that the was read from or is going to be saved to. + null if the encoding is unspecified. + If the encoding is not specified the resulting isn't debuggable. + If an encoding-less is written to a file a shall be used as a default. + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + is null. + is not supported. + + + + Constructs a from text in a string. + + TextReader + length of content from + + Encoding of the file that the was read from or is going to be saved to. + null if the encoding is unspecified. + If the encoding is not specified the resulting isn't debuggable. + If an encoding-less is written to a file a shall be used as a default. + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + is null. + is not supported. + + + + Constructs a from stream content. + + Stream. The stream must be seekable. + + Data encoding to use if the stream doesn't start with Byte Order Mark specifying the encoding. + if not specified. + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + If the decoded text contains at least two consecutive NUL + characters, then an is thrown. + True if the text can be passed to and be embedded in a PDB. + is null. + + doesn't support reading or seeking. + is not supported. + + If the given encoding is set to use a throwing decoder as a fallback + Two consecutive NUL characters were detected in the decoded text and was true. + An I/O error occurs. + Reads from the beginning of the stream. Leaves the stream open. + + + + Constructs a from a byte array. + + The encoded source buffer. + The number of bytes to read from the buffer. + + Data encoding to use if the encoded buffer doesn't start with Byte Order Mark. + if not specified. + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + If the decoded text contains at least two consecutive NUL + characters, then an is thrown. + The decoded text. + True if the text can be passed to and be embedded in a PDB. + The is null. + The is negative or longer than the . + is not supported. + If the given encoding is set to use a throwing decoder as a fallback + Two consecutive NUL characters were detected in the decoded text and was true. + + + + Decode text from a stream. + + The stream containing encoded text. + The encoding to use if an encoding cannot be determined from the byte order mark. + The actual encoding used. + The decoded text. + If the given encoding is set to use a throwing decoder as a fallback + + + + Decode text from a byte array. + + The byte array containing encoded text. + The count of valid bytes in . + The encoding to use if an encoding cannot be determined from the byte order mark. + The actual encoding used. + The decoded text. + If the given encoding is set to use a throwing decoder as a fallback + + + + Check for occurrence of two consecutive NUL (U+0000) characters. + This is unlikely to appear in genuine text, so it's a good heuristic + to detect binary files. + + + internal for unit testing + + + + + + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + + + + Encoding of the file that the text was read from or is going to be saved to. + null if the encoding is unspecified. + + + If the encoding is not specified the source isn't debuggable. + If an encoding-less is written to a file a shall be used as a default. + + + + + The length of the text in characters. + + + + + The size of the storage representation of the text (in characters). + This can differ from length when storage buffers are reused to represent fragments/subtext. + + + + + Indicates whether this source text can be embedded in the PDB. + + + If this text was constructed via or + , then the canBeEmbedded arg must have + been true. + + Otherwise, must be non-null. + + + + + If the text was created from a stream or byte[] and canBeEmbedded argument was true, + this provides the embedded text blob that was precomputed using the original stream + or byte[]. The precomputation was required in that case so that the bytes written to + the PDB match the original bytes exactly (and match the checksum of the original + bytes). + + + + + Returns a character at given position. + + The position to get the character from. + The character. + When position is negative or + greater than . + + + + Copy a range of characters from this SourceText to a destination array. + + + + + The container of this . + + + + + Gets a that contains the characters in the specified span of this text. + + + + + Returns a that has the contents of this text including and after the start position. + + + + + Write this to a text writer. + + + + + Write a span of text to a text writer. + + + + + Provides a string representation of the SourceText. + + + + + Gets a string containing the characters in specified span. + + When given span is outside of the text range. + + + + Constructs a new SourceText from this text with the specified changes. + + + + + Constructs a new SourceText from this text with the specified changes. + + + Changes do not have to be in sorted order. However, will + perform better if they are. + + If any changes are not in bounds of this . + If any changes overlap other changes. + + + + Returns a new SourceText with the specified span of characters replaced by the new text. + + + + + Returns a new SourceText with the specified range of characters replaced by the new text. + + + + + Gets the set of that describe how the text changed + between this text an older version. This may be multiple detailed changes + or a single change encompassing the entire text. + + + + + Gets the set of that describe how the text changed + between this text and an older version. This may be multiple detailed changes + or a single change encompassing the entire text. + + + + + The collection of individual text lines. + + + + + Called from to initialize the . Thereafter, + the collection is cached. + + A new representing the individual text lines. + + + + Compares the content with content of another . + + + + + Implements equality comparison of the content of two different instances of . + + + + + Detect an encoding by looking for byte order marks. + + A buffer containing the encoded text. + The length of valid data in the buffer. + The length of any detected byte order marks. + The detected encoding or null if no recognized byte order mark was present. + + + + An object that contains an instance of a SourceText and raises events when its current instance + changes. + + + + + The current text instance. + + + + + Raised when the current text instance changes. + + + + + A read-only, non-seekable over a . + + + + + Implementation of based on a input + + + + + Underlying string on which this SourceText instance is based + + + + + Underlying string which is the source of this SourceText instance + + + + + The length of the text represented by . + + + + + Returns a character at given position. + + The position to get the character from. + The character. + When position is negative or + greater than . + + + + Provides a string representation of the StringBuilderText located within given span. + + When given span is outside of the text range. + + + + Implementation of SourceText based on a input + + + + + Underlying string which is the source of this instance + + + + + The length of the text represented by . + + + + + Returns a character at given position. + + The position to get the character from. + The character. + When position is negative or + greater than . + + + + Provides a string representation of the StringText located within given span. + + When given span is outside of the text range. + + + + A that represents a subrange of another . + + + + + Describes a single change when a particular span is replaced with a new text. + + + + + The original span of the changed text. + + + + + The new text. + + + + + Initializes a new instance of + + The original span of the changed text. + The new text. + + + + Provides a string representation for . + + + + + Converts a to a . + + + + + + An empty set of changes. + + + + + Represents state for a TextChanged event. + + + + + Initializes an instance of . + + The text before the change. + The text after the change. + A set of ranges for the change. + + + + Initializes an instance of . + + The text before the change. + The text after the change. + A set of ranges for the change. + + + + Gets the text before the change. + + + + + Gets the text after the change. + + + + + Gets the set of ranges for the change. + + + + + Represents the change to a span of text. + + + + + The span of text before the edit which is being changed + + + + + Width of the span after the edit. A 0 here would represent a delete + + + + + Initializes a new instance of . + + + + + + + Compares current instance of to another. + + + + + Compares current instance of to another. + + + + + Provides hash code for current instance of . + + + + + + Determines if two instances of are same. + + + + + Determines if two instances of are different. + + + + + An empty set of changes. + + + + + Collapse a set of s into a single encompassing range. If + the set of ranges provided is empty, an empty range is returned. + + + + + Information about the character boundaries of a single line of text. + + + + + Creates a instance. + + The source text. + The span of the line. + An instance of . + The span does not represent a text line. + + + + Gets the source text. + + + + + Gets the zero-based line number. + + + + + Gets the start position of the line. + + + + + Gets the end position of the line not including the line break. + + + + + Gets the end position of the line including the line break. + + + + + Gets the line span not including the line break. + + + + + Gets the line span including the line break. + + + + + Abstract base class for collections. + + + + + The count of items in the collection + + + + + Gets the item at the specified index. + + + + + The index of the TextLine that encompasses the character position. + + + + + Gets a that encompasses the character position. + + + + + + + Gets a corresponding to a character position. + + + + + Convert a to a . + + + + + Convert a to a position. + + + + + Convert a to . + + + + + Immutable abstract representation of a span of text. For example, in an error diagnostic that reports a + location, it could come from a parsed string, text from a tool editor buffer, etc. + + + + + Creates a TextSpan instance beginning with the position Start and having the Length + specified with . + + + + + Start point of the span. + + + + + End of the span. + + + + + Length of the span. + + + + + Determines whether or not the span is empty. + + + + + Determines whether the position lies within the span. + + + The position to check. + + + true if the position is greater than or equal to Start and strictly less + than End, otherwise false. + + + + + Determines whether falls completely within this span. + + + The span to check. + + + true if the specified span falls completely within this span, otherwise false. + + + + + Determines whether overlaps this span. Two spans are considered to overlap + if they have positions in common and neither is empty. Empty spans do not overlap with any + other span. + + + The span to check. + + + true if the spans overlap, otherwise false. + + + + + Returns the overlap with the given span, or null if there is no overlap. + + + The span to check. + + + The overlap of the spans, or null if the overlap is empty. + + + + + Determines whether intersects this span. Two spans are considered to + intersect if they have positions in common or the end of one span + coincides with the start of the other span. + + + The span to check. + + + true if the spans intersect, otherwise false. + + + + + Determines whether intersects this span. + A position is considered to intersect if it is between the start and + end positions (inclusive) of this span. + + + The position to check. + + + true if the position intersects, otherwise false. + + + + + Returns the intersection with the given span, or null if there is no intersection. + + + The span to check. + + + The intersection of the spans, or null if the intersection is empty. + + + + + Creates a new from and positions as opposed to a position and length. + + The returned TextSpan contains the range with inclusive, + and exclusive. + + + + + Determines if two instances of are the same. + + + + + Determines if two instances of are different. + + + + + Determines if current instance of is equal to another. + + + + + Determines if current instance of is equal to another. + + + + + Produces a hash code for . + + + + + Provides a string representation for . + This representation uses "half-open interval" notation, indicating the endpoint character is not included. + Example: [10..20), indicating the text starts at position 10 and ends at position 20 not included. + + + + + Compares current instance of with another. + + + + + Holder for common Text Utility functions and values + + + + + Return startLineBreak = index-1, lengthLineBreak = 2 if there is a \r\n at index-1 + Return startLineBreak = index, lengthLineBreak = 1 if there is a 1-char newline at index + Return startLineBreak = index+1, lengthLineBreak = 0 if there is no newline at index. + + + + + Determine if the character in question is any line break character + + + + + Generate a ConstantValue of the same integer type as the argument + and offset by the given non-negative amount. Return ConstantValue.Bad + if the generated constant would be outside the valid range of the type. + + + + + Emit the IL for the compilation into the specified stream. + + Compilation. + Path of the file to which the compilation will be written. + Path of the file to which the compilation's debug info will be written. + Also embedded in the output file. Null to forego PDB generation. + + Path of the file to which the compilation's XML documentation will be written. Null to forego XML generation. + Path of the file from which the compilation's Win32 resources will be read (in RES format). + Null to indicate that there are none. + List of the compilation's managed resources. Null to indicate that there are none. + To cancel the emit process. + Compilation or path is null. + Path is empty or invalid. + An error occurred while reading or writing a file. + + + + Initializes a new instance of the class. + + An ordered set of fully qualified + paths which are searched when resolving assembly names. + Directory used when resolving relative paths. + + + + Represents that an intermediate result is being captured. + This node is produced only as part of a . + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + An id used to match references to the same intermediate result. + + + + + Value to be captured. + + + + + Represents a point of use of an intermediate result captured earlier. + The fact of capturing the result is represented by . + This node is produced only as part of a . + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + An id used to match references to the same intermediate result. + + + + + True if this reference to the capture initializes the capture. Used when the capture is being initialized by being passed as an out parameter. + + + + + Represents result of checking whether the is null. + For reference types this checks if the is a null reference, + for nullable types this checks if the doesn’t have a value. + The node is produced as part of a flow graph during rewrite of + and nodes. + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Value to check. + + + + + Represents a exception instance passed by an execution environment to an exception filter or handler. + This node is produced only as part of a . + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents the check during initialization of a VB static local that is initialized on the first call of the function, and never again. + If the semaphore operation returns true, the static local has not yet been initialized, and the initializer will be run. If it returns + false, then the local has already been initialized, and the static local initializer region will be skipped. + This node is produced only as part of a . + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The static local variable that is possibly initialized. + + + + + Represents an anonymous function operation in context of a . + + Current usage: + (1) C# lambda expression. + (2) VB anonymous delegate expression. + + A for the body of the anonymous function is available from + the enclosing . + + + This node is associated with the following operation kinds: + + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Symbol of the anonymous function. + + + + + Represents a basic block in a with a sequence of . + Once a basic block is entered, all operations in it are always executed. + Optional , if non-null, is evaluated after the . + Control flow leaves the basic block by taking either the branch or + the branch. + + + + + Basic block kind (entry, block, or exit). + + + + + Sequence of operations in the basic block. + + + + + Optional branch value, which if non-null, is evaluated after . + For conditional branches, this value is used to represent the condition which determines if + is taken or not. + For non-conditional branches, this value is used to represent the return or throw value associated + with the . + + + + + Indicates the condition kind for the branch out of the basic block. + + + + + Optional fall through branch executed at the end of the basic block. + This branch is null for exit block, and non-null for all other basic blocks. + + + + + Optional conditional branch out of the basic block. + If non-null, this branch may be taken at the end of the basic block based + on the and . + + + + + List of basic blocks which have a control flow branch ( or ) + into this basic block. + + + + + Unique ordinal for each basic block in a , + which can be used to index into array. + + + + + Indicates if control flow can reach this basic block from the entry block of the graph. + + + + + Enclosing region. + + + + + kind. + + + + + Indicates an entry block for a , + which is always the first block in . + + + + + Indicates an exit block for a , + which is always the last block in . + + + + + Indicates an intermediate block for a . + + + + + Capture Id is an opaque identifier to represent an intermediate result from an . + + + + + Compares s. + + + + + + + + + + + Represents a control flow branch from a basic block to a + basic block in a . + + + + + Source basic block of this branch. + + + + + Destination basic block of this branch. + + + + + Semantics associated with this branch (such as "regular", "return", "throw", etc). + + + + + Indicates if this branch represents of the basic block. + + + + + Regions exited if this branch is taken. + Ordered from the innermost region to the outermost region. + + + + + Regions entered if this branch is taken. + Ordered from the outermost region to the innermost region. + + + + + The finally regions the control goes through if this branch is taken. + Ordered in the sequence by which the finally regions are executed. + + + + + Semantics associated with a . + + + + + Represents a with no associated semantics. + + + + + Represents a regular from a source basic block to a non-null destination basic block. + + + + + Represents a to the exit block, i.e. the destination block has . + + + + + Represents a with special structured exception handling semantics: + 1. The source basic block is the last block of an enclosing finally or filter region. + 2. The destination basic block is null. + + + + + Represents a to indicate flow transfer to the end of program execution. + The destination basic block is null for this branch. + + + + + Represents a generated for an with an explicit thrown exception. + The destination basic block is null for this branch. + + + + + Represents a generated for an with in implicit rethrown exception. + The destination basic block is null for this branch. + + + + + Represents a generated for error cases. + + + + + Represents kind of conditional branch from a . + + + + + Indicates no conditional branch from a . + Associated is null. + + + + + Indicates a conditional branch from a , + with a non-null and . + If evaluates to false, + then the branch is taken. + + + + + Indicates a conditional branch from a , + with a non-null and . + If evaluates to true, + then the branch is taken. + + + + + Control flow graph representation for a given executable code block . + This graph contains a set of s, with an entry block, zero + or more intermediate basic blocks and an exit block. + Each basic block contains zero or more and + explicit (s) to other basic block(s). + + + + + Creates a for the given executable code block root . + + Root syntax node for an executable code block. + Semantic model for the syntax tree containing the . + Optional cancellation token. + + Returns null if returns null for the given and . + Otherwise, returns a for the executable code block. + + + + + Creates a for the given executable code block . + + Root operation block, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root field initializer operation, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root property initializer operation, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root parameter initializer operation, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root attribute operation, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root constructor body operation, which must have a null parent. + Optional cancellation token. + + + + Creates a for the given executable code block . + + Root method body operation, which must have a null parent. + Optional cancellation token. + + + + Original operation, representing an executable code block, from which this control flow graph was generated. + Note that in the control flow graph are not in the same operation tree as + the original operation. + + + + + Optional parent control flow graph for this graph. + Non-null for a control flow graph generated for a local function or a lambda. + Null otherwise. + + + + + Basic blocks for the control flow graph. + + + + + Root () region for the graph. + + + + + Local functions declared within . + + + + + Creates a control flow graph for the given . + + + + + Creates a control flow graph for the given . + + + + + Some basic concepts: + - Basic blocks are sequences of statements/operations with no branching. The only branching + allowed is at the end of the basic block. + - Regions group blocks together and represent the lifetime of locals and captures, loosely similar to scopes in C#. + There are different kinds of regions, . + - converts values on the stack into captures. + - Error scenarios from initial binding need to be handled. + + + + + Represents the stack s of a tree of conditional accesses. The top of the stack is the + deepest node, and except in error conditions it should contain a that will be visited + when visiting this node. This is the basic recursion that ensures that the operations are visited at the correct time. + + + + + The basic block to branch to if the top of the stack is null. + + + + + This structure is meant to capture a snapshot of the state + that is needed to build graphs for lambdas and local functions. + + + + + Holds the current object being initialized if we're visiting an object initializer. + Or the current anonymous type object being initialized if we're visiting an anonymous type object initializer. + Or the target of a VB With statement. + + + + + Do a pass to eliminate blocks without statements that can be merged with predecessor(s) and + to eliminate regions that can be merged with parents. + + + + + Merge content of into its enclosing region and free it. + + + + + Do a pass to eliminate blocks without statements that can be merged with predecessor(s). + Returns true if any blocks were eliminated + + + + + Deal with labeled blocks that were not added to the graph because labels were never found + + + + + Either visits a single operation, or a using and all subsequent statements + + The statement to visit + All statements in the block containing this node + The current statement being visited in + True if this visited all of the statements + + The operation being visited is not necessarily equal to statements[startIndex]. + When traversing down a set of labels, we set operation to the label.Operation and recurse, but statements[startIndex] still refers to the original parent label + as we haven't actually moved down the original statement list + + + + + This class captures information about beginning of stack frame + and corresponding if one was allocated to + track s used by the stack spilling, etc. + Do not create instances of this type manually, use + helper instead. Also, do not assign explicitly. + Let the builder machinery do this when appropriate. + + + + + This function does not change the current region. The stack should be spilled before calling it. + + + + + Returns converted test expression. + Caller is responsible for spilling the stack and pushing a stack frame before calling this helper. + + + + + Recursively push nexted values onto the stack for visiting + + + + + Recursively pop nested tuple values off the stack after visiting + + + + + Holds the current object being initialized if we're visiting an object initializer. + Or the current anonymous type object being initialized if we're visiting an anonymous type object initializer. + Or the target of a VB With statement. + + + + + Holds the current object instance being initialized if we're visiting an object initializer. + + + + + Holds the current anonymous type instance being initialized if we're visiting an anonymous object initializer. + + + + + Holds the captured values for initialized anonymous type properties in an anonymous object initializer. + + + + + Gets or creates a control flow graph for the given defined in + the given or any of it's parent control flow graphs. + + + + + Gets or creates a control flow graph for the given defined in + the given or any of it's parent control flow graphs. + + + + + Encapsulates information about regions of s in a . + Regions can overlap, but never cross each other boundaries. + + + + + Region's kind + + + + + Enclosing region. Null for + + + + + Target exception type for , , + + + + + + Ordinal () of the first within the region. + + + + + Ordinal () of the last within the region. + + + + + Regions nested within this region. + + + + + Locals for which this region represent the life-time. + + + + + Local functions declared within the region. + + + + + Capture Ids used for intermediate results within the region. + + + + + Defines kinds of regions that can be present in a + + + + + A root region encapsulating all s in a + + + + + Region with the only purpose to represent the life-time of locals, intermediate results, and nested methods (local functions, lambdas). + The lifetime of a local variable is the portion of program execution during which storage is guaranteed to be reserved for it. + The lifetime of a nested method is the portion of program execution within which the method can be referenced. + The lifetime of an intermediate result (capture) is the portion of program execution within which the result can be referenced. + + + + + Region representing a try region. For example, + + + + + Region representing + + + + + Region representing + + + + + Region representing a union of a and the corresponding catch regions. + Doesn't contain any s directly. + + + + + Region representing a union of a and all corresponding catch + and regions. Doesn't contain any s directly. + + + + + Region representing + + + + + Region representing a union of a and corresponding finally + region. Doesn't contain any s directly. + + An that has a set of and a + at the same time is mapped to a region with region inside its region. + + + + + Region representing the initialization for a VB Static local variable. This region will only be executed + the first time a function is called. + + + + + Region representing erroneous block of code that is unreachable from the entry block. + + + + + All of the kinds of operations, including statements and expressions. + + + + Indicates an for a construct that is not implemented yet. + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This is further differentiated by . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This has yield break semantics. + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This has yield return semantics. + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . Use instead. + + + Indicates an . + + + Indicates an . Use instead. + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This is used as an increment operator + + + Indicates an . + + + Indicates an . This is used as a decrement operator + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This is further differentiated by . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . Use instead. + + + Indicates an . + + + Indicates an . Use instead. + + + Indicates an . + + + Indicates an . Use instead. + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . This append is of a literal component + + + Indicates an . This append is of an interpolation component + + + Indicates an . This append is invalid + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + Indicates an . + + + + Cache with a fixed size that evicts the least recently used members. + Thread-safe. + + + + + Create cache from an array. The cache capacity will be the size + of the array. All elements of the array will be added to the + cache. If any duplicate keys are found in the array a + will be thrown. + + + + + For testing. Very expensive. + + + + + Expects non-empty cache. Does not lock. + + + + + Doesn't lock. + + + + + Doesn't lock. + + + + + Get maximum char count needed to decode the entire stream. + + Stream is so big that max char count can't fit in . + + + + A pre-created delegate to assign to if needed. + + + + + Dumps the stack trace of the exception and the handler to the console. This is useful + for debugging unit tests that hit a fatal exception + + + + + Checks for the given ; if the is true, + immediately terminates the process without running any pending finally blocks or finalizers + and causes a crash dump to be collected (if the system is configured to do so). + Otherwise, the process continues normally. + + The conditional expression to evaluate. + An optional message to be recorded in the dump in case of failure. Can be null. + + + + Thrown when async code must cancel the current execution but does not have access to the of the passed to the code. + Should be used in very rare cases where the is out of our control (e.g. owned but not exposed by JSON RPC in certain call-back scenarios). + + + + + Set by the host to handle an error report; this may crash the process or report telemetry. + + + + + Same as setting the Handler property except that it avoids the assert. This is useful in + test code which needs to verify the handler is called in specific cases and will continually + overwrite this value. + + + + + Copies the handler in this instance to the linked copy of this type in this other assembly. + + + This file is in linked into multiple layers, but we want to ensure that all layers have the same copy. + This lets us copy the handler in this instance into the same in another instance. + + + + + Use in an exception filter to report an error without catching the exception. + The error is reported by calling . + + to avoid catching the exception. + + + + Use in an exception filter to report an error (by calling ), unless the + operation has been cancelled. The exception is never caught. + + to avoid catching the exception. + + + + Use in an exception filter to report an error (by calling ), unless the + operation has been cancelled at the request of . The exception is + never caught. + + Cancellable operations are only expected to throw if the + applicable indicates cancellation is requested by setting + . Unexpected cancellation, i.e. an + which occurs without + requesting cancellation, is treated as an error by this method. + + This method does not require to match + , provided cancellation is expected per the previous + paragraph. + + A which will have + set if cancellation is expected. + to avoid catching the exception. + + + + The severity of the error, see the enum members for a description of when to use each. This is metadata that's included + in a non-fatal fault report, which we can take advantage of on the backend to automatically triage bugs. For example, + a critical severity issue we can open with a lower bug count compared to a low priority one. + + + + + The severity hasn't been categorized. Don't use this in new code. + + + + + Something failed, but the user is unlikely to notice. Especially useful for background things that we can silently recover + from, like bugs in caching systems. + + + + + Something failed, and the user might notice, but they're still likely able to carry on. For example, if the user + asked for some information from the IDE (find references, completion, etc.) and we were able to give partial results. + + + + + Something failed, and the user likely noticed. For example, the user pressed a button to do an action, and + we threw an exception so we completely failed to do that in an unrecoverable way. This may also be used + for back-end systems where a failure is going to result in a highly broken experience, for example if parsing a file + catastrophically failed. + + + + + A Span-compatible version of . + + + + + Ensures that the remaining stack space is large enough to execute + the average function. + + how many times the calling function has recursed + + The available stack space is insufficient to execute + the average function. + + + + + Represents an optional bool as a single byte. + + + + + Used to devirtualize ConcurrentDictionary for EqualityComparer{T}.Default and ReferenceEquals + + This type is to enable fast-path devirtualization in the Jit. Dictionary{K, V}, HashTable{T} + and ConcurrentDictionary{K, V} will devirtualize (and potentially inline) the IEquatable{T}.Equals + method for a struct when the Comparer is unspecified in .NET Core, .NET 5; whereas specifying + a Comparer will make .Equals and GetHashcode slower interface calls. + + + + + The result of + + + + + This indicates that friend access should be granted. + + + + + This indicates that friend access should be granted for the purposes of error recovery, + but the program is wrong. + + That's because this indicates that a strong-named assembly has referred to a weak-named assembly + which has extended friend access to the strong-named assembly. This will ultimately + result in an error because strong-named assemblies may not refer to weak-named assemblies. + In Roslyn we give a new error, CS7029, before emit time. In the dev10 compiler we error at + emit time. + + + + + This indicates that friend access should not be granted because the other assembly grants + friend access to a strong-named assembly, and either this assembly is weak-named, or + it is strong-named and the names don't match. + + + + + This indicates that friend access should not be granted because the other assembly + does not name this assembly as a friend in any way whatsoever. + + + + + Structure that describes a member of a type. + + + + + Id/token of containing type, usually value from some enum. + For example from SpecialType enum. + I am not using SpecialType as the type for this field because + VB runtime types are not part of SpecialType. + + So, the implication is that any type ids we use outside of the SpecialType + (either for the VB runtime classes, or types like System.Task etc.) will need + to use IDs that are all mutually disjoint. + + + + + Signature of the field or method, similar to metadata signature, + but with the following exceptions: + 1) Truncated on the left, for methods starts at [ParamCount], for fields at [Type] + 2) Type tokens are not compressed + 3) BOOLEAN | CHAR | I1 | U1 | I2 | U2 | I4 | U4 | I8 | U8 | R4 | R8 | I | U | Void types are encoded by + using VALUETYPE+typeId notation. + 4) array bounds are not included. + 5) modifiers are not included. + 6) (CLASS | VALUETYPE) are omitted after GENERICINST + + + + + Applicable only to properties and methods, throws otherwise. + + + + + The type Id may be: + (1) encoded in a single byte (for types below 255) + (2) encoded in two bytes (255 + extension byte) for types below 512 + + + + + Read a type Id from the stream and copy it into the builder. + This may copy one or two bytes depending on the first one. + + + + + Helper class to match signatures in format of + MemberDescriptor.Signature to members. + + + + + Returns true if signature matches signature of the field. + Signature should be in format described in MemberDescriptor. + + + + + Returns true if signature matches signature of the property. + Signature should be in format described in MemberDescriptor. + + + + + Returns true if signature matches signature of the method. + Signature should be in format described in MemberDescriptor. + + + + + Does pretty much the same thing as MetadataDecoder.DecodeType only instead of + producing a type symbol it compares encoded type to the target. + + Signature should be in format described in MemberDescriptor. + + + + + Read a type Id from the signature. + This may consume one or two bytes, and therefore increment the position correspondingly. + + + + + Should return null in case of error. + + + + + Should return null in case of error. + + + + + Should only accept Pointer types. + Should return null in case of error. + + + + + Should return null in case of error. + + + + + Should only accept multi-dimensional arrays. + + + + + Should only accept multi-dimensional arrays. + Should return null in case of error. + + + + If the encoded type is invalid. + An exception from metadata reader. + + + If the encoded type is invalid. + An exception from metadata reader. + + + If the encoded type is invalid. + An exception from metadata reader. + + + An exception from metadata reader. + + + If the encoded type is invalid. + An exception from metadata reader. + + + If the encoded local variable type is invalid. + An exception from metadata reader. + + + If the encoded local variable type is invalid. + An exception from metadata reader. + + + + Used to decode signatures of local constants returned by SymReader. + + + + + Returns the local info for all locals indexed by slot. + + + + If the encoded parameter type is invalid. + + + An exception from metadata reader. + + + + Decodes attribute parameter type from method signature. + + If the encoded parameter type is invalid. + An exception from metadata reader. + + + + Decodes attribute argument type from attribute blob (called FieldOrPropType in the spec). + + If the encoded argument type is invalid. + An exception from metadata reader. + + + If the encoded attribute argument is invalid. + An exception from metadata reader. + + + If the encoded attribute argument is invalid. + An exception from metadata reader. + + + If the encoded attribute argument is invalid. + An exception from metadata reader. + + + If the given is invalid. + An exception from metadata reader. + + + If the encoded named argument is invalid. + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + Find the methods that a given method explicitly overrides. + + + Methods may be on class or interfaces. + Containing classes/interfaces will be supertypes of the implementing type. + + TypeDef handle of the implementing type. + MethodDef handle of the implementing method. + The type symbol for the implementing type. + Array of implemented methods. + + + + Search for the corresponding to the given MethodDef token. Search amongst + the supertypes (classes and interfaces) of a designated type. + + + Generally, the type will be a type that explicitly implements an interface and the method will be the + implemented method (i.e. on the interface). + + TypeDef token of the type from which the search should begin. + MethodDef token of the target method. + Corresponding or null, if none is found. + + + + Enqueue the interfaces implemented and the type extended by a given TypeDef. + + Queue of TypeDefs to search. + Queue of TypeSymbols (representing typeRefs to search). + Handle of the TypeDef for which we want to enqueue supertypes. + An exception from metadata reader. + + + + Helper method for enqueuing a type token in the right queue. + Def -> typeDefsToSearch + Ref -> typeSymbolsToSearch + null -> neither + + + + + Enqueue the interfaces implemented and the type extended by a given TypeDef. + + Queue of TypeDefs to search. + Queue of TypeSymbols (representing typeRefs to search). + Symbol for which we want to enqueue supertypes. + + + + Enqueue the given type as either a def or a ref. + + Queue of TypeDefs to search. + Queue of TypeSymbols (representing typeRefs to search). + Symbol to enqueue. + + + + Search the members of a TypeSymbol to find the one that matches a given MethodDef token. + + Type to search for method. + MethodDef handle of the method to find. + The corresponding MethodSymbol or null. + + + + Search the members of a TypeSymbol to find the one that matches a given FieldDef token. + + Type to search for field. + FieldDef handle of the field to find. + The corresponding FieldSymbol or null. + + + + Given a MemberRef token for a method, we can find a corresponding MethodSymbol by + searching for the name and signature. + + A MemberRef token for a method. + Scope the search to supertypes of the implementing type. + True to only return method symbols, null if the token resolves to a field. + The corresponding MethodSymbol or null. + + + + Given a method symbol, return the MethodDef token, if it is defined in + this module, or a nil token, otherwise. + + The method symbol for which to return a MethodDef token. + A MethodDef token or nil. + + + + Returns a symbol that given token resolves to or null of the token represents an entity that isn't represented by a symbol, + such as vararg MemberRef. + + + + + Given a MemberRef token, return the TypeSymbol for its Class field. + + + + + Checks whether signatures match where the signatures are either from a property + and an accessor or two accessors. When comparing a property or getter to setter, the + setter signature must be the second argument and 'comparingToSetter' must be true. + + + Signature of the property containing the accessor, or the getter (type, then parameters). + + + Signature of the accessor when comparing property and accessor, + or the setter when comparing getter and setter (return type and then parameters). + + + True when comparing a property or getter to a setter, false otherwise. + + + True if differences in IsByRef for parameters should be treated as significant. + + + True if differences in return type (or value parameter for setter) should be treated as significant. + + True if the accessor signature is appropriate for the containing property. + + + + Check whether an event accessor has an appropriate signature. + + Type of the event containing the accessor. + Signature of the accessor (return type and then parameters). + True if the accessor signature is appropriate for the containing event. + + + + Rank equal 0 is used to denote an SzArray, rank equal 1 denotes multi-dimensional array of rank 1. + + + + + Decodes a serialized type name in its canonical form. The canonical name is its full type name, followed + optionally by the assembly where it is defined, its version, culture and public key token. If the assembly + name is omitted, the type name is in the current assembly otherwise it is in the referenced assembly. The + full type name is the fully qualified metadata type name. + + + + + Decodes a type name. A type name is a string which is terminated by the end of the string or one of the + delimiters '+', ',', '[', ']'. '+' separates nested classes. '[' and ']' + enclosed generic type arguments. ',' separates types. + + + + + Decodes a generic name. This is a type name followed optionally by a type parameter count + + + + + Rank equal 0 is used to denote an SzArray, rank equal 1 denotes multi-dimensional array of rank 1. + + + + + An ImmutableArray representing the single string "System" + + + + + Calculates information about types and namespaces immediately contained within a namespace. + + + Is current namespace a global namespace? + + + Length of the fully-qualified name of this namespace. + + + The sequence of groups of TypeDef row ids for types contained within the namespace, + recursively including those from nested namespaces. The row ids must be grouped by the + fully-qualified namespace name in case-sensitive manner. + Key of each IGrouping is a fully-qualified namespace name, which starts with the name of + this namespace. There could be multiple groups for each fully-qualified namespace name. + + The groups must be sorted by the keys in a manner consistent with comparer passed in as + nameComparer. Therefore, all types immediately contained within THIS namespace, if any, + must be in several IGrouping at the very beginning of the sequence. + + + Equality comparer to compare namespace names. + + + Output parameter, never null: + A sequence of groups of TypeDef row ids for types immediately contained within this namespace. + + + Output parameter, never null: + A sequence with information about namespaces immediately contained within this namespace. + For each pair: + Key - contains simple name of a child namespace. + Value - contains a sequence similar to the one passed to this function, but + calculated for the child namespace. + + + + + + Extract a simple name of a top level child namespace from potentially qualified namespace name. + + + Parent namespace name length plus the dot. + + + Fully qualified namespace name. + + + Simple name of a top level child namespace, the left-most name following parent namespace name + in the fully qualified name. + + + + + Determines whether given string can be used as a non-empty metadata identifier (a NUL-terminated UTF-8 string). + + + + + True if the string doesn't contain incomplete surrogates. + + + + + Checks that the specified name is a valid metadata String and a file name. + The specification isn't entirely consistent and complete but it mentions: + + 22.19.2: "Name shall index a non-empty string in the String heap. It shall be in the format {filename}.{extension} (e.g., 'goo.dll', but not 'c:\utils\goo.dll')." + 22.30.2: "The format of Name is {file name}.{file extension} with no path or drive letter; on POSIX-compliant systems Name contains no colon, no forward-slash, no backslash." + As Microsoft specific constraint. + + A reasonable restriction seems to be a valid UTF-8 non-empty string that doesn't contain '\0', '\', '/', ':' characters. + + + + + Determine if the given namespace and type names combine to produce the given fully qualified name. + + The namespace part of the split name. + The type name part of the split name. + The fully qualified name to compare with. + true if the combination of and equals the fully-qualified name given by + + + + Given an input string changes it to be acceptable as a part of a type name. + + + + + Specifies what symbols to import from metadata. + + + + + Only import public and protected symbols. + + + + + Import public, protected and internal symbols. + + + + + Import all symbols. + + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + Helper structure to encapsulate/cache various information about metadata name of a type and + name resolution options. + Also, allows us to stop using strings in the APIs that accept only metadata names, + making usage of them less bug prone. + + + + + Full metadata name of a type, includes namespace name for top level types. + + + + + Namespace name for top level types. + + + + + Name of the type without namespace prefix, but possibly with generic arity mangling present. + + + + + Name of the type without namespace prefix and without generic arity mangling. + + + + + Arity of the type inferred based on the name mangling. It doesn't have to match the actual + arity of the type. + + + + + While resolving the name, consider only types with this arity. + (-1) means allow any arity. + If forcedArity >= 0 and useCLSCompliantNameArityEncoding, lookup may + fail because forcedArity doesn't match the one encoded in the name. + + + + + While resolving the name, consider only types following + CLS-compliant generic type names and arity encoding (ECMA-335, section 10.7.2). + I.e. arity is inferred from the name and matching type must have the same + emitted name and arity. + TODO: PERF: Encode this field elsewhere to save 4 bytes + + + + + Individual parts of qualified namespace name. + + + + + Full metadata name of a type, includes namespace name for top level types. + + + + + Namespace name for top level types, empty string for nested types. + + + + + Name of the type without namespace prefix, but possibly with generic arity mangling present. + + + + + Name of the type without namespace prefix and without generic arity mangling. + + + + + Arity of the type inferred based on the name mangling. It doesn't have to match the actual + arity of the type. + + + + + Does name include arity mangling suffix. + + + + + While resolving the name, consider only types following + CLS-compliant generic type names and arity encoding (ECMA-335, section 10.7.2). + I.e. arity is inferred from the name and matching type must have the same + emitted name and arity. + + + + + While resolving the name, consider only types with this arity. + (-1) means allow any arity. + If ForcedArity >= 0 and UseCLSCompliantNameArityEncoding, lookup may + fail because ForcedArity doesn't match the one encoded in the name. + + + + + Individual parts of qualified namespace name. + + + + + A digest of MetadataTypeName's fully qualified name which can be used as the key in a dictionary + + + + + Returns true if the field should be imported. Visibility + and the value of are considered + + + + + Returns true if the flags represent a field that should be imported. + Visibility and the value of are considered + + + + + Returns true if the method should be imported. Returns false for private methods that are not + explicit interface implementations. For other methods, visibility and the value of + are considered. + + + + + Returns 0 if method name doesn't represent a v-table gap. + Otherwise, returns the gap size. + + + + + All assemblies this assembly references. + + + A concatenation of assemblies referenced by each module in the order they are listed in . + + + + + The number of assemblies referenced by each module in . + + + + + Assembly identity read from Assembly table, or null if the table is empty. + + + + + Using for atomicity. + + + + + We need to store reference to the assembly metadata to keep the metadata alive while + symbols have reference to PEAssembly. + + + + + + + + A set of helpers for extracting elements from metadata. + This type is not responsible for managing the underlying storage + backing the PE image. + + + + + We need to store reference to the module metadata to keep the metadata alive while + symbols have reference to PEModule. + + + + + This is a tuple for optimization purposes. In valid cases, we need to store + only one assembly index per type. However, if we found more than one, we + keep a second one as well to use it for error reporting. + We use -1 in case there was no forward. + + + + + Using as a type for atomicity. + + + + + If bitmap is not null, each bit indicates whether a TypeDef + with corresponding RowId has been checked if it is a NoPia + local type. If the bit is 1, local type will have an entry + in m_lazyTypeDefToTypeIdentifierMap. + + + + + For each TypeDef that has 1 in m_lazyNoPiaLocalTypeCheckBitMap, + this map stores corresponding TypeIdentifier AttributeInfo. + + + + + Target architecture of the machine. + + + + + Indicates that this PE file makes Win32 calls. See CorPEKind.pe32BitRequired for more information (http://msdn.microsoft.com/en-us/library/ms230275.aspx). + + + + An exception from metadata reader. + + + + Returns the names of linked managed modules. + + An exception from metadata reader. + + + + Returns names of referenced modules. + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + The function groups types defined in the module by their fully-qualified namespace name. + The case-sensitivity of the grouping depends upon the provided StringComparer. + + The sequence is sorted by name by using provided comparer. Therefore, if there are multiple + groups for a namespace name (e.g. because they differ in case), the groups are going to be + adjacent to each other. + + Empty string is used as namespace name for types in the Global namespace. Therefore, all types + in the Global namespace, if any, should be in the first group (assuming a reasonable StringComparer). + + Comparer to sort the groups. + + + A sorted list of TypeDef row ids, grouped by fully-qualified namespace name. + An exception from metadata reader. + + + + Groups together the RowIds of types in a given namespaces. The types considered are + those defined in this module. + + An exception from metadata reader. + + + + Supplements the namespace-to-RowIDs map with the namespaces of forwarded types. + These types will not have associated row IDs (represented as null, for efficiency). + These namespaces are important because we want lookups of missing forwarded types + to succeed far enough that we can actually find the type forwarder and provide + information about the target assembly. + + For example, consider the following forwarded type: + + .class extern forwarder Namespace.Type {} + + If this type is referenced in source as "Namespace.Type", then dev10 reports + + error CS1070: The type name 'Namespace.Name' could not be found. This type has been + forwarded to assembly 'pe2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. + Consider adding a reference to that assembly. + + If we did not include "Namespace" as a child of the global namespace of this module + (the forwarding module), then Roslyn would report that the type "Namespace" was not + found and say nothing about "Name" (because of the diagnostic already attached to + the qualifier). + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + Returns a collection of interfaces implemented by given type. + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + Find the MemberNotNull attribute(s) and extract the list of referenced member names + + + + + Find the MemberNotNullWhen attribute(s) and extract the list of referenced member names + + + + + Gets the well-known optional named properties on ObsoleteAttribute, if present. + Both 'diagnosticId' and 'urlFormat' may be present, or only one, or neither. + + + Failure to find any of these properties does not imply failure to decode the ObsoleteAttribute, + so we don't return a value indicating success or failure. + + + + An exception from metadata reader. + + + + Determine if custom attribute application is + NoPia TypeIdentifier. + + + An index of the target constructor signature in + signaturesOfTypeIdentifierAttribute array, -1 if + this is not NoPia TypeIdentifier. + + + + + Determines if a custom attribute matches a namespace and name. + + Handle of the custom attribute. + The custom attribute's namespace in metadata format (case sensitive) + The custom attribute's type name in metadata format (case sensitive) + Constructor of the custom attribute. + Should case be ignored for name comparison? + true if match is found + + + + Determines if a custom attribute matches a namespace and name. + + The metadata reader. + Handle of the custom attribute. + The custom attribute's namespace in metadata format (case sensitive) + The custom attribute's type name in metadata format (case sensitive) + Constructor of the custom attribute. + Should case be ignored for name comparison? + true if match is found + + + + Returns MetadataToken for assembly ref matching name + + The assembly name in metadata format (case sensitive) + Matching assembly ref token or nil (0) + + + + Returns MetadataToken for type ref matching resolution scope and name + + The resolution scope token + The namespace name in metadata format (case sensitive) + The type name in metadata format (case sensitive) + Matching type ref token or nil (0) + + + An exception from metadata reader. + + + + Determine if custom attribute matches the target attribute. + + + Handle of the custom attribute. + + The attribute to match. + + An index of the target constructor signature in + signatures array, -1 if + this is not the target attribute. + + + + + Determine if custom attribute matches the target attribute. + + + The metadata reader. + + + Handle of the custom attribute. + + The attribute to match. + + An index of the target constructor signature in + signatures array, -1 if + this is not the target attribute. + + + + + Given a token for a constructor, return the token for the constructor's type and the blob containing the + constructor's signature. + + True if the function successfully returns the type and signature. + + + + Given a token for a constructor, return the token for the constructor's type and the blob containing the + constructor's signature. + + True if the function successfully returns the type and signature. + + + + Given a token for a type, return the type's name and namespace. Only works for top level types. + namespaceHandle will be NamespaceDefinitionHandle for defs and StringHandle for refs. + + True if the function successfully returns the name and namespace. + + + + Given a token for a type, return the type's name and namespace. Only works for top level types. + namespaceHandle will be NamespaceDefinitionHandle for defs and StringHandle for refs. + + True if the function successfully returns the name and namespace. + + + + For testing purposes only!!! + + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + An exception from metadata reader. + + + + Returns true if method IL can be retrieved from the module. + + + + + Returns true if the full image of the module is available. + + + + Invalid metadata. + + + + Produce unbound generic type symbol if the type is a generic type. + + + + + Produce constructed type symbol. + + + + Symbol for generic type. + + + Generic type arguments, including those for containing types. + + + Flags for arguments. Each item indicates whether corresponding argument refers to NoPia local types. + + + + + Extracts information from TypeDef flags. + Returns 0 if the value is invalid. + + + + + Lookup a type defined in this module. + + + + + Lookup a type defined in referenced assembly. + + + + + Given the identity of an assembly referenced by this module, finds + the index of that assembly in the list of assemblies referenced by + the current module. + + + + + Represents an identity of an assembly as defined by CLI metadata specification. + + + May represent assembly definition or assembly reference identity. + + + Represents an identity of an assembly as defined by CLI metadata specification. + + + May represent assembly definition or assembly reference identity. + + + + + Constructs an from its constituent parts. + + The simple name of the assembly. + The version of the assembly. + + The name of the culture to associate with the assembly. + Specify null, , or "neutral" (any casing) to represent . + The name can be an arbitrary string that doesn't contain NUL character, the legality of the culture name is not validated. + + The public key or public key token of the assembly. + Indicates whether represents a public key. + Indicates whether the assembly is retargetable. + Specifies the binding model for how this object will be treated in comparisons. + If is null, empty or contains a NUL character. + If contains a NUL character. + is not a value of the enumeration. + contains values that are not greater than or equal to zero and less than or equal to ushort.MaxValue. + is true and is not set. + is false and + contains a value that is not the size of a public key token, 8 bytes. + + + + The simple name of the assembly. + + + + + The version of the assembly. + + + + + The culture name of the assembly, or empty if the culture is neutral. + + + + + The AssemblyNameFlags. + + + + + Specifies assembly binding model for the assembly definition or reference; + that is how assembly references are matched to assembly definitions. + + + + + True if the assembly identity includes full public key. + + + + + Full public key or empty. + + + + + Low 8 bytes of SHA1 hash of the public key, or empty. + + + + + True if the assembly identity has a strong name, ie. either a full public key or a token. + + + + + Gets the value which specifies if the assembly is retargetable. + + + + + Determines whether two instances are equal. + + The operand appearing on the left side of the operator. + The operand appearing on the right side of the operator. + + + + Determines whether two instances are not equal. + + The operand appearing on the left side of the operator. + The operand appearing on the right side of the operator. + + + + Determines whether the specified instance is equal to the current instance. + + The object to be compared with the current instance. + + + + Determines whether the specified instance is equal to the current instance. + + The object to be compared with the current instance. + + + + Returns the hash code for the current instance. + + + + + + Returns true (false) if specified assembly identities are (not) equal + regardless of unification, retargeting or other assembly binding policies. + Returns null if these policies must be consulted to determine name equivalence. + + + + + Retrieves assembly definition identity from given runtime assembly. + + The runtime assembly. + Assembly definition identity. + is null. + + + + Returns the display name of the assembly identity. + + True if the full public key should be included in the name. Otherwise public key token is used. + The display name. + + Characters ',', '=', '"', '\'', '\' occurring in the simple name are escaped by backslash in the display name. + Any character '\t' is replaced by two characters '\' and 't', + Any character '\n' is replaced by two characters '\' and 'n', + Any character '\r' is replaced by two characters '\' and 'r', + The assembly name in the display name is enclosed in double quotes if it starts or ends with + a whitespace character (' ', '\t', '\r', '\n'). + + + + + Returns the display name of the current instance. + + + + + Parses display name filling defaults for any basic properties that are missing. + + Display name. + A full assembly identity. + + Parts of the assembly identity that were specified in the display name, + or 0 if the parsing failed. + + True if display name parsed correctly. + + The simple name has to be non-empty. + A partially specified version might be missing build and/or revision number. The default value for these is 65535. + The default culture is neutral ( is . + If neither public key nor token is specified the identity is considered weak. + + is null. + + + + Compares assembly identities. + Derived types may implement platform specific unification and portability policies. + + + + + A set of possible outcomes of comparison. + + + + + Reference doesn't match definition. + + + + + Strongly named reference matches strongly named definition (strong identity is identity with public key or token), + Or weak reference matches weak definition. + + + + + Reference matches definition except for version (reference version is lower or higher than definition version). + + + + + Compares assembly reference name (possibly partial) with definition identity. + + Partial or full assembly display name. + Full assembly display name. + True if the reference name matches the definition identity. + + + + Compares assembly reference identity with definition identity. + + Reference assembly identity. + Full assembly display name. + True if the reference identity matches the definition identity. + + + + Compares reference assembly identity with definition identity and returns their relationship. + + Reference identity. + Definition identity. + + + + Implements a map from an assembly identity to a value. The map allows to look up the value by an identity + that either exactly matches the original identity key, or corresponds to a key with the lowest version among identities + with higher version than the requested identity key. + + + + + Represents an immutable snapshot of assembly CLI metadata. + + + + + Factory that provides the for additional modules (other than ) of the assembly. + Shall only throw or . + Null of all modules were specified at construction time. + + + + + Modules the was created with, in case they are eagerly allocated. + + + + + Cached assembly symbols. + + + Guarded by . + + + + + Creates a single-module assembly. + + + Manifest module image. + + is null. + + + + Creates a single-module assembly. + + + Manifest module image. + + is null. + The PE image format is invalid. + + + + Creates a single-module assembly. + + Manifest module PE image stream. + False to close the stream upon disposal of the metadata. + The PE image format is invalid. + + + + Creates a single-module assembly. + + Manifest module PE image stream. + False to close the stream upon disposal of the metadata. + The PE image format is invalid. + + + + Finds all modules of an assembly on a specified path and builds an instance of that represents them. + + The full path to the assembly on disk. + is null. + is invalid. + Error reading file . See for details. + Reading from a file path is not supported by the platform. + + + + Creates a single-module assembly. + + + Manifest module. + + This object disposes it when it is itself disposed. + + + + Creates a multi-module assembly. + + + Modules comprising the assembly. The first module is the manifest module of the assembly. + This object disposes the elements of it when it is itself . + is default value. + contains null elements. + is empty or contains a module that doesn't own its image (was created via ). + + + + Creates a multi-module assembly. + + + Modules comprising the assembly. The first module is the manifest module of the assembly. + This object disposes the elements of it when it is itself . + is default value. + contains null elements. + is empty or contains a module that doesn't own its image (was created via ). + + + + Creates a multi-module assembly. + + Modules comprising the assembly. The first module is the manifest module of the assembly. + This object disposes the elements of it when it is itself . + is default value. + contains null elements. + is empty or contains a module that doesn't own its image (was created via ). + + + + Creates a shallow copy of contained modules and wraps them into a new instance of . + + + The resulting copy shares the metadata images and metadata information read from them with the original. + It doesn't own the underlying metadata images and is not responsible for its disposal. + + This is used, for example, when a metadata cache needs to return the cached metadata to its users + while keeping the ownership of the cached metadata object. + + + + + Modules comprising this assembly. The first module is the manifest module. + + The PE image format is invalid. + IO error reading the metadata. See for details. + The object has been disposed. + + + The PE image format is invalid. + IO error while reading the metadata. See for details. + The object has been disposed. + + + The PE image format is invalid. + IO error while reading the metadata. See for details. + The object has been disposed. + + + + Disposes all modules contained in the assembly. + + + + + Checks if the first module has a single row in Assembly table and that all other modules have none. + + The PE image format is invalid. + IO error reading the metadata. See for details. + The object has been disposed. + + + + Returns the metadata kind. + + + + + Creates a reference to the assembly metadata. + + Provider of XML documentation comments for the metadata symbols contained in the module. + Aliases that can be used to refer to the assembly from source code (see "extern alias" directive in C#). + True to embed interop types from the referenced assembly to the referencing compilation. Must be false for a module. + Path describing the location of the metadata, or null if the metadata have no location. + Display string used in error messages to identity the reference. + A reference to the assembly metadata. + + + + Reference to another C# or VB compilation. + + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified interop types embedding. + + The new value for . + Interop types can't be embedded from modules. + + + + Returns an instance of the reference with specified properties, or this instance if properties haven't changed. + + The new properties for the reference. + Specified values not valid for this reference. + + + + An Id that can be used to identify a metadata instance. If two metadata instances + have the same id then they are guaranteed to have the same content. If two metadata + instances have different ids, then the contents may or may not be the same. As such, + the id is useful as a key in a cache when a client wants to share data for a metadata + reference as long as it has not changed. + + + + + Represents immutable assembly or module CLI metadata. + + + + + The id for this metadata instance. If two metadata instances have the same id, then + they have the same content. If they have different ids they may or may not have the + same content. + + + + + Retrieves the for this instance. + + + + + Releases any resources associated with this instance. + + + + + Creates a copy of this object. + + + + + The kind of metadata a PE file image contains. + + + + + The PE file is an assembly. + + + + + The PE file is a module. + + + + + Represents an in-memory Portable-Executable image. + + + + + Represents metadata image reference. + + + Represents a logical location of the image, not the content of the image. + The content might change in time. A snapshot is taken when the compiler queries the reference for its metadata. + + + + + Path or name used in error messages to identity the reference. + + + + + Returns true if this reference is an unresolved reference. + + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified interop types embedding. + + The new value for . + Interop types can't be embedded from modules. + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified properties, or this instance if properties haven't changed. + + The new properties for the reference. + Specified values not valid for this reference. + + + + Creates a reference to a single-module assembly or a standalone module stored in memory. + + Assembly image. + Reference properties (extern aliases, type embedding, ). + Provides XML documentation for symbol found in the reference. + Optional path that describes the location of the metadata. The file doesn't need to exist on disk. The path is opaque to the compiler. + + Performance considerations: + + It is recommended to use or + API when creating multiple references to the same metadata. + Reusing object to create multiple references allows for sharing data across these references. + + + The method pins in managed heap. The pinned memory is released + when the resulting reference becomes unreachable and GC collects it. To control the lifetime of the pinned memory + deterministically use + to create an metadata object and + to get a reference to it. + + + The method creates a reference to a single-module assembly. To create a reference to a multi-module assembly or a stand-alone module use + and . + + + is null. + + + + Creates a reference to a single-module assembly or a standalone module stored in memory. + + Assembly image. + Reference properties (extern aliases, type embedding, ). + Provides XML documentation for symbol found in the reference. + Optional path that describes the location of the metadata. The file doesn't need to exist on disk. The path is opaque to the compiler. + + Performance considerations: + + It is recommended to use or + API when creating multiple references to the same metadata. + Reusing object to create multiple references allows for sharing data across these references. + + + The method makes a copy of the data and pins it. To avoid making a copy use an overload that takes an . + The pinned memory is released when the resulting reference becomes unreachable and GC collects it. To control the lifetime of the pinned memory + deterministically use + to create an metadata object and + to get a reference to it. + + + is null. + + + + Creates a reference to a single-module assembly or a stand-alone module from data in specified stream. + Reads the content of the stream into memory and closes the stream upon return. + + Assembly image. + Reference properties (extern aliases, type embedding, ). + Provides XML documentation for symbol found in the reference. + Optional path that describes the location of the metadata. The file doesn't need to exist on disk. The path is opaque to the compiler. + doesn't support read and seek operations. + is null. + An error occurred while reading the stream. + + Performance considerations: + + It is recommended to use or + API when creating multiple references to the same metadata. + Reusing object to create multiple references allows for sharing data across these references. + + + The method eagerly reads the entire content of into native heap. The native memory block is released + when the resulting reference becomes unreachable and GC collects it. To decrease memory footprint of the reference and/or manage + the lifetime deterministically use + to create an metadata object and + + to get a reference to it. + + + + + + Creates a reference to an assembly or standalone module stored in a file. + Reads the content of the file into memory. + + Path to the assembly file. + Reference properties (extern aliases, type embedding, ). + Provides XML documentation for symbol found in the reference. + is null. + is invalid. + An error occurred while reading the file. + + Performance considerations: + + It is recommended to use or + API when creating multiple references to the same file. + Reusing object allows for sharing data across these references. + + + The method eagerly reads the entire content of the file into native heap. The native memory block is released + when the resulting reference becomes unreachable and GC collects it. To decrease memory footprint of the reference and/or manage + the lifetime deterministically use + to create an metadata object and + + to get a reference to it. + + + + + + Creates a reference to a loaded assembly. + + Path to the module file. + is null. + is dynamic, doesn't have a location, or the platform doesn't support reading from the location. + + Performance considerations: + + It is recommended to use API when creating multiple references to the same assembly. + Reusing object allows for sharing data across these references. + + + + + + Creates a reference to a loaded assembly. + + Path to the module file. + Reference properties (extern aliases, type embedding). + Provides XML documentation for symbol found in the reference. + is null. + . is not . + is dynamic, doesn't have a location, or the platform doesn't support reading from the location. + + Performance considerations: + + It is recommended to use API when creating multiple references to the same assembly. + Reusing object allows for sharing data across these references. + + + + + + Information about a metadata reference. + + + + + Default properties for a module reference. + + + + + Default properties for an assembly reference. + + + + + Initializes reference properties. + + The image kind - assembly or module. + Assembly aliases. Can't be set for a module. + True to embed interop types from the referenced assembly to the referencing compilation. Must be false for a module. + + + + Returns with specified aliases. + + + is , as modules can't be aliased. + + + + + Returns with specified aliases. + + + is , as modules can't be aliased. + + + + + Returns with set to specified value. + + is , as interop types can't be embedded from modules. + + + + Returns with set to specified value. + + + + + The image kind (assembly or module) the reference refers to. + + + + + Alias that represents a global declaration space. + + + Namespaces in references whose contain are available in global declaration space. + + + + + Aliases for the metadata reference. Empty if the reference has no aliases. + + + In C# these aliases can be used in "extern alias" syntax to disambiguate type names. + + + + + True if interop types defined in the referenced metadata should be embedded into the compilation referencing the metadata. + + + + + True to apply recursively on the target assembly and on all its transitive dependencies. + False to apply only on the target assembly. + + + + + Resolves references to metadata specified in the source (#r directives). + + + + + True to instruct the compiler to invoke for each assembly reference that + doesn't match any of the assemblies explicitly referenced by the (via , or #r directives. + + + + + Resolves a missing assembly reference. + + The metadata definition (assembly or module) that declares assembly reference in its list of dependencies. + Identity of the assembly reference that couldn't be resolved against metadata references explicitly specified to in the compilation. + Resolved reference or null if the identity can't be resolved. + + + + Represents an immutable snapshot of module CLI metadata. + + This object may allocate significant resources or lock files depending upon how it is constructed. + + + + Optional action to invoke when this metadata is disposed. + + + + + Create metadata module from a raw memory pointer to metadata directory of a PE image or .cormeta section of an object file. + Only manifest modules are currently supported. + + Pointer to the start of metadata block. + The size of the metadata block. + is null. + is not positive. + + + + Create metadata module from a raw memory pointer to metadata directory of a PE image or .cormeta section of an object file. + Only manifest modules are currently supported. + + Pointer to the start of metadata block. + The size of the metadata block. + Action to run when the metadata module is disposed. This will only be called then + this actual metadata instance is disposed. Any instances created from this using will not call this when they are disposed. + is null. + + + + Create metadata module from a raw memory pointer to a PE image or an object file. + + Pointer to the DOS header ("MZ") of a portable executable image. + The size of the image pointed to by . + is null. + is not positive. + + + + Create metadata module from a sequence of bytes. + + The portable executable image beginning with the DOS header ("MZ"). + is null. + + + + Create metadata module from a byte array. + + Portable executable image beginning with the DOS header ("MZ"). + is null. + + + + Create metadata module from a stream. + + Stream containing portable executable image. Position zero should contain the first byte of the DOS header ("MZ"). + + False to close the stream upon disposal of the metadata (the responsibility for disposal of the stream is transferred upon entry of the constructor + unless the arguments given are invalid). + + is null. + The stream doesn't support seek operations. + + + + Create metadata module from a stream. + + Stream containing portable executable image. Position zero should contain the first byte of the DOS header ("MZ"). + + Options specifying how sections of the PE image are read from the stream. + Unless is specified, the responsibility for disposal of the stream is transferred upon entry of the constructor + unless the arguments given are invalid. + + is null. + The stream doesn't support read and seek operations. + has an invalid value. + + or is specified and the PE headers of the image are invalid. + + + or is specified and an error occurs while reading the stream. + + + + + Creates metadata module from a file containing a portable executable image. + + File path. + + The file might remain mapped (and read-locked) until this object is disposed. + The memory map is only created for large files. Small files are read into memory. + + is null. + is invalid. + Error opening file . See for details. + File not found. + Reading from a file path is not supported by the platform. + + + + Creates a shallow copy of this object. + + + The resulting copy shares the metadata image and metadata information read from it with the original. + It doesn't own the underlying metadata image and is not responsible for its disposal. + + This is used, for example, when a metadata cache needs to return the cached metadata to its users + while keeping the ownership of the cached metadata object. + + + + + Frees memory and handles allocated for the module. + + + + + True if the module has been disposed. + + + + + Name of the module. + + Invalid metadata. + Module has been disposed. + + + + Version of the module content. + + Invalid metadata. + Module has been disposed. + + + + Returns the for this instance. + + + + + Returns the file names of linked managed modules. + + When an invalid module name is encountered. + Module has been disposed. + + + + Returns the metadata reader. + + Module has been disposed. + When an invalid module name is encountered. + + + + Creates a reference to the module metadata. + + Provider of XML documentation comments for the metadata symbols contained in the module. + Path describing the location of the metadata, or null if the metadata have no location. + Display string used in error messages to identity the reference. + A reference to the module metadata. + + + + Reference to metadata stored in the standard ECMA-335 metadata format. + + + + + Display string used in error messages to identity the reference. + + + + + Path describing the location of the metadata, or null if the metadata have no location. + + + + + XML documentation comments provider for the reference. + + + + + Create documentation provider for the reference. + + + Called when the compiler needs to read the documentation for the reference. + This method can be called multiple times from different threads. The result of one of the calls + is cached on the reference object. + + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified aliases. + + The new aliases for the reference. + Alias is invalid for the metadata kind. + + + + Returns an instance of the reference with specified interop types embedding. + + The new value for . + Interop types can't be embedded from modules. + + + + Returns an instance of the reference with specified properties, or this instance if properties haven't changed. + + The new properties for the reference. + Specified values not valid for this reference. + + + + Returns an instance of the reference with specified properties. + + The new properties for the reference. + Specified values not supported. + Only invoked if the properties changed. + + + + Get metadata representation for the PE file. + + If the PE image format is invalid. + The metadata image content can't be read. + The metadata image is stored in a file that can't be found. + + Called when the needs to read the reference metadata. + + The listed exceptions are caught and converted to compilation diagnostics. + Any other exception is considered an unexpected error in the implementation and is not caught. + + objects may cache information decoded from the PE image. + Reusing instances across metadata references will result in better performance. + + The calling doesn't take ownership of the objects returned by this method. + The implementation needs to retrieve the object from a provider that manages their lifetime (such as metadata cache). + The object is kept alive by the that called + and by all compilations created from it via calls to With- factory methods on , + other than overloads. A compilation created using + will call to again. + + + + + Returns a copy of the object this + contains. This copy does not need to be d. + + If the PE image format is invalid. + The metadata image content can't be read. + The metadata image is stored in a file that can't be found. + + + + Returns the for this reference's . + This will be equivalent to calling ., + but can be done more efficiently. + + If the PE image format is invalid. + The metadata image content can't be read. + The metadata image is stored in a file that can't be found. + + + + Represents the value of #r reference along with its source location. + + + + + Represents a metadata reference that can't be or is not yet resolved. + + + For error reporting only, can't be used to reference a metadata file. + + + + + Root type for representing the abstract semantics of C# and VB statements and expressions. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + IOperation that has this operation as a child. Null for the root. + + + + + Identifies the kind of the operation. + + + + + Syntax that was analyzed to produce the operation. + + + + + Result type of the operation, or null if the operation does not produce a result. + + + + + If the operation is an expression that evaluates to a constant value, is true and is the value of the expression. Otherwise, is false. + + + + + An array of child operations for this operation. Deprecated: please use . + + + + + An enumerable of child operations for this operation. + + + + + The source language of the IOperation. Possible values are and . + + + + + Set to True if compiler generated /implicitly computed by compiler code + + + + + Optional semantic model that was used to generate this operation. + Non-null for operations generated from source with API + and operation callbacks made to analyzers. + Null for operations inside a . + + + + + Implements a struct-based collection of nodes. This collection is ordered, but + random access into the collection is not provided. + + + + + Implements a struct-based enumerator for nodes. This type is not hardened + to default(Enumerator), and will null reference in these cases. Calling after + has returned false will throw an . + + + + + Implementation of the and + members are delegated to the virtual and + methods, respectively. + + + + + + + + + + Implements a reverse-order struct-based collection of nodes. + This collection is ordered, but random access into the collection is not provided. + + + + + Implements a reverse-order struct-based enumerator for nodes. This type is not hardened + to default(Enumerator), and will null reference in these cases. Calling after + has returned false will throw an . + + + + + Root type for representing the abstract semantics of C# and VB statements and expressions. + + + + + IOperation that has this operation as a child + + + + + Set to True if compiler generated /implicitly computed by compiler code + + + + + Identifies the kind of the operation. + + + + + Syntax that was analyzed to produce the operation. + + + + + Result type of the operation, or null if the operation does not produce a result. + + + + + The source language of the IOperation. Possible values are and . + + + + + If the operation is an expression that evaluates to a constant value, is true and is the value of the expression. Otherwise, is false. + + + + + + + + A slot of -1 means start at the beginning. + + + + + A slot of int.MaxValue means start from the end. + + + + + Gets the owning semantic model for this operation node. + Note that this may be different than , which + is the semantic model on which was invoked + to create this node. + + + + + Populates a empty dictionary of SyntaxNode->IOperation, where every key corresponds to an explicit IOperation node. + If there is a SyntaxNode with more than one explicit IOperation, this will throw. + + + + + Combines a value, , and a flag, , + indicating whether or not that value is meaningful. + + The type of the value. + + + + Constructs an with a meaningful value. + + + + + + Returns if the will return a meaningful value. + + + + + + Gets the value of the current object. Not meaningful unless returns . + + + Unlike , this property does not throw an exception when + is . + + + The value if is ; otherwise, the default value for type + . + + + + + Creates a new object initialized to a meaningful value. + + + + + + Returns a string representation of this object. + + + + + Specifies output assembly kinds generated by compiler. + + + + + An .exe with an entry point and a console. + + + + + An .exe with an entry point but no console. + + + + + A .dll file. + + + + + A .netmodule file. + + + + + A .winmdobj file. + + + + + An .exe that can run in an app container. + + Equivalent to a WindowsApplication, but with an extra bit set in the Portable Executable file + so that the application can only be run in an app container. + Also known as a "Windows Store app". + + + + + + A set of utilities for converting from a decimal floating-point literal string to its IEEE float + or double representation, which considers all digits significant and correctly rounds according to + the IEEE round-to-nearest-ties-to-even mode. This code does not support a leading sign character, + as that is not part of the C# or VB floating-point literal lexical syntax. + + If you change this code, please run the set of long-running random tests in the solution + RandomRealParserTests.sln. That solution is not included in Roslyn.sln as it is Windows-specific. + + + + + Try parsing a correctly-formatted double floating-point literal into the nearest representable double + using IEEE round-to-nearest-ties-to-even rounding mode. Behavior is not defined for inputs that are + not valid C# floating-point literals. + + The decimal floating-point constant's string + The nearest double value, if conversion succeeds + True if the input was converted; false if there was an overflow + + + + Try parsing a correctly-formatted float floating-point literal into the nearest representable float + using IEEE round-to-nearest-ties-to-even rounding mode. Behavior is not defined for inputs that are + not valid C# floating-point literals. + + The float floating-point constant's string + The nearest float value, if conversion succeeds + True if the input was converted; false if there was an overflow + + + + Properties of an IEEE floating-point representation. + + + + + Converts the floating point value 0.mantissa * 2^exponent into the + correct form for the FloatingPointType and stores the bits of the resulting value + into the result object. + The caller must ensure that the mantissa and exponent are correctly computed + such that either [1] the most significant bit of the mantissa is in the + correct position for the FloatingType, or [2] the exponent has been correctly + adjusted to account for the shift of the mantissa that will be required. + + This function correctly handles range errors and stores a zero or infinity in + the result object on underflow and overflow errors, respectively. This + function correctly forms denormal numbers when required. + + If the provided mantissa has more bits of precision than can be stored in the + result object, the mantissa is rounded to the available precision. Thus, if + possible, the caller should provide a mantissa with at least one more bit of + precision than is required, to ensure that the mantissa is correctly rounded. + (The caller should not round the mantissa before calling this function.) + + The bits of the mantissa + The exponent + Whether there are any nonzero bits past the supplied mantissa + Where the bits of the floating-point number are stored + A status indicating whether the conversion succeeded and why + + + + Properties of a C# float. + + + + + Properties of a C# double. + + + + + This type is used to hold a partially-parsed string representation of a + floating point number. The number is stored in the following form: +
+                0.Mantissa * 10^Exponent
+             
+ The Mantissa buffer stores the mantissa digits as characters in a string. + The MantissaCount gives the number of digits present in the Mantissa buffer. + There shall be neither leading nor trailing zero digits in the Mantissa. + Note that this represents only nonnegative floating-point literals; the + negative sign in C# and VB is actually a separate unary negation operator. +
+
+ + + Create a DecimalFloatingPointString from a string representing a floating-point literal. + + The text of the floating-point literal + + + + Convert a DecimalFloatingPointString to the bits of the given floating-point type. + + + + + This function is part of the fast track for integer floating point strings. + It takes an integer stored as an array of bytes (lsb first) and converts the value into its FloatingType + representation, storing the bits into "result". If the value is not + representable, +/-infinity is stored and overflow is reported (since this + function only deals with integers, underflow is impossible). + + the bits of the integer, least significant bits first + the number of bits of precision in integerValueAsBytes + whether there are nonzero digits after the decimal + the kind of real number to build + the result + An indicator of the kind of result + + + + Parse a sequence of digits into a BigInteger. + + The DecimalFloatingPointString containing the digits in its Mantissa + The index of the first digit to convert + The index just past the last digit to convert + The BigInteger result + + + + Return the number of significant bits set. + + + + + Return the number of significant bits set. + + + + + Return the number of significant bits set. + + + + + Return the number of significant bits set. + + + + + Computes value / 2^shift, then rounds the result according to the current + rounding mode. By the time we call this function, we will already have + discarded most digits. The caller must pass true for has_zero_tail if + all discarded bits were zeroes. + + The value to shift + The amount of shift + Whether there are any less significant nonzero bits in the value + + + + + Determines whether a mantissa should be rounded up in the + round-to-nearest-ties-to-even mode given [1] the value of the least + significant bit of the mantissa, [2] the value of the next bit after + the least significant bit (the "round" bit) and [3] whether any + trailing bits after the round bit are set. + + The mantissa is treated as an unsigned integer magnitude. + + For this function, "round up" is defined as "increase the magnitude" of the + mantissa. + + the least-significant bit of the representable value + the bit following the least-significant bit + true if there are any (less significant) bits set following roundBit + + + + + Multiply a BigInteger by the given power of two. + + The BigInteger to multiply by a power of two and replace with the product + The power of two to multiply it by + + + + Multiply a BigInteger by the given power of ten. + + The BigInteger to multiply by a power of ten and replace with the product + The power of ten to multiply it by + + + + Convert a float value to the bits of its representation + + + + + Convert the bits of its representation to a float + + + + + A union used to convert between a float and the bits of its representation + + + + + The base class for language specific assembly managers. + + Language specific representation for a compilation + Language specific representation for an assembly symbol. + + + + Information about an assembly, used as an input for the Binder class. + + + + + Identity of the assembly. + + + + + Identity of assemblies referenced by this assembly. + References should always be returned in the same order. + + + + + The sequence of AssemblySymbols the Binder can choose from. + + + + + Check if provided AssemblySymbol is created for assembly described by this instance. + This method is expected to return true for every AssemblySymbol returned by + AvailableSymbols property. + + + The AssemblySymbol to check. + + Boolean. + + + + Resolve assembly references against assemblies described by provided AssemblyData objects. + In other words, match assembly identities returned by AssemblyReferences property against + assemblies described by provided AssemblyData objects. + + An array of AssemblyData objects to match against. + Used to compare assembly identities. + + For each assembly referenced by this assembly () + a description of how it binds to one of the input assemblies. + + + + + Get the source compilation backing this assembly, if one exists. + Returns null otherwise. + + + + + Result of binding an AssemblyRef to an AssemblyDef. + + + + + Failed binding. + + + + + Successful binding. + + + + + Returns true if the reference was matched with the identity of the assembly being built. + + + + + True if the definition index is available (reference was successfully matched with the definition). + + + + + 0 if the reference is equivalent to the definition. + -1 if version of the matched definition is lower than version of the reference, but the reference otherwise matches the definition. + +1 if version of the matched definition is higher than version of the reference, but the reference otherwise matches the definition. + + Undefined unless is true. + + + + + Index into assembly definition list. + Undefined unless is true. + + + + + Private helper class to capture information about AssemblySymbol instance we + should check for suitability. Used by the Bind method. + + + + + An index of the AssemblyData object in the input array. AssemblySymbol instance should + be checked for suitability against assembly described by that object, taking into account + assemblies described by other AssemblyData objects in the input array. + + + + + AssemblySymbol instance to check for suitability. + + + + + Convenience constructor to initialize fields of this structure. + + + + + Result of binding an input assembly and its references. + + + + + Suitable AssemblySymbol instance for the corresponding assembly, + null reference if none is available/found. + + + + + For each AssemblyRef of this AssemblyDef specifies which AssemblyDef matches the reference. + + + Result of resolving assembly references of the corresponding assembly + against provided set of assemblies. Essentially, this is an array returned by + AssemblyData.BindAssemblyReferences method. + + Each element describes the assembly the corresponding reference of the input assembly + is bound to. + + + + + For the given set of AssemblyData objects, do the following: + 1) Resolve references from each assembly against other assemblies in the set. + 2) Choose suitable AssemblySymbol instance for each AssemblyData object. + + The first element (index==0) of the assemblies array represents the assembly being built. + One can think about the rest of the items in assemblies array as assembly references given to the compiler to + build executable for the assembly being built. + + + An array of objects describing assemblies, for which this method should + resolve references and find suitable AssemblySymbols. The first slot contains the assembly being built. + + + An array of objects describing standalone modules referenced by the compilation. + + + An array of references passed to the compilation and resolved from #r directives. + May contain references that were skipped during resolution (they don't have a corresponding explicit assembly). + + + Maps index to to an index of a resolved assembly or module in or modules. + + + Reference resolver used to look up missing assemblies. + + + Hide lower versions of dependencies that have multiple versions behind an alias. + + + Used to filter out assemblies that have the same strong or weak identity. + Maps simple name to a list of identities. The highest version of each name is the first. + + + Import options applied to implicitly resolved references. + + + Updated array with resolved implicitly referenced assemblies appended. + + + Implicitly resolved references. + + + Maps indices of implicitly resolved references to the corresponding indices of resolved assemblies in (explicit + implicit). + + + Map of implicit reference resolutions performed in the preceding script compilation. + Output contains additional implicit resolutions performed during binding of this script compilation references. + + + Any diagnostics reported while resolving missing assemblies. + + + True if the assembly being compiled is indirectly referenced through some of its own references. + + + The definition index of the COR library. + + + An array of structures describing the result. It has the same amount of items as + the input assemblies array, for each input AssemblyData object resides + at the same position. + + Each contains the following data: + + - Suitable AssemblySymbol instance for the corresponding assembly, + null reference if none is available/found. Always null for the first element, which corresponds to the assembly being built. + + - Result of resolving assembly references of the corresponding assembly + against provided set of assembly definitions. Essentially, this is an array returned by + method. + + + + + Resolve using a given . + + We make sure not to query the resolver for the same identity multiple times (across submissions). + Doing so ensures that we don't create multiple assembly symbols within the same chain of script compilations + for the same implicitly resolved identity. Failure to do so results in cast errors like "can't convert T to T". + + The method only records successful resolution results by updating . + Failures are only recorded after all resolution attempts have been completed. + + This approach addresses the following scenario. Consider a script: + + #r "dir1\a.dll" + #r "dir2\b.dll" + + where both a.dll and b.dll reference x.dll, which is present only in dir2. Let's assume the resolver first + attempts to resolve "x" referenced from "dir1\a.dll". The resolver may fail to find the dependency if it only + looks up the directory containing the referencing assembly (dir1). If we recorded and this failure immediately + we would not call the resolver to resolve "x" within the context of "dir2\b.dll" (or any other referencing assembly). + + This behavior would ensure consistency and if the types from x.dll do leak thru to the script compilation, but it + would result in a missing assembly error. By recording the failure after all resolution attempts are complete + we also achieve a consistent behavior but are able to bind the reference to "x.dll". Besides, this approach + also avoids dependency on the order in which we evaluate the assembly references in the scenario above. + In general, the result of the resolution may still depend on the order of #r - if there are different assemblies + of the same identity in different directories. + + + + + Determines if it is possible that gives internals + access to assembly . It does not make a conclusive + determination of visibility because the compilation's strong name key is not supplied. + + + + + Compute AssemblySymbols referenced by the input AssemblySymbol and fill in with the result. + The AssemblySymbols must correspond + to the AssemblyNames returned by AssemblyData.AssemblyReferences property. If reference is not + resolved, null reference should be returned in the corresponding item. + + The target AssemblySymbol instance. + A list which will be filled in with + AssemblySymbols referenced by the input AssemblySymbol. The caller is expected to clear + the list before calling this method. + Implementer may not cache the list; the caller may mutate it. + + + + Return collection of assemblies involved in canonical type resolution of + NoPia local types defined within target assembly. In other words, all + references used by previous compilation referencing the target assembly. + + + + + Assembly is /l-ed by compilation that is using it as a reference. + + + + + Get Assembly used as COR library for the candidate. + + + + + Checks if the properties of are compatible with properties of . + Reports inconsistencies to the given diagnostic bag. + + True if the properties are compatible and hence merged, false if the duplicate reference should not merge it's properties with primary reference. + + + + Called to compare two weakly named identities with the same name. + + + + + Aliases that should be applied to the referenced assembly. + Empty array means {"global"} (all namespaces and types in the global namespace of the assembly are accessible without qualification). + Null if not applicable (the reference only has recursive aliases). + + + + + Aliases that should be applied recursively to all dependent assemblies. + Empty array means {"global"} (all namespaces and types in the global namespace of the assembly are accessible without qualification). + Null if not applicable (the reference only has simple aliases). + + + + + default() is considered skipped. + + + + + Index into an array of assemblies (not including the assembly being built) or an array of modules, depending on . + + + + + non-negative: Index into the array of all (explicitly and implicitly) referenced assemblies. + negative: ExplicitlyReferencedAssemblies.Count + RelativeAssemblyIndex is an index into the array of assemblies. + + + + + Resolves given metadata references to assemblies and modules. + + The compilation whose references are being resolved. + + Used to filter out assemblies that have the same strong or weak identity. + Maps simple name to a list of identities. The highest version of each name is the first. + + List where to store resolved references. References from #r directives will follow references passed to the compilation constructor. + Maps #r values to successfully resolved metadata references. Does not contain values that failed to resolve. + Unique metadata references resolved from #r directives. + List where to store information about resolved assemblies to. + List where to store information about resolved modules to. + Diagnostic bag where to report resolution errors. + + Maps index to to an index of a resolved assembly or module in or , respectively. + + + + + Creates or gets metadata for PE reference. + + + If any of the following exceptions: , , , + are thrown while reading the metadata file, the exception is caught and an appropriate diagnostic stored in . + + + + + Determines whether references are the same. Compilation references are the same if they refer to the same compilation. + Otherwise, references are represented by their object identities. + + + + + Merges aliases of the first observed reference () with aliases specified for an equivalent reference (). + Empty alias list is considered to be the same as a list containing "global", since in both cases C# allows unqualified access to the symbols. + + + + + Caller is responsible for freeing any allocated ArrayBuilders. + + + + + Caller is responsible for freeing any allocated ArrayBuilders. + + + + + Returns null if an assembly of an equivalent identity has not been added previously, otherwise returns the reference that added it. + Two identities are considered equivalent if + - both assembly names are strong (have keys) and are either equal or FX unified + - both assembly names are weak (no keys) and have the same simple name. + + + + + For each given directive return a bound PE reference, or null if the binding fails. + + + + + Used to match AssemblyRef with AssemblyDef. + + Array of definition identities to match against. + An index of the first definition to consider, preceding this index are ignored. + Reference identity to resolve. + Assembly identity comparer. + + Returns an index the reference is bound. + + + + + If the compilation being built represents an assembly its assembly name. + If the compilation being built represents a module, the name of the + containing assembly or + if not specified (/moduleassemblyname command line option). + + + + + Used to compares assembly identities. + May implement unification and portability policies specific to the target platform. + + + + + Metadata observed by the compiler. + May be shared across multiple Reference Managers. + Access only under lock(). + + + + + Once this is non-zero the state of the manager is fully initialized and immutable. + + + + + True if the compilation has a reference that refers back to the assembly being compiled. + + + If we have a circular reference the bound references can't be shared with other compilations. + + + + + A map from a metadata reference to an index to array. Do not access + directly, use property instead. + + + + + A map from a net-module metadata reference to the index of the corresponding module + symbol in the source assembly symbol for the current compilation. + + + Subtract one from the index (for the manifest module) to find the corresponding elements + of and . + + + + + Maps (containing syntax tree file name, reference string) of #r directive to a resolved metadata reference. + If multiple #r's in the same tree use the same value as a reference the resolved metadata reference is the same as well. + + + + + Array of unique bound #r references. + + + The references are in the order they appear in syntax trees. This order is currently preserved + as syntax trees are added or removed, but we might decide to share reference manager between compilations + with different order of #r's. It doesn't seem this would be an issue since all #r's within the compilation + have the same "priority" with respect to each other. + + + + + Stores the results of implicit reference resolutions. + If is true the reference manager attempts to resolve assembly identities, + that do not match any explicit metadata references passed to the compilation (or specified via #r directive). + For each such assembly identity is called + and its result is captured in this map. + The map also stores failures - the reference is null if the assembly of the given identity is not found by the resolver. + This is important to maintain consistency, especially across multiple submissions (e.g. the reference is not found during compilation of the first submission + but then it is available when the second submission is compiled). + + + + + Diagnostics produced during reference resolution and binding. + + + When reporting diagnostics be sure not to include any information that can't be shared among + compilations that share the same reference manager (such as full identity of the compilation, + simple assembly name is ok). + + + + + COR library symbol, or null if the compilation itself is the COR library. + + + If the compilation being built is the COR library we don't want to store its source assembly symbol + here since we wouldn't be able to share the state among subsequent compilations that are derived from it + (each of them has its own source assembly symbol). + + + + + Standalone modules referenced by the compilation (doesn't include the manifest module of the compilation). + + + [i] corresponds to [i]. + + + + + References of standalone modules referenced by the compilation (doesn't include the manifest module of the compilation). + + + [i] corresponds to [i]. + + + + + Assemblies referenced directly by the source module of the compilation. + + + + + Aliases used by assemblies referenced directly by the source module of the compilation. + + + Aliases [i] are of an assembly [i]. + + + + + A map capturing s that were "merged" to a single referenced assembly + associated with a key in the map. + The keys are a subset of keys from . + + + + + Unified assemblies referenced directly by the source module of the compilation. + + + + + Call only while holding . + + + + + Call only while holding . + + + + + Global namespaces of assembly references that have been superseded by an assembly reference with a higher version are + hidden behind to avoid ambiguity when they are accessed from source. + All existing aliases of a superseded assembly are discarded. + + + + + Calculates map from the identities of specified symbols to the corresponding identities in the original EnC baseline metadata. + The map only includes an entry for identities that differ, i.e. for symbols representing assembly references of the current compilation that have different identities + than the corresponding identity in baseline metadata AssemblyRef table. The key comparer of the map ignores build and revision parts of the version number, + since these might change if the original version included wildcard. + + Assembly symbols for references of the current compilation. + Identities in the baseline. [i] corresponds to [i]. + + + + Gets the that corresponds to the assembly symbol. + + + + + Must be acquired whenever the following data are about to be modified: + - Compilation.lazyAssemblySymbol + - Compilation.referenceManager + - ReferenceManager state + - + - + + All the above data should be updated at once while holding this lock. + Once lazyAssemblySymbol is set the Compilation.referenceManager field and ReferenceManager + state should not change. + + + + + Enumerates all referenced assemblies. + + + + + Enumerates all referenced assemblies and their aliases. + + + + + Adds aliases of a specified reference to the merged set of aliases. + Consider the following special cases: + + o {} + {} = {} + If neither reference has any aliases then the result has no aliases. + + o {A} + {} = {A, global} + {} + {A} = {A, global} + + If one and only one of the references has aliases we add the global alias since the + referenced declarations should now be accessible both via existing aliases + as well as unqualified. + + o {A, A} + {A, B, B} = {A, A, B, B} + We preserve dups in each alias array, but avoid making more dups when merging. + + + + + A record of the assemblies referenced by a module (their identities, symbols, and unification). + + + + + Identities of referenced assemblies (those that are or will be emitted to metadata). + + + Names[i] is the identity of assembly Symbols[i]. + + + + + Assembly symbols that the identities are resolved against. + + + Names[i] is the identity of assembly Symbols[i]. + Unresolved references are represented as MissingAssemblySymbols. + + + + + A subset of that correspond to references with non-matching (unified) + version along with unification details. + + + + + Assembly symbol referenced by a AssemblyRef for which we couldn't find a matching + compilation reference but we found one that differs in version. + Created only for assemblies that require runtime binding redirection policy, + i.e. not for Framework assemblies. + + + + + Original reference that was unified to the identity of the . + + + + + Representation of a resource whose contents are to be embedded in the output assembly. + + + + + Creates a representation of a resource whose contents are to be embedded in the output assembly. + + Resource name. + The callers will dispose the result after use. + This allows the resources to be opened and read one at a time. + + True if the resource is public. + + Returns a stream of the data to embed. + + + + + Creates a representation of a resource whose file name will be recorded in the assembly. + + Resource name. + File name with an extension to be stored in metadata. + The callers will dispose the result after use. + This allows the resources to be opened and read one at a time. + + True if the resource is public. + + Function returning a stream of the resource content (used to calculate hash). + + + + + Represents errors that occur while parsing RuleSet files. + + + + + Represents a set of rules as specified in a ruleset file. + + + + + The file path of the ruleset file. + + + + + The global option specified by the IncludeAll tag. + + + + + Individual rule ids and their associated actions. + + + + + List of rulesets included by this ruleset. + + + + + Create a RuleSet. + + + + + Create a RuleSet with a global effective action applied on it. + + + + + Get the effective ruleset after resolving all the included rulesets. + + + + + Get all the files involved in resolving this ruleset. + + + + + Returns true if the action1 is stricter than action2. + + + + + Load the ruleset from the specified file. This ruleset will contain + all the rules resolved from the includes specified in the ruleset file + as well. See also: . + + + A ruleset that contains resolved rules or null if there were errors. + + + + + Get the paths to all files contributing rules to the ruleset from the specified file. + See also: . + + + The full paths to included files, or an empty array if there were errors. + + + + + Parses the ruleset file at the given and returns the following diagnostic options from the parsed file: + 1) A map of from rule ID to option. + 2) A global option for all rules in the ruleset file. + + + + + Represents a Include tag in a RuleSet file. + + + + + The path of the included file. + + + + + The effective action to apply on this included ruleset. + + + + + Create a RuleSetInclude given the include path and the effective action. + + + + + Gets the RuleSet associated with this ruleset include + + The parent of this ruleset include + + + + Returns a full path to the include file. Relative paths are expanded relative to the current rule set file. + + The parent of this rule set include + + + + This type is responsible for parsing a ruleset xml file and producing a object. + + + + + Creates and loads the rule set from a file + + The file path to load the rule set + + + + Load the rule set from the XML node + + The rule set node from which to create a rule set object + The file path to the rule set file + A rule set object with data from the given XML node + + + + Load the rules from the XML node + + The rules node from which to loop through each child rule node + A list of rule objects with data from the given XML node + + + + Load the rule from the XML node + + The rule node from which to create a rule object + A rule object with data from the given XML node + + + + Load the included rule set from the XML node + + The include node from which to create a RuleSetInclude object + A RuleSetInclude object with data from the given XML node + + + + Reads the action from the given node + + The node to read the action, it can be a rule node or an include node. + Whether or not the default value is allowed. + The rule action + + + + Load the IncludedAll from the XML node + + The IncludeAll node from which to create a IncludeAll object + A IncludeAll object with data from the given XML node + + + + Reads an attribute from a node and validates that it is not empty. + + The XML node that contains the attribute + The name of the attribute to read + The attribute value + + + + Gets the default settings to read the ruleset xml file. + + + + + Well known encodings. Used to distinguish serialized encodings with BOM and without BOM. + + + + + Specifies the C# or VB source code kind. + + + + + No scripting. Used for .cs/.vb file parsing. + + + + + Allows top-level statements, declarations, and optional trailing expression. + Used for parsing .csx/.vbx and interactive submissions. + + + + + The same as . + + + + + Resolves references to source files specified in source code. + + + + + A source text created by an + + + + + A syntax tree created by a + + + + + Adapts an ISourceGenerator to an incremental generator that + by providing an execution environment that matches the old one + + + + + Place this attribute onto a type to cause it to be considered a source generator + + + + + The source languages to which this generator applies. See . + + + + + Attribute constructor used to specify the attached class is a source generator that provides CSharp sources. + + + + + Attribute constructor used to specify the attached class is a source generator and indicate which language(s) it supports. + + One language to which the generator applies. + Additional languages to which the generator applies. See . + + + + Context passed to a source generator when is called + + + + + Get the current at the time of execution. + + + This compilation contains only the user supplied code; other generated code is not + available. As user code can depend on the results of generation, it is possible that + this compilation will contain errors. + + + + + Get the that will be used to parse any added sources. + + + + + A set of additional non-code text files that can be used by generators. + + + + + Allows access to options provided by an analyzer config + + + + + If the generator registered an during initialization, this will be the instance created for this generation pass. + + + + + If the generator registered an during initialization, this will be the instance created for this generation pass. + + + + + A that can be checked to see if the generation should be cancelled. + + + + + Adds source code in the form of a to the compilation. + + An identifier that can be used to reference this source text, must be unique within this generator + The source code to add to the compilation + + + + Adds a to the compilation + + An identifier that can be used to reference this source text, must be unique within this generator + The to add to the compilation + + + + Adds a to the users compilation + + The diagnostic that should be added to the compilation + + The severity of the diagnostic may cause the compilation to fail, depending on the settings. + + + + + Context passed to a source generator when is called + + + + + A that can be checked to see if the initialization should be cancelled. + + + + + Register a for this generator, which can be used to create an instance of an . + + + This method allows generators to be 'syntax aware'. Before each generation the will be invoked to create + an instance of . This receiver will have its + invoked for each syntax node in the compilation, allowing the receiver to build up information about the compilation before generation occurs. + + During the generator can obtain the instance that was + created by accessing the property. Any information that was collected by the receiver can be + used to generate the final output. + + A new instance of is created per-generation, meaning there is no need to manage the lifetime of the + receiver or its contents. + + A that can be invoked to create an instance of + + + + Register a for this generator, which can be used to create an instance of an . + + + This method allows generators to be 'syntax aware'. Before each generation the will be invoked to create + an instance of . This receiver will have its + invoked for each syntax node in the compilation, allowing the receiver to build up information about the compilation before generation occurs. + + During the generator can obtain the instance that was + created by accessing the property. Any information that was collected by the receiver can be + used to generate the final output. + + A new instance of is created prior to every call to , + meaning there is no need to manage the lifetime of the receiver or its contents. + + A that can be invoked to create an instance of + + + + Register a callback that is invoked after initialization. + + + This method allows a generator to opt-in to an extra phase in the generator lifecycle called PostInitialization. After being initialized + any generators that have opted in will have their provided callback invoked with a instance + that can be used to alter the compilation that is provided to subsequent generator phases. + + For example a generator may choose to add sources during PostInitialization. These will be added to the compilation before execution and + will be visited by a registered and available for semantic analysis as part of the + + Note that any sources added during PostInitialization will be visible to the later phases of other generators operating on the compilation. + + An that accepts a that will be invoked after initialization. + + + + Context passed to an when is called + + + + + The currently being visited + + + + + The that can be queried to obtain information about . + + + + + Context passed to a source generator when it has opted-in to PostInitialization via + + + + + A that can be checked to see if the PostInitialization should be cancelled. + + + + + Adds source code in the form of a to the compilation that will be available during subsequent phases + + An identifier that can be used to reference this source text, must be unique within this generator + The source code to add to the compilation + + + + Adds a to the compilation that will be available during subsequent phases + + An identifier that can be used to reference this source text, must be unique within this generator + The to add to the compilation + + + + Responsible for orchestrating a source generation pass + + + GeneratorDriver is an immutable class that can be manipulated by returning a mutated copy of itself. + In the compiler we only ever create a single instance and ignore the mutated copy. The IDE may perform + multiple edits, or generation passes of the same driver, re-using the state as needed. + + + + + Attempts to find a driver based on . If a matching driver is found in the + cache, or explicitly passed via , the cache is updated so that it is at the + head of the list. + + The key to lookup the driver by in the cache + An optional driver that should be cached, if not already found in the cache + + + + + Options passed to a during creation + + + + + The set of s associated with this state. + + + This is the set of generators that will run on next generation. + If there are any states present in , they were produced by a subset of these generators. + + + + + The set of s associated with this state. + + + This is the 'internal' representation of the collection. There is a 1-to-1 mapping + where each entry is either the unwrapped incremental generator or a wrapped + + + + + The last run state of each generator, by the generator that created it + + + There will be a 1-to-1 mapping for each generator. If a generator has yet to + be initialized or failed during initialization it's state will be default(GeneratorState) + + + + + The set of s available to source generators during a run + + + + + Gets a provider for analyzer options + + + + + ParseOptions to use when parsing generator provided source. + + + + + A bit field containing the output kinds that should not be produced by this generator driver. + + + + + Tracks if the have been changed meaning post init trees will need to be re-parsed. + + + + + Returns the underlying type of a given generator + + + For s a wrapper is created that also implements + . This method will unwrap and return the underlying type + in those cases. + + The generator to get the type of + The underlying generator type + + + + Converts an into an object that can be used when constructing a + + The incremental generator to wrap + A wrapped generator that can be passed to a generator driver + + + + Represents the current state of a generator + + + + + Creates a new generator state that contains information, constant trees and an execution pipeline + + + + + Simple wrapper class around an immutable array so we can have the value-semantics needed for the incremental + generator to know when a change actually happened and it should run later transform stages. + + + + + The base interface required to implement an incremental generator + + + The lifetime of a generator is controlled by the compiler. + State should not be stored directly on the generator, as there + is no guarantee that the same instance will be used on a + subsequent generation pass. + + + + + Called to initialize the generator and register generation steps via callbacks + on the + + The to register callbacks on + + + + Context passed to an incremental generator when is called + + + + + Context passed to an incremental generator when it has registered an output via + + + + + A that can be checked to see if the PostInitialization should be cancelled. + + + + + Adds source code in the form of a to the compilation that will be available during subsequent phases + + An identifier that can be used to reference this source text, must be unique within this generator + The source code to add to the compilation + + + + Adds a to the compilation that will be available during subsequent phases + + An identifier that can be used to reference this source text, must be unique within this generator + The to add to the compilation + + + + Context passed to an incremental generator when it has registered an output via + + + + + Adds source code in the form of a to the compilation. + + An identifier that can be used to reference this source text, must be unique within this generator + The source code to add to the compilation + + + + Adds a to the compilation + + An identifier that can be used to reference this source text, must be unique within this generator + The to add to the compilation + + + + Adds a to the users compilation + + The diagnostic that should be added to the compilation + + The severity of the diagnostic may cause the compilation to fail, depending on the settings. + + + + + A description of a step of an incremental generator that was executed. + + + + + The state of the output of a given executed incremental source generator step. + + + + + The output of this step is a new output produced from a new input. + + + + + The input to this step was modified from a previous run, and it produced a different value than the previous run. + + + + + The input to this step was modified from a previous run, but it produced an equal value to the previous run. + + + + + The output of this step was pulled from this step's cache since the inputs was unchanged from the previous run. + + + + + The input that this output is generated from was removed from the input step's outputs, so this value will be removed from the output step results. + + + + + Represents a provider of a single value that can be transformed as part of constructing an execution pipeline + + + This is an opaque type that cannot be used directly. Instead an + will receive a set of value providers when constructing its execution pipeline. A set of extension methods + are then used to create transforms over the data that creates the actual pipeline. + + The type of value that this source provides access to + + + + Represents a provider of multiple values that can be transformed to construct an execution pipeline + + + This is an opaque type that cannot be used directly. Instead an + will receive a set of value providers when constructing its execution pipeline. A set of extension methods + are then used to create transforms over the data that creates the actual pipeline. + + The type of value that this source provides access to + + + + Wraps an incremental generator in a dummy interface. + + + Allows us to treat both generator types as ISourceGenerator externally and not change the public API. + Inside the driver we unwrap and use the actual generator instance. + + + + + The base interface required to implement a source generator + + + The lifetime of a generator is controlled by the compiler. + State should not be stored directly on the generator, as there + is no guarantee that the same instance will be used on a + subsequent generation pass. + + + + + Called before generation occurs. A generator can use the + to register callbacks required to perform generation. + + The to register callbacks on + + + + Called to perform source generation. A generator can use the + to add source files via the + method. + + The to add source to + + This call represents the main generation step. It is called after a is + created that contains the user written code. + + A generator can use the property to + discover information about the users compilation and make decisions on what source to + provide. + + + + + must be a compilation unit or namespace block. + + + + + Receives notifications of each in the compilation before generation runs + + + A can provide an instance of + via a . + + The compiler will invoke the prior to generation to + obtain an instance of . This instance will have its + called for every syntax node in the compilation. + + The can record any information about the nodes visited. During + the generator can obtain the + created instance via the property. The + information contained can be used to perform final generation. + + A new instance of is created per-generation, meaning the instance + is free to store state without worrying about lifetime or reuse. + + An may provide only a single or + , not both. + + + + + Called for each in the compilation + + The current being visited + + + + Allows a generator to provide instances of an + + An instance of an + + + + Receives notifications of each in the compilation, along with a + that can be queried to obtain more information, before generation + runs. + + + A can provide an instance of + via a . + + The compiler will invoke the prior to generation to + obtain an instance of . This instance will have its + called for every syntax node + in the compilation. + + The can record any information about the nodes visited. + During the generator can obtain the + created instance via the property. The + information contained can be used to perform final generation. + + A new instance of is created per-generation, meaning the instance + is free to store state without worrying about lifetime or reuse. + + An may provide only a single or + , not both. + + + + + Allows a generator to provide instances of an + + An instance of an + + + + Represents a node in the execution pipeline of an incremental generator + + The type of value this step operates on + + + + Internal representation of an incremental output + + + + + Represents the various output kinds of an . + + + Can be passed as a bit field when creating a to selectively disable outputs. + + + + + Represents no output kinds. Can be used when creating a driver to indicate that no outputs should be disabled. + + + + + A regular source output, registered via + or + + + + + A post-initialization output, which will be visible to later phases, registered via + + + + + An Implementation only source output, registered via + or + + + + + Input nodes are the 'root' nodes in the graph, and get their values from the inputs of the driver state table + + The type of the input + + + + A data structure that tracks the inputs and output of an execution node + + The type of the items tracked by this table + + + + Indicates if every entry in this table has a state of + + + + + Represents the corresponding state of each item in , or contains a single state when + is populated or when every state of has the same value. + + + + + Holds input nodes that are shared between generators and always exist + + + + + Allows a user to create Syntax based input nodes for incremental generation + + + + + Creates an that can provide a transform over s + + The type of the value the syntax node is transformed into + A function that determines if the given should be transformed + A function that performs the transform, when returns true for a given node + An that provides the results of the transformation + + + + Creates a syntax receiver input node. Only used for back compat in + + + + + Creates an that can provide a transform over all s if that node has an attribute on it that binds to a with the + same fully-qualified metadata as the provided . should be the fully-qualified, metadata name of the attribute, including the + Attribute suffix. For example "System.CLSCompliantAttribute for . + + A function that determines if the given attribute target () should be transformed. Nodes that do not pass this + predicate will not have their attributes looked at at all. + A function that performs the transform. This will only be passed nodes that return for and which have a matching whose + has the same fully qualified, metadata name as . + + + + Returns all syntax nodes of that match if that node has an attribute on it that + could possibly bind to the provided . should be the + simple, non-qualified, name of the attribute, including the Attribute suffix, and not containing any + generics, containing types, or namespaces. For example CLSCompliantAttribute for . + This provider understands (Import in Visual Basic) aliases and will find + matches even when the attribute references an alias name. For example, given: + + using XAttribute = System.CLSCompliantAttribute; + [X] + class C { } + + Then + context.SyntaxProvider.CreateSyntaxProviderForAttribute(nameof(CLSCompliantAttribute), (node, c) => node is ClassDeclarationSyntax) + will find the C class. + + + Note: a 'Values'-provider of arrays are returned. Each array provides all the matching nodes from a single . + + + + + The syntax node the attribute is attached to. For example, with [CLSCompliant] class C { } this would + the class declaration node. + + + + + The symbol that the attribute is attached to. For example, with [CLSCompliant] class C { } this would be + the for "C". + + + + + Semantic model for the file that is contained within. + + + + + s for any matching attributes on . Always non-empty. All + these attributes will have an whose fully qualified name metadata + name matches the name requested in . + + To get the entire list of attributes, use on . + + + + + + Represents the results of running a generation pass over a set of s. + + + + + The individual result of each that was run in this generator pass, one per generator. + + + + + The wall clock time that this generator pass took to execute. + + + + + The s produced by all generators run during this generation pass. + + + This is equivalent to the union of all in . + + + + + The s produced during this generation pass by parsing each added by each generator. + + + This is equivalent to the union of all s in each in each + + + + + Represents the results of a single generation pass. + + + + + The that produced this result. + + + + + The sources that were added by during the generation pass this result represents. + + + + + A collection of s reported by + + + When generation fails due to an being thrown, a single diagnostic is added + to represent the failure. Any generator reported diagnostics up to the failure point are not included. + + + + + An instance that was thrown by the generator, or null if the generator completed without error. + + + When this property has a value, property is guaranteed to be empty, and the + collection will contain a single diagnostic indicating that the generator failed. + + + + + The wall clock time that elapsed while this generator was running. + + + + + A collection of the named incremental steps executed during the generator pass this result represents. + + + + + A collection of the named incremental steps executed during the generator pass this result represents. + + + + + Represents the results of an calling . + + + This contains the original added by the generator, along with the parsed representation of that text in . + + + + + The that was produced from parsing the . + + + + + The that was added by the generator. + + + + + An identifier provided by the generator that identifies the added . + + + + + Contains timing information for a full generation pass. + + + + + The wall clock time that the entire generation pass took. + + + This can be more than the sum of times in as it includes other costs such as setup. + + + + + Individual timings per generator. + + + + + Contains timing information for a single generator. + + + + + The that was running during the recorded time. + + + + + The wall clock time the generator spent running. + + + + + Wraps an in an + + + + + Gets the adjustment to wall clock time that should be applied for a set of input nodes. + + + The syntax store updates all input nodes in parallel the first time an input node is asked to update, + so that it can share the semantic model between multiple nodes and improve perf. + + Unfortunately that means that the first generator to request the results of a syntax node will incorrectly + have its wall clock time contain the time of all other syntax nodes. And conversely other input nodes will + not have the true time taken. + + This method gets the adjustment that should be applied to the wall clock time for a set of input nodes + so that the correct time is attributed to each. + + + + + Well known incremental generator input step names. + + + + + Well known incremental generator output step names. + + + + + Specifies the Ids of special runtime types. + + + Only types explicitly mentioned in "Co-located core types" spec + (https://github.com/dotnet/roslyn/blob/main/docs/compilers/Co-located%20core%20types.md) + can be in this enum. + The following things should be in sync: + 1) SpecialType enum + 2) names in SpecialTypes.EmittedNames array. + + + + + Indicates a non-special type (default value). + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is . + + + + + Indicates that the type is System.Runtime.CompilerServices.RuntimeFeature. + + + + + An attribute that is placed on each method with a 'methodimpl" aka ".override" in metadata. + + + + + Count of special types. This is not a count of enum members. + + + + + Checks if a type is considered a "built-in integral" by CLR. + + + + + Checks if a type is a primitive of a fixed size. + + + + + These special types are structs that contain fields of the same type + (e.g. System.Int32 contains a field of type System.Int32). + + + + + Checks if a type is considered a "built-in integral" by CLR. + + + + + For signed integer types return number of bits for their representation minus 1. + I.e. 7 for Int8, 31 for Int32, etc. + Used for checking loop end condition for VB for loop. + + + + + Array of names for types from Cor Library. + The names should correspond to ids from TypeId enum so + that we could use ids to index into the array + + + + + + Gets the name of the special type as it would appear in metadata. + + + + + Try to retrieve the public key from a crypto blob. + + + Can be either a PUBLICKEYBLOB or PRIVATEKEYBLOB. The BLOB must be unencrypted. + + + + + Helper for RsaCryptoServiceProvider.ExportParameters() + Copied from https://github.com/dotnet/corefx/blob/5fe5f9aae7b2987adc7082f90712b265bee5eefc/src/System.Security.Cryptography.Csp/src/System/Security/Cryptography/CapiHelper.Shared.cs + + + + + Helper for converting a UInt32 exponent to bytes. + Copied from https://github.com/dotnet/corefx/blob/5fe5f9aae7b2987adc7082f90712b265bee5eefc/src/System.Security.Cryptography.Csp/src/System/Security/Cryptography/CapiHelper.Shared.cs + + + + + Read in a byte array in reverse order. + Copied from https://github.com/dotnet/corefx/blob/5fe5f9aae7b2987adc7082f90712b265bee5eefc/src/System.Security.Cryptography.Csp/src/System/Security/Cryptography/CapiHelper.Shared.cs + + + + + Provides strong name and signs source assemblies. + + + + + Creates an instance of . + + Path to use for any temporary file generation. + An ordered set of fully qualified paths which are searched when locating a cryptographic key file. + + + + Resolves assembly strong name key file path. + + Normalized key file path or null if not found. + + + + + + + This is an abstraction over the file system which allows for us to do more thorough unit testing. + + + + + The strong name key associated with the identity of this assembly. + This contains the contents of the user-supplied key file exactly as extracted. + + + + + Determines source assembly identity. + + + + + The Private key information that will exist if it was a private key file that was parsed. + + + + + A diagnostic created in the process of determining the key. + + + + + The CSP key container containing the public key used to produce the key, + or null if the key was retrieved from . + + + The original value as specified by or + . + + + + + Original key file path, or null if the key is provided by the . + + + The original value as specified by or + + + + + + True when the assembly contains a value + and hence signing requires counter signature verification. + + + + + True if the compilation can be signed using these keys. + + + + + True if a strong name can be created for the compilation using these keys. + + + + + Provides strong name and signs source assemblies. + + + + + Signs the value using . + + + + + Signs the contents of using and . + + + + + Create a for the provided information. + + + + + Contains helper methods for switch statement label constants + + + + + Method used to compare ConstantValues for switch statement case labels + + + + A value that indicates the relative order of the objects being compared. The return value has these meanings: + Less than zero: first instance precedes second in the sort order. + Zero: first instance occurs in the same position in the sort order as second. + Greater than zero: first instance follows second in the sort order. + + + + + Append a default argument (i.e. the default argument of an optional parameter). + Assumed to be non-null. + + + + + Check if the given type is an enum with System.FlagsAttribute. + + + TODO: Can/should this be done using WellKnownAttributes? + + + + + This class associates a symbol with particular format for display. + It can be passed as an argument for an error message in place where symbol display should go, + which allows to defer building strings and doing many other things (like loading metadata) + associated with that until the error message is actually requested. + + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Specifies the options for how generics are displayed in the description of a symbol. + + + + + Format object using default options. + + + + + In C#, include the numeric code point before character literals. + + + + + Whether or not to include type suffix for applicable integral literals. + + + + + Whether or not to display integral literals in hexadecimal. + + + + + Whether or not to quote character and string literals. + + + + + In C#, replace non-printable (e.g. control) characters with dedicated (e.g. \t) or unicode (\u0001) escape sequences. + In Visual Basic, replace non-printable characters with calls to ChrW and vb* constants. + + + + + None + + + + + ".ctor" instead of "Goo" + + + + + "List`1" instead of "List<T>" ("List(of T)" in VB). Overrides GenericsOptions on + types. + + + + + Append "[Missing]" to missing Metadata types (for testing). + + + + + Include the Script type when qualifying type names. + + + + + Include custom modifiers (e.g. modopt([mscorlib]System.Runtime.CompilerServices.IsConst)) on + the member (return) type and parameters. + + + CONSIDER: custom modifiers are part of the public API, so we might want to move this to SymbolDisplayMemberOptions. + + + + + For a type written as "int[][,]" in C#, then + a) setting this option will produce "int[,][]", and + b) not setting this option will produce "int[][,]". + + + + + Display `System.ValueTuple` instead of tuple syntax `(...)`. + + + + + Display `System.[U]IntPtr` instead of `n[u]int`. + + + + + Separate out nested types from containing types using + instead of . (dot). + + + + + Display `MyType@File.cs` instead of `MyType`. + + + + + Equivalent to + but only if the parameter is displayed on its own + (i.e., not as part of a method, delegate, or indexer). + + + + + Specifies how to display delegates (just the name or the name with the signature). + + + + + Shows only the name of the delegate (e.g. "SomeDelegate"). + + + + + Shows the name and the parameters of the delegate (e.g. "SomeDelegate(int x)"). + + The format of the parameters will be determined by the other flags passed. + + + + + + Shows the name and the signature of the delegate (e.g. "void SomeDelegate(int x)"). + + The format of the signature will be determined by the other flags passed. + + + + + + Specifies how to display extension methods. + + + + + Displays the extension method based on its . + + + + + Displays the extension method in the form of an instance method. + For example, IEnumerable<TSource>.ElementAt<TSource>(int index). + + + + + Displays the extension method as a static method. + For example, Enumerable.ElementAt<TSource>(this IEnumerable<TSource> source, int index). + + + + + Exposes extension methods for displaying symbol descriptions. + + + + + Converts an immutable array of s to a string. + + The array of parts. + The concatenation of the parts into a single string. + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Determines if a flag is set on the enum. + + The value to check. + An enum field that specifies the flag. + Whether the is set on the . + + + + Describes the formatting rules that should be used when displaying symbols. + + + + + Formats a symbol description as in a C# compiler error message. + + + + + Formats a symbol description as in a C# compiler short error message. + + + + + Formats a symbol description as in a Visual Basic compiler error message. + + + + + Formats a symbol description as in a Visual Basic compiler short error message. + + + + + Formats the names of all types and namespaces in a fully qualified style (including the global alias). + + + The current behavior will not output the fully qualified style as expected for member symbols (such as properties) because memberOptions is not set. + For example, MyNamespace.MyClass.MyPublicProperty will return as MyPublicProperty. + The current behavior displayed here will be maintained for backwards compatibility. + + + + + Formats a symbol description in a form that suits . + + + + + A verbose format for displaying symbols (useful for testing). + + + + + A verbose format for displaying symbols (useful for testing). + + + + + this.QualifiedNameOnly = containingSymbol.QualifiedNameOnly + "." + this.Name + + + + + this.QualifiedNameArity = containingSymbol.QualifiedNameArity + "." + this.Name + "`" + this.Arity + + + + + A succinct format for displaying symbols. + + + + + The format used for displaying symbols when visualizing IL. + + + + + Used to normalize explicit interface implementation member names. + Only expected to be applied to interface types (and their type arguments). + + + + + Determines how the global namespace is displayed. + + + + + Determines how types are qualified (e.g. Nested vs Containing.Nested vs Namespace.Containing.Nested). + + + + + Determines how generics (on types and methods) should be described (i.e. the level of detail). + + + + + Determines how fields, properties, events, and methods are displayed. + + + + + Determines how parameters (of methods, properties/indexers, and delegates) are displayed. + + + + + Determines how delegates are displayed (e.g. name vs full signature). + + + + + Determines how extension methods are displayed. + + + + + Determines how properties are displayed. + For example, "Prop" vs "Prop { get; set; }" in C# or "Prop" vs. "ReadOnly Prop" in Visual Basic. + + + + + Determines how local variables are displayed. + + + + + Determines which kind keywords should be included when displaying symbols. + + + + + Determines other characteristics of how symbols are displayed. + + + + + Flags that can only be set within the compiler. + + + + + Constructs a new instance of accepting a variety of optional parameters. + + + The settings that determine how the global namespace is displayed. + + + The settings that determine how types are qualified (e.g. Nested vs Containing.Nested vs Namespace.Containing.Nested). + + + The settings that determine how generics (on types and methods) should be described (i.e. the level of detail). + + + The settings that determine how fields, properties, events, and methods are displayed. + + + The settings that determine how delegates are displayed (e.g. name vs full signature). + + + The settings that determine how extension methods are displayed. + + + The settings that determine how parameters (of methods, properties/indexers, and delegates) are displayed. + + + The settings that determine how properties are displayed. + For example, "Prop" vs "Prop { get; set; }" in C# or "Prop" vs. "ReadOnly Prop" in Visual Basic. + + + The settings that determine how local variables are displayed. + + + The settings that determine which kind keywords should be included when displaying symbols. + + + The settings that determine other characteristics of how symbols are displayed. + + + + + This version also accepts . + + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object representing how miscellaneous symbols will be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters for how miscellaneous symbols will be formatted. + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + Creates a copy of the SymbolDisplayFormat without the specified . + + + An object specifying which parameters should not be applied to how miscellaneous symbols will be formatted. + + A duplicate of the SymbolDisplayFormat, without the specified . + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object specifying how generic symbols will be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters for how generic symbols will be formatted. + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + An object specifying which parameters should not be applied to how generic symbols will be formatted. + + + A duplicate of the SymbolDisplayFormat, with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object specifying how members will be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters for how members will be formatted. + + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + An object specifying which parameters should not be applied to how members will be formatted. + + + A duplicate of the SymbolDisplayFormat, with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object specifying parameters with which symbols belonging to kind keywords should be formatted. + + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters with which symbols belonging to kind keywords should be formatted. + + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + The settings that determine other characteristics of how symbols are displayed. + + + A duplicate of the SymbolDisplayFormat, with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object specifying how parameters should be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters on how parameters should be formatted. + + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + An object specifying parameters that should not be applied when formatting parameters. + + + A duplicate of the SymbolDisplayFormat, with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with replaced . + + + An object specifying parameters on how namespace symbols should be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + An object specifying parameters on how symbols belonging to locals should be formatted. + + A duplicate of the SymbolDisplayFormat, with a replaced set of . + + + + Creates a copy of the SymbolDisplayFormat but with an additional set of . + + + An object specifying additional parameters on how symbols belonging to locals should be formatted. + + + A duplicate of the SymbolDisplayFormat, with an additional set of . + + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + An object specifying parameters that should not be applied when formatting symbols belonging to locals. + + + A duplicate of the SymbolDisplayFormat, with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with added set of . + + + + + Creates a copy of the SymbolDisplayFormat but with a set of stripped away from the original object. + + + + + Creates a copy of the SymbolDisplayFormat but with replaced set of . + + + + + Specifies the options for how generics are displayed in the description of a symbol. + + + + + Omits the type parameter list entirely. + + + + + Includes the type parameters. + For example, "Goo<T>" in C# or "Goo(Of T)" in Visual Basic. + + + + + Includes type parameters and constraints. + For example, "where T : new()" in C# or "Of T as New" in Visual Basic. + + + + + Includes in or out keywords before variant type parameters. + For example, "Goo<out T>" in C# or (Goo Of Out T" in Visual Basic. + + + + + Specifies the options for how to display the global namespace in the description of a symbol. + + + Any of these styles may be overridden by . + + + + + Omits the global namespace, unconditionally. + + + + + Omits the global namespace if it is being displayed as a containing symbol (i.e. not on its own). + + + + + Include the global namespace, unconditionally. + + + + + Specifies which kind keywords should be included when displaying symbols. + + + + + Omits all kind keywords. + + + + + Includes the namespace keyword before namespaces. + For example, "namespace System", rather than "System". + + + + + Includes the type keyword before types. + For example, "class C" in C# or "Structure S" in Visual Basic. + + + + + Include the member keyword before members (if one exists). + For example, "event D E" in C# or "Function MyFun()" in Visual Basic. + + + + + Specifies the options for how locals are displayed in the description of a symbol. + + + + + Shows only the name of the local. + For example, "x". + + + + + Shows the type of the local in addition to its name. + For example, "int x" in C# or "x As Integer" in Visual Basic. + + + + + Shows the constant value of the local, if there is one, in addition to its name. + For example "x = 1". + + + + + Includes the ref keyword for ref-locals and the scoped keyword for scoped locals. + Replaced by . + + + + + Includes the ref keyword for ref-locals and the scoped keyword for scoped locals. + + + + + Specifies the options for how members are displayed in the description of a symbol. + + + + + Includes only the name of the member. + + + + + Includes the (return) type of the method/field/property/event. + + + + + Includes the modifiers of the member. For example, "static readonly" in C# or "Shared ReadOnly" in Visual Basic. + + Accessibility modifiers are controlled separately by . + + + + + + Includes the accessibility modifiers of the member. For example, "public" in C# or "Public" in Visual Basic. + + + + + Includes the name of corresponding interface on members that explicitly implement interface members. For example, "IGoo.Bar { get; }". + + This option has no effect in Visual Basic. + + + + + + Includes the parameters of methods and properties/indexers. + + See for finer-grained settings. + + + + + + Includes the name of the type containing the member. + + The format of the containing type is determined by . + + + + + + Includes the value of the member if is a constant. + + + + + Includes the ref, ref readonly, ByRef keywords for ref-returning methods and properties/indexers. + Also includes the readonly keyword on methods, properties/indexers, and events due to the keyword + changing the this parameter's ref kind from ref to ref readonly. + + + + + Specifies miscellaneous options about the format of symbol descriptions. + + + + + Specifies that no miscellaneous options should be applied. + + + + + Uses keywords for predefined types. + For example, "int" instead of "System.Int32" in C# + or "Integer" instead of "System.Integer" in Visual Basic. + + + + + Escapes identifiers that are also keywords. + For example, "@true" instead of "true" in C# or + "[True]" instead of "True" in Visual Basic. + + + + + Displays asterisks between commas in multi-dimensional arrays. + For example, "int[][*,*]" instead of "int[][,]" in C# or + "Integer()(*,*)" instead of "Integer()(*,*) in Visual Basic. + + + + + Displays "?" for erroneous types that lack names (perhaps due to faulty metadata). + + + + + Displays attributes names without the "Attribute" suffix, if possible. + + Has no effect outside and only applies + if the context location is one where an attribute ca be referenced without the suffix. + + + + + + Displays as a normal generic type, rather than with + the special question mark syntax. + + + + + Append '?' to nullable reference types. + + + + + Allow the use of default instead of default(T) where applicable. + + + + + Append '!' to non-nullable reference types. + + + + + Insert a tuple into the display parts as a single part instead of multiple parts (similar + to how anonymous types are inserted). + + + + + Specifies how parameters are displayed in the description of a (member, property/indexer, or delegate) symbol. + + + + + Omits parameters from symbol descriptions. + + If this option is combined with , then only + the parentheses will be shown (e.g. M()). + + + + + + Includes the this keyword before the first parameter of an extension method in C#. + + This option has no effect in Visual Basic. + + + + + + Includes the params, scoped, ref, in, out, ByRef, ByVal keywords before parameters. + Replaced by . + + + + + Includes the params, scoped, ref, in, out, ByRef, ByVal keywords before parameters. + + + + + Includes parameter types in symbol descriptions. + + + + + Includes parameter names in symbol descriptions. + + + + + Includes parameter default values in symbol descriptions. + Ignored if is not set. + + + + + + Includes square brackets around optional parameters. + + + + + A single element of a symbol description. For example, a keyword, a punctuation character or + a class name. + + + + + + + + Gets the kind of this display part. + + + + + Gets the symbol associated with this display part, if there is one. + For example, the associated with a class name. + + + + + + Construct a non-formattable (i.e. with a fixed string value). + + The kind of the display part. + An optional associated symbol. + The fixed string value of the part. + + + + Returns the string value of this symbol display part. + + + + + Specifies the kinds of a piece of classified text (SymbolDisplayPart). + + + + The name of an alias. + + + The name of an assembly. + + + The name of a class. + + + The name of a delegate. + + + The name of an enum. + + + The name of an error type. + + + + The name of an event. + + + The name of a field. + + + The name of an interface. + + + A language keyword. + + + The name of a label. + + + A line-break (i.e. whitespace). + + + A numeric literal. + Typically for the default values of parameters and the constant values of fields. + + + + + A string literal. + Typically for the default values of parameters and the constant values of fields. + + + + + The name of a local. + + + The name of a method. + + + The name of a module. + + + The name of a namespace. + + + The symbol of an operator (e.g. "+"). + + + The name of a parameter. + + + The name of a property. + + + A punctuation character (e.g. "(", ".", ",") other than an . + + + A single space character. + + + The name of a struct (structure in Visual Basic). + + + A keyword-like part for anonymous types (not actually a keyword). + + + An unclassified part. + Never returned - only set in user-constructed parts. + + + + + The name of a type parameter. + + + The name of a query range variable. + + + The name of an enum member. + + + The name of a reduced extension method. + + When an extension method is in it's non-reduced form it will be will be marked as MethodName. + + + + + The name of a field or local constant. + + + The name of a record class. + + + The name of a record struct. + + + + Specifies the options for how properties are displayed in symbol descriptions. + + + + + Shows only the names of properties. + + + + + + Indicates whether the property is readable and/or writable. + In C#, this is accomplished by including accessors. + In Visual Basic, this is accomplished by including the ReadOnly or WriteOnly + keyword, as appropriate. + + + + + Specifies how much qualification is used in symbol descriptions. + + + + + Shows only the name of the symbol. + + + + + Shows the name of the symbol and the names of all containing types. + + + + + Shows the name of the symbol the names of all containing types and namespaces. + + + + + Enumeration for common accessibility combinations. + + + + + No accessibility specified. + + + + + Only accessible where both protected and internal members are accessible + (more restrictive than , and ). + + + + + Only accessible where both protected and friend members are accessible + (more restrictive than , and ). + + + + + Accessible wherever either protected or internal members are accessible + (less restrictive than , and ). + + + + + Accessible wherever either protected or friend members are accessible + (less restrictive than , and ). + + + + + We should not see new anonymous types from source after we finished emit phase. + If this field is true, the collection is sealed; in DEBUG it also is used to check the assertion. + + + + + Collection of anonymous type templates is sealed + + + + + Gets the name of this assembly. + + + + + Returns true if this field was declared as "volatile". + + + + + True if the method is a source method implemented as an iterator. + + + + + Returns true if this method is an async method + + + + + Returns a constructed method given its type arguments. + + The immediate type arguments to be replaced for type + parameters in the method. + + + + For enum types, gets the underlying type. Returns null on all other + kinds of types. + + + + + Returns whether this namespace is the unnamed, global namespace that is + at the root of all namespaces. + + + + + The contents of the AssemblySignatureKeyAttribute + + + + + Interface implemented by the compiler's internal representation of a symbol. + An object implementing this interface might also implement (as is done in VB), + or the compiler's symbols might be wrapped to implement ISymbol (as is done in C#). + + + + + Gets the indicating what kind of symbol it is. + + + + + Gets the symbol name. Returns the empty string if unnamed. + + + + + Allows a symbol to support comparisons that involve child type symbols + + + Because TypeSymbol equality can differ based on e.g. nullability, any symbols that contain TypeSymbols can also differ in the same way + This call allows the symbol to accept a comparison kind that should be used when comparing its contained types + + + + + Gets the for the immediately containing symbol. + + + + + Gets the for the containing assembly. Returns null if the + symbol is shared across multiple assemblies. + + + + + Gets the for the containing module. Returns null if the + symbol is shared across multiple modules. + + + + + Gets the for the containing type. Returns null if the + symbol is not contained within a type. + + + + + Gets the for the nearest enclosing namespace. Returns null if the + symbol isn't contained in a namespace. + + + + + Gets a value indicating whether the symbol is the original definition. Returns false + if the symbol is derived from another symbol, by type substitution for instance. + + + + + Gets the locations where the symbol was originally defined, either in source or + metadata. Some symbols (for example, partial classes) may be defined in more than one + location. + + + + + Returns true if this symbol was automatically created by the compiler, and does not have + an explicit corresponding source code declaration. + + + This is intended for symbols that are ordinary symbols in the language sense, and may be + used by code, but that are simply declared implicitly rather than with explicit language + syntax. + + + Examples include (this list is not exhaustive): + + The default constructor for a class or struct that is created if one is not provided. + The BeginInvoke/Invoke/EndInvoke methods for a delegate. + The generated backing field for an auto property or a field-like event. + The "this" parameter for non-static methods. + The "value" parameter for a property setter. + The parameters on indexer accessor methods (not on the indexer itself). + Methods in anonymous types. + + + + + + + Gets a indicating the declared accessibility for the symbol. + Returns NotApplicable if no accessibility is declared. + + + + + Gets a value indicating whether the symbol is static. + + + + + Gets a value indicating whether the symbol is virtual. + + + + + Gets a value indicating whether the symbol is an override of a base class symbol. + + + + + Gets a value indicating whether the symbol is abstract. + + + + + Returns an instance associated with this symbol. + + + + + Returns an instance associated with this symbol. + In general, this API is not safe to use. Transition from symbols to Cci interfaces + should be handled by PEModuleBuilder translation layer. One relatively safe scenario + is to use it on a symbol that is a definition. + + + + + Synthesized symbol that implements a method body feature (iterator, async, lambda, etc.) + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The symbol whose body lowering produced this synthesized symbol, + or null if the symbol is synthesized based on declaration. + + + + + True if this symbol body needs to be updated when the body is updated. + False if is null. + + + + + An enumerated value that identifies whether this type is an array, pointer, enum, and so on. + + + + + An enumerated value that identifies certain 'special' types such as . + Returns if the type is not special. + + + + + True if this type is known to be a reference type. It is never the case that + and both return true. However, for an unconstrained type + parameter, and will both return false. + + + + + True if this type is known to be a value type. It is never the case that + and both return true. However, for an unconstrained type + parameter, and will both return false. + + + + + Returns an instance associated with this symbol. + This API and should return the same object. + + + + + Default attribute usage for attribute types: + (a) Valid targets: AttributeTargets.All + (b) AllowMultiple: false + (c) Inherited: true + + + + + Information decoded from well-known custom attributes applied on an assembly. + + + + + Raw assembly version as specified in the AssemblyVersionAttribute, or Nothing if none specified. + If the string passed to AssemblyVersionAttribute contains * the version build and/or revision numbers are set to . + + + + + Returns data decoded from security attributes or null if there are no security attributes. + + + + + The attribute class. + + + + + The constructor on the attribute class. + + + + + Constructor arguments on the attribute. + + + + + Named (property value) arguments on the attribute. + + + + + Attribute is conditionally omitted if it is a source attribute and both the following are true: + (a) It has at least one applied conditional attribute AND + (b) None of conditional symbols are true at the attribute source location. + + + + + Checks if an applied attribute with the given attributeType matches the namespace name and type name of the given early attribute's description + and the attribute description has a signature with parameter count equal to the given attributeArgCount. + NOTE: We don't allow early decoded attributes to have optional parameters. + + + + + Returns the value of a constructor argument as type . + Throws if no constructor argument exists or the argument cannot be converted to the type. + + + + + Returns named attribute argument with the given as type . + If there is more than one named argument with this name, it returns the last one. + If no named argument is found then the is returned. + + The metadata property or field name. This name is case sensitive (both VB and C#). + SpecialType of the named argument. + Default value for the named argument. + + For user defined attributes VB allows duplicate named arguments and uses the last value. + Dev11 reports an error for pseudo-custom attributes when emitting metadata. We don't. + + + + + Decode the arguments to ObsoleteAttribute. ObsoleteAttribute can have 0, 1 or 2 arguments. + + + + + Decode the arguments to DeprecatedAttribute. DeprecatedAttribute can have 3 or 4 arguments. + + + + + Decode the arguments to ExperimentalAttribute. ExperimentalAttribute has 0 arguments. + + + + + Used to determine if two instances are identical, + i.e. they have the same attribute type, attribute constructor and have identical arguments. + + + + + Information decoded from early well-known custom attributes applied on an event. + + + + + Information decoded from well-known custom attributes applied on an event. + + + + + Information decoded from early well-known custom attributes applied on a field. + + + + + Information decoded from well-known custom attributes applied on a field. + + + + + Returns marshalling data or null of MarshalAs attribute isn't applied on the field. + + + + + Information decoded from early well-known custom attributes applied on a method. + + + + + Information decoded from well-known custom attributes applied on a method. + + + + + Returns data decoded from security attributes or null if there are no security attributes. + + + + + Information decoded from well-known custom attributes applied on a module. + + + + + Information decoded from early well-known custom attributes applied on a parameter. + + + + + Information decoded from well-known custom attributes applied on a parameter. + + + + + Returns marshalling data or null of MarshalAs attribute isn't applied on the parameter. + + + + + Information decoded from early well-known custom attributes applied on a property. + + + + + Information decoded from well-known custom attributes applied on a property. + + + + + Information decoded from well-known custom attributes applied on a method return value. + + + + + Returns marshalling data or null of MarshalAs attribute isn't applied on the return value. + + + + + Information decoded from early well-known custom attributes applied on a type. + + + + + Information decoded from well-known custom attributes applied on a type. + + + + + Returns data decoded from security attributes or null if there are no security attributes. + + + + + Represents a bag of custom attributes and the associated decoded well-known attribute data. + + + + + Instance representing sealed custom attribute bag with no attributes. + + + + + Returns a non-sealed custom attribute bag with null initialized , null initialized and uninitialized . + + + + + Sets the early decoded well-known attribute data on the bag in a thread safe manner. + Stored early decoded data is immutable and cannot be updated further. + + Returns true if early decoded data were stored into the bag on this thread. + + + + Sets the decoded well-known attribute data (except the early data) on the bag in a thread safe manner. + Stored decoded data is immutable and cannot be updated further. + + Returns true if decoded data were stored into the bag on this thread. + + + + Sets the bound attributes on the bag in a thread safe manner. + If store succeeds, it seals the bag and makes the bag immutable. + + Returns true if bound attributes were stored into the bag on this thread. + + + + Gets the stored bound attributes in the bag. + + This property can only be accessed on a sealed bag. + + + + Gets the decoded well-known attribute data (except the early data) in the bag. + + This property can only be accessed on the bag after has been invoked. + + + + Gets the early decoded well-known attribute data in the bag. + + This property can only be accessed on the bag after has been invoked. + + + + Return whether early decoded attribute data has been computed and stored on the bag and it is safe to access from this bag. + Return value of true doesn't guarantee that bound attributes or remaining decoded attribute data has also been initialized. + + + + + Return whether all decoded attribute data has been computed and stored on the bag and it is safe to access from this bag. + Return value of true doesn't guarantee that bound attributes have also been initialized. + + + + + Enum representing the current state of attribute binding/decoding for a corresponding CustomAttributeBag. + + + + + Bag has been created, but no decoded data or attributes have been stored. + CustomAttributeBag is in this state during early decoding phase. + + + + + Early decoded attribute data has been computed and stored on the bag, but bound attributes or remaining decoded attribute data is not stored. + Only can be accessed from this bag. + + + + + All decoded attribute data has been computed and stored on the bag, but bound attributes are not yet stored. + Both and can be accessed from this bag. + + + + + Bound attributes have been computed and stored on this bag. + + + + + CustomAttributeBag is completely initialized and immutable. + + + + + Contains common arguments to Symbol.DecodeWellKnownAttribute method in both the language compilers. + + + + + Object to store the decoded data from bound well-known attributes. + Created lazily only when some decoded data needs to be stored, null otherwise. + + + + + Gets or creates the decoded data object. + + + This method must be called only when some decoded data will be stored into it subsequently. + + + + + Returns true if some decoded data has been stored into . + + + + + Gets the stored decoded data. + + + Assumes is true. + + + + + Syntax of the attribute to decode. Might be null when the attribute information is not coming + from syntax. For example, an assembly attribute propagated from added module to the resulting assembly. + + + + + Bound attribute to decode. + + + + + The index of the attribute in the list of attributes to decode. + + + + + Total count of attributes to decode. + + + + + Diagnostic bag. + + + + + Specific part of the symbol to which the attributes apply, or AttributeLocation.None if the attributes apply to the symbol itself. + Used e.g. for return type attributes of a method symbol. + + + + + Contains common arguments to Symbol.EarlyDecodeWellKnownAttribute method in both the language compilers. + + + + + Object to store the decoded data from early bound well-known attributes. + Created lazily only when some decoded data needs to be stored, null otherwise. + + + + + Gets or creates the decoded data object. + + + This method must be called only when some decoded data will be stored into it subsequently. + + + + + Returns true if some decoded data has been stored into . + + + + + Gets the stored decoded data. + + + Assumes is true. + + + + + Binder to bind early well-known attributes. + + + + + Bound type of the attribute to decode. + + + + + Syntax of the attribute to decode. + + + + + Specific part of the symbol to which the attributes apply, or AttributeLocation.None if the attributes apply to the symbol itself. + Used e.g. for return type attributes of a method symbol. + + + + + Base class for storing information decoded from early well-known custom attributes. + + + CONSIDER: Should we remove this class and let the sub-classes derived from WellKnownAttributeData? + + + + + Information decoded from . + + + + + Returns an instance of with all types replaced by types returned by specified translator. + Returns this instance if it doesn't hold on any types. + + + + + Information decoded from . + + + + + True if an error should be thrown for the . Default is false in which case + a warning is thrown. + + + + + The message that will be shown when an error/warning is created for . + + + + + The custom diagnostic ID to use for obsolete diagnostics. + If null, diagnostics are produced using the compiler default diagnostic IDs. + + + + + + The custom help URL format string for obsolete diagnostics. + Expected to contain zero or one format items. + + + When specified, the obsolete diagnostic's will be produced + by formatting this string using the as the single argument. + + + + e.g. with a value "TEST1", + and a value ,
+ the diagnostic will have the HelpLinkUri
. +
+
+
+ + + Information decoded from security attributes, i.e. attributes derived from well-known SecurityAttribute, applied on a method/type/assembly. + + + + + Used for retrieving applied source security attributes, i.e. attributes derived from well-known SecurityAttribute. + + + + + Base class for storing information decoded from well-known custom attributes. + + + + + Used to distinguish cases when attribute is applied with null value and when attribute is not applied. + For some well-known attributes, the latter case will return string stored in + field. + + + + + If true, a language may use the modified storage location without + being aware of the meaning of the modification, modopt vs. modreq. + + + + + A type used as a tag that indicates which type of modification applies. + + + + + Represents a using alias (Imports alias in Visual Basic). + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the for the + namespace or type referenced by the alias. + + + + + Represents an array. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the number of dimensions of this array. A regular single-dimensional array + has rank 1, a two-dimensional array has rank 2, etc. + + + + + Is this a zero-based one-dimensional array, i.e. SZArray in CLR terms. + SZArray is an array type encoded in metadata with ELEMENT_TYPE_SZARRAY (always single-dim array with 0 lower bound). + Non-SZArray type is encoded in metadata with ELEMENT_TYPE_ARRAY and with optional sizes and lower bounds. Even though + non-SZArray can also be a single-dim array with 0 lower bound, the encoding of these types in metadata is distinct. + + + + + Specified lower bounds for dimensions, by position. The length can be less than , + meaning that some trailing dimensions don't have the lower bound specified. + The most common case is all dimensions are zero bound - a default (Nothing in VB) array is returned in this case. + + + + + Specified sizes for dimensions, by position. The length can be less than , + meaning that some trailing dimensions don't have the size specified. + The most common case is none of the dimensions have the size specified - an empty array is returned. + + + + + Gets the type of the elements stored in the array. + + + + + Gets the top-level nullability of the elements stored in the array. + + + + + Custom modifiers associated with the array type, or an empty array if there are none. + + + + + Represents a .NET assembly, consisting of one or more modules. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + True if the assembly contains interactive code. + + + + + Gets the name of this assembly. + + + + + Gets the merged root namespace that contains all namespaces and types defined in the modules + of this assembly. If there is just one module in this assembly, this property just returns the + GlobalNamespace of that module. + + + + + Gets the modules in this assembly. (There must be at least one.) The first one is the main module + that holds the assembly manifest. + + + + + Gets the set of type identifiers from this assembly. + + + + + Gets the set of namespace names from this assembly. + + + + + Gets a value indicating whether this assembly gives + access to internal symbols + + + + Lookup a type within the assembly using the canonical CLR metadata name of the type. + + Type name. + Symbol for the type or null if type cannot be found or is ambiguous. + + + + Determines if the assembly might contain extension methods. + If false, the assembly does not contain extension methods. + + + + + Returns the type symbol for a forwarded type based its canonical CLR metadata name. + The name should refer to a non-nested type. If type with this name is not forwarded, + null is returned. + + + + + Returns type symbols for top-level (non-nested) types forwarded by this assembly. + + + + + If this symbol represents a metadata assembly returns the underlying . + + Otherwise, this returns . + + + + + A symbol representing a discarded value, e.g. a symbol in the result of + GetSymbolInfo for _ in M(out _) or (x, _) = e. + + + + + The type of the discarded value. + + + + + The top-level nullability of the discarded value. + + + + + Represents the 'dynamic' type in C#. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + An IErrorTypeSymbol is used when the compiler cannot determine a symbol object to return because + of an error. For example, if a field is declared "Goo x;", and the type "Goo" cannot be + found, an IErrorTypeSymbol is returned when asking the field "x" what it's type is. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + When constructing this type, there may have been symbols that seemed to + be what the user intended, but were unsuitable. For example, a type might have been + inaccessible, or ambiguous. This property returns the possible symbols that the user + might have intended. It will return no symbols if no possible symbols were found. + See the CandidateReason property to understand why the symbols were unsuitable. + + + This only applies if this INamedTypeSymbol has TypeKind TypeKind.Error. + If not, an empty ImmutableArray is returned. + + + + + If CandidateSymbols returns one or more symbols, returns the reason that those + symbols were not chosen. Otherwise, returns None. + + + + + Represents an event. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The type of the event. + + + + + The top-level nullability of the event. + + + + + Returns true if the event is a WinRT type event. + + + + + The 'add' accessor of the event. Null only in error scenarios. + + + + + The 'remove' accessor of the event. Null only in error scenarios. + + + + + The 'raise' accessor of the event. Null if there is no raise method. + + + + + The original definition of the event. If the event is constructed from another + symbol by type substitution, OriginalDefinition gets the original symbol, as it was + defined in source or metadata. + + + + + Returns the overridden event, or null. + + + + + Returns interface properties explicitly implemented by this event. + + + Properties imported from metadata can explicitly implement more than one event. + + + + + Represents a field in a class, struct or enum. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + If this field serves as a backing variable for an automatically generated + property or a field-like event, returns that + property/event. Otherwise returns null. + Note, the set of possible associated symbols might be expanded in the future to + reflect changes in the languages. + + + + + Returns true if this field was declared as "const" (i.e. is a constant declaration). + Also returns true for an enum member. + + + + + Returns true if this field was declared as "readonly". + + + + + Returns true if this field was declared as "volatile". + + + + + True if this field is required to be set in an object initializer during construction. + + + + + Returns true if this field was declared as "fixed". + Note that for a fixed-size buffer declaration, this.Type will be a pointer type, of which + the pointed-to type will be the declared element type of the fixed-size buffer. + + + + + If IsFixedSizeBuffer is true, the value between brackets in the fixed-size-buffer declaration. + If IsFixedSizeBuffer is false or there is an error (such as a bad constant value in source), FixedSize is 0. + Note that for fixed-size buffer declaration, this.Type will be a pointer type, of which + the pointed-to type will be the declared element type of the fixed-size buffer. + + + + + Returns the RefKind of the field. + + + + + Custom modifiers associated with the ref modifier, or an empty array if there are none. + + + + + Gets the type of this field. + + + + + Gets the top-level nullability of this field. + + + + + Returns false if the field wasn't declared as "const", or constant value was omitted or erroneous. + True otherwise. + + + + + Gets the constant value of this field + + + + + Returns custom modifiers associated with the field, or an empty array if there are none. + + + + + Get the original definition of this symbol. If this symbol is derived from another + symbol by (say) type substitution, this gets the original symbol, as it was defined in + source or metadata. + + + + + If this field represents a tuple element, returns a corresponding default element field. + Otherwise returns null. + + + A tuple type will always have default elements such as Item1, Item2, Item3... + This API allows matching a field that represents a named element, such as "Alice" + to the corresponding default element field such as "Item1" + + + + + Returns true if this field represents a tuple element which was given an explicit name. + + + + + Represents a function pointer type such as "delegate*<void>". + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the signature of the function pointed to by an instance of the function pointer type. + + + + + Represents a label in method body + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the immediately containing of this . + + + + + Represents a local variable in method body. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the type of this local variable. + + + + + Gets the top-level nullability of this local variable. + + + + + Returns true if this local variable was declared as "const" (i.e. is a constant declaration). + Also returns true for an enum member. + + + + + Returns true if this local is a ref local or a ref readonly local. + Use to get more detailed information. + + + + + Whether the variable is a ref or ref readonly local. + + + + + Returns the scoped kind of the local. + + + + + Returns false if the local variable wasn't declared as "const", or constant value was omitted or erroneous. + True otherwise. + + + + + Gets the constant value of this local variable. + + + + + Returns true if this local variable is function return variable whose name is the function's name, + whose type is the return type of the function and whose initial value is the default of its type. + + + Is always false for the C# local variable + + + + + Returns true if the local variable is declared with fixed-pointer-initializer (in unsafe context). + + + + + Returns true if this local variable is declared as iteration variable + + + + + Returns true if the local variable is declared in resource-acquisition of a 'using statement'; + otherwise false + + + + using (var localVariable = new StreamReader(path)) { ... } + + + + + + Represents a method or method-like symbol (including constructor, + destructor, operator, or property/event accessor). + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets what kind of method this is. There are several different kinds of things in the + C# language that are represented as methods. This property allow distinguishing those things + without having to decode the name of the method. + + + + + Returns the arity of this method, or the number of type parameters it takes. + A non-generic method has zero arity. + + + + + Returns whether this method is generic; i.e., does it have any type parameters? + + + + + Returns true if this method is an extension method. + + + + + Returns true if this method is an async method + + + + + Returns whether this method is using CLI VARARG calling convention. This is used for + C-style variable argument lists. This is used extremely rarely in C# code and is + represented using the undocumented "__arglist" keyword. + + Note that methods with "params" on the last parameter are indicated with the "IsParams" + property on ParameterSymbol, and are not represented with this property. + + + + + Returns whether this built-in operator checks for integer overflow. + + + + + Returns true if this method hides base methods by name. This cannot be specified directly + in the C# language, but can be true for methods defined in other languages imported from + metadata. The equivalent of the "hidebyname" flag in metadata. + + + + + Returns true if this method has no return type; i.e., returns "void". + + + + + Returns true if this method returns by reference. + + + + + Returns true if this method returns by ref readonly. + + + + + Returns the RefKind of the method. + + + + + Gets the return type of the method. + + + + + Gets the top-level nullability of the return type of the method. + + + + + Returns the type arguments that have been substituted for the type parameters. + If nothing has been substituted for a given type parameter, + then the type parameter itself is consider the type argument. + + + + + Returns the top-level nullability of the type arguments that have been substituted + for the type parameters. If nothing has been substituted for a given type parameter, + then is returned. + + + + + Get the type parameters on this method. If the method has not generic, + returns an empty list. + + + + + Gets the parameters of this method. If this method has no parameters, returns + an empty list. + + + + + Returns the method symbol that this method was constructed from. The resulting + method symbol + has the same containing type (if any), but has type arguments that are the same + as the type parameters (although its containing type might not). + + + + + Indicates whether the method is readonly, + i.e. whether the 'this' receiver parameter is 'ref readonly'. + Returns true for readonly instance methods and accessors + and for reduced extension methods with a 'this in' parameter. + + + + + Returns true for 'init' set accessors, and false otherwise. + + + + + Get the original definition of this symbol. If this symbol is derived from another + symbol by (say) type substitution, this gets the original symbol, as it was defined in + source or metadata. + + + + + If this method overrides another method (because it both had the override modifier + and there correctly was a method to override), returns the overridden method. + + + + + If this method can be applied to an object, returns the type of object it is applied to. + + + + + If this method can be applied to an object, returns the top-level nullability of the object it is applied to. + + + + + If this method is a reduced extension method, returns the definition of extension + method from which this was reduced. Otherwise, returns null. + + + + + If this method is a reduced extension method, returns a type inferred during reduction process for the type parameter. + + Type parameter of the corresponding method. + Inferred type or Nothing if nothing was inferred. + If this is not a reduced extension method. + If is null. + If doesn't belong to the corresponding method. + + + + If this is an extension method that can be applied to a receiver of the given type, + returns a reduced extension method symbol thus formed. Otherwise, returns null. + + + + + Returns interface methods explicitly implemented by this method. + + + Methods imported from metadata can explicitly implement more than one method, + that is why return type is ImmutableArray. + + + + + Returns the list of custom modifiers, if any, associated with the return type. + + + + + Custom modifiers associated with the ref modifier, or an empty array if there are none. + + + + + Returns the list of custom attributes, if any, associated with the returned value. + + + + + The calling convention enum of the method symbol. + + + + + Modifier types that are considered part of the calling convention of this method, if the is + and the is . If this is not a function pointer signature or the calling convention is + not unmanaged, this is an empty array. Order and duplication of these modifiers reflect source/metadata order and duplication, whichever this symbol came from. + + + + + Returns a symbol (e.g. property, event, etc.) associated with the method. + + + If this method has of or , + returns the property that this method is the getter or setter for. + If this method has of or , + returns the event that this method is the adder or remover for. + Note, the set of possible associated symbols might be expanded in the future to + reflect changes in the languages. + + + + + Returns a constructed method given its type arguments. + + The immediate type arguments to be replaced for type + parameters in the method. + + + + Returns a constructed method given its type arguments and type argument nullable annotations. + + + + + If this is a partial method implementation part, returns the corresponding + definition part. Otherwise null. + + + + + If this is a partial method declaration without a body, and the method is + implemented with a body, returns that implementing definition. Otherwise + null. + + + + + Returns the implementation flags for the given method symbol. + + + + + Return true if this is a partial method definition without a body. If there + is an implementing body, it can be retrieved with . + + + + + Platform invoke information, or null if the method isn't a P/Invoke. + + + + + If this method is a Lambda method (MethodKind = MethodKind.LambdaMethod) and + there is an anonymous delegate associated with it, returns this delegate. + + Returns null if the symbol is not a lambda or if it does not have an + anonymous delegate associated with it. + + + + + Returns a flag indicating whether this symbol has at least one applied/inherited conditional attribute. + + + + + Represents a module within an assembly. Every assembly contains one or more modules. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Returns a NamespaceSymbol representing the global (root) namespace, with + module extent, that can be used to browse all of the symbols defined in this module. + + + + + Given a namespace symbol, returns the corresponding module specific namespace symbol + + + + + Returns an array of assembly identities for assemblies referenced by this module. + Items at the same position from ReferencedAssemblies and from ReferencedAssemblySymbols + correspond to each other. + + + + + Returns an array of AssemblySymbol objects corresponding to assemblies referenced + by this module. Items at the same position from ReferencedAssemblies and + from ReferencedAssemblySymbols correspond to each other. + + + + + If this symbol represents a metadata module returns the underlying . + + Otherwise, this returns . + + + + + Represents a type other than an array, a pointer, a type parameter. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Returns the arity of this type, or the number of type parameters it takes. + A non-generic type has zero arity. + + + + + True if this type or some containing type has type parameters. + + + + + True if this is a reference to an unbound generic type. A generic type is + considered unbound if all of the type argument lists in its fully qualified + name are empty. Note that the type arguments of an unbound generic type will be + returned as error types because they do not really have type arguments. An unbound + generic type yields null for its BaseType and an empty result for its Interfaces. + + + + + Returns true if the type is a Script class. + It might be an interactive submission class or a Script class in a csx file. + + + + + Returns true if the type is the implicit class that holds onto invalid global members (like methods or + statements in a non script file). + + + + + Specifies that the class or interface is imported from another module. See + and + + + + + Indicates the type is declared in source and is only visible in the file it is declared in. + + + + + Returns collection of names of members declared within this type. + + + + + Returns the type parameters that this type has. If this is a non-generic type, + returns an empty ImmutableArray. + + + + + Returns the type arguments that have been substituted for the type parameters. + If nothing has been substituted for a given type parameter, + then the type parameter itself is considered the type argument. + + + + + Returns the top-level nullability of the type arguments that have been substituted + for the type parameters. If nothing has been substituted for a given type parameter, + then is returned for that type argument. + + + + + Returns custom modifiers for the type argument that has been substituted for the type parameter. + The modifiers correspond to the type argument at the same ordinal within the + array. Returns an empty array if there are no modifiers. + + + + + Get the original definition of this type symbol. If this symbol is derived from another + symbol by (say) type substitution, this gets the original symbol, as it was defined in + source or metadata. + + + + + For delegate types, gets the delegate's invoke method. Returns null on + all other kinds of types. Note that it is possible to have an ill-formed + delegate type imported from metadata which does not have an Invoke method. + Such a type will be classified as a delegate but its DelegateInvokeMethod + would be null. + + + + + For enum types, gets the underlying type. Returns null on all other + kinds of types. + + + + + Returns the type symbol that this type was constructed from. This type symbol + has the same containing type (if any), but has type arguments that are the same + as the type parameters (although its containing type might not). + + + + + Returns a constructed type given its type arguments. + + The immediate type arguments to be replaced for type + parameters in the type. + + + + Returns a constructed type given its type arguments and type argument nullable annotations. + + + + + Returns an unbound generic type of this named type. + + + + + Get the instance constructors for this type. + + + + + Get the static constructors for this type. + + + + + Get the both instance and static constructors for this type. + + + + + For implicitly declared delegate types returns the EventSymbol that caused this + delegate type to be generated. + For all other types returns null. + Note, the set of possible associated symbols might be expanded in the future to + reflect changes in the languages. + + + + + Determines if the symbol might contain extension methods. + If false, the symbol does not contain extension methods. + + + + + If this is a tuple type with element names, returns the symbol for the tuple type without names. + Otherwise, returns null. + The type argument corresponding to the type of the extension field (VT[8].Rest), + which is at the 8th (one based) position is always a symbol for another tuple, + rather than its underlying type. + + + + + Returns fields that represent tuple elements for types that are tuples. + + If this type is not a tuple, then returns default. + + + + + True if the type is serializable (has Serializable metadata flag). + + + + + If this is a native integer, returns the symbol for the underlying type, + either or . + Otherwise, returns null. + + + + + Represents either a namespace or a type. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Get all the members of this symbol. + + An ImmutableArray containing all the members of this symbol. If this symbol has no members, + returns an empty ImmutableArray. Never returns Null. + + + + Get all the members of this symbol that have a particular name. + + An ImmutableArray containing all the members of this symbol with the given name. If there are + no members with this name, returns an empty ImmutableArray. Never returns Null. + + + + Get all the members of this symbol that are types. + + An ImmutableArray containing all the types that are members of this symbol. If this symbol has no type members, + returns an empty ImmutableArray. Never returns null. + + + + Get all the members of this symbol that are types that have a particular name, of any arity. + + An ImmutableArray containing all the types that are members of this symbol with the given name. + If this symbol has no type members with this name, + returns an empty ImmutableArray. Never returns null. + + + + Get all the members of this symbol that are types that have a particular name and arity + + An ImmutableArray containing all the types that are members of this symbol with the given name and arity. + If this symbol has no type members with this name and arity, + returns an empty ImmutableArray. Never returns null. + + + + Returns true if this symbol is a namespace. If it is not a namespace, it must be a type. + + + + + Returns true if this symbols is a type. If it is not a type, it must be a namespace. + + + + + Represents a namespace. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Get all the members of this symbol. + + + + + Get all the members of this symbol that have a particular name. + + + + + Get all the members of this symbol that are namespaces. + + + + + Returns whether this namespace is the unnamed, global namespace that is + at the root of all namespaces. + + + + + The kind of namespace: Module, Assembly or Compilation. + Module namespaces contain only members from the containing module that share the same namespace name. + Assembly namespaces contain members for all modules in the containing assembly that share the same namespace name. + Compilation namespaces contain all members, from source or referenced metadata (assemblies and modules) that share the same namespace name. + + + + + The containing compilation for compilation namespaces. + + + + + If a namespace is an assembly or compilation namespace, it may be composed of multiple + namespaces that are merged together. If so, ConstituentNamespaces returns + all the namespaces that were merged. If this namespace was not merged, returns + an array containing only this namespace. + + + + + Represents a parameter of a method or property. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Whether the parameter passed by value or by reference. + + + + + Returns the scoped kind of the parameter. + + + + + Returns true if the parameter was declared as a parameter array. + + + + + Returns true if the parameter is optional. + + + + + Returns true if the parameter is the hidden 'this' ('Me' in Visual Basic) parameter. + + + + + Returns true if the parameter is a discard parameter. + + + + + Gets the type of the parameter. + + + + + Gets the top-level nullability of the parameter. + + + + + Custom modifiers associated with the parameter type, or an empty array if there are none. + + + + + Custom modifiers associated with the ref modifier, or an empty array if there are none. + + + + + Gets the ordinal position of the parameter. The first parameter has ordinal zero. + The 'this' parameter ('Me' in Visual Basic) has ordinal -1. + + + + + Returns true if the parameter specifies a default value to be passed + when no value is provided as an argument to a call. The default value + can be obtained with the property. + + + + + Returns the default value of the parameter. + + + Returns null if the parameter type is a struct and the default value of the parameter + is the default value of the struct type. + + The parameter has no default value. + + + + Get the original definition of this symbol. If this symbol is derived from another + symbol by (say) type substitution, this gets the original symbol, as it was defined in + source or metadata. + + + + + Represents a pointer type such as "int *". Pointer types + are used only in unsafe code. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the type of the storage location that an instance of the pointer type points to. + + + + + Custom modifiers associated with the pointer type, or an empty array if there are none. + + + Some managed languages may represent special information about the pointer type + as a custom modifier on either the pointer type or the element type, or + both. + + + + + Represents a preprocessing conditional compilation symbol. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a property or indexer. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Returns whether the property is really an indexer. + + + + + True if this is a read-only property; that is, a property with no set accessor. + + + + + True if this is a write-only property; that is, a property with no get accessor. + + + + + True if this property is required to be set in an object initializer during construction. + + + + + Returns true if this property is an auto-created WithEvents property that takes place of + a field member when the field is marked as WithEvents. + + + + + Returns true if this property returns by reference. + + + + + Returns true if this property returns by reference a readonly variable. + + + + + Returns the RefKind of the property. + + + + + The type of the property. + + + + + The parameters of this property. If this property has no parameters, returns + an empty list. Parameters are only present on indexers, or on some properties + imported from a COM interface. + + + + + The 'get' accessor of the property, or null if the property is write-only. + + + + + The 'set' accessor of the property, or null if the property is read-only. + + + + + The original definition of the property. If the property is constructed from another + symbol by type substitution, OriginalDefinition gets the original symbol, as it was + defined in source or metadata. + + + + + Returns the overridden property, or null. + + + + + Returns interface properties explicitly implemented by this property. + + + Properties imported from metadata can explicitly implement more than one property. + + + + + Custom modifiers associated with the ref modifier, or an empty array if there are none. + + + + + The list of custom modifiers, if any, associated with the type of the property. + + + + + Represents a range variable in a query expression. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a source assembly symbol exposed by the compiler. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Represents a symbol (namespace, class, method, parameter, etc.) + exposed by the compiler. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + Gets the indicating what kind of symbol it is. + + + + + Gets the source language ("C#" or "Visual Basic"). + + + + + Gets the symbol name. Returns the empty string if unnamed. + + + + + Gets the name of a symbol as it appears in metadata. Most of the time, this + is the same as the Name property, with the following exceptions: + + + The metadata name of generic types includes the "`1", "`2" etc. suffix that + indicates the number of type parameters (it does not include, however, names of + containing types or namespaces). + + + The metadata name of explicit interface names have spaces removed, compared to + the name property. + + + The length of names is limited to not exceed metadata restrictions. + + + + + + + Gets the metadata token associated with this symbol, or 0 if the symbol is not loaded from metadata. + + + + + Gets the for the immediately containing symbol. + + + + + Gets the for the containing assembly. Returns null if the + symbol is shared across multiple assemblies. + + + + + Gets the for the containing module. Returns null if the + symbol is shared across multiple modules. + + + + + Gets the for the containing type. Returns null if the + symbol is not contained within a type. + + + + + Gets the for the nearest enclosing namespace. Returns null if the + symbol isn't contained in a namespace. + + + + + Gets a value indicating whether the symbol is the original definition. Returns false + if the symbol is derived from another symbol, by type substitution for instance. + + + + + Gets a value indicating whether the symbol is static. + + + + + Gets a value indicating whether the symbol is virtual. + + + + + Gets a value indicating whether the symbol is an override of a base class symbol. + + + + + Gets a value indicating whether the symbol is abstract. + + + + + Gets a value indicating whether the symbol is sealed. + + + + + Gets a value indicating whether the symbol is defined externally. + + + + + Returns true if this symbol was automatically created by the compiler, and does not have + an explicit corresponding source code declaration. + + + This is intended for symbols that are ordinary symbols in the language sense, and may be + used by code, but that are simply declared implicitly rather than with explicit language + syntax. + + + Examples include (this list is not exhaustive): + + The default constructor for a class or struct that is created if one is not provided. + The BeginInvoke/Invoke/EndInvoke methods for a delegate. + The generated backing field for an auto property or a field-like event. + The "this" parameter for non-static methods. + The "value" parameter for a property setter. + The parameters on indexer accessor methods (not on the indexer itself). + Methods in anonymous types. + + + + The class and entry point method for top-level statements are not considered as implicitly declared. + + + + + + Returns true if this symbol can be referenced by its name in code. + + + + + Gets the locations where the symbol was originally defined, either in source or + metadata. Some symbols (for example, partial classes) may be defined in more than one + location. + + + + + Get the syntax node(s) where this symbol was declared in source. Some symbols (for example, + partial classes) may be defined in more than one location. This property should return + one or more syntax nodes only if the symbol was declared in source code and also was + not implicitly declared (see the IsImplicitlyDeclared property). + + + Note that for namespace symbol, the declaring syntax might be declaring a nested namespace. + For example, the declaring syntax node for N1 in "namespace N1.N2 {...}" is the entire + NamespaceDeclarationSyntax for N1.N2. For the global namespace, the declaring syntax will + be the CompilationUnitSyntax. + + + + The syntax node(s) that declared the symbol. If the symbol was declared in metadata + or was implicitly declared, returns an empty read-only array. + + + + + Gets the attributes for the symbol. Returns an empty + if there are no attributes. + + + + + Gets a indicating the declared accessibility for the symbol. + Returns NotApplicable if no accessibility is declared. + + + + + Gets the for the original definition of the symbol. + If this symbol is derived from another symbol, by type substitution for instance, + this gets the original symbol, as it was defined in source or metadata. + + + + + Returns the Documentation Comment ID for the symbol, or null if the symbol doesn't + support documentation comments. + + + + + Gets the XML (as text) for the comment associated with the symbol. + + Preferred culture or null for the default. + Optionally, expand <include> elements. No impact on non-source documentation comments. + Token allowing cancellation of request. + The XML that would be written to the documentation file for the symbol. + + + + Converts the symbol to a string representation. + + Format or null for the default. + A formatted string representation of the symbol. + + + + Convert a symbol to an array of string parts, each of which has a kind. Useful for + colorizing the display string. + + Formatting rules - null implies + SymbolDisplayFormat.ErrorMessageFormat. + A read-only array of string parts. + + + + Convert a symbol to a string that can be displayed to the user. May be tailored to a + specific location in the source code. + + Binding information (for determining names appropriate to + the context). + A position in the source code (context). + Formatting rules - null implies + SymbolDisplayFormat.MinimallyQualifiedFormat. + A formatted string that can be displayed to the user. + + + + Convert a symbol to an array of string parts, each of which has a kind. May be tailored + to a specific location in the source code. Useful for colorizing the display string. + + Binding information (for determining names appropriate to + the context). + A position in the source code (context). + Formatting rules - null implies + SymbolDisplayFormat.MinimallyQualifiedFormat. + A read-only array of string parts. + + + + Indicates that this symbol uses metadata that cannot be supported by the language. + + + Examples include: + + Pointer types in VB + ByRef return type + Required custom modifiers + + + + + This is distinguished from, for example, references to metadata symbols defined in assemblies that weren't referenced. + Symbols where this returns true can never be used successfully, and thus should never appear in any IDE feature. + + + + This is set for metadata symbols, as follows: + + Type - if a type is unsupported (for example, a pointer type) + Method - parameter or return type is unsupported + Field - type is unsupported + Event - type is unsupported + Property - type is unsupported + Parameter - type is unsupported + + + + + + + Determines if this symbol is equal to another, according to the rules of the provided + + The other symbol to compare against + The to use when comparing symbols + True if the symbols are equivalent. + + + + Returns the constructed form of the ReducedFrom property, + including the type arguments that were either inferred during reduction or supplied at the call site. + + + + + Returns true if a given field is a default tuple element + + + + + Returns true if a given field is a tuple element + + + + + Return the name of the field if the field is an explicitly named tuple element. + Otherwise returns null. + + + Note that it is possible for an element to be both "Default" and to have a user provided name. + That could happen if the provided name matches the default name such as "Item10" + + + + + Given that an assembly with identity assemblyGrantingAccessIdentity granted access to assemblyWantingAccess, + check the public keys to ensure the internals-visible-to check should succeed. This is used by both the + C# and VB implementations as a helper to implement `bool IAssemblySymbol.GivesAccessTo(IAssemblySymbol toAssembly)`. + + + + + Represents a type parameter in a generic type or generic method. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + The ordinal position of the type parameter in the parameter list which declares + it. The first type parameter has ordinal zero. + + + + + The variance annotation, if any, of the type parameter declaration. Type parameters may be + declared as covariant (out), contravariant (in), or neither. + + + + + The type parameter kind of this type parameter. + + + + + The method that declares the type parameter, or null. + + + + + The type that declares the type parameter, or null. + + + + + True if the reference type constraint (class) was specified for the type parameter. + + + + + If is true, returns the top-level nullability of the + class constraint that was specified for the type parameter. If there was no class + constraint, this returns . + + + + + True if the value type constraint (struct) was specified for the type parameter. + + + + + True if the value type constraint (unmanaged) was specified for the type parameter. + + + + + True if the notnull constraint (notnull) was specified for the type parameter. + + + + + True if the parameterless constructor constraint (new()) was specified for the type parameter. + + + + + The types that were directly specified as constraints on the type parameter. + + + + + The top-level nullabilities that were directly specified as constraints on the + constraint types. + + + + + Get the original definition of this type symbol. If this symbol is derived from another + symbol by (say) type substitution, this gets the original symbol, as it was defined in + source or metadata. + + + + + If this is a type parameter of a reduced extension method, gets the type parameter definition that + this type parameter was reduced from. Otherwise, returns Nothing. + + + + + Represents a type. + + + This interface is reserved for implementation by its associated APIs. We reserve the right to + change it in the future. + + + + + An enumerated value that identifies whether this type is an array, pointer, enum, and so on. + + + + + The declared base type of this type, or null. The object type, interface types, + and pointer types do not have a base type. The base type of a type parameter + is its effective base class. + + + + + Gets the set of interfaces that this type directly implements. This set does not include + interfaces that are base interfaces of directly implemented interfaces. This does + include the interfaces declared as constraints on type parameters. + + + + + The list of all interfaces of which this type is a declared subtype, excluding this type + itself. This includes all declared base interfaces, all declared base interfaces of base + types, and all declared base interfaces of those results (recursively). This also is the effective + interface set of a type parameter. Each result + appears exactly once in the list. This list is topologically sorted by the inheritance + relationship: if interface type A extends interface type B, then A precedes B in the + list. This is not quite the same as "all interfaces of which this type is a proper + subtype" because it does not take into account variance: AllInterfaces for + IEnumerable<string> will not include IEnumerable<object>. + + + + + True if this type is known to be a reference type. It is never the case that + and both return true. However, for an unconstrained type + parameter, and will both return false. + + + + + True if this type is known to be a value type. It is never the case that + and both return true. However, for an unconstrained type + parameter, and will both return false. + + + + + Is this a symbol for an anonymous type (including anonymous VB delegate). + + + + + Is this a symbol for a tuple . + + + + + True if the type represents a native integer. In C#, the types represented + by language keywords 'nint' and 'nuint'. + + + + + The original definition of this symbol. If this symbol is constructed from another + symbol by type substitution then gets the original symbol as it was defined in + source or metadata. + + + + + An enumerated value that identifies certain 'special' types such as . + Returns if the type is not special. + + + + + Returns the corresponding symbol in this type or a base type that implements + interfaceMember (either implicitly or explicitly), or null if no such symbol exists + (which might be either because this type doesn't implement the container of + interfaceMember, or this type doesn't supply a member that successfully implements + interfaceMember). + + + Must be a non-null interface property, method, or event. + + + + + True if the type is ref-like, meaning it follows rules similar to CLR by-ref variables. False if the type + is not ref-like or if the language has no concept of ref-like types. + + + is a commonly used ref-like type. + + + + + True if the type is unmanaged according to language rules. False if managed or if the language + has no concept of unmanaged types. + + + + + True if the type is readonly. + + + + + True if the type is a record. + + + + + Converts an ITypeSymbol and a nullable flow state to a string representation. + + The top-level nullability to use for formatting. + Format or null for the default. + A formatted string representation of the symbol with the given nullability. + + + + Converts a symbol to an array of string parts, each of which has a kind. Useful + for colorizing the display string. + + The top-level nullability to use for formatting. + Format or null for the default. + A read-only array of string parts. + + + + Converts a symbol to a string that can be displayed to the user. May be tailored to a + specific location in the source code. + + Binding information (for determining names appropriate to + the context). + The top-level nullability to use for formatting. + A position in the source code (context). + Formatting rules - null implies + A formatted string that can be displayed to the user. + + + + Convert a symbol to an array of string parts, each of which has a kind. May be tailored + to a specific location in the source code. Useful for colorizing the display string. + + Binding information (for determining names appropriate to + the context). + The top-level nullability to use for formatting. + A position in the source code (context). + Formatting rules - null implies + A read-only array of string parts. + + + + Nullable annotation associated with the type, or if there are none. + + + + + Returns the same type as this type but with the given nullable annotation. + + The nullable annotation to use + + + + A class that provides constants for common language names. + + + + + The common name used for the C# language. + + + + + The common name used for the Visual Basic language. + + + + + The common name used for the F# language. + + + F# is not a supported compile target for the Roslyn compiler. + + + + + Enumeration of the possible "degrees of managed" for a type. + + + + + Enumeration for possible kinds of method symbols. + + + + + An anonymous method or lambda expression + + + + + + + + + + Method is a constructor. + + + + + Method is a conversion. + + + + + Method is a delegate invoke. + + + + + Method is a destructor. + + + + + Method is an event add. + + + + + Method is an event raise. + + + + + Method is an event remove. + + + + + Method is an explicit interface implementation. + + + + + Method is an operator. + + + + + Method is an ordinary method. + + + + + Method is a property get. + + + + + Method is a property set. + + + + + An extension method with the "this" parameter removed. + + + + + Method is a static constructor. + + + + + + + + + + A built-in operator. + + + + + Declare Sub or Function. + + + + + Method is declared inside of another method. + + + + + Method represents the signature of a function pointer type. + + + + + Describes the kind of the namespace extent. + + + + + The nullable annotation of the expression represented by the syntax node. This represents + the nullability of expressions that can be assigned to this expression, if this expression + can be used as an lvalue. + + + + + The nullable flow state of the expression represented by the syntax node. This represents + the compiler's understanding of whether this expression can currently contain null, if + this expression can be used as an rvalue. + + + + + Represents the nullability of values that can be assigned + to an expression used as an lvalue. + + + + + The expression has not been analyzed, or the syntax is + not an expression (such as a statement). + There are a few different reasons the expression could have not been analyzed: + + + The symbol producing the expression comes from a method that has not been annotated, such as invoking a C# 7.3 or earlier method, or a method in this compilation that is in a disabled context. + Nullable is completely disabled in this compilation. + + + + + + The expression is not annotated (does not have a ?). + + + + + The expression is annotated (does have a ?). + + + + + Represents the compiler's analysis of whether an expression may be null + + + + + Syntax is not an expression, or was not analyzed. + + + + + Expression is not null. + + + + + Expression may be null. + + + + + This method directly converts a to a , + ignoring the to which it is attached. It should only be used when converting + an RValue flow state to an RValue annotation for returning via the public API. For general use, please + use Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithState.ToTypeWithAnnotations. + + + + + Information that describes how a method from the underlying Platform is to be invoked. + + + + + Module name. Null if value specified in the attribute is not valid. + + + + + Name of the native entry point or null if not specified (the effective name is the same as the name of the target method). + + + + + Controls whether the field causes the common language runtime + to search an unmanaged DLL for entry-point names other than the one specified. + + + + + Indicates how to marshal string parameters and controls name mangling. + + + + + Indicates whether the callee calls the SetLastError Win32 API function before returning from the attributed method. + + + + + Indicates the calling convention of an entry point. + + + + + Enables or disables best-fit mapping behavior when converting Unicode characters to ANSI characters. + Null if not specified (the setting for the containing type or assembly should be used, ). + + + + + Enables or disables the throwing of an exception on an unmappable Unicode character that is converted to an ANSI "?" character. + Null if not specified. + + + + + Denotes the kind of reference. + + + + + Indicates a "value" parameter or return type. + + + + + Indicates a "ref" parameter or return type. + + + + + Indicates an "out" parameter. + + + + + Indicates an "in" parameter. + + + + + Indicates a "ref readonly" return type. + + + + + Enumeration for kinds of scoped modifiers. + + + + + Not scoped. + + + + + A ref scoped to the enclosing block or method. + + + + + A value scoped to the enclosing block or method. + + + + + Allows for the comparison of two instances + + + + + Compares two instances based on the default comparison rules, equivalent to calling . + + + Comparing string and string? will return equal. Use if you don't want them to be considered equal. + + + + + Compares two instances, considering that a reference type and the same nullable reference type are not equal. + + + Comparing string and string? will not return equal. Use if you want them to be considered equal. + + + + + Determines if two instances are equal according to the rules of this comparer + + The first symbol to compare + The second symbol to compare + True if the symbols are equivalent + + + + Specifies the possible kinds of symbols. + + + + + Symbol is an alias. + + + + + Symbol is an array type. + + + + + Symbol is an assembly. + + + + + Symbol is a dynamic type. + + + + + Symbol that represents an error + + + + + Symbol is an Event. + + + + + Symbol is a field. + + + + + Symbol is a label. + + + + + Symbol is a local. + + + + + Symbol is a method. + + + + + Symbol is a netmodule. + + + + + Symbol is a named type (e.g. class). + + + + + Symbol is a namespace. + + + + + Symbol is a parameter. + + + + + Symbol is a pointer type. + + + + + Symbol is a property. + + + + + Symbol is a range variable of a query expression. + + + + + Symbol is a type parameter. + + + + + Symbol is a preprocessing/conditional compilation constant. + + + + + Symbol represents a value that is discarded, e.g. in M(out _) + + + + + Symbol represents a function pointer type + + + + + Internal Symbol representing the inferred signature of + a lambda expression or method group. + + + + + Specifies the different kinds of comparison between types. + + + + + Represents a constant value used as an argument to a custom attribute. + + + + + The kind of the constant. + + + + + Returns the of the constant, + or null if the type can't be determined (error). + + + + + True if the constant represents a null reference. + + + + + The value for a non-array constant. + + + + + Unlike returns when the value is a symbol. + + + + + The value for a array. + + + + + TypedConstant isn't computing its own kind from the type symbol because it doesn't + have a way to recognize the well-known type System.Type. + + + + + Represents the kind of a TypedConstant. + + + + + Represents a simple value or a read-only array of . + + + + + True if the constant represents a null literal. + + + + + Enumeration for possible kinds of type symbols. + + + + + Type's kind is undefined. + + + + + Type is an array type. + + + + + Type is a class. + + + + + Type is a delegate. + + + + + Type is dynamic. + + + + + Type is an enumeration. + + + + + Type is an error type. + + + + + Type is an interface. + + + + + Type is a module. + + + + + Type is a pointer. + + + + + Type is a C# struct or VB Structure + + + + + Type is a C# struct or VB Structure + + + + + Type is a type parameter. + + + + + Type is an interactive submission. + + + + + Type is a function pointer. + + + + + Internal Symbol representing the inferred signature of + a lambda expression or method group. + + + + + Type layout information. + + + + + Layout kind (Layout flags in metadata). + + + + + Field alignment (PackingSize field in metadata). + + + + + Size of the type. + + + + + Represents the different kinds of type parameters. + + + + + Type parameter of a named type. For example: T in ]]>. + + + + + Type parameter of a method. For example: T in ()]]>. + + + + + Type parameter in a cref attribute in XML documentation comments. For example: T in ]]>. + + + + + An enumeration declaring the kinds of variance supported for generic type parameters. + + + + + Invariant. + + + + + Covariant (out). + + + + + Contravariant (in). + + + + + Specifies the member names known to the compiler (such as .ctor or op_Explicit). + + + + + Name of the enum backing field. + + + + + The name assigned to an instance constructor. + + + + + The name assigned to the static constructor. + + + + + The symbol name assigned to all indexers, other than explicit interface implementations. + + + Will not correspond to the name that appears in metadata. + + + + + The name assigned to the destructor. + + + + + The name assigned to the delegate Invoke method. + + + + + The name assigned to the delegate BeginInvoke method. + + + + + The name assigned to the delegate EndInvoke method. + + + + + The name of an entry point method. + + + + + The default fully qualified name of a Script class. + + + + + The name assigned to Object.ToString method. + + + + + The name assigned to Object.Equals method. + + + + + The name assigned to Object.GetHashCode method. + + + + + The name assigned to an implicit (widening) conversion. + + + + + The name assigned to an explicit (narrowing) conversion. + + + + + The name assigned to a checked explicit (narrowing) conversion. + + + + + The name assigned to the Addition operator. + + + + + The name assigned to the checked Addition operator. + + + + + The name assigned to the BitwiseAnd operator. + + + + + The name assigned to the BitwiseOr operator. + + + + + The name assigned to the Decrement operator. + + + + + The name assigned to the checked Decrement operator. + + + + + The name assigned to the Division operator. + + + + + The name assigned to the checked Division operator. + + + + + The name assigned to the Equality operator. + + + + + The name assigned to the ExclusiveOr operator. + + + + + The name assigned to the False operator. + + + + + The name assigned to the GreaterThan operator. + + + + + The name assigned to the GreaterThanOrEqual operator. + + + + + The name assigned to the Increment operator. + + + + + The name assigned to the checked Increment operator. + + + + + The name assigned to the Inequality operator. + + + + + The name assigned to the LeftShift operator. + + + + + The name assigned to the UnsignedLeftShift operator. + + + + + The name assigned to the LessThan operator. + + + + + The name assigned to the LessThanOrEqual operator. + + + + + The name assigned to the LogicalNot operator. + + + + + The name assigned to the LogicalOr operator. + + + + + The name assigned to the LogicalAnd operator. + + + + + The name assigned to the Modulus operator. + + + + + The name assigned to the Multiply operator. + + + + + The name assigned to the checked Multiply operator. + + + + + The name assigned to the OnesComplement operator. + + + + + The name assigned to the RightShift operator. + + + + + The name assigned to the UnsignedRightShift operator. + + + + + The name assigned to the Subtraction operator. + + + + + The name assigned to the checked Subtraction operator. + + + + + The name assigned to the True operator. + + + + + The name assigned to the UnaryNegation operator. + + + + + The name assigned to the checked UnaryNegation operator. + + + + + The name assigned to the UnaryPlus operator. + + + + + The name assigned to the Concatenate operator. + + + + + The name assigned to the Exponent operator. + + + + + The name assigned to the IntegerDivision operator. + + + + + The name assigned to the Like operator. + + + + + The required name for the GetEnumerator method used in a ForEach statement. + + + + + The required name for the GetAsyncEnumerator method used in a ForEach statement. + + + + + The required name for the MoveNextAsync method used in a ForEach-await statement. + + + + + The required name for the Deconstruct method used in a deconstruction. + + + + + The required name for the MoveNext method used in a ForEach statement. + + + + + The required name for the Current property used in a ForEach statement. + + + + + The required name for the property used in + a ForEach statement when the collection is a nullable struct. + + + + + The name for the Add method to be invoked for each element in a collection initializer expression + (see C# Specification, §7.6.10.3 Collection initializers). + + + + + The required name for the GetAwaiter method used to obtain an awaiter for a task + (see C# Specification, §7.7.7.1 Awaitable expressions). + + + + + The required name for the IsCompleted property used to determine if a task is already complete + (see C# Specification, §7.7.7.1 Awaitable expressions). + + + + + The required name for the GetResult method used to obtain the outcome of a task once it is complete + (see C# Specification, §7.7.7.1 Awaitable expressions). + + + + + The name of the method used to register a resumption delegate + (see C# Specification, §7.7.7.1 Awaitable expressions). + + + + + The required name for the Dispose method used in a Using statement. + + + + + The required name for the DisposeAsync method used in an await using statement. + + + + + The required name for the Count property used in a pattern-based Index or Range indexer. + + + + + The required name for the Length property used in a pattern-based Index or Range indexer. + + + + + The required name for the Slice method used in a pattern-based Range indexer. + + + + + The required name for the PrintMembers method that is synthesized in a record. + + + + + The name of an entry point method synthesized for top-level statements. + + + + + The name of a type synthesized for a top-level statements entry point method. + + + + + List of entries sorted in source order, each of which captures a + position in the supplied syntax tree and the set of diagnostics (warnings) + whose reporting should either be suppressed or enabled at this position. + + + + + Returns list of entries sorted in source order, each of which captures a + position in the supplied syntax tree and the set of diagnostics (warnings) + whose reporting should either be suppressed or enabled at this position. + + + + + Returns the reporting state for the supplied diagnostic id at the supplied position + in the associated syntax tree. + + + + + Gets the entry with the largest position less than or equal to supplied position. + + + + + Struct that represents an entry in the warning state map. Sorts by position in the associated syntax tree. + + + + + Gets the separator at the given index in this list. + + The index. + + + + + WARN WARN WARN: This should be used with extreme caution - the underlying builder does + not give any indication that it is from a separated syntax list but the constraints + (node, token, node, token, ...) should still be maintained. + + + In order to avoid creating a separate pool of SeparatedSyntaxListBuilders, we expose + our underlying SyntaxListBuilder to SyntaxListPool. + + + + + Find the slot that contains the given offset. + + The target offset. Must be between 0 and . + The slot index of the slot containing the given offset. + + This implementation uses a binary search to find the first slot that contains + the given offset. + + + + + Adds to the end of this builder. No change happens if is + passed in. + + + + + Provides caching functionality for green nonterminals with up to 3 children. + Example: + When constructing a node with given kind, flags, child1 and child2, we can look up + in the cache whether we already have a node that contains same kind, flags, + child1 and child2 and use that. + + For the purpose of children comparison, reference equality is used as a much cheaper + alternative to the structural/recursive equality. This implies that in order to de-duplicate + a node to a cache node, the children of two nodes must be already de-duplicated. + When adding a node to the cache we verify that cache does contain node's children, + since otherwise there is no reason for the node to be used. + Tokens/nulls are for this purpose considered deduplicated. Indeed most of the tokens + are deduplicated via quick-scanner caching, so we just assume they all are. + + As a result of above, "fat" nodes with 4 or more children or their recursive parents + will never be in the cache. This naturally limits the typical single cache item to be + a relatively simple expression. We do not want the cache to be completely unbounded + on the item size. + While it still may be possible to store a gigantic nested binary expression, + it should be a rare occurrence. + + We only consider "normal" nodes to be cacheable. + Nodes with diagnostics/annotations/directives/skipped, etc... have more complicated identity + and are not likely to be repetitive. + + + + + + This is a SyntaxReference implementation that lazily translates the result (SyntaxNode) of the + original syntax reference to another one. + + + + + Creates a new node identical to this node with the specified annotations attached. + + Original node. + Annotations to be added to the new node. + + + + Creates a new node identical to this node with the specified annotations attached. + + Original node. + Annotations to be added to the new node. + + + + Creates a new node identical to this node with the specified annotations removed. + + Original node. + Annotations to be removed from the new node. + + + + Creates a new node identical to this node with the specified annotations removed. + + Original node. + Annotations to be removed from the new node. + + + + Creates a new node identical to this node with the annotations of the specified kind removed. + + Original node. + The kind of annotation to remove. + + + + Gets the number of children contained in the . + + + + Gets the child at the specified index. + The zero-based index of the child to get. + + is less than 0.-or- is equal to or greater than . + + + + internal indexer that does not verify index. + Used when caller has already ensured that index is within bounds. + + + + + Locate the node or token that is a child of the given and contains the given position. + + The to search. + The position. + The node or token that spans the given position. + + Assumes that is within the span of . + + + + + internal indexer that does not verify index. + Used when caller has already ensured that index is within bounds. + + + + + Returns the first child in the list. + + The first child in the list. + The list is empty. + + + + Returns the last child in the list. + + The last child in the list. + The list is empty. + + + + Returns a list which contains all children of in reversed order. + + which contains all children of in reversed order + + + Returns an enumerator that iterates through the . + A for the . + + + Determines whether the specified object is equal to the current instance. + true if the specified object is a structure and is equal to the current instance; otherwise, false. + The object to be compared with the current instance. + + + Determines whether the specified structure is equal to the current instance. + true if the specified structure is equal to the current instance; otherwise, false. + The structure to be compared with the current instance. + + + Returns the hash code for the current instance. + A 32-bit signed integer hash code. + + + Indicates whether two structures are equal. + true if is equal to ; otherwise, false. + The structure on the left side of the equality operator. + The structure on the right side of the equality operator. + + + Indicates whether two structures are unequal. + true if is equal to ; otherwise, false. + The structure on the left side of the inequality operator. + The structure on the right side of the inequality operator. + + + Enumerates the elements of a . + + + Advances the enumerator to the next element of the . + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + Gets the element at the current position of the enumerator. + The element in the at the current position of the enumerator. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + The collection was modified after the enumerator was created. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Enumerates all nodes of the tree rooted by this node (including this node). + + + + + Find the slot that contains the given offset. + + The target offset. Must be between 0 and . + The slot index of the slot containing the given offset. + + The base implementation is a linear search. This should be overridden + if a derived class can implement it more efficiently. + + + + + Add an error to the given node, creating a new node that is the same except it has no parent, + and has the given error attached to it. The error span is the entire span of this node. + + The error to attach to this node + A new node, with no parent, that has this error added to it. + Since nodes are immutable, the only way to create nodes with errors attached is to create a node without an error, + then add an error with this method to create another node. + + + + Interface implemented by any node that is the root 'CompilationUnit' of a . i.e. + any node returned by where + is will implement this interface. + + This interface provides a common way to both easily find the root of a + given any , as well as a common way for handling the special + that is needed to store all final trivia in a + that is not owned by any other . + + + + + Represents the end of the source file. This may have + (whitespace, comments, directives) attached to it. + + + + + Represents structured trivia that contains skipped tokens. This is implemented by + and + . + + + + + Represents the root node of a structured trivia tree (for example, a preprocessor directive + or a documentation comment). From this root node you can traverse back up to the containing + trivia in the outer tree that contains it. + + + + + Returns the parent trivia syntax for this structured trivia syntax. + + The parent trivia syntax for this structured trivia syntax. + + + + The LineDirectiveMap is created to enable translating positions, using the #line directives + in a file. The basic implementation creates an ordered array of line mapping entries, one + for each #line directive in the file (plus one at the beginning). If the file has no + directives, then the array has just one element in it. To map line numbers, a binary search + of the mapping entries is done and nearest line mapping is applied. + + + + + Determines whether the position is considered to be hidden from the debugger or not. + + + + + Combines TranslateSpan and IsHiddenPosition to not search the entries twice when emitting sequence points + + + + + Are there any hidden regions in the map? + + True if there's at least one hidden region in the map. + + + + The caller is expected to not call this if is empty. + + + + + Enum that describes the state related to the #line or #externalsource directives at a position in source. + + + + + Used in VB when the position is not hidden, but it's not known yet that there is a (nonempty) #ExternalSource + following. + + + + + Used in C# for spans preceding the first #line directive (if any) and for #line default spans + + + + + Used in C# for spans inside of #line linenumber directive + + + + + Used in C# for spans inside of #line (startLine, startChar) - (endLine, endChar) charOffset directive + + + + + Used in VB for spans inside of a #ExternalSource directive that followed an unknown span + + + + + Used in VB for spans inside of a #ExternalSource directive that followed a hidden span + + + + + Used in C# and VB for spans that are inside of #line hidden (C#) or outside of #ExternalSource (VB) + directives + + + + + Represents a line mapping defined by a single line mapping directive (#line in C# or #ExternalSource in VB). + + + + + The span in the syntax tree containing the line mapping directive. + + + + + The optional offset in the syntax tree for the line immediately following an enhanced #line directive in C#. + + + + + If the line mapping directive maps the span into an explicitly specified file the is true. + If the path is not mapped is empty and is false. + If the line mapping directive marks hidden code is false. + + + + + True if the line mapping marks hidden code. + + + + + The state of the visibility of a line. + + + + + The line is located before any #line directive and there is at least one #line directive present in this syntax tree. + This enum value is used for C# only to enable the consumer to define how to interpret the lines before the first + line directive. + + + + + The line is following a #line hidden directive. + + + + + The line is following a #line default directive or a #line directive with at least a line number. + If there is no line directive at all, Visible is returned for all lines. + + + + + Gets the separator at the given index in this list. + + The index. + + + + + Returns the sequence of just the separator tokens. + + + + + The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements. + + + + + The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements. + + + + + Returns the string representation of the nodes in this list including separators but not including + the first node's leading trivia and the last node or token's trailing trivia. + + + The string representation of the nodes in this list including separators but not including + the first node's leading trivia and the last node or token's trailing trivia. + + + + + Returns the full string representation of the nodes in this list including separators, + the first node's leading trivia, and the last node or token's trailing trivia. + + + The full string representation of the nodes in this list including separators including separators, + the first node's leading trivia, and the last node or token's trailing trivia. + + + + + Creates a new list with the specified node added to the end. + + The node to add. + + + + Creates a new list with the specified nodes added to the end. + + The nodes to add. + + + + Creates a new list with the specified node inserted at the index. + + The index to insert at. + The node to insert. + + + + Creates a new list with the specified nodes inserted at the index. + + The index to insert at. + The nodes to insert. + + + + Creates a new list with the element at the specified index removed. + + The index of the element to remove. + + + + Creates a new list with specified element removed. + + The element to remove. + + + + Creates a new list with the specified element replaced by the new node. + + The element to replace. + The new node. + + + + Creates a new list with the specified element replaced by the new nodes. + + The element to replace. + The new nodes. + + + + Creates a new list with the specified separator token replaced with the new separator. + + The separator token to be replaced. + The new separator token. + + + + A SyntaxAnnotation is used to annotate syntax elements with additional information. + + Since syntax elements are immutable, annotating them requires creating new instances of them + with the annotations attached. + + + + + A predefined syntax annotation that indicates whether the syntax element has elastic trivia. + + + + + A list of . + + + + + Creates a singleton list of syntax nodes. + + The single element node. + + + + Creates a list of syntax nodes. + + A sequence of element nodes. + + + + The number of nodes in the list. + + + + + Gets the node at the specified index. + + The zero-based index of the node to get or set. + The node at the specified index. + + + + The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements. + + + + + The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements. + + + + + Returns the string representation of the nodes in this list, not including + the first node's leading trivia and the last node's trailing trivia. + + + The string representation of the nodes in this list, not including + the first node's leading trivia and the last node's trailing trivia. + + + + + Returns the full string representation of the nodes in this list including + the first node's leading trivia and the last node's trailing trivia. + + + The full string representation of the nodes in this list including + the first node's leading trivia and the last node's trailing trivia. + + + + + Creates a new list with the specified node added at the end. + + The node to add. + + + + Creates a new list with the specified nodes added at the end. + + The nodes to add. + + + + Creates a new list with the specified node inserted at the index. + + The index to insert at. + The node to insert. + + + + Creates a new list with the specified nodes inserted at the index. + + The index to insert at. + The nodes to insert. + + + + Creates a new list with the element at specified index removed. + + The index of the element to remove. + + + + Creates a new list with the element removed. + + The element to remove. + + + + Creates a new list with the specified element replaced with the new node. + + The element to replace. + The new node. + + + + Creates a new list with the specified element replaced with new nodes. + + The element to replace. + The new nodes. + + + + The first node in the list. + + + + + The first node in the list or default if the list is empty. + + + + + The last node in the list. + + + + + The last node in the list or default if the list is empty. + + + + + True if the list has at least one node. + + + + + Get's the enumerator for this list. + + + + + The index of the node in this list, or -1 if the node is not in the list. + + + + + Represents a non-terminal node in the syntax tree. This is the language agnostic equivalent of and . + + + + + Used by structured trivia which has "parent == null", and therefore must know its + SyntaxTree explicitly when created. + + + + + An integer representing the language specific kind of this node. + + + + + The language name that this node is syntax of. + + + + + Returns that owns the node. + + + + + The absolute span of this node in characters, including its leading and trailing trivia. + + + + + The absolute span of this node in characters, not including its leading and trailing trivia. + + + + + Same as accessing on . + + + Slight performance improvement. + + + + + The width of the node in characters, not including leading and trailing trivia. + + + The Width property returns the same value as Span.Length, but is somewhat more efficient. + + + + + The complete width of the node in characters, including leading and trailing trivia. + + The FullWidth property returns the same value as FullSpan.Length, but is + somewhat more efficient. + + + + This works the same as GetRed, but intended to be used in lists + The only difference is that the public parent of the node is not the list, + but the list's parent. (element's grand parent). + + + + + special cased helper for 2 and 3 children lists where child #1 may map to a token + + + + + Returns the string representation of this node, not including its leading and trailing trivia. + + The string representation of this node, not including its leading and trailing trivia. + The length of the returned string is always the same as Span.Length + + + + Returns full string representation of this node including its leading and trailing trivia. + + The full string representation of this node including its leading and trailing trivia. + The length of the returned string is always the same as FullSpan.Length + + + + Writes the full text of this node to the specified . + + + + + Gets the full text of this node as a new instance. + + + Encoding of the file that the text was read from or is going to be saved to. + null if the encoding is unspecified. + If the encoding is not specified the isn't debuggable. + If an encoding-less is written to a file a shall be used as a default. + + + Hash algorithm to use to calculate checksum of the text that's saved to PDB. + + is not supported. + + + + Determine whether this node is structurally equivalent to another. + + + + + Returns true if these two nodes are considered "incrementally identical". An incrementally identical node + occurs when a is incrementally parsed using + and the incremental parser is able to take the node from the original tree and use it in its entirety in the + new tree. In this case, the of each node will be the same, though + they could have different parents, and may occur at different positions in their respective trees. If two nodes are + incrementally identical, all children of each node will be incrementally identical as well. + + + Incrementally identical nodes can also appear within the same syntax tree, or syntax trees that did not arise + from . This can happen as the parser is allowed to construct parse + trees from shared nodes for efficiency. In all these cases though, it will still remain true that the incrementally + identical nodes could have different parents and may occur at different positions in their respective trees. + + + + + Determines whether the node represents a language construct that was actually parsed + from the source code. Missing nodes are generated by the parser in error scenarios to + represent constructs that should have been present in the source code in order to + compile successfully but were actually missing. + + + + + Determines whether this node is a descendant of a structured trivia. + + + + + Determines whether this node represents a structured trivia. + + + + + Determines whether a descendant trivia of this node is structured. + + + + + Determines whether this node has any descendant skipped text. + + + + + Determines whether this node or any of its descendant nodes, tokens or trivia have any diagnostics on them. + + + + + Determines whether this node has any descendant preprocessor directives. + + + + + Returns true if this node contains any directives (e.g. #if, #nullable, etc.) within it with a matching kind. + + + + + Determines if the specified node is a descendant of this node. + Returns true for current node. + + + + + Determines whether this node has any leading trivia. + + + + + Determines whether this node has any trailing trivia. + + + + + Gets a node at given node index without forcing its creation. + If node was not created it would return null. + + + + + This function calculates the offset of a child at given position. It is very common that + some children to the left of the given index already know their positions so we first + check if that is the case. In a worst case the cost is O(n), but it is not generally an + issue because number of children in regular nodes is fixed and small. In a case where + the number of children could be large (lists) this function is overridden with more + efficient implementations. + + + + + Gets a list of all the diagnostics in the sub tree that has this node as its root. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets a for this syntax node. CommonSyntaxReferences can be used to + regain access to a syntax node without keeping the entire tree and source text in + memory. + + + + + The node that contains this node in its collection. + + + + + The list of child nodes and tokens of this node, where each element is a SyntaxNodeOrToken instance. + + + + + Gets node at given node index. + This WILL force node creation if node has not yet been created. + Can still return null for invalid slot numbers + + + + + Gets a list of the child nodes in prefix document order. + + + + + Gets a list of ancestor nodes + + + + + Gets a list of ancestor nodes (including this node) + + + + + Gets the first node of type TNode that matches the predicate. + + + + + Gets the first node of type TNode that matches the predicate. + + + + + Gets a list of descendant nodes in prefix document order. + + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of descendant nodes in prefix document order. + + The span the node's full span must intersect. + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of descendant nodes (including this node) in prefix document order. + + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of descendant nodes (including this node) in prefix document order. + + The span the node's full span must intersect. + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of descendant nodes and tokens in prefix document order. + + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of the descendant nodes and tokens in prefix document order. + + The span the node's full span must intersect. + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of descendant nodes and tokens (including this node) in prefix document order. + + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Gets a list of the descendant nodes and tokens (including this node) in prefix document order. + + The span the node's full span must intersect. + An optional function that determines if the search descends into the argument node's children. + Determines if nodes that are part of structured trivia are included in the list. + + + + Finds the node with the smallest that contains . + is used to determine the behavior in case of a tie (i.e. a node having the same span as its parent). + If is true, then it returns lowest descending node encompassing the given . + Otherwise, it returns the outermost node encompassing the given . + + + TODO: This should probably be reimplemented with + + This exception is thrown if doesn't contain the given span. + + + + Finds a descendant token of this node whose span includes the supplied position. + + The character position of the token relative to the beginning of the file. + + True to return tokens that are part of trivia. If false finds the token whose full span (including trivia) + includes the position. + + + + + Gets the first token of the tree rooted by this node. Skips zero-width tokens. + + The first token or default(SyntaxToken) if it doesn't exist. + + + + Gets the last token of the tree rooted by this node. Skips zero-width tokens. + + The last token or default(SyntaxToken) if it doesn't exist. + + + + Gets a list of the direct child tokens of this node. + + + + + Gets a list of all the tokens in the span of this node. + + + + + Gets a list of all the tokens in the full span of this node. + + + + + The list of trivia that appears before this node in the source code and are attached to a token that is a + descendant of this node. + + + + + The list of trivia that appears after this node in the source code and are attached to a token that is a + descendant of this node. + + + + + Finds a descendant trivia of this node whose span includes the supplied position. + + The character position of the trivia relative to the beginning of the file. + + True to return tokens that are part of trivia. If false finds the token whose full span (including trivia) + includes the position. + + + + + Finds a descendant trivia of this node at the specified position, where the position is + within the span of the node. + + The character position of the trivia relative to the beginning of + the file. + Specifies a function that determines per trivia node, whether to + descend into structured trivia of that node. + + + + + Get a list of all the trivia associated with the descendant nodes and tokens. + + + + + Get a list of all the trivia associated with the descendant nodes and tokens. + + + + + Determines whether this node or any sub node, token or trivia has annotations. + + + + + Determines whether this node has any annotations with the specific annotation kind. + + + + + Determines whether this node has any annotations with any of the specific annotation kinds. + + + + + Determines whether this node has the specific annotation. + + + + + Gets all the annotations with the specified annotation kind. + + + + + Gets all the annotations with the specified annotation kinds. + + + + + Gets all nodes and tokens with an annotation of the specified annotation kind. + + + + + Gets all nodes and tokens with an annotation of the specified annotation kinds. + + + + + Gets all nodes and tokens with the specified annotation. + + + + + Gets all nodes with the specified annotation. + + + + + Gets all nodes with the specified annotation kind. + + + + + + + Gets all tokens with the specified annotation. + + + + + Gets all tokens with the specified annotation kind. + + + + + Gets all trivia with an annotation of the specified annotation kind. + + + + + Gets all trivia with an annotation of the specified annotation kinds. + + + + + Gets all trivia with the specified annotation. + + + + + Copies all SyntaxAnnotations, if any, from this SyntaxNode instance and attaches them to a new instance based on . + + + + If no annotations are copied, just returns . + + + It can also be used manually to preserve annotations in a more complex tree + modification, even if the type of a node changes. + + + + + + Determines if two nodes are the same, disregarding trivia differences. + + The node to compare against. + If true then the nodes are equivalent if the contained nodes and + tokens declaring metadata visible symbolic information are equivalent, ignoring any + differences of nodes inside method bodies or initializer expressions, otherwise all + nodes and tokens must be equivalent. + + + + + Serializes the node to the given . + Leaves the open for further writes. + + + + + Determine if this node is structurally equivalent to another. + + + + + Returns SyntaxTree that owns the node. If the node does not belong to a tree then + one will be generated. + + + + + Finds a descendant token of this node whose span includes the supplied position. + + The character position of the token relative to the beginning of the file. + + True to return tokens that are part of trivia. + If false finds the token whose full span (including trivia) includes the position. + + + + + Finds a descendant token of this node whose span includes the supplied position. + + The character position of the token relative to the beginning of the file. + + Applied on every structured trivia. Return false if the tokens included in the trivia should be skipped. + Pass null to skip all structured trivia. + + + + + Finds a descendant trivia of this node whose span includes the supplied position. + + The character position of the trivia relative to the beginning of the file. + Whether to search inside structured trivia. + + + + Creates a new tree of nodes with the specified nodes, tokens or trivia replaced. + + + + + Creates a new tree of nodes with the specified node removed. + + + + + Determines if two nodes are the same, disregarding trivia differences. + + The node to compare against. + If true then the nodes are equivalent if the contained nodes and + tokens declaring metadata visible symbolic information are equivalent, ignoring any + differences of nodes inside method bodies or initializer expressions, otherwise all + nodes and tokens must be equivalent. + + + + + Whether or not this parent node wants its child SyntaxList node to be + converted to a Weak-SyntaxList when creating the red-node equivalent. + For example, in C# the statements of a Block-Node that is parented by a + MethodDeclaration will be held weakly. + + + + + Creates a clone of a red node that can be used as a root of given syntaxTree. + New node has no parents, position == 0, and syntaxTree as specified. + + + + + Creates a new tree of nodes with the specified nodes, tokens and trivia replaced. + + The type of the root node. + The root node of the tree of nodes. + The nodes to be replaced. + A function that computes a replacement node for the + argument nodes. The first argument is the original node. The second argument is the same + node potentially rewritten with replaced descendants. + The tokens to be replaced. + A function that computes a replacement token for + the argument tokens. The first argument is the original token. The second argument is + the same token potentially rewritten with replaced trivia. + The trivia to be replaced. + A function that computes replacement trivia for + the specified arguments. The first argument is the original trivia. The second argument is + the same trivia with potentially rewritten sub structure. + + + + Creates a new tree of nodes with the specified old node replaced with a new node. + + The type of the root node. + The type of the nodes being replaced. + The root node of the tree of nodes. + The nodes to be replaced; descendants of the root node. + A function that computes a replacement node for the + argument nodes. The first argument is the original node. The second argument is the same + node potentially rewritten with replaced descendants. + + + + Creates a new tree of nodes with the specified old node replaced with a new node. + + The type of the root node. + The root node of the tree of nodes. + The node to be replaced; a descendant of the root node. + The new node to use in the new tree in place of the old node. + + + + Creates a new tree of nodes with specified old node replaced with a new nodes. + + The type of the root node. + The root of the tree of nodes. + The node to be replaced; a descendant of the root node and an element of a list member. + A sequence of nodes to use in the tree in place of the old node. + + + + Creates a new tree of nodes with new nodes inserted before the specified node. + + The type of the root node. + The root of the tree of nodes. + The node to insert before; a descendant of the root node an element of a list member. + A sequence of nodes to insert into the tree immediately before the specified node. + + + + Creates a new tree of nodes with new nodes inserted after the specified node. + + The type of the root node. + The root of the tree of nodes. + The node to insert after; a descendant of the root node an element of a list member. + A sequence of nodes to insert into the tree immediately after the specified node. + + + + Creates a new tree of nodes with the specified old token replaced with new tokens. + + The type of the root node. + The root of the tree of nodes. + The token to be replaced; a descendant of the root node and an element of a list member. + A sequence of tokens to use in the tree in place of the specified token. + + + + Creates a new tree of nodes with new tokens inserted before the specified token. + + The type of the root node. + The root of the tree of nodes. + The token to insert before; a descendant of the root node and an element of a list member. + A sequence of tokens to insert into the tree immediately before the specified token. + + + + Creates a new tree of nodes with new tokens inserted after the specified token. + + The type of the root node. + The root of the tree of nodes. + The token to insert after; a descendant of the root node and an element of a list member. + A sequence of tokens to insert into the tree immediately after the specified token. + + + + Creates a new tree of nodes with the specified old trivia replaced with new trivia. + + The type of the root node. + The root of the tree of nodes. + The trivia to be replaced; a descendant of the root node. + A sequence of trivia to use in the tree in place of the specified trivia. + + + + Creates a new tree of nodes with new trivia inserted before the specified trivia. + + The type of the root node. + The root of the tree of nodes. + The trivia to insert before; a descendant of the root node. + A sequence of trivia to insert into the tree immediately before the specified trivia. + + + + Creates a new tree of nodes with new trivia inserted after the specified trivia. + + The type of the root node. + The root of the tree of nodes. + The trivia to insert after; a descendant of the root node. + A sequence of trivia to insert into the tree immediately after the specified trivia. + + + + Creates a new tree of nodes with the specified old node replaced with a new node. + + The type of the root node. + The root node of the tree of nodes. + The token to be replaced; descendants of the root node. + A function that computes a replacement token for + the argument tokens. The first argument is the original token. The second argument is + the same token potentially rewritten with replaced trivia. + + + + Creates a new tree of nodes with the specified old token replaced with a new token. + + The type of the root node. + The root node of the tree of nodes. + The token to be replaced. + The new token to use in the new tree in place of the old + token. + + + + Creates a new tree of nodes with the specified trivia replaced with new trivia. + + The type of the root node. + The root node of the tree of nodes. + The trivia to be replaced; descendants of the root node. + A function that computes replacement trivia for + the specified arguments. The first argument is the original trivia. The second argument is + the same trivia with potentially rewritten sub structure. + + + + Creates a new tree of nodes with the specified trivia replaced with new trivia. + + The type of the root node. + The root node of the tree of nodes. + The trivia to be replaced. + The new trivia to use in the new tree in place of the old trivia. + + + + Creates a new tree of nodes with the specified node removed. + + The type of the root node. + The root node from which to remove a descendant node from. + The node to remove. + Options that determine how the node's trivia is treated. + New root or null if the root node itself is removed. + + + + Creates a new tree of nodes with the specified nodes removed. + + The type of the root node. + The root node from which to remove a descendant node from. + The nodes to remove. + Options that determine how the nodes' trivia is treated. + + + + Creates a new syntax node with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The type of the node. + The node to format. + A sequence of whitespace characters that defines a single level of indentation. + If true the replaced trivia is elastic trivia. + + + + Creates a new syntax node with all whitespace and end of line trivia replaced with + regularly formatted trivia. + + The type of the node. + The node to format. + An optional sequence of whitespace characters that defines a single level of indentation. + An optional sequence of whitespace characters used for end of line. + If true the replaced trivia is elastic trivia. + + + + Creates a new node from this node with both the leading and trailing trivia of the specified node. + + + + + Creates a new node from this node without leading or trailing trivia. + + + + + Creates a new token from this token without leading or trailing trivia. + + + + + Creates a new node from this node with the leading trivia replaced. + + + + + Creates a new node from this node with the leading trivia replaced. + + + + + Creates a new node from this node with the leading trivia removed. + + + + + Creates a new node from this node with the leading trivia replaced. + + + + + Creates a new node from this node with the trailing trivia replaced. + + + + + Creates a new node from this node with the trailing trivia replaced. + + + + + Creates a new node from this node with the trailing trivia removed. + + + + + Creates a new node from this node with the trailing trivia replaced. + + + + + Attaches the node to a SyntaxTree that the same options as + + + + + Creates a new tree of nodes with the specified nodes being tracked. + + Use GetCurrentNode on the subtree resulting from this operation, or any transformation of it, + to get the current node corresponding to the original tracked node. + + The root of the subtree containing the nodes to be tracked. + One or more nodes that are descendants of the root node. + + + + Creates a new tree of nodes with the specified nodes being tracked. + + Use GetCurrentNode on the subtree resulting from this operation, or any transformation of it, + to get the current node corresponding to the original tracked node. + + The root of the subtree containing the nodes to be tracked. + One or more nodes that are descendants of the root node. + + + + Gets the nodes within the subtree corresponding to the original tracked node. + Use TrackNodes to start tracking nodes. + + The root of the subtree containing the current node corresponding to the original tracked node. + The node instance originally tracked. + + + + Gets the node within the subtree corresponding to the original tracked node. + Use TrackNodes to start tracking nodes. + + The root of the subtree containing the current node corresponding to the original tracked node. + The node instance originally tracked. + + + + Gets the nodes within the subtree corresponding to the original tracked nodes. + Use TrackNodes to start tracking nodes. + + The root of the subtree containing the current nodes corresponding to the original tracked nodes. + One or more node instances originally tracked. + + + + A wrapper for either a syntax node () or a syntax token (). + + + Note that we do not store the token directly, we just store enough information to reconstruct it. + This allows us to reuse nodeOrToken as a token's parent. + + + + + An integer representing the language specific kind of the underlying node or token. + + + + + The language name that this node or token is syntax of. + + + + + Determines whether the underlying node or token represents a language construct that was actually parsed + from source code. Missing nodes and tokens are typically generated by the parser in error scenarios to + represent constructs that should have been present in the source code for the source code to compile + successfully but were actually missing. + + + + + The node that contains the underlying node or token in its Children collection. + + + + + Determines whether this is wrapping a token. + + + + + Determines whether this is wrapping a node. + + + + + Returns the underlying token if this is wrapping a + token. + + + The underlying token if this is wrapping a token. + + + + + Returns the underlying node if this is wrapping a + node. + + + The underlying node if this is wrapping a node. + + + + + The list of child nodes and tokens of the underlying node or token. + + + + + The absolute span of the underlying node or token in characters, not including its leading and trailing + trivia. + + + + + Same as accessing on . + + + Slight performance improvement. + + + + + The absolute span of the underlying node or token in characters, including its leading and trailing trivia. + + + + + Returns the string representation of this node or token, not including its leading and trailing + trivia. + + + The string representation of this node or token, not including its leading and trailing trivia. + + The length of the returned string is always the same as Span.Length + + + + Returns the full string representation of this node or token including its leading and trailing trivia. + + The full string representation of this node or token including its leading and trailing + trivia. + The length of the returned string is always the same as FullSpan.Length + + + + Writes the full text of this node or token to the specified TextWriter. + + + + + Determines whether the underlying node or token has any leading trivia. + + + + + The list of trivia that appear before the underlying node or token in the source code and are attached to a + token that is a descendant of the underlying node or token. + + + + + Determines whether the underlying node or token has any trailing trivia. + + + + + The list of trivia that appear after the underlying node or token in the source code and are attached to a + token that is a descendant of the underlying node or token. + + + + + Determines whether the underlying node or token or any of its descendant nodes, tokens or trivia have any + diagnostics on them. + + + + + Gets a list of all the diagnostics in either the sub tree that has this node as its root or + associated with this token and its related trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Determines whether the underlying node or token has any descendant preprocessor directives. + + + + + Determines whether this node or token (or any sub node, token or trivia) as annotations. + + + + + Determines whether this node or token has annotations of the specified kind. + + + + + Determines whether this node or token has annotations of the specified kind. + + + + + Determines if this node or token has the specific annotation. + + + + + Gets all annotations of the specified annotation kind. + + + + + Gets all annotations of the specified annotation kind. + + + + + Creates a new node or token identical to this one with the specified annotations. + + + + + Creates a new node or token identical to this one with the specified annotations. + + + + + Creates a new node or token identical to this one without the specified annotations. + + + + + Creates a new node or token identical to this one without the specified annotations. + + + + + Creates a new node or token identical to this one without annotations of the specified kind. + + + + + Determines whether the supplied is equal to this + . + + + + + Determines whether two s are equal. + + + + + Determines whether two s are unequal. + + + + + Determines whether the supplied is equal to this + . + + + + + Serves as hash function for . + + + + + Determines if the two nodes or tokens are equivalent. + + + + + See and . + + + + + Returns a new that wraps the supplied token. + + The input token. + + A that wraps the supplied token. + + + + + Returns the underlying token wrapped by the supplied . + + + The input . + + + The underlying token wrapped by the supplied . + + + + + Returns a new that wraps the supplied node. + + The input node. + + A that wraps the supplied node. + + + + + Returns the underlying node wrapped by the supplied . + + + The input . + + + The underlying node wrapped by the supplied . + + + + + SyntaxTree which contains current SyntaxNodeOrToken. + + + + + Get the location of this node or token. + + + + + A list of structures. + + + + + The underlying field + + + + + The index from the parent's children list of this node. + + + + + Initializes a new instance of the structure. + + The underlying syntax node. + The index. + + + + Create a from a sequence of . + + The sequence of nodes and tokens + + + + Create a from one or more . + + The nodes and tokens + + + + Gets the underlying syntax node. + + + + + Gets the count of nodes in this list + + + + + Gets the at the specified index. + + is out of range. + + + + The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements. + + + + + The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements. + + + + + Returns the string representation of the nodes and tokens in this list, not including the first node or token's leading trivia + and the last node or token's trailing trivia. + + + The string representation of the nodes and tokens in this list, not including the first node or token's leading trivia + and the last node or token's trailing trivia. + + + + + Returns the full string representation of the nodes and tokens in this list including the first node or token's leading trivia + and the last node or token's trailing trivia. + + + The full string representation of the nodes and tokens in this list including the first node or token's leading trivia + and the last node or token's trailing trivia. + + + + + Gets the first SyntaxNodeOrToken structure from this list. + + + + + Gets the first SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken). + + + + + Gets the last SyntaxNodeOrToken structure from this list. + + + + + Gets the last SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken). + + + + + Returns the index from the list for the given . + + The node or token to search for in the list. + The index of the found nodeOrToken, or -1 if it wasn't found + + + + Indicates whether there is any element in the list. + + true if there are any elements in the list, else false. + + + + Copies a given count of elements into the given array at specified offsets. + + The offset to start copying from. + The array to copy the elements into. + The array offset to start writing to. + The count of elements to copy. + + + + Creates a new with the specified node or token added to the end. + + The node or token to add. + + + + Creates a new with the specified nodes or tokens added to the end. + + The nodes or tokens to add. + + + + Creates a new with the specified node or token inserted at the index. + + The index to insert at. + The node or token to insert. + + + + Creates a new with the specified nodes or tokens inserted at the index. + + The index to insert at. + The nodes or tokens to insert. + + + + Creates a new with the element at the specified index removed. + + The index of the element to remove. + + + + Creates a new with the specified element removed. + + The element to remove. + + + + Creates a new with the specified element replaced with a new node or token. + + The element to replace. + The new node or token. + + + + Creates a new with the specified element replaced with a new nodes and tokens. + + The element to replace. + The new nodes and tokens. + + + + Gets the enumerator. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Implements the operator ==. + + The left SyntaxNodeOrTokenList + The right SyntaxNodeOrTokenList + + true if both lists equal, else false. + + + + + Implements the operator !=. + + The left SyntaxNodeOrTokenList + The right SyntaxNodeOrTokenList + + true if both lists not equal, else false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, + false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Enumerator for lists of SyntaxNodeOrToken structs. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + + Gets the struct that this enumerator instance is currently pointing to. + + + + + Gets the struct that this enumerator instance is currently pointing to. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + The collection was modified after the enumerator was created. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + A reference to a syntax node. + + + + + The syntax tree that this references a node within. + + + + + The span of the node referenced. + + + + + Retrieves the original referenced syntax node. + This action may cause a parse to happen to recover the syntax node. + + The original referenced syntax node. + + + + Retrieves the original referenced syntax node. + This action may cause a parse to happen to recover the syntax node. + + The original referenced syntax node. + + + + The location of this syntax reference. + + The location of this syntax reference. + + More performant than GetSyntax().GetLocation(). + + + + + None of the trivia associated with the node or token is kept. + + + + + The leading trivia associated with the node or token is kept. + + + + + The trailing trivia associated with the node or token is kept. + + + + + The leading and trailing trivia associated with the node or token is kept. + + + + + Any directives that would become unbalanced are kept. + + + + + All directives are kept + + + + + Ensure that at least one EndOfLine trivia is kept if one was present + + + + + Adds elastic marker trivia + + + + + Represents a token in the syntax tree. This is the language agnostic equivalent of and . + + + + + An integer representing the language specific kind of this token. + + + + + The language name that this token is syntax of. + + + + + The kind of token, given its position in the syntax. This differs from when a contextual keyword is used in a place in the syntax that gives it + its keyword meaning. + + + The ContextualKind is relevant only on contextual keyword tokens. ContextualKind differs + from Kind when a token is used in context where the token should be interpreted as a + keyword. + + + + + The node that contains this token in its Children collection. + + + + + The width of the token in characters, not including its leading and trailing trivia. + + + + + The complete width of the token in characters including its leading and trailing trivia. + + + + + The absolute span of this token in characters, not including its leading and trailing trivia. + + + + + Same as accessing on . + + + Slight performance improvement. + + + + + The absolute span of this token in characters, including its leading and trailing trivia. + + + + + Determines whether this token represents a language construct that was actually parsed from source code. + Missing tokens are typically generated by the parser in error scenarios to represent constructs that should + have been present in the source code for the source code to compile successfully but were actually missing. + + + + + Returns the value of the token. For example, if the token represents an integer literal, then this property + would return the actual integer. + + + + + Returns the text representation of the value of the token. For example, if the token represents an integer + literal, then this property would return a string representing the integer. + + + + + Returns the string representation of this token, not including its leading and trailing trivia. + + The string representation of this token, not including its leading and trailing trivia. + The length of the returned string is always the same as Span.Length + + + + Returns the full string representation of this token including its leading and trailing trivia. + + The full string representation of this token including its leading and trailing trivia. + The length of the returned string is always the same as FullSpan.Length + + + + Writes the full text of this token to the specified . + + + + + Writes the text of this token to the specified TextWriter, optionally including trivia. + + + + + Determines whether this token has any leading trivia. + + + + + Determines whether this token has any trailing trivia. + + + + + Full width of the leading trivia of this token. + + + + + Full width of the trailing trivia of this token. + + + + + Determines whether this token or any of its descendant trivia have any diagnostics on them. + + + + + Determines whether this token has any descendant preprocessor directives. + + + + + Determines whether this token is a descendant of a structured trivia. + + + + + Determines whether any of this token's trivia is structured. + + + + + True if this token or its trivia has any annotations. + + + + + True if this token has annotations of the specified annotation kind. + + + + + True if this token has annotations of the specified annotation kinds. + + + + + True if this token has the specified annotation. + + + + + Gets all the annotations of the specified annotation kind. + + + + + Gets all the annotations of the specified annotation kind. + + + + + Gets all the annotations of the specified annotation kind. + + + + + Adds this annotation to a given syntax token, creating a new syntax token of the same type with the + annotation on it. + + + + + Adds this annotation to a given syntax token, creating a new syntax token of the same type with the + annotation on it. + + + + + Creates a new syntax token identical to this one without the specified annotations. + + + + + Creates a new syntax token identical to this one without the specified annotations. + + + + + Creates a new syntax token identical to this one without annotations of the specified kind. + + + + + Copies all SyntaxAnnotations, if any, from this SyntaxToken instance and attaches them to a new instance based on . + + + If no annotations are copied, just returns . + + + + + The list of trivia that appear before this token in the source code. + + + + + The list of trivia that appear after this token in the source code and are attached to this token or any of + its descendants. + + + + + Creates a new token from this token with the leading and trailing trivia from the specified token. + + + + + Creates a new token from this token with the leading trivia specified. + + + + + Creates a new token from this token with the leading trivia specified.. + + + + + Creates a new token from this token with the leading trivia specified. + + + + + Creates a new token from this token with the trailing trivia specified. + + + + + Creates a new token from this token with the trailing trivia specified. + + + + + Creates a new token from this token with the trailing trivia specified. + + + + + Gets a list of all the trivia (both leading and trailing) for this token. + + + + + Determines whether two s are equal. + + + + + Determines whether two s are unequal. + + + + + Determines whether the supplied is equal to this + . + + + + + Determines whether the supplied is equal to this + . + + + + + Serves as hash function for . + + + + + Gets the token that follows this token in the syntax tree. + + The token that follows this token in the syntax tree. + + + + Returns the token after this token in the syntax tree. + + Delegate applied to each token. The token is returned if the predicate returns + true. + Delegate applied to trivia. If this delegate is present then trailing trivia is + included in the search. + + + + Gets the token that precedes this token in the syntax tree. + + The previous token that precedes this token in the syntax tree. + + + + Returns the token before this token in the syntax tree. + + Delegate applied to each token. The token is returned if the predicate returns + true. + Delegate applied to trivia. If this delegate is present then trailing trivia is + included in the search. + + + + The SyntaxTree that contains this token. + + + + + Gets the location for this token. + + + + + Gets a list of all the diagnostics associated with this token and any related trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Determines if this token is equivalent to the specified token. + + + + + Returns true if these two tokens are considered "incrementally identical". An incrementally identical token + occurs when a is incrementally parsed using + and the incremental parser is able to take the token from the original tree and use it in its entirety in the + new tree. In this case, the of each token will be the same, though + they could have different parents, and may occur at different positions in the respective trees. If two tokens are + incrementally identical, all trivial of each node will be incrementally identical as well. + + + Incrementally identical tokens can also appear within the same syntax tree, or syntax trees that did not arise + from . This can happen as the parser is allowed to construct parse + trees using shared tokens for efficiency. In all these cases though, it will still remain true that the incrementally + identical tokens could have different parents and may occur at different positions in their respective trees. + + + + + Represents a read-only list of . + + + Represents a read-only list of s. + + + + + Creates a list of tokens. + + An array of tokens. + + + + Creates a list of tokens. + + + + + Returns the number of tokens in the list. + + + + + Gets the token at the specified index. + + The zero-based index of the token to get. + The token at the specified index. + + is less than 0.-or- is equal to or greater than . + + + + The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements. + + + + + The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements. + + + + + Returns the string representation of the tokens in this list, not including + the first token's leading trivia and the last token's trailing trivia. + + + The string representation of the tokens in this list, not including + the first token's leading trivia and the last token's trailing trivia. + + + + + Returns the full string representation of the tokens in this list including + the first token's leading trivia and the last token's trailing trivia. + + + The full string representation of the tokens in this list including + the first token's leading trivia and the last token's trailing trivia. + + + + + Returns the first token in the list. + + The first token in the list. + The list is empty. + + + + Returns the last token in the list. + + The last token in the list. + The list is empty. + + + + Tests whether the list is non-empty. + + True if the list contains any tokens. + + + + Returns a list which contains all elements of in reversed order. + + which contains all elements of in reversed order + + + + get the green node at the given slot + + + + + get the green node at the given slot + + + + + Creates a new with the specified token added to the end. + + The token to add. + + + + Creates a new with the specified tokens added to the end. + + The tokens to add. + + + + Creates a new with the specified token insert at the index. + + The index to insert the new token. + The token to insert. + + + + Creates a new with the specified tokens insert at the index. + + The index to insert the new tokens. + The tokens to insert. + + + + Creates a new with the token at the specified index removed. + + The index of the token to remove. + + + + Creates a new with the specified token removed. + + The token to remove. + + + + Creates a new with the specified token replaced with a new token. + + The token to replace. + The new token. + + + + Creates a new with the specified token replaced with new tokens. + + The token to replace. + The new tokens. + + + + Returns an enumerator for the tokens in the + + + + + Compares and for equality. + + + + True if the two s are equal. + + + + Compares and for inequality. + + + + True if the two s are not equal. + + + + Compares this with the for equality. + + True if the two objects are equal. + + + + Serves as a hash function for the + + + + + Create a new Token List + + Element of the return Token List + + + + A structure for enumerating a + + + + + Advances the enumerator to the next token in the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator + has passed the end of the collection. + + + + Gets the current element in the collection. + + + + + Reversed enumerable. + + + + + The parsed representation of a source document. + + + + + Cached value for empty . + + + + + The path of the source document file. + + + If this syntax tree is not associated with a file, this value can be empty. + The path shall not be null. + + The file doesn't need to exist on disk. The path is opaque to the compiler. + The only requirement on the path format is that the implementations of + , and + passed to the compilation that contains the tree understand it. + + Clients must also not assume that the values of this property are unique + within a Compilation. + + The path is used as follows: + - When debug information is emitted, this path is embedded in the debug information. + - When resolving and normalizing relative paths in #r, #load, #line/#ExternalSource, + #pragma checksum, #ExternalChecksum directives, XML doc comment include elements, etc. + + + + + Returns true if this syntax tree has a root with SyntaxKind "CompilationUnit". + + + + + The options used by the parser to produce the syntax tree. + + + + + The options used by the parser to produce the syntax tree. + + + + + Option to specify custom behavior for each warning in this tree. + + + A map from diagnostic ID to diagnostic reporting level. The diagnostic + ID string may be case insensitive depending on the language. + + + + + The length of the text of the syntax tree. + + + + + Gets the syntax tree's text if it is available. + + + + + Gets the text of the source document. + + + + + The text encoding of the source document. + + + + + Useful information about this tree that is stored for source-generator scenarios. Allows the incremental + generation framework to compute and cache data once against a tree so it does not have to go back to source + for untouched trees when other trees in the compilation are modified. + + + + + Gets the text of the source document asynchronously. + + + By default, the work associated with this method will be executed immediately on the current thread. + Implementations that wish to schedule this work differently should override . + + + + + Gets the root of the syntax tree if it is available. + + + + + Gets the root of the syntax tree if it is available. + + + + + Gets the root node of the syntax tree, causing computation if necessary. + + + + + Gets the root node of the syntax tree, causing computation if necessary. + + + + + Gets the root node of the syntax tree asynchronously. + + + + + Gets the root node of the syntax tree asynchronously. + + + + + Create a new syntax tree based off this tree using a new source text. + + If the new source text is a minor change from the current source text an incremental + parse will occur reusing most of the current syntax tree internal data. Otherwise, a + full parse will occur using the new source text. + + + + + Gets a list of all the diagnostics in the syntax tree. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets a list of all the diagnostics in the sub tree that has the specified node as its root. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets a list of all the diagnostics associated with the token and any related trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets a list of all the diagnostics associated with the trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets a list of all the diagnostics in either the sub tree that has the specified node as its root or + associated with the token and its related trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Gets the location in terms of path, line and column for a given span. + + Span within the tree. + Cancellation token. + + A valid that contains path, line and column information. + The values are not affected by line mapping directives (#line). + + + + + Gets the location in terms of path, line and column after applying source line mapping directives + (#line in C# or #ExternalSource in VB). + + Span within the tree. + Cancellation token. + + A valid that contains path, line and column information. + + If the location path is mapped the resulting path is the path specified in the corresponding #line, + otherwise it's . + + A location path is considered mapped if it is preceded by a line mapping directive that + either specifies an explicit file path or is #line default. + + + + + Returns empty sequence if there are no line mapping directives in the tree. + Otherwise, returns a sequence of pairs of spans: each describing a mapping of a span of the tree between two consecutive #line directives. + If the first directive is not on the first line the first pair describes mapping of the span preceding the first directive. + The last pair of the sequence describes mapping of the span following the last #line directive. + + + Empty sequence if the tree does not contain a line mapping directive. + Otherwise a non-empty sequence of . + + + + + Returns the visibility for the line at the given position. + + The position to check. + The cancellation token. + + + + Gets a FileLinePositionSpan for a TextSpan and the information whether this span is considered to be hidden or not. + FileLinePositionSpans are used primarily for diagnostics and source locations. + This method combines a call to GetLineSpan and IsHiddenPosition. + + + Returns a boolean indicating whether this span is considered hidden or not. + This function is being called only in the context of sequence point creation and therefore interprets the + LineVisibility accordingly (BeforeFirstRemappingDirective -> Visible). + + + + Returns a path for particular location in source that is presented to the user. + + + Used for implementation of + or for embedding source paths in error messages. + + Unlike Dev12 we do account for #line and #ExternalSource directives when determining value for + . + + + + + Returns a line number for particular location in source that is presented to the user. + + + Used for implementation of + or for embedding source line numbers in error messages. + + Unlike Dev12 we do account for #line and #ExternalSource directives when determining value for + . + + + + + Are there any hidden regions in the tree? + + True if there is at least one hidden region. + + + + Returns a list of the changed regions between this tree and the specified tree. The list is conservative for + performance reasons. It may return larger regions than what has actually changed. + + + + + Gets a location for the specified text span. + + + + + Determines if two trees are the same, disregarding trivia differences. + + The tree to compare against. + If true then the trees are equivalent if the contained nodes and tokens declaring + metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies + or initializer expressions, otherwise all nodes and tokens must be equivalent. + + + + + Gets a SyntaxReference for a specified syntax node. SyntaxReferences can be used to + regain access to a syntax node without keeping the entire tree and source text in + memory. + + + + + Gets a list of text changes that when applied to the old tree produce this tree. + + The old tree. + The list of changes may be different than the original changes that produced + this tree. + + + + Gets the checksum + algorithm id to use in the PDB. + + + + + Returns a new tree whose root and options are as specified and other properties are copied from the current tree. + + + + + Returns a new tree whose is the specified node and other properties are copied from the current tree. + + + + + Returns a new tree whose are the specified value and other properties are copied + from the current tree. + + + A mapping from diagnostic id to diagnostic reporting level. The diagnostic ID may be case-sensitive depending + on the language. + + + + + Returns a that represents the entire source text of this . + + + + + Verify nodes match source. + + + + + Return the index of the first difference between + the two strings, or -1 if the strings are the same. + + + + + Returns true if the provided position is in a hidden region inaccessible to the user. + + + + + Represents a trivia in the syntax tree. + + + + + An integer representing the language specific kind of this trivia. + + + + + The language name that this trivia is syntax of. + + + + + The parent token that contains this token in its LeadingTrivia or TrailingTrivia collection. + + + + + The width of this trivia in characters. If this trivia is a structured trivia then the returned width will + not include the widths of any leading or trailing trivia present on the child non-terminal node of this + trivia. + + + + + The width of this trivia in characters. If this trivia is a structured trivia then the returned width will + include the widths of any leading or trailing trivia present on the child non-terminal node of this trivia. + + + + + The absolute span of this trivia in characters. If this trivia is a structured trivia then the returned span + will not include spans of any leading or trailing trivia present on the child non-terminal node of this + trivia. + + + + + Same as accessing on . + + + Slight performance improvement. + + + + + The absolute span of this trivia in characters. If this trivia is a structured trivia then the returned span + will include spans of any leading or trailing trivia present on the child non-terminal node of this trivia. + + + + + Determines whether this trivia has any diagnostics on it. If this trivia is a structured trivia then the + returned value will indicate whether this trivia or any of its descendant nodes, tokens or trivia have any + diagnostics on them. + > + + + + Determines whether this trivia is a structured trivia. + + + + + Determines whether this trivia is a descendant of a structured trivia. + + + + + Determines whether this trivia or any of its structure has annotations. + + + + + Determines where this trivia has annotations of the specified annotation kind. + + + + + Determines where this trivia has any annotations of the specified annotation kinds. + + + + + Determines whether this trivia has the specific annotation. + + + + + Get all the annotations of the specified annotation kind. + + + + + Get all the annotations of the specified annotation kinds. + + + + + Determines whether this trivia represents a preprocessor directive. + + + + + Returns the child non-terminal node representing the syntax tree structure under this structured trivia. + + The child non-terminal node representing the syntax tree structure under this structured + trivia. + + + + Returns the string representation of this trivia. If this trivia is structured trivia then the returned string + will not include any leading or trailing trivia present on the StructuredTriviaSyntax node of this trivia. + + The string representation of this trivia. + The length of the returned string is always the same as Span.Length + + + + Returns the full string representation of this trivia. If this trivia is structured trivia then the returned string will + include any leading or trailing trivia present on the StructuredTriviaSyntax node of this trivia. + + The full string representation of this trivia. + The length of the returned string is always the same as FullSpan.Length + + + + Writes the full text of this trivia to the specified TextWriter. + + + + + Determines whether two s are equal. + + + + + Determines whether two s are unequal. + + + + + Determines whether the supplied is equal to this + . + + + + + Determines whether the supplied is equal to this + . + + + + + Serves as hash function for . + + + + + Creates a new SyntaxTrivia with the specified annotations. + + + + + Creates a new SyntaxTrivia with the specified annotations. + + + + + Creates a new SyntaxTrivia without the specified annotations. + + + + + Creates a new SyntaxTrivia without the specified annotations. + + + + + Creates a new SyntaxTrivia without annotations of the specified kind. + + + + + Copies all SyntaxAnnotations, if any, from this SyntaxTrivia instance and attaches them to a new instance based on . + + + + + SyntaxTree which contains current SyntaxTrivia. + + + + + Get the location of this trivia. + + + + + Gets a list of all the diagnostics associated with this trivia. + This method does not filter diagnostics based on #pragmas and compiler options + like nowarn, warnaserror etc. + + + + + Determines if this trivia is equivalent to the specified trivia. + + + + + Represents a read-only list of . + + + + + Creates a list of trivia. + + An array of trivia. + + + + Creates a list of trivia. + + A sequence of trivia. + + + + Gets the trivia at the specified index. + + The zero-based index of the trivia to get. + The token at the specified index. + + is less than 0.-or- is equal to or greater than . + + + + The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements. + + + + + The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements. + + + + + Returns the first trivia in the list. + + The first trivia in the list. + The list is empty. + + + + Returns the last trivia in the list. + + The last trivia in the list. + The list is empty. + + + + Does this list have any items. + + + + + Returns a list which contains all elements of in reversed order. + + which contains all elements of in reversed order + + + + Creates a new with the specified trivia added to the end. + + The trivia to add. + + + + Creates a new with the specified trivia added to the end. + + The trivia to add. + + + + Creates a new with the specified trivia inserted at the index. + + The index in the list to insert the trivia at. + The trivia to insert. + + + + Creates a new with the specified trivia inserted at the index. + + The index in the list to insert the trivia at. + The trivia to insert. + + + + Creates a new with the element at the specified index removed. + + The index identifying the element to remove. + + + + Creates a new with the specified element removed. + + The trivia element to remove. + + + + Creates a new with the specified element replaced with new trivia. + + The trivia element to replace. + The trivia to replace the element with. + + + + Creates a new with the specified element replaced with new trivia. + + The trivia element to replace. + The trivia to replace the element with. + + + + get the green node at the specific slot + + + + + Copy number of items starting at from this list into starting at . + + + + + Reversed enumerable. + + + + + Walks the syntax tree, allowing subclasses to operate on all nodes, token and trivia. The + walker will perform a depth first walk of the tree. + + + + + Syntax the should descend into. + + + + + Creates a new walker instance. + + Syntax the should descend into. + + + + Called when the walker visits a node. This method may be overridden if subclasses want + to handle the node. Overrides should call back into this base method if they want the + children of this node to be visited. + + The current node that the walker is visiting. + + + + Called when the walker visits a token. This method may be overridden if subclasses want + to handle the token. Overrides should call back into this base method if they want the + trivia of this token to be visited. + + The current token that the walker is visiting. + + + + Called when the walker visits a trivia syntax. This method may be overridden if + subclasses want to handle the token. Overrides should call back into this base method if + they want the children of this trivia syntax to be visited. + + The current trivia syntax that the walker is visiting. + + + + Syntax the should descend into. + + + + + descend into only nodes + + + + + descend into nodes and tokens + + + + + descend into nodes, tokens and trivia + + + + + descend into everything + + + + + Kind of a synthesized local variable. + + + Synthesized local variables are either + 1) Short-lived (temporary) + The lifespan of a temporary variable shall not cross a statement boundary (a PDB sequence point). + These variables are not tracked by EnC and don't have names. Only values less than 0 are considered + short-lived: new short-lived kinds should have a negative value. + + 2) Long-lived + All variables whose lifespan might cross a statement boundary (include a PDB sequence point) + must be named in a build configuration that supports EnC. Some of them might need to be named in release, to support EE. + The kind of such local must be encoded in the name, so that we can retrieve it from debug metadata during EnC. + + The integer value of the kind must match corresponding Dev11/12 TEMP_KIND enum values for + compatibility with assemblies generated by the native compiler. + + Long-lived local variables must be assigned slots in source order. + + + + + Temp created for caching "this". + Technically it is long-lived, but will happen only in optimized code. + + + + + Temp variable created by the optimizer. + + + + + Temp variable created during lowering. + + + + + Temp variable created by the emitter. + + + + + The variable is not synthesized (C#, VB). Note that SynthesizedLocalKind values + greater than or equal to this are considered long-lived; + see . + + + + + Local variable that stores value of an expression consumed by a subsequent conditional branch instruction that might jump across PDB sequence points. + The value needs to be preserved when remapping the IL offset from old method body to new method body during EnC. + A hidden sequence point also needs to be inserted at the offset where this variable is loaded to be consumed by the branch instruction. + (VB, C#). + + + + + Boolean passed to Monitor.Enter (C#, VB). + + + + + Variable holding on the object being locked while the execution is within the block of the lock statement (C#) or SyncLock statement (VB). + + + + + Local variable that stores the resources to be disposed at the end of using statement (C#, VB). + + + + + Local variable that stores the enumerator instance (C#, VB). + + + + + Local variable that stores the array instance (C#, VB?). + + + + + Local variables that store upper bound of multi-dimensional array, for each dimension (C#, VB?). + + + + + Local variables that store the current index, for each dimension (C#, VB?). + + + + + Local variable that holds a pinned handle of a managed reference passed to a fixed statement (C#). + + + + + Local variable that holds the object passed to With statement (VB). + + + + + Local variable used to store the value of Select Case during the execution of Case statements. + + + + + Local variable that stores the return value of an async method. + + + + + VB: Stores the return value of a function that is not accessible from user code (e.g. operator, lambda, async, iterator). + C#: Stores the return value of a method/lambda with a block body, so that we can put a sequence point on the closing brace of the body. + + + + + Very special corner case involving filters, await and lambdas. + + + + + Local variable that stores the current state of the state machine while MoveNext method is executing. + Used to avoid race conditions due to multiple reads from the lifted state. + + + + + Local that stores an expression value which needs to be spilled. + Such a local arises from the translation of an await or switch expression, + and might be hoisted to an async state machine if it remains alive + after an await expression. + + + + + Local variable that holds on the display class instance. + + + + + Local variable used to cache a delegate that is used in inner block (possibly a loop), + and can be reused for all iterations of the loop. + + + + + Local variable that stores the result of an await expression (the awaiter object). + The variable is assigned the result of a call to await-expression.GetAwaiter() and subsequently used + to check whether the task completed. Eventually the value is stored in an awaiter field. + + The value assigned to the variable needs to be preserved when remapping the IL offset from old method body + to new method body during EnC. If the awaiter expression is contained in an active statement and the + containing MoveNext method changes the debugger finds the next sequence point that follows the await expression + and transfers the execution to the new method version. This sequence point is placed by the compiler at + the immediately after the stloc instruction that stores the awaiter object to this variable. + The subsequent ldloc then restores it in the new method version. + + (VB, C#). + + + + + Stores a dynamic analysis instrumentation payload array. The value is initialized in + synthesized method prologue code and referred to throughout the method body. + + + + + Temp created for pattern matching by type. This holds the value of an input value provisionally + converted to the type against which it is being matched. + + + + + All values have to be less than or equal to + () + + + + + An awaiter in async method. + Never actually created as a local variable, immediately lifted to a state machine field. + Not serialized to . + + + + + The receiver of a delegate relaxation stub. + Created as a local variable but always lifted to a relaxation display class field. + We never emit debug info for hoisted relaxation variable. + TODO: Avoid using lambdas and display classes for implementation of relaxation stubs and remove this kind. + + + + + This is ONLY used id BoundNode.cs Debug method - Dump() + + + + + This is ONLY used for debugging purpose + + + + + Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]". + + The version string to parse. + If parsing succeeds, the parsed version. Otherwise a version that represents as much of the input as could be parsed successfully. + True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. + + + + Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" + as accepted by System.Reflection.AssemblyVersionAttribute. + + The version string to parse. + Indicates whether or not a wildcard is accepted as the terminal component. + + If parsing succeeded, the parsed version. Otherwise a version instance with all parts set to zero. + If contains * the version build and/or revision numbers are set to . + + True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. + + + + Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" + as accepted by System.Reflection.AssemblyVersionAttribute. + + The version string to parse. + Indicates whether or not we're parsing an assembly version string. If so, wildcards are accepted and each component must be less than 65535. + The maximum value that a version component may have. + Allow the parsing of version elements where invalid characters exist. e.g. 1.2.2a.1 + + If parsing succeeded, the parsed version. When is true a version with values up to the first invalid character set. Otherwise a version with all parts set to zero. + If contains * and wildcard is allowed the version build and/or revision numbers are set to . + + True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. + + + + If build and/or revision numbers are 65535 they are replaced with time-based values. + + + + + This function defines whether an attribute is optional or not. + + The attribute member. + + + + Ids of well known runtime types. + Values should not intersect with SpecialType enum! + + + + + + Number of well known types in WellKnownType enum + + + + + Array of names for types. + The names should correspond to ids from WellKnownType enum so + that we could use ids to index into the array + + + + + + Resolves references to XML files specified in the source. + + + + + Resolves XML document file path. + + + Value of the "file" attribute of an <include> documentation comment element. + + + Path of the source file () or XML document that contains the . + If not null used as a base path of , if is relative. + If is relative is used as the base path of . + + Normalized XML document file path or null if not found. + + + + The XmlCharType class is used for quick character type recognition + which is optimized for the first 127 ascii characters. + + + + + start >= value <= end + + + + + Struct containing information about a source declaration. + + + + + Topmost syntax node for this declaration. + + + + + Syntax nodes for executable code blocks (method body, initializers, etc.) associated with this declaration. + + + + + Symbol declared by this declaration. + + + + + Constants for producing and consuming streams of binary custom debug info. + + + + More than records added. + + + + The kinds of custom debug info in Windows PDBs that we know how to interpret. + The values correspond to possible values of the "kind" byte + in the record header. + + + + + C# only. Encodes the sizes of using groups that are applicable to the method. + The actual import strings are stored separately trhu ISymUnmanagedWriter.UsingNamespace. + + + Represented by using XML node in PDB tests. + + + + + C# only. Indicates that per-method debug information (import strings) is stored on another method, + whose token is specified. + + + Represented by forward XML node in PDB tests. + + + + + C# only. Indicates that per-module debug information (assembly reference aliases) is stored on another method, + whose token is specified. + + + Represented by forwardToModule XML node in PDB tests. + + + + + C# only. Specifies local scopes for state machine hoisted local variables. + + + Represented by hoistedLocalScopes XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + C# and VB. The name of the state machine type. Emitted for async and iterator kick-off methods. + + + Represented by forwardIterator XML node in PDB tests. + + + + + C# only. Dynamic flags for local variables and constants. + + + Represented by dynamicLocals XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + C# and VB. Encodes EnC local variable slot map. + See https://github.com/dotnet/corefx/blob/main/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EditAndContinueLocalSlotMap. + + + Represented by encLocalSlotMap XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + C# and VB. Encodes EnC lambda map. + See https://github.com/dotnet/corefx/blob/main/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EditAndContinueLambdaAndClosureMap. + + + Represented by encLambdaMap XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + C# and VB. Tuple element names for local variables and constants. + + + Represented by tupleElementNames XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + C# and VB. Syntax offsets of nodes associated with state machine states in an async/iterator method and their corresponding state numbers. + + + Represented by encStateMachineStateMap XML node in PDB tests. + Equivalent to in Portable PDB. + + + + + A collection of utility method for consuming custom debug info from a PDB. + + + This is not a public API, so we're just going to let bad offsets fail on their own. + + + + + This is the first header in the custom debug info blob. + + + + + After the global header (see comes list of custom debug info record. + Each record begins with a standard header. + + + + + + + + Exposed for . + + + + + + For each namespace declaration enclosing a method (innermost-to-outermost), there is a count + of the number of imports in that declaration. + + + There's always at least one entry (for the global namespace). + Exposed for . + + + + + This indicates that further information can be obtained by looking at the custom debug + info of another method (specified by token). + + + Appears when multiple method would otherwise have identical using records (see ). + Exposed for . + + + + + This indicates that further information can be obtained by looking at the custom debug + info of another method (specified by token). + + + Appears when there are extern aliases and edit-and-continue is disabled. + Exposed for . + + + + + Scopes of state machine hoisted local variables. + + + Exposed for . + + + + + Indicates that this method is the iterator state machine for the method named in the record. + + + Appears on kick-off methods of a state machine. + Exposed for . + + Encodes NULL-terminated UTF16 name of the state machine type. + The ending NULL character might not be present if the PDB was generated by an older compiler. + + Bad data. + + + + Does for locals what System.Runtime.CompilerServices.DynamicAttribute does for parameters, return types, and fields. + In particular, indicates which occurrences of in the signature are really dynamic. + + + Appears when there are dynamic locals. + Exposed for . + + Bad data. + + + + Tuple element names for locals. + + + + + Get the import strings for a given method, following forward pointers as necessary. + + + For each namespace enclosing the method, a list of import strings, innermost to outermost. + There should always be at least one entry, for the global namespace. + + + + + Get the import strings for a given method, following forward pointers as necessary. + + + A list of import strings. There should always be at least one entry, for the global namespace. + + + + + Parse a string representing a C# using (or extern alias) directive. + + + + "AS USystem" -> + "AC TSystem.Console" -> + "AS ESystem alias" -> + "XOldLib" -> + "ZOldLib assembly" -> + "ESystem alias" -> + "TSystem.Math" -> + ]]> + + + + + Parse a string representing a VB import statement. + + is null. + Format of is not valid. + + + + Read UTF-8 string with null terminator. + + + + + C# or VB namespace import. + + + + + C# or VB type import. + + + + + VB namespace or type alias target (not specified). + + + + + C# extern alias. + + + + + VB XML import. + + + + + VB forwarding information (i.e. another method has the imports for this one). + + + + + VB containing namespace (not an import). + + + + + VB root namespace (not an import). + + + + + A kind that is no longer used. + + + + + The offset of the first operation in the scope. + + + + + The offset of the first operation outside of the scope, or the method body length. + If zero then is also zero and the slot represents a synthesized local. + + + + + Realizes the array. + + + + + Realizes the array and clears the collection. + + + + + Write to slot . + Fills in unallocated slots preceding the , if any. + + + + + Realizes the array. + + + + + Realizes the array, downcasting each element to a derived type. + + + + + Realizes the array and disposes the builder in one operation. + + + + + struct enumerator used in foreach. + + + + + Generic implementation of object pooling pattern with predefined pool size limit. The main + purpose is that limited number of frequently used objects can be kept in the pool for + further recycling. + + Notes: + 1) it is not the goal to keep all returned objects. Pool is not meant for storage. If there + is no space in the pool, extra returned objects will be dropped. + + 2) it is implied that if object was obtained from a pool, the caller will return it back in + a relatively short time. Keeping checked out objects for long durations is ok, but + reduces usefulness of pooling. Just new up your own. + + Not returning objects to the pool in not detrimental to the pool's work, but is a bad practice. + Rationale: + If there is no intent for reusing the object, do not use pool - just use "new". + + + + + Not using System.Func{T} because this file is linked into the (debugger) Formatter, + which does not have that type (since it compiles against .NET 2.0). + + + + + Produces an instance. + + + Search strategy is a simple linear probing which is chosen for it cache-friendliness. + Note that Free will try to store recycled objects close to the start thus statistically + reducing how far we will typically search. + + + + + Returns objects to the pool. + + + Search strategy is a simple linear probing which is chosen for it cache-friendliness. + Note that Free will try to store recycled objects close to the start thus statistically + reducing how far we will typically search in Allocate. + + + + + Removes an object from leak tracking. + + This is called when an object is returned to the pool. It may also be explicitly + called if an object allocated from the pool is intentionally not being returned + to the pool. This can be of use with pooled arrays if the consumer wants to + return a larger array to the pool than was originally allocated. + + + + + Provides pooled delegate instances to help avoid closure allocations for delegates that require a state argument + with APIs that do not provide appropriate overloads with state arguments. + + + + + Gets an delegate, which calls with the specified + . The resulting may be called any number of times + until the returned is disposed. + + + The following example shows the use of a capturing delegate for a callback action that requires an + argument: + + + int x = 3; + RunWithActionCallback(() => this.DoSomething(x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + callback action: + + + int x = 3; + using var _ = GetPooledAction(arg => arg.self.DoSomething(arg.x), (self: this, x), out Action action); + RunWithActionCallback(action); + + + The type of argument to pass to . + The unbound action delegate. + The argument to pass to the unbound action delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets an delegate, which calls with the specified + . The resulting may be called any number of times + until the returned is disposed. + + + The following example shows the use of a capturing delegate for a callback action that requires an + argument: + + + int x = 3; + RunWithActionCallback(a => this.DoSomething(a, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + callback action: + + + int x = 3; + using var _ = GetPooledAction((a, arg) => arg.self.DoSomething(a, arg.x), (self: this, x), out Action<int> action); + RunWithActionCallback(action); + + + The type of the first parameter of the bound action. + The type of argument to pass to . + The unbound action delegate. + The argument to pass to the unbound action delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets an delegate, which calls with the specified + . The resulting may be called any number of times + until the returned is disposed. + + + The following example shows the use of a capturing delegate for a callback action that requires an + argument: + + + int x = 3; + RunWithActionCallback((a, b) => this.DoSomething(a, b, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + callback action: + + + int x = 3; + using var _ = GetPooledAction((a, b, arg) => arg.self.DoSomething(a, b, arg.x), (self: this, x), out Action<int, int> action); + RunWithActionCallback(action); + + + The type of the first parameter of the bound action. + The type of the second parameter of the bound action. + The type of argument to pass to . + The unbound action delegate. + The argument to pass to the unbound action delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets an delegate, which calls with the specified + . The resulting may be called any number of times + until the returned is disposed. + + + The following example shows the use of a capturing delegate for a callback action that requires an + argument: + + + int x = 3; + RunWithActionCallback((a, b, c) => this.DoSomething(a, b, c, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + callback action: + + + int x = 3; + using var _ = GetPooledAction((a, b, c, arg) => arg.self.DoSomething(a, b, c, arg.x), (self: this, x), out Action<int, int, int> action); + RunWithActionCallback(action); + + + The type of the first parameter of the bound action. + The type of the second parameter of the bound action. + The type of the third parameter of the bound action. + The type of argument to pass to . + The unbound action delegate. + The argument to pass to the unbound action delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets a delegate, which calls with the + specified . The resulting may be called any + number of times until the returned is disposed. + + + The following example shows the use of a capturing delegate for a predicate that requires an + argument: + + + int x = 3; + RunWithPredicate(() => this.IsSomething(x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + predicate: + + + int x = 3; + using var _ = GetPooledFunction(arg => arg.self.IsSomething(arg.x), (self: this, x), out Func<bool> predicate); + RunWithPredicate(predicate); + + + The type of argument to pass to . + The type of the return value of the function. + The unbound function delegate. + The argument to pass to the unbound function delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets a delegate, which calls with the + specified . The resulting may be called any + number of times until the returned is disposed. + + + The following example shows the use of a capturing delegate for a predicate that requires an + argument: + + + int x = 3; + RunWithPredicate(a => this.IsSomething(a, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + predicate: + + + int x = 3; + using var _ = GetPooledFunction((a, arg) => arg.self.IsSomething(a, arg.x), (self: this, x), out Func<int, bool> predicate); + RunWithPredicate(predicate); + + + The type of the first parameter of the bound function. + The type of argument to pass to . + The type of the return value of the function. + The unbound function delegate. + The argument to pass to the unbound function delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets a delegate, which calls with the + specified . The resulting may be called any + number of times until the returned is disposed. + + + The following example shows the use of a capturing delegate for a predicate that requires an + argument: + + + int x = 3; + RunWithPredicate((a, b) => this.IsSomething(a, b, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + predicate: + + + int x = 3; + using var _ = GetPooledFunction((a, b, arg) => arg.self.IsSomething(a, b, arg.x), (self: this, x), out Func<int, int, bool> predicate); + RunWithPredicate(predicate); + + + The type of the first parameter of the bound function. + The type of the second parameter of the bound function. + The type of argument to pass to . + The type of the return value of the function. + The unbound function delegate. + The argument to pass to the unbound function delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + Gets a delegate, which calls with the + specified . The resulting may be called any + number of times until the returned is disposed. + + + The following example shows the use of a capturing delegate for a predicate that requires an + argument: + + + int x = 3; + RunWithPredicate((a, b, c) => this.IsSomething(a, b, c, x)); + + + The following example shows the use of a pooled delegate to avoid capturing allocations for the same + predicate: + + + int x = 3; + using var _ = GetPooledFunction((a, b, c, arg) => arg.self.IsSomething(a, b, c, arg.x), (self: this, x), out Func<int, int, int, bool> predicate); + RunWithPredicate(predicate); + + + The type of the first parameter of the bound function. + The type of the second parameter of the bound function. + The type of the third parameter of the bound function. + The type of argument to pass to . + The type of the return value of the function. + The unbound function delegate. + The argument to pass to the unbound function delegate. + A delegate which calls with the specified + . + A disposable which returns the object to the delegate pool. + + + + A releaser for a pooled delegate. + + + This type is intended for use as the resource of a using statement. When used in this manner, + should not be called explicitly. + + If used without a using statement, calling is optional. If the call is + omitted, the object will not be returned to the pool. The behavior of this type if is + called multiple times is undefined. + + + + + The usage is: + var inst = PooledStringBuilder.GetInstance(); + var sb = inst.builder; + ... Do Stuff... + ... sb.ToString() ... + inst.Free(); + + + + + If someone need to create a private pool + + The size of the pool. + + + + Output kind not supported. + + + Path returned by {0}.ResolveMetadataFile must be absolute: '{1}' + + + Assembly must have at least one module. + + + Module copy can't be used to create an assembly metadata. + + + Unresolved: + + + assembly + + + class + + + constructor + + + delegate + + + enum + + + event + + + field + + + type parameter + + + interface + + + method + + + module + + + parameter + + + property, indexer + + + return + + + struct + + + Can't create a reference to a submission. + + + Can't create a reference to a module. + + + <in-memory assembly> + + + <in-memory module> + + + Size has to be positive. + + + Assembly file not found + + + Can't embed interop types from module. + + + Can't alias a module. + + + Invalid alias. + + + {0}.GetMetadata() must return an instance of {1}. + + + Value too large to be represented as a 30 bit unsigned integer. + + + Arrays with more than one dimension cannot be serialized. + + + Invalid assembly name: '{0}' + + + Absolute path expected. + + + A key in the pathMap is empty. + + + A value in the pathMap is null. + + + Compilation options must not have errors. + + + Return type can't be a value type, pointer, by-ref or open generic type + + + Return type can't be void, by-ref or open generic type + + + Type must be same as host object type of previous submission. + + + Previous submission has errors. + + + Invalid output kind for submission. DynamicallyLinkedLibrary expected. + + + Invalid compilation options -- submission can't be signed. + + + Resource stream provider should return non-null stream. + + + Reference resolver should return readable non-null stream. + + + Empty or invalid resource name + + + Empty or invalid file name + + + Resource data provider should return non-null stream + + + File not found. + + + Path returned by {0}.ResolveStrongNameKeyFile must be absolute: '{1}' + + + type must be a subclass of SyntaxAnnotation. + + + Invalid module name specified in metadata module '{0}': '{1}' + + + File size exceeds maximum allowed size of a valid metadata file. + + + Name cannot be null. + + + Name cannot be empty. + + + Name cannot start with whitespace. + + + Name contains invalid characters. + + + The span does not include the start of a line. + + + The span does not include the end of a line. + + + 'start' must not be negative + + + 'end' must not be less than 'start' + + + Invalid content type + + + Expected non-empty public key + + + Invalid size of public key token. + + + Invalid characters in assembly name + + + Invalid characters in assembly culture name + + + Stream must support read and seek operations. + + + Stream must be readable. + + + Stream must be writable. + + + PDB stream should not be given when embedding PDB into the PE stream. + + + PDB stream should not be given when emitting metadata only. + + + Metadata PE stream should not be given when emitting metadata only. + + + Including private members should not be used when emitting to the secondary assembly output. + + + Must include private members unless emitting a ref assembly. + + + Embedding PDB is not allowed when emitting metadata. + + + Cannot target net module when emitting ref assembly. + + + Invalid hash. + + + Unsupported hash algorithm. + + + Inconsistent language versions + + + Win32 resources, assumed to be in COFF object format, have one or more invalid relocation header values. + + + Win32 resources, assumed to be in COFF object format, have an invalid section size. + + + Win32 resources, assumed to be in COFF object format, have one or more invalid symbol values. + + + Win32 resources, assumed to be in COFF object format, are missing one or both of sections '.rsrc$01' and '.rsrc$02' + + + Icon stream is not in the expected format. + + + Invalid culture name: '{0}' + + + WindowsRuntime identity can't be retargetable + + + PE image not available. + + + Assembly signing not supported. + + + References to XML documents are not supported. + + + Could not locate the rule set file '{0}'. + + + An error occurred while loading the included rule set file {0} - {1} + + + Analyzer Failure + + + Analyzer '{0}' threw an exception of type '{1}' with message '{2}'. + {3} + + + Analyzer '{0}' threw the following exception: + '{1}'. + + + Analyzer Driver Failure + + + Analyzer driver threw an exception of type '{0}' with message '{1}'. + + + Analyzer driver threw the following exception: + '{0}'. + + + PE image doesn't contain managed metadata. + + + The changes must not overlap. + + + A DiagnosticDescriptor must have an Id that is neither null nor an empty string nor a string that only contains white space. + + + A SuppressionDescriptor must have an Id that is neither null nor an empty string nor a string that only contains white space. + + + The rule set file has duplicate rules for '{0}' with differing actions '{1}' and '{2}'. + + + Can't create a module reference to an assembly. + + + Can't create a metadata reference to a dynamic assembly. + + + Can't create a metadata reference to an assembly without location. + + + Argument cannot be empty. + + + Argument cannot have a null element. + + + Reported diagnostic with ID '{0}' is not supported by the analyzer. + + + Reported suppression with ID '{0}' is not supported by the suppressor. + + + Suppressed diagnostic ID '{0}' does not match suppressable ID '{1}' for the given suppression descriptor. + + + Non-reported diagnostic with ID '{0}' cannot be suppressed. + + + Reported diagnostic has an ID '{0}', which is not a valid identifier. + + + Reported diagnostic '{0}' has a source location in file '{1}', which is not part of the compilation being analyzed. + + + Analyzer '{0}' contains a null descriptor in its 'SupportedDiagnostics'. + + + Analyzer '{0}' contains a null descriptor in its 'SupportedSuppressions'. + + + The type '{0}' is not understood by the serialization binder. + + + Cannot deserialize type '{0}'. + + + Cannot serialize type '{0}'. + + + Node to track is not a descendant of the root. + + + A node or token is out of sequence. + + + A node in the list is not of the expected type. + + + The item specified is not the element of a list. + + + Invalid public key. + + + Invalid public key token. + + + Invalid data at offset {0}: {1}{2}*{3}{4} + + + Windows PDB writer doesn't support deterministic compilation: '{0}' + + + The version of Windows PDB writer is older than required: '{0}' + + + Windows PDB writer doesn't support SourceLink feature: '{0}' + + + The attribute {0} has an invalid value of {1}. + + + The element {0} is missing an attribute named {1}. + + + Argument to '/keepalive' option is not a 32-bit integer. + + + Arguments to '/keepalive' option below -1 are invalid. + + + '/keepalive' option is only valid with '/shared' option. + + + Roslyn compiler server reports different protocol version than build task. + + + Missing argument for '/keepalive' option. + + + Total analyzer execution time: {0} seconds. + + + NOTE: Elapsed time may be less than analyzer execution time because analyzers can run concurrently. + + + Time (s) + + + Analyzer + + + No analyzers found + + + Argument contains duplicate analyzer instances. + + + Argument contains an analyzer instance that does not belong to the 'Analyzers' for this CompilationWithAnalyzers instance. + + + Syntax tree doesn't belong to the underlying 'Compilation'. + + + Additional file doesn't belong to the underlying 'CompilationWithAnalyzers'. + + + Resource stream ended at {0} bytes, expected {1} bytes. + + + Value for argument '/shared:' must not be empty + + + Exception occurred with following context: + {0} + + + {0} and {1} must have the same length. + + + {0} must either be 'default' or have the same length as {1}. + + + Inconsistent syntax tree features + + + Reference of type '{0}' is not valid for this compilation. + + + MetadataReference '{0}' not found to remove. + + + If tuple element names are specified, the number of element names must match the cardinality of the tuple. + + + Tuple element name cannot be an empty string. + + + If tuple element locations are specified, the number of locations must match the cardinality of the tuple. + + + If tuple element nullable annotations are specified, the number of annotations must match the cardinality of the tuple. + + + Tuples must have at least two elements. + + + The compilation references multiple assemblies whose versions only differ in auto-generated build and/or revision numbers. + + + The underlying type for a tuple must be tuple-compatible. + + + Unrecognized resource file format. + + + SourceText cannot be embedded. Provide encoding or canBeEmbedded=true at construction. + + + Stream is too long. + + + Embedded texts are only supported when emitting a PDB. + + + The stream cannot be written to. + + + element is expected + + + separator is expected + + + The stream cannot be read from. + + + Deserialization reader for '{0}' read incorrect number of values. + + + Stream contains invalid data + + + Reported diagnostic '{0}' has a source location '{1}' in file '{2}', which is outside of the given file. + + + Warning: Could not enable multicore JIT due to exception: {0}. + + + Given operation has a non-null parent. + + + Given operation has a null semantic model. + + + Given operation block does not belong to the current analysis context. + + + Parameter '{0}' must be an 'INamedTypeSymbol' or an 'IAssemblySymbol'. + + + Parameter '{0}' must be a symbol from this compilation or some referenced assembly. + + + The provided operation must not be part of a Control Flow Graph. + + + A language name cannot be specified for this option. + + + A language name must be specified for this option. + + + The diagnostic '{0}' was given an invalid severity '{1}' in the analyzer config file at '{2}'. + + + Invalid severity in analyzer config file. + + + Programmatic suppression of an analyzer diagnostic + + + Diagnostic '{0}: {1}' was programmatically suppressed by a DiagnosticSuppressor with suppression ID '{2}' and justification '{3}' + + + Module has invalid attributes. + + + Unable to determine specific cause of the failure. + + + Changing the version of an assembly reference is not allowed during debugging: '{0}' changed version to '{1}'. + + + Suppress the following diagnostics to disable this analyzer: {0} + + + Only a single {0} can be registered per generator. + + + Multiple global analyzer config files set the same key '{0}' in section '{1}'. It has been unset. Key was set by the following files: '{2}' + + + Multiple global analyzer config files set the same key. It has been unset. + + + The hintName '{0}' of the added source file must be unique within a generator. + + + The hintName '{0}' contains an invalid character '{1}' at position {2}. + + + The SourceText with hintName '{0}' must have an explicit encoding set. + + + The assembly containing type '{0}' references .NET Framework, which is not supported. + + + Global analyzer config section name '{0}' is invalid as it is not an absolute path. Section will be ignored. Section was declared in file: '{1}' + + + Global analyzer config section name is invalid as it is not an absolute path. Section will be ignored. + + + Changes must be within bounds of SourceText + + + Edit and Continue can't resume suspended asynchronous method since the corresponding await expression has been deleted + + + Edit and Continue can't resume suspended iterator since the corresponding yield return statement has been deleted + + + Generator + + + Total generator execution time: {0} seconds. + + + Illegal built-in operator name '{0}' + + + Unsupported built-in operator: {0} + + + '{0}' was not a valid built-in operator name + + + + Resolves type reference. + + The TypeRef metadata token to return the referenced type information for. + The IID of the interface to return in scope. Typically, this would be IID_IMetaDataImport. + An interface to the module scope in which the referenced type is defined. + A pointer to a TypeDef token that represents the referenced type. + + TypeDefs define a type within a scope. TypeRefs refer to type-defs in other scopes + and allow you to import a type from another scope. This function attempts to determine + which type-def a type-ref points to. + + This resolve (type-ref, this cope) --> (type-def=*ptd, other scope=*ppIScope) + + However, this resolution requires knowing what modules have been loaded, which is not decided + until runtime via loader / fusion policy. Thus this interface can't possibly be correct since + it doesn't have that knowledge. Furthermore, when inspecting metadata from another process + (such as a debugger inspecting the debuggee's metadata), this API can be truly misleading. + + This API usage should be avoided. + + + + + Minimal implementation of IMetadataImport that implements APIs used by SymReader and SymWriter. + + + + + A COM IStream implementation over memory. Supports just enough for DiaSymReader's PDB writing. + Also tuned for performance: + 1. SetSize (and Seek beyond the length) is very fast and doesn't re-allocate the underlying memory. + 2. Read and Write are optimized to avoid copying (see ) + 3. Allocates in chunks instead of a contiguous buffer to avoid re-alloc and copy costs when growing. + + + + + This is a re-definition of COM's IStream interface. The important change is that + the Read and Write methods take an instead of a byte[] to avoid the + allocation cost when called from native code. + + + + + Adds compiler version number and name. + + + + + The highest version of the interface available on Desktop FX 4.0+. + + + + + has type , rather than , + so that we can do custom marshalling of . Unfortunately, .NET marshals + s as the number of days since 1899/12/30, whereas the native VB compiler + marshalled them as the number of ticks since the Unix epoch (i.e. a much, much larger number). + + + + + Open a special custom data section to emit token to source span mapping information into. + Opening this section while a method is already open or vice versa is an error. + + + + + Close the special custom data section for token to source span mapping + information. Once it is closed no more mapping information can be added. + + + + + Maps the given metadata token to the given source line span in the specified source file. + Must be called between calls to and . + + + + + The highest version of the interface available in Microsoft.DiaSymReader.Native. + + + + + A struct with the same size and layout as the native VARIANT type: + 2 bytes for a discriminator (i.e. which type of variant it is). + 6 bytes of padding + 8 or 16 bytes of data + + + + + This field determines the size of the struct + (16 bytes on 32-bit platforms, 24 bytes on 64-bit platforms). + + + + + This type is 8 bytes on a 32-bit platforms and 16 bytes on 64-bit platforms. + + + + + Windows PDB writer. + + + + + Disposes the writer. + + + + + Gets the raw data blobs that comprise the written PDB content so far. + + + + + Writes the PDB data to specified stream. Once called no more changes to the data can be made using this writer. + May be called multiple times. Always writes the same data. + + Stream to write PDB data to. + Error occurred while writing data to the stream. + + + + The capacity of document table. + + + Whenever a document is defined an entry is added to this table. + If the number of documents is known upfront setting this value may reduce memory consumption. + + + + + Defines a source document. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Defines sequence points. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Opens a method. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Closes a method previously open using . + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Opens a local scope. + + Object has been disposed. + Writes are not allowed to the underlying stream. + + + + Closes a local scope previously open using . + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Defines a local variable. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Defines a local constant. + + Name of the constant. + Value. + Standalone signature token encoding the static type of the constant. + False if the constant representation is too long (e.g. long string). + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + is null + + + + Adds namespace import. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + is null + + + + Sets method async information. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + or is null + or differ in length. + + + + Associates custom debug information blob with the current method. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + is null + + + + Designates specified method as an entry point. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Updates the current PDB signature. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Gets the current PDB signature. + + Object has been disposed. + Error occurred while writing PDB data. + + + + Sets source server data blob (srcsvr stream). + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + is null + + + + Sets source link data blob (sourcelink stream). + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + is null + + + + Opens a map of tokens to source spans. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Maps specified token to a source span. + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + doesn't correspond to any defined document. + + + + Closes map of tokens to source spans previously opened using . + + Object has been disposed. + Writes are not allowed to the underlying stream. + Error occurred while writing PDB data. + + + + Writes compiler version and name to the PDB. + + Major version + Minor version + Build + Revision + Compiler name + Object has been disposed. + Error occurred while writing PDB data. + The PDB writer does not support adding compiler info. + is null. + + + + creation options. + + + + + Default options. + + + + + Use environment variable MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH to locate Microsoft.DiaSymReader.Native.{platform}.dll. + + + + + Use COM registry to locate an implementation of the writer. + + + + + Create a deterministic PDB writer. + + + + + Exception reported when PDB write operation fails. + + + + + The name of the module that implements the underlying PDB writer (e.g. diasymreader.dll), or null if not available. + + + + + Creates a Windows PDB writer. + + implementation. + Options. + + Tries to load the implementation of the PDB writer from Microsoft.DiaSymReader.Native.{platform}.dll library first. + It searches for this library in the directory Microsoft.DiaSymReader.dll is loaded from, + the application directory, the %WinDir%\System32 directory, and user directories in the DLL search path, in this order. + If not found in the above locations and option is specified + the directory specified by MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH environment variable is also searched. + If the Microsoft.DiaSymReader.Native.{platform}.dll library can't be found and + option is specified checks if the PDB reader is available from a globally registered COM object. This COM object is provided + by .NET Framework and has limited functionality (features like determinism and source link are not supported). + + is null. + The SymWriter implementation is not available or failed to load. + Error creating the PDB writer. See inner exception for root cause. + + + + Writes the content to the given stream. The writer is disposed and can't be used for further writing. + + + + + This class is used to store the module serialization properties for a compilation. + + + + + The alignment factor (in bytes) that is used to align the raw data of sections in the image file. + The value should be a power of 2 between 512 and 64K, inclusive. The default is 512. + + + + + The alignment (in bytes) of sections when they are loaded into memory. + It must be greater than or equal to . + The default is the page size for the architecture. + + + + + Identifies the version of the CLR that is required to load this module or assembly. + + + + + Specifies the target CPU. means AnyCPU. + + + + + A globally unique persistent identifier for this module. + + + + + The preferred memory address at which the module is to be loaded at runtime. + + + + + The size of the virtual memory to reserve for the initial process heap. + Must fit into 32 bits if the target platform is 32 bit. + + + + + The size of the virtual memory initially committed for the initial process heap. + Must fit into 32 bits if the target platform is 32 bit. + + + + + The size of the virtual memory to reserve for the initial thread's stack. + Must fit into 32 bits if the target platform is 32 bit. + + + + + The first part of a two part version number indicating the version of the linker that produced this module. For example, the 8 in 8.0. + + + + + The first part of a two part version number indicating the version of the linker that produced this module. For example, the 0 in 8.0. + + + + + Flags that control the behavior of the target operating system. CLI implementations are supposed to ignore this, but some operating system pay attention. + + + + + Write document entries for all debug documents that do not yet have an entry. + + + This is done after serializing method debug info to ensure that we embed all requested + text even if there are no corresponding sequence points. + + + + + Represents an assembly reference with an alias (C# only, /r:Name=Reference on command line). + + + + + An alias for the global namespace of the assembly. + + + + + The assembly reference. + + + + + Names for compilation options that get embedded as debug information + in the PDB as key-value pairs. + + + REMOVAL OR CHANGES TO EXISTING VALUES IS CONSIDERED A BREAKING CHANGE FOR PDB FORMAT + + + + + System.Runtime.InteropServices.VarEnum is obsolete. + + + + + An object corresponding to a metadata entity such as a type or a field. + + + + + An object corresponding to reference to a metadata entity such as a type or a field. + + + + + A collection of metadata custom attributes that are associated with this definition. + + + + + Calls the visitor.Visit(T) method where T is the most derived object model node interface type implemented by the concrete type + of the object implementing IDefinition. The dispatch method does not invoke Dispatch on any child objects. If child traversal + is desired, the implementations of the Visit methods should do the subsequent dispatching. + + + + + Gets the definition object corresponding to this reference within the given context, + or null if the referenced entity isn't defined in the context. + + + + + Returns underlying internal symbol object, if any. + + + + + Returns true if the namespace scope for this method should be forwarded to another method. + Returns non-null if the forwarding should be done directly via UsingNamespace, + null if the forwarding is done via custom debug info. + + + + + Use to create a document when checksum is computed based on actual source stream. + + + + + Use to create a document when checksum is suggested via external checksum pragma/directive + + + + + returns true when checksum was computed base on an actual source stream + as opposed to be suggested via a checksum directive/pragma + + + + + Represents the portion of a that are derived + from the source document content, and which can be computed asynchronously. + + + + + The ID of the hash algorithm used. + + + + + The hash of the document content. + + + + + The source text to embed in the PDB. (If any, otherwise default.) + + + + + A region representing an exception handler clause. The region exposes the type (catch or + finally) and the bounds of the try block and catch or finally block as needed by + + + + + Label instruction corresponding to the start of try block + + + + + Label instruction corresponding to the end of try block + + + + + Label instruction corresponding to the start of handler block + + + + + Label instruction corresponding to the end of handler block + + + + + Handler kind for this SEH info + + + + + If HandlerKind == HandlerKind.Catch, this is the type of exception to catch. If HandlerKind == HandlerKind.Filter, this is System.Object. + Otherwise this is a Dummy.TypeReference. + + + + + Label instruction corresponding to the start of filter decision block + + + + + Info needed when emitting ExportedType table entry. + + + + + The target type reference. + + + + + True if this represents a type forwarder definition, + false if it represents a type from a linked netmodule. + + + + + If is a nested type defined in a linked netmodule, + the index of the entry that represents the enclosing type. + + + + + An expression that can be represented directly in metadata. + + + + + Calls the visitor.Visit(T) method where T is the most derived object model node interface type implemented by the concrete type + of the object implementing IStatement. The dispatch method does not invoke Dispatch on any child objects. If child traversal + is desired, the implementations of the Visit methods should do the subsequent dispatching. + + + + + The type of value the expression represents. + + + + + An expression that represents a (name, value) pair and that is typically used in method calls, custom attributes and object initializers. + + + + + The name of the parameter or property or field that corresponds to the argument. + + + + + The value of the argument. + + + + + True if the named argument provides the value of a field. + + + + + This PEBuilder adds an .mvid section. + + + + + A metadata custom attribute. + + + + + Zero or more positional arguments for the attribute constructor. + + + + + A reference to the constructor that will be used to instantiate this custom attribute during execution (if the attribute is inspected via Reflection). + + + + + Zero or more named arguments that specify values for fields and properties of the attribute. + + + + + The number of positional arguments. + + + + + The number of named arguments. + + + + + The type of the attribute. For example System.AttributeUsageAttribute. + + + + + Whether attribute allows multiple. + + + + + Represents a file referenced by an assembly. + + + + + True if the file has metadata. + + + + + File name with extension. + + + + + A hash of the file contents. + + + + + Represents a lexical scope that declares imports. + + + + + Zero or more used namespaces. These correspond to using directives in C# or Imports syntax in VB. + Multiple invocations return the same array instance. + + + + + Parent import scope, or null. + + + + + A range of CLR IL operations that comprise a lexical scope. + + + + + The offset of the first operation in the scope. + + + + + The offset of the first operation outside of the scope, or the method body length. + + + + + Returns zero or more local constant definitions that are local to the given scope. + + + + + Returns zero or more local variable definitions that are local to the given scope. + + + + + streamProvider callers will dispose result after use. + and are mutually exclusive. + + + + + Specifies how the caller passes parameters to the callee and who cleans up the stack. + + + + + C/C++ style calling convention for unmanaged methods. The call stack is cleaned up by the caller, + which makes this convention suitable for calling methods that accept extra arguments. + + + + + The convention for calling managed methods with a fixed number of arguments. + + + + + The convention for calling managed methods that accept extra arguments. + + + + + Arguments are passed in registers when possible. This calling convention is not yet supported. + + + + + Win32 API calling convention for calling unmanaged methods via PlatformInvoke. The call stack is cleaned up by the callee. + + + + + C++ member unmanaged method (non-vararg) calling convention. The callee cleans the stack and the this pointer is pushed on the stack last. + + + + + Extensible calling convention protocol. This represents either the union of calling convention modopts after the paramcount specifier + in IL, or platform default if none are present + + + + + The convention for calling a generic method. + + + + + The convention for calling an instance method with an implicit this parameter (the method does not have an explicit parameter definition for this). + + + + + The convention for calling an instance method that explicitly declares its first parameter to correspond to the this instance. + + + + + Compares calling conventions, ignoring calling convention attributes. + + + + + An event is a member that enables an object or class to provide notifications. Clients can attach executable code for events by supplying event handlers. + This interface models the metadata representation of an event. + + + + + A list of methods that are associated with the event. + + + + + The method used to add a handler to the event. + + + + + The method used to call the event handlers when the event occurs. May be null. + + + + + True if the event gets special treatment from the runtime. + + + + + This event is special in some way, as specified by the name. + + + + + The method used to add a handler to the event. + + + + + The (delegate) type of the handlers that will handle the event. + + + + + A field is a member that represents a variable associated with an object or class. + This interface models the metadata representation of a field. + + + + + The compile time value of the field. This value should be used directly in IL, rather than a reference to the field. + If the field does not have a valid compile time value, Dummy.Constant is returned. + + + + + Mapped field data, or null if the field is not mapped. + + + + + This field is a compile-time constant. The field has no runtime location and cannot be directly addressed from IL. + + + + + This field has associated field marshalling information. + + + + + The field does not have to be serialized when its containing instance is serialized. + + + + + This field can only be read. Initialization takes place in a constructor. + + + + + True if the field gets special treatment from the runtime. + + + + + This field is special in some way, as specified by the name. + + + + + This field is static (shared by all instances of its declaring type). + + + + + Specifies how this field is marshalled when it is accessed from unmanaged code. + + + + + Checked if IsMarshalledExplicitly == true and MarshallingInformation is null + + + + + Offset of the field. + + + + + A reference to a field. + + + + + The type of value that is stored in this field. + + + + + The list of custom modifiers, if any, associated with the ref modifier. + + + + + True if the field contains a managed pointer. + + + + + The Field being referred to. + + + + + True, if field is an IContextualNamedEntity, even if field reference implements the interface, + doesn't mean it is contextual. + + + + + An object that represents a local variable or constant. + + + + + The compile time value of the definition, if it is a local constant. + + + + + Custom modifiers associated with local variable definition. + + + + + TODO: use instead. + True if the value referenced by the local must not be moved by the actions of the garbage collector. + + + + + TODO: use instead. + True if the local contains a managed pointer (for example a reference to a local variable or a reference to a field of an object). + + + + + Each local has an attributes field in the PDB. To match the native compiler, + we emit for locals that should + definitely not bind in the debugger and + for all other locals. + + + A value of is a sufficient, but not a necessary, condition for hiding the + local in the debugger. Locals with value may also be hidden. + + Hidden locals must still be emitted because they participate in evaluation. + + + + + The synthesized dynamic attributes of the local definition if any, or empty. + + + + + The tuple element names of the local definition if any, or empty. + + + + + The type of the local. + + + + + Location for reporting diagnostics about the local. + + + Use rather than null. + + + + + Slot index or -1 if not applicable. + + + + + Optional serialized local signature. + + + + + Local id, or if this is a local constant, short-lived temp variable, + or we are not emitting local variable ids (release builds). + + + + + A metadata (IL) level representation of the body of a method or of a property/event accessor. + + + + + A list exception data within the method body IL. + + + + + True if the locals are initialized by zeroing the stack upon method entry. + + + + + True if there's a stackalloc somewhere in the method. + + + + + The local variables of the method. + + + + + The definition of the method whose body this is. + If this is the body of an event or property accessor, this will hold the corresponding adder/remover/setter or getter method. + + + + + Debugging information associated with a MoveNext method of a state machine. + + + + + The maximum number of elements on the evaluation stack during the execution of the method. + + + + + Returns true if there is at least one dynamic local within the MethodBody + + + + + Returns zero or more local (block) scopes into which the CLR IL operations in the given method body is organized. + + + + + Returns an import scope the method is declared within, or null if there is none + (e.g. the method doesn't contain user code). + + + The chain is a spine of a tree in a forest of import scopes. A tree of import scopes is created by the language for each source file + based on namespace declarations. In VB each tree is trivial single-node tree that declares the imports of a file. + In C# the tree copies the nesting of namespace declarations in the file. There is a separate scope for each dotted component in + the namespace type name. For instance namespace type x.y.z will have two namespace scopes, the first is for the x and the second + is for the y. + + + + + Returns debug information for local variables hoisted to state machine fields, + or null if this method isn't MoveNext method of a state machine. + + + Returns zero or more local (block) scopes, each defining an IL range in which an iterator local is defined. + The scopes are returned for the MoveNext method of the object returned by the iterator method. + The index of the scope corresponds to the index of the local. Specifically local scope i corresponds + to the local stored in a field named <localName>5__i of the class used to store the local values in + between calls to MoveNext, where localName is the original name of the local variable. For example, if + the first local to be moved into the class is named "xyzzy", it will be stored in a field named + "<xyzzy>5__1", and the ILocalScope returned from this method at index 1 (i.e. the second one) will + have the scope information for where that variable is in scope. + + + + + The name of the state machine generated for the method, + or null if the method isn't the kickoff method of a state machine. + + + + + Returns information relevant to EnC on slots of local variables hoisted to state machine fields, + or null if the method isn't the kickoff method of a state machine. + + + + + Returns types of awaiter slots allocated on the state machine, + or null if the method isn't the kickoff method of a state machine. + + + + + This interface models the metadata representation of a method. + + + + + A container for a list of IL instructions providing the implementation (if any) of this method. + + + When emitting metadata-only assemblies this returns null even if returns true. + + + + + If the method is generic then this list contains the type parameters. + + + + + True if this method has a non empty collection of SecurityAttributes or the System.Security.SuppressUnmanagedCodeSecurityAttribute. + + + + + True if the method does not provide an implementation. + + + + + True if the method can only be overridden when it is also accessible. + + + + + True if the method is a constructor. + + + + + True if the method has an external implementation (i.e. not supplied by this definition). + + + If the method is not external and not abstract it has to provide an IL body. + + + + + True if this method is hidden if a derived type declares a method with the same name and signature. + If false, any method with the same name hides this method. This flag is ignored by the runtime and is only used by compilers. + + + + + The method always gets a new slot in the virtual method table. + This means the method will hide (not override) a base type method with the same name and signature. + + + + + True if the method is implemented via the invocation of an underlying platform method. + + + + + True if the method gets special treatment from the runtime. For example, it might be a constructor. + + + + + True if the method may not be overridden. + + + + + True if the method is special in some way for tools. For example, it might be a property getter or setter. + + + + + True if the method does not require an instance of its declaring type as its first argument. + + + + + True if the method may be overridden (or if it is an override). + + + + + Implementation flags. + + + + + The parameters forming part of this signature. + + + + + Detailed information about the PInvoke stub. Identifies which method to call, which module has the method and the calling convention among other things. + + + + + True if the method calls another method containing security code. If this flag is set, the method + should have System.Security.DynamicSecurityMethodAttribute present in its list of custom attributes. + + + + + Custom attributes associated with the method's return value. + + + + + The return value has associated marshalling information. + + + + + Specifies how the return value is marshalled when the method is called from unmanaged code. + + + + + Checked if ReturnValueIsMarshalledExplicitly == true and ReturnValueMarshallingInformation is null + + + + + Declarative security actions for this method. + + + + + Namespace containing this method. + TODO: Ideally we would expose INamespace on INamespaceTypeDefinition. Right now we can only get the qualified namespace name. + + + + + This interface models the metadata representation of a method or property parameter. + + + + + A compile time constant value that should be supplied as the corresponding argument value by callers that do not explicitly specify an argument value for this parameter. + Null if the parameter doesn't have default value. + + + + + True if the parameter has a default value that should be supplied as the argument value by a caller for which the argument value has not been explicitly specified. + + + + + True if the argument value must be included in the marshalled arguments passed to a remote callee. + + + + + This parameter has associated marshalling information. + + + + + True if the argument value must be included in the marshalled arguments passed to a remote callee only if it is different from the default value (if there is one). + + + + + True if the final value assigned to the parameter will be marshalled with the return values passed back from a remote callee. + + + + + Specifies how this parameter is marshalled when it is accessed from unmanaged code. + + + + + Checked if IsMarshalledExplicitly == true and MarshallingInformation is null + + + + + A property is a member that provides access to an attribute of an object or a class. + This interface models the metadata representation of a property. + + + + + A list of methods that are associated with the property. + + + + + A compile time constant value that provides the default value for the property. (Who uses this and why?) + + + + + The method used to get the value of this property. May be absent (null). + + + + + True if this property has a compile time constant associated with that serves as a default value for the property. (Who uses this and why?) + + + + + True if this property gets special treatment from the runtime. + + + + + True if this property is special in some way, as specified by the name. + + + + + The parameters forming part of this signature. + + + + + The method used to set the value of this property. May be absent (null). + + + + + The parameters and return type that makes up a method or property signature. + This interface models the metadata representation of a signature. + + + + + Calling convention of the signature. + + + + + The number of required parameters of the signature. + + + + + The parameters forming part of this signature. + + + + + Returns the list of custom modifiers, if any, associated with the return type. + + + + + Returns the list of custom modifiers, if any, associated with the ref modifier. + + + + + True if the return value is passed by reference (using a managed pointer). + + + + + The return type of the method or type of the property. + + + + + A member of a type definition, such as a field or a method. + This interface models the metadata representation of a type member. + + + + + The type definition that contains this member. + + + + + Indicates if the member is public or confined to its containing type, derived types and/or declaring assembly. + + + + + A reference to a member of a type, such as a field or a method. + This interface models the metadata representation of a type member reference. + + + + + A reference to the containing type of the referenced type member. + + + + + Represents the specialized event definition. + + + + + The event that has been specialized to obtain this event. When the containing type is an instance of type which is itself a specialized member (i.e. it is a nested + type of a generic type instance), then the unspecialized member refers to a member from the unspecialized containing type. (I.e. the unspecialized member always + corresponds to a definition that is not obtained via specialization.) + + + + + Represents reference specialized field. + + + + + A reference to the field definition that has been specialized to obtain the field definition referred to by this field reference. + When the containing type of the referenced specialized field definition is itself a specialized nested type of a generic type instance, + then the unspecialized field reference refers to the corresponding field definition from the unspecialized containing type definition. + (I.e. the unspecialized field reference always refers to a field definition that is not obtained via specialization.) + + + + + Represents reference specialized method. + + + + + A reference to the method definition that has been specialized to obtain the method definition referred to by this method reference. + When the containing type of the referenced specialized method definition is itself a specialized nested type of a generic type instance, + then the unspecialized method reference refers to the corresponding method definition from the unspecialized containing type definition. + (I.e. the unspecialized method reference always refers to a method definition that is not obtained via specialization.) + + + + + Represents the specialized property definition. + + + + + The property that has been specialized to obtain this property. When the containing type is an instance of type which is itself a specialized member (i.e. it is a nested + type of a generic type instance), then the unspecialized member refers to a member from the unspecialized containing type. (I.e. the unspecialized member always + corresponds to a definition that is not obtained via specialization.) + + + + + A reference to a method. + + + + + True if the call sites that references the method with this object supply extra arguments. + + + + + The number of generic parameters of the method. Zero if the referenced method is not generic. + + + + + True if the method has generic parameters; + + + + + The method being referred to. + + + + + Information about this types of the extra arguments supplied at the call sites that references the method with this object. + + + + + A reference to generic method instantiated with a list of type arguments. + + + + + The type arguments that were used to instantiate this.GenericMethod in order to create this method. + + + + + Returns the generic method of which this method is an instance. + + + + + Represents a global field in symbol table. + + + + + Represents a global method in symbol table. + + + + + The name of the method. + + + + + When emitting ref assemblies, some members will not be included. + + + + + A visitor base class that traverses the object model in depth first, left to right order. + + + + + Use this routine, rather than ITypeReference.Dispatch, to call the appropriate derived overload of an ITypeReference. + The former routine will call Visit(INamespaceTypeDefinition) rather than Visit(INamespaceTypeReference), etc., + in the case where a definition is used as a reference to itself. + + A reference to a type definition. Note that a type definition can serve as a reference to itself. + + + + Use this routine, rather than IUnitReference.Dispatch, to call the appropriate derived overload of an IUnitReference. + The former routine will call Visit(IAssembly) rather than Visit(IAssemblyReference), etc. + in the case where a definition is used as the reference to itself. + + A reference to a unit. Note that a unit can serve as a reference to itself. + + + + This is the maximum length of a type or member name in metadata, assuming + the name is in UTF-8 format and not (yet) null-terminated. + + + Source names may have to be shorter still to accommodate mangling. + Used for event names, field names, property names, field names, method def names, + member ref names, type def (full) names, type ref (full) names, exported type + (full) names, parameter names, manifest resource names, and unmanaged method names + (ImplMap table). + + See CLI Part II, section 22. + + + + + This is the maximum length of a path in metadata, assuming the path is in UTF-8 + format and not (yet) null-terminated. + + + Used for file names, module names, and module ref names. + + See CLI Part II, section 22. + + + + + This is the maximum length of a string in the PDB, assuming it is in UTF-8 format + and not (yet) null-terminated. + + + Used for import strings, locals, and local constants. + + + + + Returns true if writing full metadata, false if writing delta. + + + + + True if writing delta metadata in a minimal format. + + + + + NetModules and EnC deltas don't have AssemblyDef record. + We don't emit it for EnC deltas since assembly identity has to be preserved across generations (CLR/debugger get confused otherwise). + + + + + Returns metadata generation ordinal. Zero for + full metadata and non-zero for delta. + + + + + Returns unique Guid for this delta, or default(Guid) + if full metadata. + + + + + Returns Guid of previous delta, or default(Guid) + if full metadata or generation 1 delta. + + + + + Returns true and full metadata handle of the type definition + if the type definition is recognized. Otherwise returns false. + + + + + Get full metadata handle of the type definition. + + + + + The type definition corresponding to full metadata type handle. + Deltas are only required to support indexing into current generation. + + + + + The type definitions to be emitted, in row order. These + are just the type definitions from the current generation. + + + + + Get full metadata handle of the event definition. + + + + + The event definitions to be emitted, in row order. These + are just the event definitions from the current generation. + + + + + Get full metadata handle of the field definition. + + + + + The field definitions to be emitted, in row order. These + are just the field definitions from the current generation. + + + + + Returns true and handle of the method definition + if the method definition is recognized. Otherwise returns false. + The index is into the full metadata. + + + + + Get full metadata handle of the method definition. + + + + + The method definition corresponding to full metadata method handle. + Deltas are only required to support indexing into current generation. + + + + + The method definitions to be emitted, in row order. These + are just the method definitions from the current generation. + + + + + Get full metadata handle of the property definition. + + + + + The property definitions to be emitted, in row order. These + are just the property definitions from the current generation. + + + + + The full metadata handle of the parameter definition. + + + + + The parameter definitions to be emitted, in row order. These + are just the parameter definitions from the current generation. + + + + + The generic parameter definitions to be emitted, in row order. These + are just the generic parameter definitions from the current generation. + + + + + The handle of the first field of the type. + + + + + The handle of the first method of the type. + + + + + The handle of the first parameter of the method. + + + + + Return full metadata handle of the assembly reference, adding + the reference to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The assembly references to be emitted, in row order. These + are just the assembly references from the current generation. + + + + + Return full metadata handle of the module reference, adding + the reference to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The module references to be emitted, in row order. These + are just the module references from the current generation. + + + + + Return full metadata handle of the member reference, adding + the reference to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The member references to be emitted, in row order. These + are just the member references from the current generation. + + + + + Return full metadata handle of the method spec, adding + the spec to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The method specs to be emitted, in row order. These + are just the method specs from the current generation. + + + + + The greatest index given to any method definition. + + + + + Return true and full metadata handle of the type reference + if the reference is available in the current generation. + Deltas are not required to return rows from previous generations. + + + + + Return full metadata handle of the type reference, adding + the reference to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The type references to be emitted, in row order. These + are just the type references from the current generation. + + + + + Returns full metadata handle of the type spec, adding + the spec to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The type specs to be emitted, in row order. These + are just the type specs from the current generation. + + + + + Returns full metadata handle the standalone signature, adding + the signature to the index for this generation if missing. + Deltas are not required to return rows from previous generations. + + + + + The signature blob handles to be emitted, in row order. These + are just the signature indices from the current generation. + + + + + Return a visitor for traversing all references to be emitted. + + + + + Populate EventMap table. + + + + + Populate PropertyMap table. + + + + + Returns a reference to the unit that defines the given referenced type. If the referenced type is a structural type, such as a pointer or a generic type instance, + then the result is null. + + + + + The Microsoft CLR requires that {namespace} + "." + {name} fit in MAX_CLASS_NAME + (even though the name and namespace are stored separately in the Microsoft + implementation). Note that the namespace name of a nested type is always blank + (since comes from the container). + + We're trying to add the containing namespace of this type to the string heap. + Namespace names are never used on their own - this is the type that is adding the namespace name. + Used only for length checking. + + + + Test the given name to see if it fits in metadata. + + String to test (non-null). + Max length for name. (Expected to be at least 5.) + True if the name is too long. + Internal for test purposes. + + + + Serialize the method local signature to the blob. + + Standalone signature token + + + + Computes the string representing the strong name of the given assembly reference. + + + + + Import scopes are associated with binders (in C#) and thus multiple instances might be created for a single set of imports. + We consider scopes with the same parent and the same imports the same. + Internal for testing. + + + + + Write string as UTF-8 with null terminator. + + + + + Add document entries for all debug documents that do not yet have an entry. + + + This is done after serializing method debug info to ensure that we embed all requested + text even if there are no corresponding sequence points. + + + + The version of the compilation options schema to be written to the PDB. + + + + Capture the set of compilation options to allow a compilation + to be reconstructed from the pdb + + + + + Writes information about metadata references to the pdb so the same + reference can be found on sourcelink to create the compilation again + + + + + A container for static helper methods that are used for manipulating and computing iterators. + + + + + True if the given enumerable is not null and contains at least one element. + + + + + True if the given enumerable is null or contains no elements + + + + + Returns the number of elements in the given enumerable. A null enumerable is allowed and results in 0. + + + + + A declarative specification of a security action applied to a set of permissions. Used by the CLR loader to enforce security restrictions. + Each security attribute represents a serialized permission or permission set for a specified security action. + The union of the security attributes with identical security action, define the permission set to which the security action applies. + + + + + Information about how values of managed types should be marshalled to and from unmanaged types. + + + + + or a string (usually a fully-qualified type name of a type implementing the custom marshaller, but Dev11 allows any string). + + + + + An argument string (cookie) passed to the custom marshaller at run time. + + + + + The unmanaged element type of the unmanaged array. + -1 if it should be omitted from the marshal blob. + + + + + Specifies the index of the parameter that contains the value of the Interface Identifier (IID) of the marshalled object. + -1 if it should be omitted from the marshal blob. + + + + + The unmanaged type to which the managed type will be marshalled. This can be UnmanagedType.CustomMarshaler, in which case the unmanaged type + is decided at runtime. + + + + + The number of elements in the fixed size portion of the unmanaged array. + -1 if it should be omitted from the marshal blob. + + + + + The zero based index of the parameter in the unmanaged method that contains the number of elements in the variable portion of unmanaged array. + If -1, the variable portion is of size zero, or the caller conveys the size of the variable portion of the array to the unmanaged method in some other way. + + + + + The type to which the variant values of all elements of the safe array must belong. See also SafeArrayElementUserDefinedSubtype. + (The element type of a safe array is VARIANT. The "sub type" specifies the value of all of the tag fields (vt) of the element values. ) + -1 if it should be omitted from the marshal blob. + + + + + A reference to the user defined type to which the variant values of all elements of the safe array must belong. + (The element type of a safe array is VARIANT. The tag fields will all be either VT_DISPATCH or VT_UNKNOWN or VT_RECORD. + The "user defined sub type" specifies the type of value the ppdispVal/ppunkVal/pvRecord fields of the element values may point to.) + + + + + Implemented by any entity that has a name. + + + + + The name of the entity. + + + + + The name of the entity depends on other metadata (tokens, signatures) originated from + PeWriter. + + + + + Method must be called before calling INamedEntity.Name. + + + + + Implemented by an entity that is always a member of a particular parameter list, such as an IParameterDefinition. + Provides a way to determine the position where the entity appears in the parameter list. + + + + + The position in the parameter list where this instance can be found. + + + + + Information that describes how a method from the underlying Platform is to be invoked. + + + + + Module providing the method/field. + + + + + Name of the method providing the implementation. + + + + + Flags that determine marshalling behavior. + + + + + A resource file formatted according to Win32 API conventions and typically obtained from a Portable Executable (PE) file. + See the Win32 UpdateResource method for more details. + + + + + A string that identifies what type of resource this is. Only valid if this.TypeId < 0. + + + + + An integer tag that identifies what type of resource this is. If the value is less than 0, this.TypeName should be used instead. + + + + + The name of the resource. Only valid if this.Id < 0. + + + + + An integer tag that identifies this resource. If the value is less than 0, this.Name should be used instead. + + + + + The language for which this resource is appropriate. + + + + + The code page for which this resource is appropriate. + + + + + The data of the resource. + + + + + Special type <Module> + + + + + Allows for the comparison of two instances or two + instances based on underlying symbols, if any. + + + + + Strip off *, &, and []. + + + + + Qualified name of namespace. + e.g. "A.B.C" + + + + + Visitor to force translation of all symbols that will be referred to + in metadata. Allows us to build the set of types that must be embedded + as local types (for NoPia). + + + + + This interface models the metadata representation of an array type reference. + + + + + The type of the elements of this array. + + + + + This type of array is a single dimensional array with zero lower bound for index values. + + + + + A possibly empty list of lower bounds for dimension indices. When not explicitly specified, a lower bound defaults to zero. + The first lower bound in the list corresponds to the first dimension. Dimensions cannot be skipped. + + + + + The number of array dimensions. + + + + + A possible empty list of upper bounds for dimension indices. + The first upper bound in the list corresponds to the first dimension. Dimensions cannot be skipped. + An unspecified upper bound means that instances of this type can have an arbitrary upper bound for that dimension. + + + + + Modifies the set of allowed values for a type, or the semantics of operations allowed on those values. + Custom modifiers are not associated directly with types, but rather with typed storage locations for values. + + + + + If true, a language may use the modified storage location without being aware of the meaning of the modification. + + + + + A type used as a tag that indicates which type of modification applies to the storage location. + + + + + Information that describes a method or property parameter, but does not include all the information in a IParameterDefinition. + + + + + The list of custom modifiers, if any, associated with the parameter type. + + + + + The list of custom modifiers, if any, associated with the ref modifier. + + + + + True if the parameter is passed by reference (using a managed pointer). + + + + + The type of argument value that corresponds to this parameter. + + + + + The definition of a type parameter of a generic type or method. + + + + + A list of classes or interfaces. All type arguments matching this parameter must be derived from all of the classes and implement all of the interfaces. + + + + + True if all type arguments matching this parameter are constrained to be reference types. + + + + + True if all type arguments matching this parameter are constrained to be value types. + + + + + True if all type arguments matching this parameter are constrained to be value types or concrete classes with visible default constructors. + + + + + Indicates if the generic type or method with this type parameter is co-, contra-, or non variant with respect to this type parameter. + + + + + A reference to the definition of a type parameter of a generic type or method. + + + + + The definition of a type parameter of a generic method. + + + + + The generic method that defines this type parameter. + + + + + A reference to a type parameter of a generic method. + + + + + A reference to the generic method that defines the referenced type parameter. + + + + + A generic type instantiated with a list of type arguments + + + + + The type arguments that were used to instantiate this.GenericType in order to create this type. + + + + + Returns the generic type of which this type is an instance. + Equivalent to Symbol.OriginalDefinition + + + + + The definition of a type parameter of a generic type. + + + + + The generic type that defines this type parameter. + + + + + A reference to a type parameter of a generic type. + + + + + A reference to the generic type that defines the referenced type parameter. + + + + + A reference to a named type, such as an INamespaceTypeReference or an INestedTypeReference. + + + + + The number of generic parameters. Zero if the type is not generic. + + + + + If true, the persisted type name is mangled by appending "`n" where n is the number of type parameters, if the number of type parameters is greater than 0. + + + + Indicates that the type is scoped to the file it is declared in. Used as a prefix for the metadata name. + + + + A named type definition, such as an INamespaceTypeDefinition or an INestedTypeDefinition. + + + + + A type definition that is a member of a namespace definition. + + + + + True if the type can be accessed from other assemblies. + + + + + Represents a namespace. + + + + + Containing namespace or null if this namespace is global. + + + + + Returns underlying internal symbol object, if any. + + + + + A reference to a type definition that is a member of a namespace definition. + + + + + A reference to the unit that defines the referenced type. + + + + + Fully qualified name of the containing namespace. + + + + + A type definition that is a member of another type definition. + + + + + A type definition that is a member of another type definition. + + + + + A reference to a type definition that is a specialized nested type. + + + + + A reference to the nested type that has been specialized to obtain this nested type reference. When the containing type is an instance of type which is itself a specialized member (i.e. it is a nested + type of a generic type instance), then the unspecialized member refers to a member from the unspecialized containing type. (I.e. the unspecialized member always + corresponds to a definition that is not obtained via specialization.) + + + + + Models an explicit implementation or override of a base class virtual method or an explicit implementation of an interface method. + + + + + The type that is explicitly implementing or overriding the base class virtual method or explicitly implementing an interface method. + + + + + A reference to the method that provides the implementation. + + + + + The type that is explicitly implementing or overriding the base class virtual method or explicitly implementing an interface method. + + + + + A type reference that has custom modifiers associated with it. For example a reference to the target type of a managed pointer to a constant. + + + + + Returns the list of custom modifiers associated with the type reference. + + + + + An unmodified type reference. + + + + + This interface models the metadata representation of a pointer to a location in unmanaged memory. + + + + + The type of value stored at the target memory location. + + + + + This interface models the metadata representation of a pointer to a function in unmanaged memory. + + + + + The signature of the function located at the target memory address. + + + + + A type ref with attributes attached directly to the type reference + itself. Unlike a + will never provide attributes + for the "pointed at" declaration, and all attributes will be emitted + directly on the type ref, rather than the declaration. + + + + + The type reference. + + + + + The attributes on the type reference itself. + + + + + This interface models the metadata representation of a type. + + + + + The byte alignment that values of the given type ought to have. Must be a power of 2. If zero, the alignment is decided at runtime. + + + + + Returns null for interfaces and System.Object. + + + + + Zero or more events defined by this type. + + + + + Zero or more implementation overrides provided by the class. + + + + + Zero or more fields defined by this type. + + + + + Zero or more parameters that can be used as type annotations. + + + + + The number of generic parameters. Zero if the type is not generic. + + + + + True if this type has a non empty collection of SecurityAttributes or the System.Security.SuppressUnmanagedCodeSecurityAttribute. + + + + + Zero or more interfaces implemented by this type. + + + + + True if the type may not be instantiated. + + + + + Is type initialized anytime before first access to static field + + + + + Is this imported from COM type library + + + + + True if this type is parameterized (this.GenericParameters is a non empty collection). + + + + + True if the type is an interface. + + + + + True if the type is a delegate. + + + + + True if this type gets special treatment from the runtime. + + + + + True if this type is serializable. + + + + + True if the type has special name. + + + + + True if the type is a Windows runtime type. + + + A type can me marked as a Windows runtime type in source by applying the WindowsRuntimeImportAttribute. + WindowsRuntimeImportAttribute is a pseudo custom attribute defined as an internal class in System.Runtime.InteropServices.WindowsRuntime namespace. + This is needed to mark Windows runtime types which are redefined in mscorlib.dll and System.Runtime.WindowsRuntime.dll. + These two assemblies are special as they implement the CLR's support for WinRT. + + + + + True if the type may not be subtyped. + + + + + Layout of the type. + + + + + Zero or more methods defined by this type. + + + + + Zero or more nested types defined by this type. + + + + + Zero or more properties defined by this type. + + + + + Declarative security actions for this type. Will be empty if this.HasSecurity is false. + + + + + Size of an object of this type. In bytes. If zero, the size is unspecified and will be determined at runtime. + + + + + Default marshalling of the Strings in this class. + + + + + A reference to a type. + + + + + True if the type is an enumeration (it extends System.Enum and is sealed). Corresponds to C# enum. + + + + + True if the type is a value type. + Value types are sealed and extend System.ValueType or System.Enum. + A type parameter for which MustBeValueType (the struct constraint in C#) is true also returns true for this property. + + + + + The type definition being referred to. + + + + + Unless the value of TypeCode is PrimitiveTypeCode.NotPrimitive, the type corresponds to a "primitive" CLR type (such as System.Int32) and + the type code identifies which of the primitive types it corresponds to. + + + + + TypeDefs defined in modules linked to the assembly being emitted are listed in the ExportedTypes table. + + + + + A enumeration of all of the value types that are built into the Runtime (and thus have specialized IL instructions that manipulate them). + + + + + A single bit. + + + + + An unsigned 16 bit integer representing a Unicode UTF16 code point. + + + + + A signed 8 bit integer. + + + + + A 32 bit IEEE floating point number. + + + + + A 64 bit IEEE floating point number. + + + + + A signed 16 bit integer. + + + + + A signed 32 bit integer. + + + + + A signed 64 bit integer. + + + + + A signed 32 bit integer or 64 bit integer, depending on the native word size of the underlying processor. + + + + + A pointer to fixed or unmanaged memory. + + + + + A reference to managed memory. + + + + + A string. + + + + + An unsigned 8 bit integer. + + + + + An unsigned 16 bit integer. + + + + + An unsigned 32 bit integer. + + + + + An unsigned 64 bit integer. + + + + + An unsigned 32 bit integer or 64 bit integer, depending on the native word size of the underlying processor. + + + + + A type that denotes the absence of a value. + + + + + Not a primitive type. + + + + + A pointer to a function in fixed or managed memory. + + + + + Type is a dummy type. + + + + + Enumerates the different kinds of levels of visibility a type member can have. + + + + + The member is visible only within its own type. + + + + + The member is visible only within the intersection of its family (its own type and any subtypes) and assembly. + + + + + The member is visible only within its own assembly. + + + + + The member is visible only within its own type and any subtypes. + + + + + The member is visible only within the union of its family and assembly. + + + + + The member is visible everywhere its declaring type is visible. + + + + + Enumerates the different kinds of variance a generic method or generic type parameter may have. + + + + + Two type or method instances are compatible only if they have exactly the same type argument for this parameter. + + + + + A type or method instance will match another instance if it has a type for this parameter that is the same or a subtype of the type the + other instance has for this parameter. + + + + + A type or method instance will match another instance if it has a type for this parameter that is the same or a supertype of the type the + other instance has for this parameter. + + + + + A reference to a .NET assembly. + + + + + A reference to a .NET module. + + + + + The Assembly that contains this module. May be null if the module is not part of an assembly. + + + + + A unit of metadata stored as a single artifact and potentially produced and revised independently from other units. + Examples of units include .NET assemblies and modules, as well C++ object files and compiled headers. + + + + + A reference to a instance of . + + + + + Represents a single using directive (Imports clause). + + + + + Given a path to an assembly, identifies files in the same directory + that could satisfy the assembly's dependencies. May throw. + + + Dependencies are identified by simply checking the name of an assembly + reference against a file name; if they match the file is considered a + dependency. Other factors, such as version, culture, public key, etc., + are not considered, and so the returned collection may include items that + cannot in fact satisfy the original assembly's dependencies. + + If the file at does not exist or cannot be accessed. + If the file is not an assembly or is somehow corrupted. + + + + Given a path to an assembly, returns its MVID (Module Version ID). + May throw. + + If the file at does not exist or cannot be accessed. + If the file is not an assembly or is somehow corrupted. + + + + Given a path to an assembly, finds the paths to all of its satellite + assemblies. + + If the file at does not exist or cannot be accessed. + If the file is not an assembly or is somehow corrupted. + + + + Given a path to an assembly and a set of paths to possible dependencies, + identifies which of the assembly's references are missing. May throw. + + If the files does not exist or cannot be accessed. + If one of the files is not an assembly or is somehow corrupted. + + + + Given a path to an assembly, returns the for the assembly. + May throw. + + If the file at does not exist or cannot be accessed. + If the file is not an assembly or is somehow corrupted. + + + + Full case-insensitive path. + + + + + Last write time (UTC). + + + + + Constructor. + + Full path. + Last write time (UTC). + + + + + + + Resolves relative path and returns absolute path. + The method depends only on values of its parameters and their implementation (for fileExists). + It doesn't itself depend on the state of the current process (namely on the current drive directories) or + the state of file system. + + + Path to resolve. + + + Base file path to resolve CWD-relative paths against. Null if not available. + + + Base directory to resolve CWD-relative paths against if isn't specified. + Must be absolute path. + Null if not available. + + + Sequence of paths used to search for unqualified relative paths. + + + Method that tests existence of a file. + + + The resolved path or null if the path can't be resolved or does not exist. + + + + + Normalizes an absolute path. + + Path to normalize. + + Normalized path. + + + + Used to create a file given a path specified by the user. + paramName - Provided by the Public surface APIs to have a clearer message. Internal API just rethrow the exception + + + + + + + + + + + Abstraction over the file system that is useful for test hooks + + + + + Open a file and ensure common exception types are wrapped to . + + + + + Null or empty. + + + + + "file" + + + + + ".\file" + + + + + "..\file" + + + + + "\dir\file" + + + + + "C:dir\file" + + + + + "C:\file" or "\\machine" (UNC). + + + + + True if the character is the platform directory separator character or the alternate directory separator. + + + + + True if the character is any recognized directory separator character. + + + + + Removes trailing directory separator characters + + + This will trim the root directory separator: + "C:\" maps to "C:", and "/" maps to "" + + + + + Ensures a trailing directory separator character + + + + + Get directory name from path. + + + Unlike it doesn't check for invalid path characters + + Prefix of path that represents a directory + + + + Gets the root part of the path. + + + + + Gets the specific kind of relative or absolute path. + + + + + True if the path is an absolute path (rooted to drive or network share) + + + + + Returns true if given path is absolute and starts with a drive specification ("C:\"). + + + + + Combines an absolute path with a relative. + + Absolute root path. + Relative path. + + An absolute combined path, or null if is + absolute (e.g. "C:\abc", "\\machine\share\abc"), + relative to the current root (e.g. "\abc"), + or relative to a drive directory (e.g. "C:abc\def"). + + + + + + Combine two paths, the first of which may be absolute. + + First path: absolute, relative, or null. + Second path: relative and non-null. + null, if is null; a combined path, otherwise. + + + + + Combines paths with the same semantics as + but does not throw on null paths or paths with invalid characters. + + First path: absolute, relative, or null. + Second path: absolute, relative, or null. + + The combined paths. If contains an absolute path, returns . + + + Relative and absolute paths treated the same as . + + + + + Determines whether an assembly reference is considered an assembly file path or an assembly name. + used, for example, on values of /r and #r. + + + + + Determines if "path" contains 'component' within itself. + i.e. asking if the path "c:\goo\bar\baz" has component "bar" would return 'true'. + On the other hand, if you had "c:\goo\bar1\baz" then it would not have "bar" as a + component. + + A path contains a component if any file name or directory name in the path + matches 'component'. As such, if you had something like "\\goo" then that would + not have "goo" as a component. That's because here "goo" is the server name portion + of the UNC path, and not an actual directory or file name. + + + + + Gets a path relative to a directory. + + + + + True if the child path is a child of the parent path. + + + + + True if the two paths are the same. + + + + + True if the two paths are the same. (but only up to the specified length) + + + + + Unfortunately, we cannot depend on Path.GetInvalidPathChars() or Path.GetInvalidFileNameChars() + From MSDN: The array returned from this method is not guaranteed to contain the complete set of characters + that are invalid in file and directory names. The full set of invalid characters can vary by file system. + https://msdn.microsoft.com/en-us/library/system.io.path.getinvalidfilenamechars.aspx + + Additionally, Path.GetInvalidPathChars() doesn't include "?" or "*" which are invalid characters, + and Path.GetInvalidFileNameChars() includes ":" and "\" which are valid characters. + + The more accurate way is to let the framework parse the path and throw on any errors. + + + + + If the current environment uses the '\' directory separator, replaces all uses of '\' + in the given string with '/'. Otherwise, returns the string. + + + This method is equivalent to Microsoft.CodeAnalysis.BuildTasks.GenerateMSBuildEditorConfig.NormalizeWithForwardSlash + Both methods should be kept in sync. + + + + + Takes an absolute path and attempts to expand any '..' or '.' into their equivalent representation. + + An equivalent path that does not contain any '..' or '.' path parts, or the original path. + + This method handles unix and windows drive rooted absolute paths only (i.e /a/b or x:\a\b). Passing any other kind of path + including relative, drive relative, unc, or windows device paths will simply return the original input. + + + + + Search a sorted integer array for the target value in O(log N) time. + + The array of integers which must be sorted in ascending order. + The target value. + An index in the array pointing to the position where should be + inserted in order to maintain the sorted order. All values to the right of this position will be + strictly greater than . Note that this may return a position off the end + of the array if all elements are less than or equal to . + + + + A write-only memory stream backed by a . + + + + + The chunk size to be used by the underlying BlobBuilder. + + + The current single use case for this type is embedded sources in PDBs. + + 32 KB is: + + * Large enough to handle 99.6% all VB and C# files in Roslyn and CoreFX + without allocating additional chunks. + + * Small enough to avoid the large object heap. + + * Large enough to handle the files in the 0.4% case without allocating tons + of small chunks. Very large source files are often generated in build + (e.g. Syntax.xml.Generated.vb is 390KB compressed!) and those are actually + attractive candidates for embedding, so we don't want to discount the large + case too heavily.) + + * We pool the outer BlobBuildingStream but only retain the first allocated chunk. + + + + + Provide structural equality for ReadOnlyMemory{char} instances. + + + + + Split a command line by the same rules as Main would get the commands except the original + state of backslashes and quotes are preserved. For example in normal Windows command line + parsing the following command lines would produce equivalent Main arguments: + + - /r:a,b + - /r:"a,b" + + This method will differ as the latter will have the quotes preserved. The only case where + quotes are removed is when the entire argument is surrounded by quotes without any inner + quotes. + + + Rules for command line parsing, according to MSDN: + + Arguments are delimited by white space, which is either a space or a tab. + + A string surrounded by double quotation marks ("string") is interpreted + as a single argument, regardless of white space contained within. + A quoted string can be embedded in an argument. + + A double quotation mark preceded by a backslash (\") is interpreted as a + literal double quotation mark character ("). + + Backslashes are interpreted literally, unless they immediately precede a + double quotation mark. + + If an even number of backslashes is followed by a double quotation mark, + one backslash is placed in the argv array for every pair of backslashes, + and the double quotation mark is interpreted as a string delimiter. + + If an odd number of backslashes is followed by a double quotation mark, + one backslash is placed in the argv array for every pair of backslashes, + and the double quotation mark is "escaped" by the remaining backslash, + causing a literal double quotation mark (") to be placed in argv. + + + + + Parse the value provided to an MSBuild Feature option into a list of entries. This will + leave name=value in their raw form. + + + + + NOTE!!! adding duplicates will result in exceptions. + Being concurrent only allows accessing the dictionary without taking locks. + Duplicate keys are still not allowed in the hashtable. + If unsure about adding unique items use APIs such as TryAdd, GetOrAdd, etc... + + + + + A concurrent, simplified HashSet. + + + + + The default concurrency level is 2. That means the collection can cope with up to two + threads making simultaneous modifications without blocking. + Note ConcurrentDictionary's default concurrency level is dynamic, scaling according to + the number of processors. + + + + + Taken from ConcurrentDictionary.DEFAULT_CAPACITY + + + + + The backing dictionary. The values are never used; just the keys. + + + + + Construct a concurrent set with the default concurrency level. + + + + + Construct a concurrent set using the specified equality comparer. + + The equality comparer for values in the set. + + + + Obtain the number of elements in the set. + + The number of elements in the set. + + + + Determine whether the set is empty. + true if the set is empty; otherwise, false. + + + + Determine whether the given value is in the set. + + The value to test. + true if the set contains the specified value; otherwise, false. + + + + Attempts to add a value to the set. + + The value to add. + true if the value was added to the set. If the value already exists, this method returns false. + + + + Attempts to remove a value from the set. + + The value to remove. + true if the value was removed successfully; otherwise false. + + + + Clear the set + + + + + Obtain an enumerator that iterates through the elements in the set. + + An enumerator for the set. + + + + A custom awaiter that supports for + . + + + + + a simple Lisp-like immutable list. Good to use when lists are always accessed from the head. + + + + + + + + + + + Generally is a sufficient method for enforcing DEBUG + only invariants in our code. When it triggers that provides a nice stack trace for + investigation. Generally that is enough. + + There are cases for which a stack is not enough and we need a full heap dump to + investigate the failure. This method takes care of that. The behavior is that when running + in our CI environment if the assert triggers we will rudely crash the process and + produce a heap dump for investigation. + + + + + Names of well-known XML attributes and elements. + + + + + Very cheap trivial comparer that never matches the keys, + should only be used in empty dictionaries. + + + + + This method is necessary to avoid an ambiguity between and . + + + + + This method is necessary to avoid an ambiguity between and . + + + + + Maps an immutable array through a function that returns ValueTask, returning the new ImmutableArray. + + + + + Maps an immutable array through a function that returns ValueTask, returning the new ImmutableArray. + + + + + Maps an immutable array through a function that returns ValueTask, returning the new ImmutableArray. + + + + + Returns the only element of specified sequence if it has exactly one, and default(TSource) otherwise. + Unlike doesn't throw if there is more than one element in the sequence. + + + + + Cached versions of commonly used delegates. + + + + + + Cached versions of commonly used delegates. + + + + + + Convert a boxed primitive (generally of the backing type of an enum) into a ulong. + + + + + + + Creates an with information about an unexpected value. + + The unexpected value. + The , which should be thrown by the caller. + + + + Determine if an exception was an , and that the provided token caused the cancellation. + + The exception to test. + Checked to see if the provided token was cancelled. + if the exception was an and the token was canceled. + + + + Implements a few file name utilities that are needed by the compiler. + In general the compiler is not supposed to understand the format of the paths. + In rare cases it needs to check if a string is a valid file name or change the extension + (embedded resources, netmodules, output name). + The APIs are intentionally limited to cover just these rare cases. Do not add more APIs. + + + + + Returns true if the string represents an unqualified file name. + The name may contain any characters but directory and volume separators. + + Path. + + True if is a simple file name, false if it is null or includes a directory specification. + + + + + Returns the offset in where the dot that starts an extension is, or -1 if the path doesn't have an extension. + + + Returns 0 for path ".goo". + Returns -1 for path "goo.". + + + + + Returns an extension of the specified path string. + + + The same functionality as but doesn't throw an exception + if there are invalid characters in the path. + + + + + Removes extension from path. + + + Returns "goo" for path "goo.". + Returns "goo.." for path "goo...". + + + + + Returns path with the extension changed to . + + + Equivalent of + + If is null, returns null. + If path does not end with an extension, the new extension is appended to the path. + If extension is null, equivalent to . + + + + + Returns the position in given path where the file name starts. + + -1 if path is null. + + + + Get file name from path. + + Unlike doesn't check for invalid path characters. + + + + This is how VB Anonymous Types combine hash values for fields. + + + + + This is how VB Anonymous Types combine hash values for fields. + PERF: Do not use with enum types because that involves multiple + unnecessary boxing operations. Unfortunately, we can't constrain + T to "non-enum", so we'll use a more restrictive constraint. + + + + + The offset bias value used in the FNV-1a algorithm + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + + + + The generative factor used in the FNV-1a algorithm + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + + + + Compute the FNV-1a hash of a sequence of bytes + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The sequence of bytes + The FNV-1a hash of + + + + Compute the FNV-1a hash of a sequence of bytes and determines if the byte + sequence is valid ASCII and hence the hash code matches a char sequence + encoding the same text. + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The sequence of bytes that are likely to be ASCII text. + True if the sequence contains only characters in the ASCII range. + The FNV-1a hash of + + + + Compute the FNV-1a hash of a sequence of bytes + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The sequence of bytes + The FNV-1a hash of + + + + Compute the hashcode of a sub-string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + Note: FNV-1a was developed and tuned for 8-bit sequences. We're using it here + for 16-bit Unicode chars on the understanding that the majority of chars will + fit into 8-bits and, therefore, the algorithm will retain its desirable traits + for generating hash codes. + + + + + Compute the hashcode of a sub-string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + Note: FNV-1a was developed and tuned for 8-bit sequences. We're using it here + for 16-bit Unicode chars on the understanding that the majority of chars will + fit into 8-bits and, therefore, the algorithm will retain its desirable traits + for generating hash codes. + + The input string + The start index of the first character to hash + The number of characters, beginning with to hash + The FNV-1a hash code of the substring beginning at and ending after characters. + + + + Compute the hashcode of a sub-string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The input string + The start index of the first character to hash + The FNV-1a hash code of the substring beginning at and ending at the end of the string. + + + + Compute the hashcode of a string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The input string + The FNV-1a hash code of + + + + Compute the hashcode of a string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The input string + The FNV-1a hash code of + + + + Compute the hashcode of a sub string using FNV-1a + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The input string as a char array + The start index of the first character to hash + The number of characters, beginning with to hash + The FNV-1a hash code of the substring beginning at and ending after characters. + + + + Compute the hashcode of a single character using the FNV-1a algorithm + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + Note: In general, this isn't any more useful than "char.GetHashCode". However, + it may be needed if you need to generate the same hash code as a string or + substring with just a single character. + + The character to hash + The FNV-1a hash code of the character. + + + + Combine a string with an existing FNV-1a hash code + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The accumulated hash code + The string to combine + The result of combining with using the FNV-1a algorithm + + + + Combine a char with an existing FNV-1a hash code + See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + + The accumulated hash code + The new character to combine + The result of combining with using the FNV-1a algorithm + + + + Initialize the value referenced by in a thread-safe manner. + The value is changed to only if the current value is null. + + Type of value. + Reference to the target location. + The value to use if the target is currently null. + The new value referenced by . Note that this is + nearly always more useful than the usual return from + because it saves another read to . + + + + Initialize the value referenced by in a thread-safe manner. + The value is changed to only if the current value + is . + + Type of value. + Reference to the target location. + The value to use if the target is currently uninitialized. + The uninitialized value. + The new value referenced by . Note that this is + nearly always more useful than the usual return from + because it saves another read to . + + + + Initialize the immutable array referenced by in a thread-safe manner. + + Elemental type of the array. + Reference to the target location. + The value to use if the target is currently uninitialized (default). + The new value referenced by . Note that this is + nearly always more useful than the usual return from + because it saves another read to . + + + + A simple, forward-only JSON writer to avoid adding dependencies to the compiler. + Used to generate /errorlogger output. + + Does not guarantee well-formed JSON if misused. It is the caller's responsibility + to balance array/object start/end, to only write key-value pairs to objects and + elements to arrays, etc. + + Takes ownership of the given at construction and handles its disposal. + + + + + Catches exceptions thrown during disposal of the underlying stream and + writes them to the given . Check + after disposal to see if any + exceptions were thrown during disposal. + + + + + Underlying stream + + + + + True if and only if an exception was thrown during a call to + + + + + Represents a single item or many items (including none). + + + Used when a collection usually contains a single item but sometimes might contain multiple. + + + + + This class provides simple properties for determining whether the current platform is Windows or Unix-based. + We intentionally do not use System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(...) because + it incorrectly reports 'true' for 'Windows' in desktop builds running on Unix-based platforms via Mono. + + + + + Are we running on .NET 5 or later using the Mono runtime? + Will also return true when running on Mono itself; if necessary + we can use IsRunningOnMono to distinguish. + + + + + Compares objects based upon their reference identity. + + + + + Find a instance by first probing the contract name and then the name as it + would exist in mscorlib. This helps satisfy both the CoreCLR and Desktop scenarios. + + + + + + + + + + + + + + + + + + + + + + + + + + A set that returns the inserted values in insertion order. + The mutation operations are not thread-safe. + + + + + Attempts to read all of the requested bytes from the stream into the buffer + + + The number of bytes read. Less than will + only be returned if the end of stream is reached before all bytes can be read. + + + Unlike it is not guaranteed that + the stream position or the output buffer will be unchanged if an exception is + returned. + + + + + Reads all bytes from the current position of the given stream to its end. + + + + + Checks if the given name is a sequence of valid CLR names separated by a dot. + + + + + Remove one set of leading and trailing double quote characters, if both are present. + + + + + Compares string based upon their ordinal equality. + We use this comparer for string identifiers because it does exactly what we need and nothing more + The StringComparer.Ordinal as implemented by StringComparer is more complex to support + case sensitive and insensitive compares depending on flags. + It also defers to the default string hash function that might not be the best for our scenarios. + + + + + This is basically a lossy cache of strings that is searchable by + strings, string sub ranges, character array ranges or string-builder. + + + + + Merges the new change ranges into the old change ranges, adjusting the new ranges to be with respect to the original text + (with neither old or new changes applied) instead of with respect to the original text after "old changes" are applied. + + This may require splitting, concatenation, etc. of individual change ranges. + + + Both `oldChanges` and `newChanges` must contain non-overlapping spans in ascending order. + + + + + Represents a new change being processed by . + Such a new change must be adjusted before being added to the result list. + + + A value of this type may represent the intermediate state of merging of an old change into an unadjusted new change, + resulting in a temporary unadjusted new change whose is negative (not valid) until it is adjusted. + This tends to happen when we need to merge an old change deletion into a new change near the beginning of the text. (see TextChangeTests.Fuzz_4) + + + + + Defines a set of helper methods to classify Unicode characters. + + + + + Returns true if the Unicode character can be a part of an identifier. + + The Unicode character. + + + + Check that the name is a valid Unicode identifier. + + + + + Returns true if the Unicode character is a formatting character (Unicode class Cf). + + The Unicode character. + + + + Returns true if the Unicode character is a formatting character (Unicode class Cf). + + The Unicode character. + + + + Implements and static members that are only available in .NET 5. + + + + + Explicitly indicates result is void + + + + + Represents an ordered sequence of weak references. + + + + + Copies all live references from to . + Assumes that all references prior are alive. + + + + + Returns the number of weak references in this list. + Note that some of them might not point to live objects anymore. + + + + + Implements ConfigureAwait(bool) for . The resulting behavior in asynchronous code + is the same as one would expect for . + + The awaitable provided by . + + An object used to await this yield. + + + + Objects that implement this interface know how to write their contents to an , + so they can be reconstructed later by an . + + + + + Returns 'true' when the same instance could be used more than once. + Instances that return 'false' should not be tracked for the purpose + of de-duplication while serializing/deserializing. + + + + + is a registry that maps between arbitrary s and + the 'reader' function used to deserialize serialized instances of those types. Registration + must happen ahead of time using the method. + + + + + Lock for all data in this type. + + + + + Last created snapshot of our data. We hand this out instead of exposing our raw + data so that and do not need to + take any locks while processing. + + + + + Map from a to the corresponding index in and + . will write out the index into + the stream, and will use that index to get the reader used + for deserialization. + + + + + Gets an immutable copy of the state of this binder. This copy does not need to be + locked while it is used. + + + + + An that deserializes objects from a byte stream. + + + + + We start the version at something reasonably random. That way an older file, with + some random start-bytes, has little chance of matching our version. When incrementing + this version, just change VersionByte2. + + + + + Map of reference id's to deserialized objects. + + + + + Copy of the global binder data that maps from Types to the appropriate reading-function + for that type. Types register functions directly with , but + that means that is both static and locked. This gives us + local copy we can work with without needing to worry about anyone else mutating. + + + + + Creates a new instance of a . + + The stream to read objects from. + True to leave the open after the is disposed. + + + + + Attempts to create a from the provided . + If the does not start with a valid header, then will + be returned. + + + + + Creates an from the provided . + Unlike , it requires the version + of the data in the stream to exactly match the current format version. + Should only be used to read data written by the same version of Roslyn. + + + + + A reference-id to object map, that can share base data efficiently. + + + + + An that serializes objects to a byte stream. + + + + + Map of serialized object's reference ids. The object-reference-map uses reference equality + for performance. While the string-reference-map uses value-equality for greater cache hits + and reuse. + + These are not readonly because they're structs and we mutate them. + + When we write out objects/strings we give each successive, unique, item a monotonically + increasing integral ID starting at 0. I.e. the first object gets ID-0, the next gets + ID-1 and so on and so forth. We do *not* include these IDs with the object when it is + written out. We only include the ID if we hit the object *again* while writing. + + During reading, the reader knows to give each object it reads the same monotonically + increasing integral value. i.e. the first object it reads is put into an array at position + 0, the next at position 1, and so on. Then, when the reader reads in an object-reference + it can just retrieved it directly from that array. + + In other words, writing and reading take advantage of the fact that they know they will + write and read objects in the exact same order. So they only need the IDs for references + and not the objects themselves because the ID is inferred from the order the object is + written or read in. + + + + + Copy of the global binder data that maps from Types to the appropriate reading-function + for that type. Types register functions directly with , but + that means that is both static and locked. This gives us + local copy we can work with without needing to worry about anyone else mutating. + + + + + Creates a new instance of a . + + The stream to write to. + True to leave the open after the is disposed. + Cancellation token. + + + + Used so we can easily grab the low/high 64bits of a guid for serialization. + + + + + Write an array of bytes. The array data is provided as a + ReadOnlySpan<>, and deserialized to a byte array. + + The array data. + + + + An object reference to reference-id map, that can share base data efficiently. + + + + + Indexed by . + + + + + byte marker mask for encoding compressed uint + + + + + byte marker bits for uint encoded in 1 byte. + + + + + byte marker bits for uint encoded in 2 bytes. + + + + + byte marker bits for uint encoded in 4 bytes. + + + + + The null value + + + + + A type + + + + + An object with member values encoded as variants + + + + + An object reference with the id encoded as 1 byte. + + + + + An object reference with the id encode as 2 bytes. + + + + + An object reference with the id encoded as 4 bytes. + + + + + A string encoded as UTF-8 (using BinaryWriter.Write(string)) + + + + + A string encoded as UTF16 (as array of UInt16 values) + + + + + A reference to a string with the id encoded as 1 byte. + + + + + A reference to a string with the id encoded as 2 bytes. + + + + + A reference to a string with the id encoded as 4 bytes. + + + + + The boolean value true. + + + + + The boolean value char. + + + + + A character value encoded as 2 bytes. + + + + + An Int8 value encoded as 1 byte. + + + + + An Int16 value encoded as 2 bytes. + + + + + An Int32 value encoded as 4 bytes. + + + + + An Int32 value encoded as 1 byte. + + + + + An Int32 value encoded as 2 bytes. + + + + + The Int32 value 0 + + + + + The Int32 value 1 + + + + + The Int32 value 2 + + + + + The Int32 value 3 + + + + + The Int32 value 4 + + + + + The Int32 value 5 + + + + + The Int32 value 6 + + + + + The Int32 value 7 + + + + + The Int32 value 8 + + + + + The Int32 value 9 + + + + + The Int32 value 10 + + + + + An Int64 value encoded as 8 bytes + + + + + A UInt8 value encoded as 1 byte. + + + + + A UIn16 value encoded as 2 bytes. + + + + + A UInt32 value encoded as 4 bytes. + + + + + A UInt32 value encoded as 1 byte. + + + + + A UInt32 value encoded as 2 bytes. + + + + + The UInt32 value 0 + + + + + The UInt32 value 1 + + + + + The UInt32 value 2 + + + + + The UInt32 value 3 + + + + + The UInt32 value 4 + + + + + The UInt32 value 5 + + + + + The UInt32 value 6 + + + + + The UInt32 value 7 + + + + + The UInt32 value 8 + + + + + The UInt32 value 9 + + + + + The UInt32 value 10 + + + + + A UInt64 value encoded as 8 bytes. + + + + + A float value encoded as 4 bytes. + + + + + A double value encoded as 8 bytes. + + + + + A decimal value encoded as 12 bytes. + + + + + A DateTime value + + + + + An array with length encoded as compressed uint + + + + + An array with zero elements + + + + + An array with one element + + + + + An array with 2 elements + + + + + An array with 3 elements + + + + + The boolean type + + + + + The string type + + + + + Encoding serialized as . + + + + + Encoding serialized as . + + + + + Encoding serialized as . + + + + + Naive thread pool focused on reducing the latency to execution of chunky work items as much as possible. + If a thread is ready to process a work item the moment a work item is queued, it's used, otherwise + a new thread is created. This is meant as a stop-gap measure for workloads that would otherwise be + creating a new thread for every work item. + + + This class is derived from dotnet/machinelearning. + + + + How long should threads wait around for additional work items before retiring themselves. + + + The queue of work items. Also used as a lock to protect all relevant state. + + + The number of threads currently waiting in tryDequeue for work to arrive. + + + + Queues a delegate to be executed immediately on another thread, + and returns a that represents its eventual completion. The task will + always end in the state; if the delegate throws + an exception, it'll be allowed to propagate on the thread, crashing the process. + + + + + Queues a delegate and associated state to be executed immediately on + another thread, and returns a that represents its eventual completion. + + + + + Indicates that a code element is performance sensitive under a known scenario. + + + When applying this attribute, only explicitly set the values for properties specifically indicated by the + test/measurement technique described in the associated . + + + + + Gets the location where the original problem is documented, likely with steps to reproduce the issue and/or + validate performance related to a change in the method. + + + + + Gets or sets a description of the constraint imposed by the original performance issue. + + + Constraints are normally specified by other specific properties that allow automated validation of the + constraint. This property supports documenting constraints which cannot be described in terms of other + constraint properties. + + + + + Gets or sets a value indicating whether captures are allowed. + + + + + Gets or sets a value indicating whether implicit boxing of value types is allowed. + + + + + Gets or sets a value indicating whether enumeration of a generic + is allowed. + + + + + Gets or sets a value indicating whether locks are allowed. + + + + + Gets or sets a value indicating whether the asynchronous state machine typically completes synchronously. + + + When , validation of this performance constraint typically involves analyzing + the method to ensure synchronous completion of the state machine does not require the allocation of a + , either through caching the result or by using + . + + + + + Gets or sets a value indicating whether this is an entry point to a parallel algorithm. + + + Parallelization APIs and algorithms, e.g. Parallel.ForEach, may be efficient for parallel entry + points (few direct calls but large amounts of iterative work), but are problematic when called inside the + iterations themselves. Performance-sensitive code should avoid the use of heavy parallelization APIs except + for known entry points to the parallel portion of code. + + + + + This is a marker attribute that can be put on an interface to denote that only internal implementations + of that interface should exist. + + + + + Indicates that compiler support for a particular feature is required for the location where this attribute is applied. + + + + + The name of the compiler feature. + + + + + If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand . + + + + + The used for the ref structs C# feature. + + + + + The used for the required members C# feature. + + + + Indicates which arguments to a method involving an interpolated string handler should be passed to that handler. + + + Initializes a new instance of the class. + The name of the argument that should be passed to the handler. + may be used as the name of the receiver in an instance method. + + + Initializes a new instance of the class. + The names of the arguments that should be passed to the handler. + may be used as the name of the receiver in an instance method. + + + Gets the names of the arguments that should be passed to the handler. + may be used as the name of the receiver in an instance method. + + + Indicates the attributed type is to be used as an interpolated string handler. + + + Initializes the . + + + + Reserved to be used by the compiler for tracking metadata. + This class should not be used by developers in source code. + + + + Specifies that a type has required members or that a member is required. + + + + Declare the following extension methods in System.Linq namespace to avoid accidental boxing of ImmutableArray{T} that implements IEnumerable{T}. + The boxing would occur if the methods were defined in Roslyn.Utilities and the file calling these methods has using Roslyn.Utilities + but not using System.Linq. + + + + + + + Represent a type can be used to index a collection either from the start or the end. + + Index is used by the C# compiler to support the new index syntax + + int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ; + int lastElement = someArray[^1]; // lastElement = 5 + + + + + Construct an Index using a value and indicating if the index is from the start or from the end. + The index value. it has to be zero or positive number. + Indicating if the index is from the start or from the end. + + If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element. + + + + Create an Index pointing at first element. + + + Create an Index pointing at beyond last element. + + + Create an Index from the start at the position indicated by the value. + The index value from the start. + + + Create an Index from the end at the position indicated by the value. + The index value from the end. + + + Returns the index value. + + + Indicates whether the index is from the start or the end. + + + Calculate the offset from the start using the giving collection length. + The length of the collection that the Index will be used with. length has to be a positive value + + For performance reason, we don't validate the input length parameter and the returned offset value against negative values. + we don't validate either the returned offset is greater than the input length. + It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and + then used to index a collection will get out of range exception which will be same affect as the validation. + + + + Indicates whether the current Index object is equal to another object of the same type. + An object to compare with this object + + + Indicates whether the current Index object is equal to another Index object. + An object to compare with this object + + + Returns the hash code for this instance. + + + Converts integer number to an Index. + + + Converts the value of the current Index object to its equivalent string representation. + + + Specifies that null is allowed as an input even if the corresponding type disallows it. + + + Specifies that null is disallowed as an input even if the corresponding type allows it. + + + Specifies that an output may be null even if the corresponding type disallows it. + + + Specifies that an output will not be null even if the corresponding type allows it. + + + Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. + + + Initializes the attribute with the specified return value condition. + + The return value condition. If the method returns this value, the associated parameter may be null. + + + + Gets the return value condition. + + + Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. + + + Initializes the attribute with the specified return value condition. + + The return value condition. If the method returns this value, the associated parameter will not be null. + + + + Gets the return value condition. + + + Specifies that the output will be non-null if the named parameter is non-null. + + + Initializes the attribute with the associated parameter name. + + The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. + + + + Gets the associated parameter name. + + + Applied to a method that will never return under any circumstance. + + + Specifies that the method will not return if the associated Boolean parameter is passed the specified value. + + + Initializes the attribute with the specified parameter value. + + The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to + the associated parameter matches this value. + + + + Gets the condition parameter value. + + + Specifies that the method or property will ensure that the listed field and property members have not-null values. + + + Initializes the attribute with a field or property member. + + The field or property member that is promised to be not-null. + + + + Initializes the attribute with the list of field and property members. + + The list of field and property members that are promised to be not-null. + + + + Gets field or property member names. + + + Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. + + + Initializes the attribute with the specified return value condition and a field or property member. + + The return value condition. If the method returns this value, the associated parameter will not be null. + + + The field or property member that is promised to be not-null. + + + + Initializes the attribute with the specified return value condition and list of field and property members. + + The return value condition. If the method returns this value, the associated parameter will not be null. + + + The list of field and property members that are promised to be not-null. + + + + Gets the return value condition. + + + Gets field or property member names. + + + + Specifies that this constructor sets all required members for the current type, and callers + do not need to set any required members themselves. + + + + Represent a range has start and end indexes. + + Range is used by the C# compiler to support the range syntax. + + int[] someArray = new int[5] { 1, 2, 3, 4, 5 }; + int[] subArray1 = someArray[0..2]; // { 1, 2 } + int[] subArray2 = someArray[1..^0]; // { 2, 3, 4, 5 } + + + + + Represent the inclusive start index of the Range. + + + Represent the exclusive end index of the Range. + + + Construct a Range object using the start and end indexes. + Represent the inclusive start index of the range. + Represent the exclusive end index of the range. + + + Indicates whether the current Range object is equal to another object of the same type. + An object to compare with this object + + + Indicates whether the current Range object is equal to another Range object. + An object to compare with this object + + + Returns the hash code for this instance. + + + Converts the value of the current Range object to its equivalent string representation. + + + Create a Range object starting from start index to the end of the collection. + + + Create a Range object starting from first element in the collection to the end Index. + + + Create a Range object starting from first element to the end. + + + Calculate the start offset and length of range object using a collection length. + The length of the collection that the range will be used with. length has to be a positive value. + + For performance reason, we don't validate the input length parameter against negative values. + It is expected Range will be used with collections which always have non negative length/count. + We validate the range is inside the length scope though. + + +
+
diff --git a/SpaceWarpPatcherLibraries/System.Collections.Immutable.dll b/SpaceWarpPatcherLibraries/System.Collections.Immutable.dll new file mode 100644 index 00000000..98774b92 Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Collections.Immutable.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Collections.Immutable.xml b/SpaceWarpPatcherLibraries/System.Collections.Immutable.xml new file mode 100644 index 00000000..fb6b8088 --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Collections.Immutable.xml @@ -0,0 +1,5380 @@ + + + + System.Collections.Immutable + + + + Represents an immutable collection of key/value pairs. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of keys in the dictionary. + The type of values in the dictionary. + + + Adds an element with the specified key and value to the dictionary. + The key of the element to add. + The value of the element to add. + The given key already exists in the dictionary but has a different value. + A new immutable dictionary that contains the additional key/value pair. + + + Adds the specified key/value pairs to the dictionary. + The key/value pairs to add. + One of the given keys already exists in the dictionary but has a different value. + A new immutable dictionary that contains the additional key/value pairs. + + + Retrieves an empty dictionary that has the same ordering and key/value comparison rules as this dictionary instance. + An empty dictionary with equivalent ordering and key/value comparison rules. + + + Determines whether the immutable dictionary contains the specified key/value pair. + The key/value pair to locate. + + if the specified key/value pair is found in the dictionary; otherwise, . + + + Removes the element with the specified key from the immutable dictionary. + The key of the element to remove. + A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. + + + Removes the elements with the specified keys from the immutable dictionary. + The keys of the elements to remove. + A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. + + + Sets the specified key and value in the immutable dictionary, possibly overwriting an existing value for the key. + The key of the entry to add. + The key value to set. + A new immutable dictionary that contains the specified key/value pair. + + + Sets the specified key/value pairs in the immutable dictionary, possibly overwriting existing values for the keys. + The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. + A new immutable dictionary that contains the specified key/value pairs. + + + Determines whether this dictionary contains a specified key. + The key to search for. + The matching key located in the dictionary if found, or equalkey if no match is found. + + if a match for is found; otherwise, . + + + Represents a list of elements that cannot be modified. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the list. + + + Makes a copy of the list, and adds the specified object to the end of the copied list. + The object to add to the list. + A new list with the object added. + + + Makes a copy of the list and adds the specified objects to the end of the copied list. + The objects to add to the list. + A new list with the elements added. + + + Creates a list with all the items removed, but with the same sorting and ordering semantics as this list. + An empty list that has the same sorting and ordering semantics as this instance. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the that starts at the specified index and contains the specified number of elements. + The object to locate in the . This value can be null for reference types. + The zero-based starting indexes of the search. 0 (zero) is valid in an empty list. + The number of elements in the section to search. + The equality comparer to use to locate . + The zero-based index of the first occurrence of within the range of elements in the that starts at and contains number of elements if found; otherwise -1. + + + Inserts the specified element at the specified index in the immutable list. + The zero-based index at which to insert the value. + The object to insert. + A new immutable list that includes the specified element. + + + Inserts the specified elements at the specified index in the immutable list. + The zero-based index at which the new elements should be inserted. + The elements to insert. + A new immutable list that includes the specified elements. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the that contains the specified number of elements and ends at the specified index. + The object to locate in the list. The value can be for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements in the section to search. + The equality comparer to match . + Returns . + + + Removes the first occurrence of a specified object from this immutable list. + The object to remove from the list. + The equality comparer to use to locate . + A new list with the specified object removed. + + + Removes all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to remove. + A new immutable list with the elements removed. + + + Removes the element at the specified index of the immutable list. + The index of the element to remove. + A new list with the element removed. + + + Removes the specified object from the list. + The objects to remove from the list. + The equality comparer to use to determine if match any objects in the list. + A new immutable list with the specified objects removed, if matched objects in the list. + + + Removes a range of elements from the . + The zero-based starting index of the range of elements to remove. + The number of elements to remove. + A new immutable list with the elements removed. + + + Returns a new list with the first matching element in the list replaced with the specified element. + The element to be replaced. + The element to replace the first occurrence of with. + The equality comparer to use for matching . + + does not exist in the list. + A new list that contains , even if is the same as . + + + Replaces an element in the list at a given position with the specified element. + The position in the list of the element to replace. + The element to replace the old element with. + A new list that contains the new element, even if the element at the specified location is the same as the new element. + + + Represents an immutable first-in, first-out collection of objects. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the queue. + + + Returns a new queue with all the elements removed. + An empty immutable queue. + + + Removes the first element in the immutable queue, and returns the new queue. + The queue is empty. + The new immutable queue with the first element removed. This value is never . + + + Adds an element to the end of the immutable queue, and returns the new queue. + The element to add. + The new immutable queue with the specified element added. + + + Returns the element at the beginning of the immutable queue without removing it. + The queue is empty. + The element at the beginning of the queue. + + + Gets a value that indicates whether this immutable queue is empty. + + if this queue is empty; otherwise, . + + + Represents a set of elements that can only be modified by creating a new instance of the set. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of element stored in the set. + + + Adds the specified element to this immutable set. + The element to add. + A new set with the element added, or this set if the element is already in the set. + + + Retrieves an empty immutable set that has the same sorting and ordering semantics as this instance. + An empty set that has the same sorting and ordering semantics as this instance. + + + Determines whether this immutable set contains a specified element. + The element to locate in the set. + + if the set contains the specified value; otherwise, . + + + Removes the elements in the specified collection from the current immutable set. + The collection of items to remove from this set. + A new set with the items removed; or the original set if none of the items were in the set. + + + Creates an immutable set that contains only elements that exist in this set and the specified set. + The collection to compare to the current . + A new immutable set that contains elements that exist in both sets. + + + Determines whether the current immutable set is a proper (strict) subset of the specified collection. + The collection to compare to the current set. + + if the current set is a proper subset of the specified collection; otherwise, . + + + Determines whether the current immutable set is a proper (strict) superset of the specified collection. + The collection to compare to the current set. + + if the current set is a proper superset of the specified collection; otherwise, . + + + Determines whether the current immutable set is a subset of a specified collection. + The collection to compare to the current set. + + if the current set is a subset of the specified collection; otherwise, . + + + Determines whether the current immutable set is a superset of a specified collection. + The collection to compare to the current set. + + if the current set is a superset of the specified collection; otherwise, . + + + Determines whether the current immutable set overlaps with the specified collection. + The collection to compare to the current set. + + if the current set and the specified collection share at least one common element; otherwise, . + + + Removes the specified element from this immutable set. + The element to remove. + A new set with the specified element removed, or the current set if the element cannot be found in the set. + + + Determines whether the current immutable set and the specified collection contain the same elements. + The collection to compare to the current set. + + if the sets are equal; otherwise, . + + + Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + A new set that contains the elements that are present only in the current set or in the specified collection, but not both. + + + Determines whether the set contains a specified value. + The value to search for. + The matching value from the set, if found, or equalvalue if there are no matches. + + if a matching value was found; otherwise, . + + + Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. + The collection to add elements from. + A new immutable set with the items added; or the original set if all the items were already in the set. + + + Represents an immutable last-in-first-out (LIFO) collection. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the stack. + + + Removes all objects from the immutable stack. + An empty immutable stack. + + + Returns the element at the top of the immutable stack without removing it. + The stack is empty. + The element at the top of the stack. + + + Removes the element at the top of the immutable stack and returns the new stack. + The stack is empty. + The new stack; never . + + + Inserts an element at the top of the immutable stack and returns the new stack. + The element to push onto the stack. + The new stack. + + + Gets a value that indicates whether this immutable stack is empty. + + if this stack is empty; otherwise,. + + + Provides methods for creating an array that is immutable; meaning it cannot be changed once it is created. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Searches the sorted immutable array for a specified element using the default comparer and returns the zero-based index of the element, if it's found. + The sorted array to search. + The object to search for. + The type of element stored in the array. + + does not implement or the search encounters an element that does not implement . + The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . + + + Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found. + The sorted array to search. + The object to search for. + The comparer implementation to use when comparing elements, or null to use the default comparer. + The type of element stored in the array. + + is null and does not implement or the search encounters an element that does not implement . + The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . + + + Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found. + The sorted array to search. + The starting index of the range to search. + The length of the range to search. + The object to search for. + The type of element stored in the array. + + does not implement or the search encounters an element that does not implement . + + and do not specify a valid range in . + + is less than the lower bound of . + +-or- + + is less than zero. + The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . + + + Searches a sorted immutable array for a specified element and returns the zero-based index of the element. + The sorted array to search. + The starting index of the range to search. + The length of the range to search. + The object to search for. + The comparer to use when comparing elements for equality or to use the default comparer. + The type of element stored in the array. + + is null and does not implement or the search encounters an element that does not implement . + + and do not specify a valid range in . + +-or- + + is , and is of a type that is not compatible with the elements of . + + is less than the lower bound of . + +-or- + + is less than zero. + The zero-based index of the item in the array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than or, if there is no larger element, the bitwise complement of . + + + Creates an empty immutable array. + The type of elements stored in the array. + An empty immutable array. + + + Creates an immutable array that contains the specified object. + The object to store in the array. + The type of elements stored in the array. + An immutable array that contains the specified object. + + + Creates an immutable array that contains the specified objects. + The first object to store in the array. + The second object to store in the array. + The type of elements stored in the array. + An immutable array that contains the specified objects. + + + Creates an immutable array that contains the specified objects. + The first object to store in the array. + The second object to store in the array. + The third object to store in the array. + The type of elements stored in the array. + An immutable array that contains the specified objects. + + + Creates an immutable array that contains the specified objects. + The first object to store in the array. + The second object to store in the array. + The third object to store in the array. + The fourth object to store in the array. + The type of elements stored in the array. + An immutable array that contains the specified objects. + + + Creates an immutable array from the specified array of objects. + The array of objects to populate the array with. + The type of elements stored in the array. + An immutable array that contains the array of items. + + + Creates an immutable array with specified objects from another array. + The source array of objects. + The index of the first element to copy from . + The number of elements from to include in this immutable array. + The type of elements stored in the array. + An immutable array that contains the specified objects from the source array. + + + Creates an immutable array with the specified objects from another immutable array. + The source array of objects. + The index of the first element to copy from . + The number of elements from to include in this immutable array. + The type of elements stored in the array. + An immutable array that contains the specified objects from the source array. + + + Creates a mutable array that can be converted to an without allocating new memory. + The type of elements stored in the builder. + A mutable array of the specified type that can be efficiently converted to an immutable array. + + + Creates a mutable array that can be converted to an without allocating new memory. + The initial capacity of the builder. + The type of elements stored in the builder. + A mutable array of the specified type that can be efficiently converted to an immutable array. + + + Creates a new populated with the specified items. + The elements to add to the array. + The type of element stored in the array. + An immutable array that contains the specified items. + + + Initializes a new instance of the struct. + The source array to initialize the resulting array with. + The function to apply to each element from the source array. + The type of element stored in the source array. + The type of element to store in the target array. + An immutable array that contains the specified items. + + + Initializes a new instance of the struct. + The source array to initialize the resulting array with. + The index of the first element in the source array to include in the resulting array. + The number of elements from the source array to include in the resulting array. + The function to apply to each element from the source array included in the resulting array. + The type of element stored in the source array. + The type of element to store in the target array. + An immutable array that contains the specified items. + + + Initializes a new instance of the struct. + The source array to initialize the resulting array with. + The function to apply to each element from the source array. + An argument to be passed to the selector mapping function. + The type of element stored in the source array. + The type of argument to pass to the selector mapping function. + The type of element to store in the target array. + An immutable array that contains the specified items. + + + Initializes a new instance of the struct. + The source array to initialize the resulting array with. + The index of the first element in the source array to include in the resulting array. + The number of elements from the source array to include in the resulting array. + The function to apply to each element from the source array included in the resulting array. + An argument to be passed to the selector mapping function. + The type of element stored in the source array. + The type of argument to be passed to the selector mapping function. + The type of element to be stored in the target array. + An immutable array that contains the specified items. + + + Creates an immutable array from the specified collection. + The collection of objects to copy to the immutable array. + The type of elements contained in . + An immutable array that contains the specified collection of objects. + + + Creates an immutable array from the current contents of the builder's array. + The builder to create the immutable array from. + The type of elements contained in the immutable array. + An immutable array that contains the current contents of the builder's array. + + + Represents an array that is immutable; meaning it cannot be changed once it is created. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of element stored by the array. + + + Gets an empty immutable array. + + + Returns a copy of the original array with the specified item added to the end. + The item to be added to the end of the array. + A new array with the specified item added to the end. + + + Returns a copy of the original array with the specified elements added to the end of the array. + The elements to add to the array. + A new array with the elements added. + + + Returns a copy of the original array with the specified elements added to the end of the array. + The elements to add to the array. + A new array with the elements added. + + + Returns a new immutable array that contains the elements of this array cast to a different type. + The type of array element to return. + An immutable array that contains the elements of this array, cast to a different type. If the cast fails, returns an array whose property returns . + + + Creates a new read-only memory region over this immutable array. + The read-only memory representation of this immutable array. + + + Creates a new read-only span over this immutable array. + The read-only span representation of this immutable array. + + + Initializes a new instance of the struct by casting the underlying array to an array of type . + The type of array element to return. + Thrown if the cast is illegal. + An immutable array instance with elements cast to the new type. + + + Initializes a new instance of the struct based on the contents of an existing instance, allowing a covariant static cast to efficiently reuse the existing array. + The array to initialize the array with. No copy is made. + The type of array element to return. + An immutable array instance with elements cast to the new type. + + + Returns an array with all the elements removed. + An array with all of the elements removed. + + + Determines whether the specified item exists in the array. + The item to search for. + + if the specified item was found in the array; otherwise . + + + Copies the contents of this array to the specified array. + The array to copy to. + + + Copies the contents of this array to the specified array starting at the specified destination index. + The array to copy to. + The index in where copying begins. + + + Copies the specified items in this array to the specified array at the specified starting index. + The index of this array where copying begins. + The array to copy to. + The index in where copying begins. + The number of elements to copy from this array. + + + Indicates whether specified array is equal to this array. + An object to compare with this object. + + if is equal to this array; otherwise, . + + + Determines if this array is equal to the specified object. + The to compare with this array. + + if this array is equal to ; otherwise, . + + + Returns an enumerator that iterates through the contents of the array. + An enumerator. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Searches the array for the specified item. + The item to search for. + The zero-based index position of the item if it is found, or -1 if it is not. + + + Searches the array for the specified item. + The item to search for. + The index at which to begin the search. + The zero-based index position of the item if it is found, or -1 if it is not. + + + Searches the array for the specified item. + The item to search for. + The index at which to begin the search. + The equality comparer to use in the search. + The zero-based index position of the item if it is found, or -1 if it is not. + + + Searches the array for the specified item. + The item to search for. + The index at which to begin the search. + The number of elements to search. + The zero-based index position of the item if it is found, or -1 if it is not. + + + Searches the array for the specified item. + The item to search for. + The index at which to begin the search. + The number of elements to search. + The equality comparer to use in the search. + The zero-based index position of the item if it is found, or -1 if it is not. + + + Returns a new array with the specified value inserted at the specified position. + The 0-based index into the array at which the new item should be added. + The item to insert at the start of the array. + A new array with the item inserted at the specified index. + + + Inserts the specified values at the specified index. + The index at which to insert the value. + The elements to insert. + A new immutable array with the items inserted at the specified index. + + + Inserts the specified values at the specified index. + The index at which to insert the value. + The elements to insert. + A new immutable array with the items inserted at the specified index. + + + Gets a read-only reference to the element at the specified in the read-only list. + The zero-based index of the element to get a reference to. + A read-only reference to the element at the specified in the read-only list. + + + Searches the array for the specified item; starting at the end of the array. + The item to search for. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Searches the array for the specified item; starting at the end of the array. + The item to search for. + The index at which to begin the search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Searches the array for the specified item; starting at the end of the array. + The item to search for. + The index at which to begin the search. + The number of elements to search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Searches the array for the specified item; starting at the end of the array. + The item to search for. + The index at which to begin the search. + The number of elements to search. + The equality comparer to use in the search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Filters the elements of this array to those assignable to the specified type. + The type to filter the elements of the sequence on. + An that contains elements from the input sequence of type of . + + + Returns a value that indicates if two arrays are equal. + The array to the left of the operator. + The array to the right of the operator. + + if the arrays are equal; otherwise, . + + + Returns a value that indicates if two arrays are equal. + The array to the left of the operator. + The array to the right of the operator. + + if the arrays are equal; otherwise, . + + + Returns a value that indicates whether two arrays are not equal. + The array to the left of the operator. + The array to the right of the operator. + + if the arrays are not equal; otherwise, . + + + Checks for inequality between two array. + The object to the left of the operator. + The object to the right of the operator. + + if the two arrays are not equal; otherwise, . + + + Returns an array with the first occurrence of the specified element removed from the array. If no match is found, the current array is returned. + The item to remove. + A new array with the item removed. + + + Returns an array with the first occurrence of the specified element removed from the array. + + If no match is found, the current array is returned. + The item to remove. + The equality comparer to use in the search. + A new array with the specified item removed. + + + Removes all the items from the array that meet the specified condition. + The delegate that defines the conditions of the elements to remove. + A new array with items that meet the specified condition removed. + + + Returns an array with the element at the specified position removed. + The 0-based index of the element to remove from the returned array. + A new array with the item at the specified index removed. + + + Removes the specified items from this array. + The items to remove if matches are found in this list. + A new array with the elements removed. + + + Removes the specified items from this array. + The items to remove if matches are found in this list. + The equality comparer to use in the search. + A new array with the elements removed. + + + Removes the specified values from this list. + The items to remove if matches are found in this list. + A new list with the elements removed. + + + Removes the specified items from this list. + The items to remove if matches are found in this list. + The equality comparer to use in the search. + A new array with the elements removed. + + + Returns an array with the elements at the specified position removed. + The 0-based index of the starting element to remove from the array. + The number of elements to remove from the array. + The new array with the specified elements removed. + + + Finds the first element in the array equal to the specified value and replaces the value with the specified new value. + The value to find and replace in the array. + The value to replace the oldvalue with. + + is not found in the array. + A new array that contains even if the new and old values are the same. + + + Finds the first element in the array equal to the specified value and replaces the value with the specified new value. + The value to find and replace in the array. + The value to replace the oldvalue with. + The equality comparer to use to compare values. + + is not found in the array. + A new array that contains even if the new and old values are the same. + + + Replaces the item at the specified index with the specified item. + The index of the item to replace. + The item to add to the list. + The new array that contains at the specified index. + + + Sorts the elements in the immutable array using the default comparer. + A new immutable array that contains the items in this array, in sorted order. + + + Sorts the elements in the immutable array using the specified comparer. + The implementation to use when comparing elements, or to use the default comparer. + A new immutable array that contains the items in this array, in sorted order. + + + Sorts the elements in the entire using the specified . + The to use when comparing elements. + + is null. + The sorted list. + + + Sorts the specified elements in the immutable array using the specified comparer. + The index of the first element to sort. + The number of elements to include in the sort. + The implementation to use when comparing elements, or to use the default comparer. + A new immutable array that contains the items in this array, in sorted order. + + + Throws in all cases. + The item to add to the end of the array. + + + Throws in all cases. + + + Throws in all cases. + The object to remove from the array. + Throws in all cases. + + + Returns an enumerator that iterates through the array. + The property returns . + An enumerator that can be used to iterate through the array. + + + Throws in all cases. + The index of the location to insert the item. + The item to insert. + + + Throws in all cases. + The index. + + + Copies this array to another array starting at the specified index. + The array to copy this array to. + The index in the destination array to start the copy operation. + + + Returns an enumerator that iterates through the immutable array. + The property returns . + An enumerator that iterates through the immutable array. + + + Throws in all cases. + The value to add to the array. + Thrown in all cases. + Throws in all cases. + + + Throws in all cases. + Thrown in all cases. + + + Throws in all cases. + The value to check for. + Throws in all cases. + + + Gets the value at the specified index. + The value to return the index of. + The value of the element at the specified index. + + + Throws in all cases. + Index that indicates where to insert the item. + The value to insert. + Thrown in all cases. + + + Throws in all cases. + The value to remove from the array. + Thrown in all cases. + + + Throws in all cases. + The index of the item to remove. + Thrown in all cases. + + + Returns a copy of the original array with the specified item added to the end. + The value to add to the end of the array. + A new array with the specified item added to the end. + + + Returns a copy of the original array with the specified elements added to the end of the array. + The elements to add to the end of the array. + A new array with the elements added to the end. + + + Returns an array with all the elements removed. + An array with all the elements removed. + + + Returns a new array with the specified value inserted at the specified position. + The 0-based index into the array at which the new item should be added. + The item to insert at the start of the array. + A new array with the specified value inserted. + + + Inserts the specified values at the specified index. + The index at which to insert the value. + The elements to insert. + A new array with the specified values inserted. + + + Returns an array with the first occurrence of the specified element removed from the array; if no match is found, the current array is returned. + The value to remove from the array. + The equality comparer to use in the search. + A new array with the value removed. + + + Removes all the items from the array that meet the specified condition. + The delegate that defines the conditions of the elements to remove. + A new array with items that meet the specified condition removed. + + + Returns an array with the element at the specified position removed. + The 0-based index of the element to remove from the returned array. + A new array with the specified item removed. + + + Removes the specified items from this array. + The items to remove if matches are found in this list. + The equality comparer to use in the search. + A new array with the elements removed. + + + Returns an array with the elements at the specified position removed. + The 0-based index of the starting element to remove from the array. + The number of elements to remove from the array. + The new array with the specified elements removed. + + + Finds the first element in the array equal to the specified value and replaces the value with the specified new value. + The value to find and replace in the array. + The value to replace the oldvalue with. + The equality comparer to use to compare values. + + is not found in the array. + A new array that contains even if the new and old values are the same. + + + Replaces the item at the specified index with the specified item. + The index of the item to replace. + The value to add to the list. + The new array that contains at the specified index. + + + Determines whether the current collection element precedes, occurs in the same position as, or follows another element in the sort order. + The element to compare with the current instance. + The object used to compare members of the current array with the corresponding members of other array. + The arrays are not the same length. + An integer that indicates whether the current element precedes, is in the same position or follows the other element. + + + Determines whether this array is structurally equal to the specified array. + The array to compare with the current instance. + An object that determines whether the current instance and other are structurally equal. + + if the two arrays are structurally equal; otherwise, . + + + Returns a hash code for the current instance. + An object that computes the hash code of the current object. + The hash code for the current instance. + + + Creates a mutable array that has the same contents as this array and can be efficiently mutated across multiple operations using standard mutable interfaces. + The new builder with the same contents as this array. + + + Gets a value indicating whether this array was declared but not initialized. + + if the is ; otherwise, . + + + Gets a value indicating whether this is empty or is not initialized. + + if the is or ; otherwise, . + + + Gets a value indicating whether this is empty. + + if the is empty; otherwise, . + + + Gets the element at the specified index in the immutable array. + The zero-based index of the element to get. + The element at the specified index in the immutable array. + + + Gets the number of elements in the array. + The number of elements in the array. + + + Gets the number of items in the collection. + Thrown if the property returns true. + Number of items in the collection. + + + Gets a value indicating whether this instance is read only. + + if this instance is read only; otherwise, . + + + Gets or sets the element at the specified index in the read-only list. + The zero-based index of the element to get. + Always thrown from the setter. + Thrown if the property returns true. + The element at the specified index in the read-only list. + + + Gets the number of items in the collection. + Thrown if the property returns true. + The number of items in the collection. + + + Gets the element at the specified index. + The index. + Thrown if the property returns true. + The element. + + + Gets the size of the array. + Thrown if the property returns true. + The number of items in the collection. + + + See the interface. Always returns since since immutable collections are thread-safe. + Boolean value determining whether the collection is thread-safe. + + + Gets the sync root. + An object for synchronizing access to the collection. + + + Gets a value indicating whether this instance is fixed size. + + if this instance is fixed size; otherwise, . + + + Gets a value indicating whether this instance is read only. + + if this instance is read only; otherwise, . + + + Gets or sets the at the specified index. + The index. + Always thrown from the setter. + Thrown if the property returns true. + The object at the specified index. + + + A writable array accessor that can be converted into an instance without allocating extra memory. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Adds the specified item to the array. + The object to add to the array. + + + Adds the specified items to the end of the array. + The items to add to the array. + + + Adds the specified items to the end of the array. + The items to add to the array. + The number of elements from the source array to add. + + + Adds the specified items to the end of the array. + The items to add to the array. + + + Adds the specified items to the end of the array. + The items to add to the array. + + + Adds the specified items to the end of the array. + The items to add to the array. + + + Adds the specified items to the end of the array. + The items to add to the array. + The number of elements from the source array to add. + + + Adds the specified items that derive from the type currently in the array, to the end of the array. + The items to add to end of the array. + The type that derives from the type of item already in the array. + + + Adds the specified items that derive from the type currently in the array, to the end of the array. + The items to add to the end of the array. + The type that derives from the type of item already in the array. + + + Adds the specified items that derive from the type currently in the array, to the end of the array. + The items to add to the end of the array. + The type that derives from the type of item already in the array. + + + Removes all items from the array. + + + Determines whether the array contains a specific value. + The object to locate in the array. + + if the object is found; otherwise, . + + + Copies the current contents to the specified array. + The array to copy to. + The index to start the copy operation. + + + Gets an object that can be used to iterate through the collection. + An object that can be used to iterate through the collection. + + + Determines the index of a specific item in the array. + The item to locate in the array. + The index of if it's found in the list; otherwise, -1. + + + Determines the index of the specified item. + The item to locate in the array. + The starting position of the search. + The index of if it's found in the list; otherwise, -1. + + + Determines the index of the specified item. + The item to locate in the array. + The starting position of the search. + The number of elements to search. + The index of if it's found in the list; otherwise, -1. + + + Determines the index for the specified item. + The item to locate in the array. + The index at which to begin the search. + The starting position of the search. + The equality comparer to use in the search. + The index of if it's found in the list; otherwise, -1. + + + Inserts an item in the array at the specified index. + The zero-based index at which to insert the item. + The object to insert into the array. + + + Gets a read-only reference to the element at the specified index. + The item index. + + is greater or equal to the array count. + The read-only reference to the element at the specified index. + + + Determines the 0-based index of the last occurrence of the specified item in this array. + The item to search for. + The 0-based index where the item was found; or -1 if it could not be found. + + + Determines the 0-based index of the last occurrence of the specified item in this array. + The item to search for. + The starting position of the search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Determines the 0-based index of the last occurrence of the specified item in this array. + The item to search for. + The starting position of the search. + The number of elements to search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Determines the 0-based index of the last occurrence of the specified item in this array. + The item to search for. + The starting position of the search. + The number of elements to search. + The equality comparer to use in the search. + The 0-based index into the array where the item was found; or -1 if it could not be found. + + + Extracts the internal array as an and replaces it with a zero length array. + When doesn't equal . + An immutable array containing the elements of the builder. + + + Removes the specified element. + The item to remove. + + if was found and removed; otherwise, . + + + Removes the item at the specified index from the array. + The zero-based index of the item to remove. + + + Reverses the order of elements in the collection. + + + Sorts the contents of the array. + + + Sorts the contents of the array. + The comparer to use for sorting. If comparer is , the default comparer for the elements type in the array is used. + + + Sorts the elements in the entire array using the specified . + The to use when comparing elements. + + is null. + + + Sorts the contents of the array. + The starting index for the sort. + The number of elements to include in the sort. + The comparer to use for sorting. If comparer is , the default comparer for the elements type in the array is used. + + + Returns an enumerator that iterates through the array. + An enumerator that iterates through the array. + + + Returns an enumerator that iterates through the array. + An enumerator that iterates through the array. + + + Creates a new array with the current contents of this . + A new array with the contents of this . + + + Returns an immutable array that contains the current contents of this . + An immutable array that contains the current contents of this . + + + Gets or sets the length of the internal array. When set, the internal array is reallocated to the given capacity if it is not already the specified length. + The length of the internal array. + + + Gets or sets the number of items in the array. + The number of items in the array. + + + Gets or sets the item at the specified index. + The index of the item to get or set. + The specified index is not in the array. + The item at the specified index. + + + Gets a value that indicates whether the is read-only. + + if the is read-only; otherwise, . + + + An array enumerator. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Advances to the next value in the array. + + if another item exists in the array; otherwise, . + + + Gets the current item. + The current item. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Determines whether the specified immutable dictionary contains the specified key/value pair. + The immutable dictionary to search. + The key to locate in the immutable dictionary. + The value to locate on the specified key, if the key is found. + The type of the keys in the immutable dictionary. + The type of the values in the immutable dictionary. + + if this map contains the specified key/value pair; otherwise, . + + + Creates an empty immutable dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable dictionary. + + + Creates an empty immutable dictionary that uses the specified key comparer. + The implementation to use to determine the equality of keys in the dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable dictionary. + + + Creates an empty immutable dictionary that uses the specified key and value comparers. + The implementation to use to determine the equality of keys in the dictionary. + The implementation to use to determine the equality of values in the dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable dictionary. + + + Creates a new immutable dictionary builder. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The new builder. + + + Creates a new immutable dictionary builder. + The key comparer. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The new builder. + + + Creates a new immutable dictionary builder. + The key comparer. + The value comparer. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The new builder. + + + Creates a new immutable dictionary that contains the specified items. + The items used to populate the dictionary before it's immutable. + The type of keys in the dictionary. + The type of values in the dictionary. + A new immutable dictionary that contains the specified items. + + + Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. + The comparer implementation to use to compare keys for equality. + The items to add to the dictionary before it's immutable. + The type of keys in the dictionary. + The type of values in the dictionary. + A new immutable dictionary that contains the specified items and uses the specified comparer. + + + Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. + The comparer implementation to use to compare keys for equality. + The comparer implementation to use to compare values for equality. + The items to add to the dictionary before it's immutable. + The type of keys in the dictionary. + The type of values in the dictionary. + A new immutable dictionary that contains the specified items and uses the specified comparer. + + + Gets the value for a given key if a matching key exists in the dictionary. + The dictionary to retrieve the value from. + The key to search for. + The type of the key. + The type of the value. + The value for the key, or default(TValue) if no matching key was found. + + + Gets the value for a given key if a matching key exists in the dictionary. + The dictionary to retrieve the value from. + The key to search for. + The default value to return if no matching key is found in the dictionary. + The type of the key. + The type of the value. + The value for the key, or if no matching key was found. + + + Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. + The source collection used to generate the immutable dictionary. + The function used to transform keys for the immutable dictionary. + The type of element in the source collection. + The type of key in the resulting immutable dictionary. + The immutable dictionary that contains elements from , with keys transformed by applying . + + + Constructs an immutable dictionary based on some transformation of a sequence. + The source collection used to generate the immutable dictionary. + The function used to transform keys for the immutable dictionary. + The key comparer to use for the dictionary. + The type of element in the source collection. + The type of key in the resulting immutable dictionary. + The immutable dictionary that contains elements from , with keys transformed by applying . + + + Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents. + The sequence of key/value pairs to enumerate. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable dictionary that contains the key/value pairs in the specified sequence. + + + Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. + The sequence of key/value pairs to enumerate. + The key comparer to use when building the immutable dictionary. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable dictionary that contains the key/value pairs in the specified sequence. + + + Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers. + The sequence of key/value pairs to enumerate. + The key comparer to use when building the immutable dictionary. + The value comparer to use for the immutable dictionary. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable dictionary that contains the key/value pairs in the specified sequence. + + + Creates an immutable dictionary from the current contents of the builder's dictionary. + The builder to create the immutable dictionary from. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable dictionary that contains the current contents in the builder's dictionary. + + + Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable dictionary that contains the items in the specified sequence. + + + Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The key comparer to use for the dictionary. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable dictionary that contains the items in the specified sequence. + + + Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The key comparer to use for the dictionary. + The value comparer to use for the dictionary. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable dictionary that contains the items in the specified sequence. + + + Represents an immutable, unordered collection of keys and values. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of the keys in the dictionary. + The type of the values in the dictionary. + + + Gets an empty immutable dictionary. + + + Adds an element with the specified key and value to the immutable dictionary. + The key of the element to add. + The value of the element to add. + The given key already exists in the dictionary but has a different value. + A new immutable dictionary that contains the additional key/value pair. + + + Adds the specified key/value pairs to the immutable dictionary. + The key/value pairs to add. + One of the given keys already exists in the dictionary but has a different value. + A new immutable dictionary that contains the additional key/value pairs. + + + Retrieves an empty immutable dictionary that has the same ordering and key/value comparison rules as this dictionary instance. + An empty dictionary with equivalent ordering and key/value comparison rules. + + + Determines whether this immutable dictionary contains the specified key/value pair. + The key/value pair to locate. + + if the specified key/value pair is found in the dictionary; otherwise, . + + + Determines whether the immutable dictionary contains an element with the specified key. + The key to locate. + + if the immutable dictionary contains an element with the specified key; otherwise, . + + + Determines whether the immutable dictionary contains an element with the specified value. + The value to locate. The value can be for reference types. + + if the dictionary contains an element with the specified value; otherwise, . + + + Returns an enumerator that iterates through the immutable dictionary. + An enumerator that can be used to iterate through the dictionary. + + + Removes the element with the specified key from the immutable dictionary. + The key of the element to remove. + A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. + + + Removes the elements with the specified keys from the immutable dictionary. + The keys of the elements to remove. + A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. + + + Sets the specified key and value in the immutable dictionary, possibly overwriting an existing value for the key. + The key of the entry to add. + The key value to set. + A new immutable dictionary that contains the specified key/value pair. + + + Sets the specified key/value pairs in the immutable dictionary, possibly overwriting existing values for the keys. + The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. + A new immutable dictionary that contains the specified key/value pairs. + + + Adds an item to the . + The object to add to the . + + + Removes all items from the . + + + Copies the elements of the to an , starting at a particular index. + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . + + + Adds an element with the provided key and value to the immutable dictionary. + The object to use as the key of the element to add. + The object to use as the value of the element to add. + + is . + An element with the same key already exists in the . + The is read-only. + + + Removes the element with the specified key from the generic dictionary. + The key of the element to remove. + + is . + The is read-only. + + if the element is successfully removed; otherwise, . This method also returns if was not found in the original generic dictionary. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Copies the elements of the dictionary to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Adds an element with the provided key and value to the immutable dictionary object. + The object to use as the key of the element to add. + The object to use as the value of the element to add. + + + Clears this instance. + The dictionary object is read-only. + + + Determines whether the immutable dictionary object contains an element with the specified key. + The key to locate in the dictionary object. + + if the dictionary contains an element with the key; otherwise, . + + + Returns an object for the immutable dictionary object. + An enumerator object for the dictionary object. + + + Removes the element with the specified key from the immutable dictionary object. + The key of the element to remove. + + + Returns an enumerator that iterates through a collection. + An enumerator object that can be used to iterate through the collection. + + + See the interface. + Key of the entry to be added. + Value of the entry to be added. + A new immutable dictionary that contains the additional key/value pair. + + + See the interface. + Sequence of key/value pairs to be added to the dictionary. + A new immutable dictionary that contains the additional key/value pairs. + + + Retrieves an empty dictionary that has the same ordering and key-value comparison rules as this dictionary instance. + The immutable dictionary instance. + + + See the interface. + Key of the entry to be removed. + A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary. + + + See the interface. + Sequence of keys to be removed. + A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. + + + See the interface. + Key of entry to be added. + Value of the entry to be added. + A new immutable dictionary that contains the specified key/value pair. + + + Applies a given set of key-value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary. + The key-value pairs to set on the map. Any keys that conflict with existing keys will replace the previous values. + A copy of the immutable dictionary with updated key-value pairs. + + + Creates an immutable dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. + A collection with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. + + + Determines whether this dictionary contains a specified key. + The key to search for. + The matching key located in the dictionary if found, or equalkey if no match is found. + + if a match for is found; otherwise, . + + + Gets the value associated with the specified key. + The key whose value will be retrieved. + When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + if the object that implements the dictionary contains an element with the specified key; otherwise, . + + + Gets an instance of the immutable dictionary that uses the specified key comparer. + The key comparer to use. + An instance of the immutable dictionary that uses the given comparer. + + + Gets an instance of the immutable dictionary that uses the specified key and value comparers. + The key comparer to use. + The value comparer to use. + An instance of the immutable dictionary that uses the given comparers. + + + Gets the number of key/value pairs in the immutable dictionary. + The number of key/value pairs in the dictionary. + + + Gets a value that indicates whether this instance of the immutable dictionary is empty. + + if this instance is empty; otherwise, . + + + Gets the associated with the specified key. + The type of the key. + The value associated with the specified key. If no results are found, the operation throws an exception. + + + Gets the key comparer for the immutable dictionary. + The key comparer. + + + Gets the keys in the immutable dictionary. + The keys in the immutable dictionary. + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the with the specified key. + The type of the key. + An object of type associated with the . + + + Gets the keys. + A collection containing the keys. + + + Gets the values. + A collection containing the values. + + + Gets a value indicating whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Gets a value indicating whether the object has a fixed size. + + if the object has a fixed size; otherwise, . + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the element with the specified key. + The key. + The value stored under the specified key. + + + Gets an containing the keys of the . + An containing the keys of the object that implements . + + + Gets an containing the values in the . + An containing the values in the object that implements . + + + Gets the value comparer used to determine whether values are equal. + The value comparer used to determine whether values are equal. + + + Gets the values in the immutable dictionary. + The values in the immutable dictionary. + + + Represents a hash map that mutates with little or no memory allocations and that can produce or build on immutable hash map instances very efficiently. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + + Adds an element that has the specified key and value to the immutable dictionary. + The key of the element to add. + The value of the element to add. + + is null. + An element with the same key already exists in the dictionary. + The dictionary is read-only. + + + Adds the specified item to the immutable dictionary. + The object to add to the dictionary. + The dictionary is read-only. + + + Adds a sequence of values to this collection. + The items to add to this collection. + + + Removes all items from the immutable dictionary. + The dictionary is read-only. + + + Determines whether the immutable dictionary contains a specific value. + The object to locate in the dictionary. + + if is found in the dictionary; otherwise, . + + + Determines whether the immutable dictionary contains an element that has the specified key. + The key to locate in the dictionary. + + is null. + + if the dictionary contains an element with the key; otherwise, . + + + Determines whether the immutable dictionary contains an element that has the specified value. + The value to locate in the immutable dictionary. The value can be for reference types. + + if the dictionary contains an element with the specified value; otherwise, . + + + Returns an enumerator that iterates through the immutable dictionary. + An enumerator that can be used to iterate through the collection. + + + Gets the value for a given key if a matching key exists in the dictionary. + The key to search for. + The value for the key, or default(TValue) if no matching key was found. + + + Gets the value for a given key if a matching key exists in the dictionary. + The key to search for. + The default value to return if no matching key is found in the dictionary. + The value for the key, or if no matching key was found. + + + Removes the element with the specified key from the immutable dictionary. + The key of the element to remove. + + is null. + The dictionary is read-only. + + if the element is successfully removed; otherwise, . This method also returns if was not found in the dictionary. + + + Removes the first occurrence of a specific object from the immutable dictionary. + The object to remove from the dictionary. + The dictionary is read-only. + + if was successfully removed from the dictionary; otherwise, . This method also returns false if is not found in the dictionary. + + + Removes any entries with keys that match those found in the specified sequence from the immutable dictionary. + The keys for entries to remove from the dictionary. + + + Copies the elements of the dictionary to an array of type , starting at the specified array index. + The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Copies the elements of the dictionary to an array of type , starting at the specified array index. + The one-dimensional array of type that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Adds an element with the provided key and value to the dictionary object. + The key of the element to add. + The value of the element to add. + + + Determines whether the dictionary object contains an element with the specified key. + The key to locate. + + if the dictionary contains an element with the key; otherwise, . + + + Returns an object for the dictionary. + + An object for the dictionary. + + + Removes the element with the specified key from the dictionary. + The key of the element to remove. + + + Returns an enumerator that iterates through a collection. + An enumerator object that can be used to iterate through the collection. + + + Creates an immutable dictionary based on the contents of this instance. + An immutable dictionary. + + + Determines whether this dictionary contains a specified key. + The key to search for. + The matching key located in the dictionary if found, or equalkey if no match is found. + + if a match for is found; otherwise, . + + + Returns the value associated with the specified key. + The key whose value will be retrieved. + When this method returns, contains the value associated with the specified key, if the key is found; otherwise, returns the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + if the object that implements the immutable dictionary contains an element with the specified key; otherwise, . + + + Gets the number of elements contained in the immutable dictionary. + The number of elements contained in the immutable dictionary. + + + Gets or sets the element with the specified key. + The element to get or set. + + is . + The property is being retrieved, and is not found. + The property is being set, and the is read-only. + The element that has the specified key. + + + Gets or sets the key comparer. + The key comparer. + + + Gets a collection that contains the keys of the immutable dictionary. + A collection that contains the keys of the object that implements the immutable dictionary. + + + Gets a value that indicates whether the collection is read-only. + + if the collection is read-only; otherwise, . + + + Gets a collection containing the keys of the generic dictionary. + A collection containing the keys of the object that implements the generic dictionary. + + + Gets a collection containing the values in the generic dictionary. + A collection containing the values in the object that implements the generic dictionary. + + + Gets a value that indicates whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Gets a value that indicates whether the object has a fixed size. + + if the object has a fixed size; otherwise, . + + + Gets a value that indicates whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the element with the specified key. + The key. + Value stored under specified key. + + + Gets an containing the keys of the . + An containing the keys of the object that implements . + + + Gets an containing the values in the . + An containing the values in the object that implements . + + + Gets or sets the value comparer. + The value comparer. + + + Gets a collection that contains the values of the immutable dictionary. + A collection that contains the values of the object that implements the dictionary. + + + Enumerates the contents of the immutable dictionary without allocating any memory. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + + Releases the resources used by the current instance of the class. + + + Advances the enumerator to the next element of the immutable dictionary. + The dictionary was modified after the enumerator was created. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the dictionary. + + + Sets the enumerator to its initial position, which is before the first element in the dictionary. + The dictionary was modified after the enumerator was created. + + + Gets the element at the current position of the enumerator. + The element in the dictionary at the current position of the enumerator. + + + Gets the current element. + Current element in enumeration. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable hash set. + The type of items to be stored in the immutable hash set. + An empty immutable hash set. + + + Creates a new immutable hash set that contains the specified item. + The item to prepopulate the hash set with. + The type of items in the immutable hash set. + A new immutable hash set that contains the specified item. + + + Creates a new immutable hash set that contains the specified array of items. + An array that contains the items to prepopulate the hash set with. + The type of items in the immutable hash set. + A new immutable hash set that contains the specified items. + + + Creates an empty immutable hash set that uses the specified equality comparer. + The object to use for comparing objects in the set for equality. + The type of items in the immutable hash set. + An empty immutable hash set. + + + Creates a new immutable hash set that contains the specified item and uses the specified equality comparer for the set type. + The object to use for comparing objects in the set for equality. + The item to prepopulate the hash set with. + The type of items in the immutable hash set. + A new immutable hash set that contains the specified item. + + + Creates a new immutable hash set that contains the items in the specified collection and uses the specified equality comparer for the set type. + The object to use for comparing objects in the set for equality. + An array that contains the items to prepopulate the hash set with. + The type of items stored in the immutable hash set. + A new immutable hash set that contains the specified items. + + + Creates a new immutable hash set builder. + The type of items stored by the collection. + The immutable hash set builder. + + + Creates a new immutable hash set builder. + The object to use for comparing objects in the set for equality. + The type of items stored by the collection. + The new immutable hash set builder. + + + Creates a new immutable hash set prefilled with the specified items. + The items to add to the hash set. + The type of items stored by the collection. + The new immutable hash set that contains the specified items. + + + Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type. + The object to use for comparing objects in the set for equality. + The items add to the collection before immutability is applied. + The type of items stored in the collection. + The new immutable hash set. + + + Enumerates a sequence and produces an immutable hash set of its contents. + The sequence to enumerate. + The type of the elements in the sequence. + An immutable hash set that contains the items in the specified sequence. + + + Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. + The sequence to enumerate. + The object to use for comparing objects in the set for equality. + The type of the elements in the sequence. + An immutable hash set that contains the items in the specified sequence and uses the specified equality comparer. + + + Creates an immutable hash set from the current contents of the builder's set. + The builder to create the immutable hash set from. + The type of the elements in the hash set. + An immutable hash set that contains the current contents in the builder's set. + + + Represents an immutable, unordered hash set. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the hash set. + + + Gets an immutable hash set for this type that uses the default . + + + Adds the specified element to the hash set. + The element to add to the set. + A hash set that contains the added value and any values previously held by the object. + + + Retrieves an empty immutable hash set that has the same sorting and ordering semantics as this instance. + An empty hash set that has the same sorting and ordering semantics as this instance. + + + Determines whether this immutable hash set contains the specified element. + The object to locate in the immutable hash set. + + if is found in the ; otherwise, . + + + Removes the elements in the specified collection from the current immutable hash set. + The collection of items to remove from this set. + A new set with the items removed; or the original set if none of the items were in the set. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Creates an immutable hash set that contains elements that exist in both this set and the specified set. + The collection to compare to the current set. + A new immutable set that contains any elements that exist in both sets. + + + Determines whether the current immutable hash set is a proper (strict) subset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper subset of the specified collection; otherwise, . + + + Determines whether the current immutable hash set is a proper (strict) superset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper superset of the specified collection; otherwise, . + + + Determines whether the current immutable hash set is a subset of a specified collection. + The collection to compare to the current set. + + if the current set is a subset of the specified collection; otherwise, . + + + Determines whether the current immutable hash set is a superset of a specified collection. + The collection to compare to the current set. + + if the current set is a superset of the specified collection; otherwise, . + + + Determines whether the current immutable hash set overlaps with the specified collection. + The collection to compare to the current set. + + if the current set and the specified collection share at least one common element; otherwise, . + + + Removes the specified element from this immutable hash set. + The element to remove. + A new set with the specified element removed, or the current set if the element cannot be found in the set. + + + Determines whether the current immutable hash set and the specified collection contain the same elements. + The collection to compare to the current set. + + if the sets are equal; otherwise, . + + + Creates an immutable hash set that contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + A new set that contains the elements that are present only in the current set or in the specified collection, but not both. + + + Adds an item to the set. + The object to add to the set. + The set is read-only. + + + Removes all items from this set. + The set is read-only. + + + Copies the elements of the set to an array, starting at a particular index. + The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Removes the first occurrence of a specific object from the set. + The object to remove from the set. + + if the element is successfully removed; otherwise, . + + + Returns an enumerator that iterates through the collection. + An enumerator that iterates through the collection. + + + Adds an element to the current set and returns a value that indicates whether the element was successfully added. + The element to add to the collection. + + if the element is added to the set; if the element is already in the set. + + + Removes all elements in the specified collection from the current set. + The collection of items to remove. + + + Modifies the current set so that it contains only elements that are also in a specified collection. + The collection to compare to the current collection. + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + The collection to compare to the current set. + + + Copies the elements of the set to an array, starting at a particular index. + The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through a set. + An enumerator that can be used to iterate through the set. + + + Adds the specified element to this immutable set. + The element to add. + A new set with the element added, or this set if the element is already in the set. + + + Retrieves an empty set that has the same sorting and ordering semantics as this instance. + An empty set that has the same sorting or ordering semantics as this instance. + + + Removes the elements in the specified collection from the current set. + The collection of items to remove from this set. + A new set with the items removed; or the original set if none of the items were in the set. + + + Creates an immutable set that contains elements that exist in both this set and the specified set. + The collection to compare to the current set. + A new immutable set that contains any elements that exist in both sets. + + + Removes the specified element from this immutable set. + The element to remove. + A new set with the specified element removed, or the current set if the element cannot be found in the set. + + + Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + A new set that contains the elements that are present only in the current set or in the specified collection, but not both. + + + Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. + The collection to add elements from. + A new immutable set with the items added; or the original set if all the items were already in the set. + + + Creates an immutable hash set that has the same contents as this set and can be efficiently mutated across multiple operations by using standard mutable interfaces. + A set with the same contents as this set that can be efficiently mutated across multiple operations by using standard mutable interfaces. + + + Searches the set for a given value and returns the equal value it finds, if any. + The value to search for. + The value from the set that the search found, or the original value if the search yielded no match. + A value indicating whether the search was successful. + + + Creates a new immutable hash set that contains all elements that are present in either the current set or in the specified collection. + The collection to add elements from. + A new immutable hash set with the items added; or the original set if all the items were already in the set. + + + Gets an instance of the immutable hash set that uses the specified equality comparer for its search methods. + The equality comparer to use. + An instance of this immutable hash set that uses the given comparer. + + + Gets the number of elements in the immutable hash set. + The number of elements in the hash set. + + + Gets a value that indicates whether the current immutable hash set is empty. + + if this instance is empty; otherwise, . + + + Gets the object that is used to obtain hash codes for the keys and to check the equality of values in the immutable hash set. + The comparer used to obtain hash codes for the keys and check equality. + + + See the interface. + + + See the interface. + + + See . + + + Represents a hash set that mutates with little or no memory allocations and that can produce or build on immutable hash set instances very efficiently. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Adds the specified item to the immutable hash set. + The item to add. + + if the item did not already belong to the collection; otherwise, . + + + Removes all items from the immutable hash set. + The hash set is read-only. + + + Determines whether the immutable hash set contains a specific value. + The object to locate in the hash set. + + if is found in the hash set ; otherwise, . + + + Removes all elements in the specified collection from the current hash set. + The collection of items to remove from the set. + + + Returns an enumerator that iterates through the immutable hash set. + An enumerator that can be used to iterate through the set. + + + Modifies the current set so that it contains only elements that are also in a specified collection. + The collection to compare to the current set. + + + Determines whether the current set is a proper (strict) subset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper subset of ; otherwise, . + + + Determines whether the current set is a proper (strict) superset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper superset of ; otherwise, . + + + Determines whether the current set is a subset of a specified collection. + The collection to compare to the current set. + + if the current set is a subset of ; otherwise, . + + + Determines whether the current set is a superset of a specified collection. + The collection to compare to the current set. + + if the current set is a superset of ; otherwise, . + + + Determines whether the current set overlaps with the specified collection. + The collection to compare to the current set. + + if the current set and share at least one common element; otherwise, . + + + Removes the first occurrence of a specific object from the immutable hash set. + The object to remove from the set. + The set is read-only. + + if was successfully removed from the set ; otherwise, . This method also returns if is not found in the original set. + + + Determines whether the current set and the specified collection contain the same elements. + The collection to compare to the current set. + + if the current set is equal to ; otherwise, . + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + + + Adds an item to the hash set. + The object to add to the set. + The set is read-only. + + + Copies the elements of the hash set to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the hash set. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An enumerator that can be used to iterate through the collection. + + + Creates an immutable hash set based on the contents of this instance. + An immutable set. + + + Searches the set for a given value and returns the equal value it finds, if any. + The value for which to search. + The value from the set that the search found, or the original value if the search yielded no match. + A value indicating whether the search was successful. + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + The collection to compare to the current set. + + + Gets the number of elements contained in the immutable hash set. + The number of elements contained in the immutable hash set. + + + Gets or sets the key comparer. + The key comparer. + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Enumerates the contents of the immutable hash set without allocating any memory. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Releases the resources used by the current instance of the class. + + + Advances the enumerator to the next element of the immutable hash set. + The hash set was modified after the enumerator was created. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the hash set. + + + Sets the enumerator to its initial position, which is before the first element in the hash set. + The hash set was modified after the enumerator was created. + + + Gets the element at the current position of the enumerator. + The element at the current position of the enumerator. + + + Gets the current element. + + + Contains interlocked exchange mechanisms for immutable collections. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Obtains the value from a dictionary after having added it or updated an existing entry. + The variable or field to atomically update if the specified is not in the dictionary. + The key for the value to add or update. + The value to use if no previous value exists. + The function that receives the key and prior value and returns the new value with which to update the dictionary. + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The added or updated value. + + + Obtains the value from a dictionary after having added it or updated an existing entry. + The variable or field to atomically update if the specified is not in the dictionary. + The key for the value to add or update. + The function that receives the key and returns a new value to add to the dictionary when no value previously exists. + The function that receives the key and prior value and returns the new value with which to update the dictionary. + The type of key stored by the dictionary. + The type of value stored by the dictionary. + The added or updated value. + + + Atomically enqueues an element to the end of a queue. + The variable or field to atomically update. + The value to enqueue. + The type of items contained in the collection. + + + Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. + The variable or field to atomically update if the specified key is not in the dictionary. + The key for the value to get or add. + The value to add to the dictionary the key is not found. + The type of the keys contained in the collection. + The type of the values contained in the collection. + The value at the specified key or if the key was not present. + + + Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. + The variable or field to atomically update if the specified is not in the dictionary. + The key for the value to retrieve or add. + The function to execute to obtain the value to insert into the dictionary if the key is not found. This delegate will not be invoked more than once. + The type of the keys contained in the collection. + The type of the values contained in the collection. + The value at the specified key or if the key was not present. + + + Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary. + The variable or field to update if the specified is not in the dictionary. + The key for the value to retrieve or add. + The function to execute to obtain the value to insert into the dictionary if the key is not found. + The argument to pass to the value factory. + The type of the keys contained in the collection. + The type of the values contained in the collection. + The type of the argument supplied to the value factory. + The value at the specified key or if the key was not present. + + + Compares two immutable arrays for equality and, if they are equal, replaces one of the arrays. + The destination, whose value is compared with and possibly replaced. + The value that replaces the destination value if the comparison results in equality. + The value that is compared to the value at . + The type of element stored by the array. + The original value in . + + + Sets an array to the specified array and returns a reference to the original array, as an atomic operation. + The array to set to the specified value. + The value to which the parameter is set. + The type of element stored by the array. + The original value of . + + + Sets an array to the specified array if the array has not been initialized. + The array to set to the specified value. + The value to which the parameter is set, if it's not initialized. + The type of element stored by the array. + + if the array was assigned the specified value; otherwise, . + + + Pushes a new element onto the stack. + The stack to update. + The value to push on the stack. + The type of items in the stack. + + + Adds the specified key and value to the dictionary if the key is not in the dictionary. + The dictionary to update with the specified key and value. + The key to add, if is not already defined in the dictionary. + The value to add. + The type of the keys contained in the collection. + The type of the values contained in the collection. + + if the key is not in the dictionary; otherwise, . + + + Atomically removes and returns the specified element at the head of the queue, if the queue is not empty. + The variable or field to atomically update. + Set to the value from the head of the queue, if the queue not empty. + The type of items in the queue. + + if the queue is not empty and the head element is removed; otherwise, . + + + Removes an element from the top of the stack, if there is an element to remove. + The stack to update. + Receives the value removed from the stack, if the stack is not empty. + The type of items in the stack. + + if an element is removed from the stack; otherwise, . + + + Removes the element with the specified key, if the key exists. + The dictionary to update. + The key to remove. + Receives the value of the removed item, if the dictionary is not empty. + The type of the keys contained in the collection. + The type of the values contained in the collection. + + if the key was found and removed; otherwise, . + + + Sets the specified key to the specified value if the specified key already is set to a specific value. + The dictionary to update. + The key to update. + The new value to set. + The current value for in order for the update to succeed. + The type of the keys contained in the collection. + The type of the values contained in the collection. + + if and are present in the dictionary and comparison was updated to ; otherwise, . + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. + The variable or field to be changed, which may be accessed by multiple threads. + A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads. + The type of data. + + if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. + + + Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. + The transformation is retried as many times as necessary to win the optimistic locking race. + The immutable array to be changed. + A function that produces the new array from the old. This function should be side-effect free, as it may run multiple times when races occur with other threads. + The type of data in the immutable array. + + if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. + + + Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race. + The variable or field to be changed, which may be accessed by multiple threads. + A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads. + The argument to pass to . + The type of data. + The type of argument passed to the . + + if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. + + + Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. + The transformation is retried as many times as necessary to win the optimistic locking race. + The immutable array to be changed. + A function that produces the new array from the old. This function should be side-effect free, as it may run multiple times when races occur with other threads. + The argument to pass to . + The type of data in the immutable array. + The type of argument passed to the . + + if the location's value is changed by applying the result of the function; if the location's value remained the same because the last invocation of returned the existing value. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable list. + The type of items to be stored in the . + An empty immutable list. + + + Creates a new immutable list that contains the specified item. + The item to prepopulate the list with. + The type of items in the . + A new that contains the specified item. + + + Creates a new immutable list that contains the specified array of items. + An array that contains the items to prepopulate the list with. + The type of items in the . + A new immutable list that contains the specified items. + + + Creates a new immutable list builder. + The type of items stored by the collection. + The immutable collection builder. + + + Creates a new immutable list that contains the specified items. + The items to add to the list. + The type of items in the . + An immutable list that contains the specified items. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the list. + The list to search. + The object to locate in the list. The value can be null for reference types. + The type of items in the list. + The zero-based index of the first occurrence of item within the range of elements in the list that extends from index to the last element, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the list. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The equality comparer to use in the search. + The type of items in the list. + The zero-based index of the first occurrence of item within the range of elements in the immutable list that extends from index to the last element, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The type of items in the list. + The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements in the section to search. + The type of items in the list. + The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The type of items in the list. + The zero-based index of the last occurrence of item within the entire the Immutable list, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The equality comparer to use in the search. + The type of items in the list. + The zero-based index of the last occurrence of item within the entire the Immutable list, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The zero-based starting index of the backward search. + The type of items in the list. + The zero-based index of the last occurrence of item within the range of elements in the Immutable list that extends from the first element to index, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. + The list to search. + The object to locate in the Immutable list. The value can be null for reference types. + The zero-based starting index of the backward search. + The number of elements in the section to search. + The type of items in the list. + The zero-based index of the last occurrence of item within the range of elements in the Immutable list that extends from the first element to index, if found; otherwise, -1. + + + Removes the specified value from this list. + The list to search. + The value to remove. + The type of items in the list. + A new immutable list with the element removed, or this list if the element is not in this list. + + + Removes the specified values from this list. + The list to search. + The items to remove if matches are found in this list. + The type of items in the list. + A new immutable list with the elements removed. + + + Replaces the first equal element in the list with the specified element. + The list to search. + The element to replace. + The element to replace the old element with. + The type of items in the list. + Thrown when the old value does not exist in the list. + The new list -- even if the value being replaced is equal to the new value for that position. + + + Enumerates a sequence and produces an immutable list of its contents. + The sequence to enumerate. + The type of the elements in the sequence. + An immutable list that contains the items in the specified sequence. + + + Creates an immutable list from the current contents of the builder's collection. + The builder to create the immutable list from. + The type of the elements in the list. + An immutable list that contains the current contents in the builder's collection. + + + Represents an immutable list, which is a strongly typed list of objects that can be accessed by index. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the list. + + + Gets an empty set with the default sort comparer. + + + Adds the specified object to the end of the immutable list. + The object to add. + A new immutable list with the object added. + + + Adds the elements of the specified collection to the end of the immutable list. + The collection whose elements will be added to the end of the list. + A new immutable list with the elements added. + + + Searches the entire sorted list for an element using the default comparer and returns the zero-based index of the element. + The object to locate. The value can be for reference types. + The default comparer cannot find a comparer implementation of the for type T. + The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . + + + Searches the entire sorted list for an element using the specified comparer and returns the zero-based index of the element. + The object to locate. The value can be null for reference types. + The comparer implementation to use when comparing elements or null to use the default comparer. + comparer is , and the default comparer cannot find an comparer implementation for type T. + The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . + + + Searches a range of elements in the sorted list for an element using the specified comparer and returns the zero-based index of the element. + The zero-based starting index of the range to search. + The length of the range to search. + The object to locate. The value can be null for reference types. + The comparer implementation to use when comparing elements, or to use the default comparer. + index is less than 0 or is less than 0. + index and do not denote a valid range in the list. + + is , and the default comparer cannot find an comparer implementation for type T. + The zero-based index of item in the sorted list, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of . + + + Removes all elements from the immutable list. + An empty list that retains the same sort or unordered semantics that this instance has. + + + Determines whether this immutable list contains the specified value. + The value to locate. + + if the list contains the specified value; otherwise, . + + + Converts the elements in the current immutable list to another type, and returns a list containing the converted elements. + A delegate that converts each element from one type to another type. + The type of the elements of the target array. + A list of the target type containing the converted elements from the current . + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the beginning of the target array. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Copies a range of elements from the immutable list to a compatible one-dimensional array, starting at the specified index of the target array. + The zero-based index in the source immutable list at which copying begins. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + + + Determines whether the immutable list contains elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to search for. + + if the immutable list contains one or more elements that match the conditions defined by the specified predicate; otherwise, . + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . + + + Retrieves all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to search for. + An immutable list that contains all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty immutable list. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the immutable list that starts at the specified index and contains the specified number of elements. + The zero-based starting index of the search. + The number of elements in the section to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, ?1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. + The zero-based starting index of the search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, ?1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, ?1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The last element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index. + The zero-based starting index of the backward search. + The number of elements in the section to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. + The zero-based starting index of the backward search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, ?1. + + + Performs the specified action on each element of the immutable list. + The delegate to perform on each element of the immutable list. + + + Returns an enumerator that iterates through the immutable list. + An enumerator that can be used to iterate through the immutable list. + + + Creates a shallow copy of a range of elements in the source immutable list. + The zero-based index at which the range starts. + The number of elements in the range. + A shallow copy of a range of elements in the source immutable list. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the entire immutable list. + The object to locate in the immutable list. The value can be for reference types. + The zero-based index of the first occurrence of within the entire immutable list, if found; otherwise, ?1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements. + The object to locate in the list The value can be null for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements in the section to search. + The equality comparer to use in the search. + The zero-based index of the first occurrence of item within the range of elements in the list that starts at index and contains count number of elements, if found; otherwise, -1. + + + Inserts the specified object into the immutable list at the specified index. + The zero-based index at which to insert the object. + The object to insert. + The new immutable list after the object is inserted. + + + Inserts the elements of a collection into the immutable list at the specified index. + The zero-based index at which to insert the elements. + The collection whose elements should be inserted. + The new immutable list after the elements are inserted. + + + Gets a read-only reference to the element of the set at the given . + The 0-based index of the element in the set to return. + + is negative or not less than . + A read-only reference to the element at the given position. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the list that contains the specified number of elements and ends at the specified index. + The object to locate in the list. The value can be null for reference types. + The zero-based starting index of the backward search. + The number of elements in the section to search. + The equality comparer to use in the search. + The zero-based index of the last occurrence of item within the range of elements in the list that contains count number of elements and ends at index, if found; otherwise, -1. + + + Removes the first occurrence of the specified object from this immutable list. + The object to remove. + A new list with the object removed, or this list if the specified object is not in this list. + + + Removes the first occurrence of the object that matches the specified value from this immutable list. + The value of the element to remove from the list. + The equality comparer to use in the search. + A new list with the object removed, or this list if the specified object is not in this list. + + + Removes all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to remove. + The new list with the elements removed. + + + Removes the element at the specified index. + The zero-based index of the element to remove. + A new list with the element removed. + + + Removes a range of elements from this immutable list. + The collection whose elements should be removed if matches are found in this list. + A new list with the elements removed. + + + Removes the specified values from this list. + The items to remove if matches are found in this list. + The equality comparer to use in the search. + A new list with the elements removed. + + + Removes a range of elements, starting from the specified index and containing the specified number of elements, from this immutable list. + The starting index to begin removal. + The number of elements to remove. + A new list with the elements removed. + + + Replaces the specified element in the immutable list with a new element. + The element to replace. + The element to replace with. + + does not exist in the immutable list. + The new list with the replaced element, even if it is equal to the old element. + + + Replaces the specified element in the immutable list with a new element. + The element to replace in the list. + The element to replace with. + The comparer to use to check for equality. + A new list with the object replaced, or this list if the specified object is not in this list. + + + Reverses the order of the elements in the entire immutable list. + The reversed list. + + + Reverses the order of the elements in the specified range of the immutable list. + The zero-based starting index of the range to reverse. + The number of elements in the range to reverse. + The reversed list. + + + Replaces an element at a given position in the immutable list with the specified element. + The position in the list of the element to replace. + The element to replace the old element with. + The new list with the replaced element, even if it is equal to the old element at that position. + + + Sorts the elements in the entire immutable list using the default comparer. + The sorted list. + + + Sorts the elements in the entire immutable list using the specified comparer. + The implementation to use when comparing elements, or to use the default comparer (). + The sorted list. + + + Sorts the elements in the entire immutable list using the specified comparer. + The delegate to use when comparing elements. + + is . + The sorted list. + + + Sorts a range of elements in the immutable list using the specified comparer. + The zero-based starting index of the range to sort. + The length of the range to sort. + The implementation to use when comparing elements, or to use the default comparer (). + The sorted list. + + + Adds the specified item to the immutable list. + The item to add. + Always thrown. + + + Removes all items from the immutable list. + + + + Removes the first occurrence of a specific object from the immutable list. + The object to remove. + Always thrown. + + if was successfully removed from the list; otherwise, . This method also returns if is not found in the original list. + + + Returns an enumerator that iterates through the immutable list. + An enumerator that can be used to iterate through the list. + + + Inserts an object in the immutable list at the specified index. + The zero-based index at which should be inserted. + The object to insert. + + + + Removes the value at the specified index. + The zero-based index of the item to remove. + + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the specified array index. + The one-dimensional array that is the destination of the elements copied from immutable list. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through the immutable list. + An enumerator that can be used to iterate through the list. + + + Adds an item to the immutable list. + The object to add to the list. + Always thrown. + The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the list. + + + Removes all items from the immutable list. + Always thrown. + + + Determines whether the immutable list contains a specific value. + The object to locate in the list. + + + if the object is found in the list; otherwise, . + + + Determines the index of a specific item in the immutable list. + The object to locate in the list. + + The index of if found in the list; otherwise, -1. + + + Inserts an item into the immutable list at the specified index. + The zero-based index at which should be inserted. + The object to insert into the list. + Always thrown. + + + Removes the first occurrence of a specific object from the immutable list. + The object to remove from the list. + Always thrown. + + + Removes the item at the specified index of the immutable list. + The zero-based index of the item to remove. + Always thrown. + + + Adds the specified value to this immutable list. + The value to add. + A new list with the element added. + + + Adds the specified values to this immutable list. + The values to add. + A new list with the elements added. + + + Retrieves an empty list that has the same sorting and ordering semantics as this instance. + An empty list that has the same sorting and ordering semantics as this instance. + + + Inserts the specified element at the specified index in the immutable list. + The index at which to insert the value. + The element to insert. + A new immutable list that includes the specified element. + + + Inserts the specified elements at the specified index in the immutable list. + The index at which to insert the elements. + The elements to insert. + A new immutable list that includes the specified elements. + + + Removes the element with the specified value from the list. + The value of the element to remove from the list. + The comparer to use to compare elements for equality. + A new with the specified element removed. + + + Removes all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to remove. + A new immutable list with the elements removed. + + + Removes the element at the specified index of the immutable list. + The index of the element to remove. + A new list with the element removed. + + + Removes a range of elements from this immutable list that match the items specified. + The range of items to remove from the list, if found. + The equality comparer to use to compare elements. + + or is . + An immutable list with the items removed. + + + Removes the specified number of elements at the specified location from this list. + The starting index of the range of elements to remove. + The number of elements to remove. + A new list with the elements removed. + + + Replaces an element in the list with the specified element. + The element to replace. + The element to replace the old element with. + The equality comparer to use in the search. + Thrown when the old value does not exist in the list. + The new list. + + + Replaces an element in the list at a given position with the specified element. + The position in the list of the element to replace. + The element to replace the old element with. + The new list. + + + Creates a list that has the same contents as this list and can be efficiently mutated across multiple operations using standard mutable interfaces. + The created list with the same contents as this list. + + + Determines whether every element in the immutable list matches the conditions defined by the specified predicate. + The delegate that defines the conditions to check against the elements. + + if every element in the immutable list matches the conditions defined by the specified predicate; otherwise, . If the list has no elements, the return value is . + + + Gets the number of elements contained in the list. + The number of elements in the list. + + + Gets a value that indicates whether this list is empty. + + if the list is empty; otherwise, . + + + Gets the element at the specified index of the list. + The index of the element to retrieve. + In a get operation, is negative or not less than . + The element at the specified index. + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the value at the specified index. + The zero-based index of the item to access. + Thrown from getter when is negative or not less than . + Always thrown from the setter. + Value stored in the specified index. + + + This type is immutable, so it is always thread-safe. See the interface. + Boolean value determining whether the collection is thread-safe. + + + See . + Object used for synchronizing access to the collection. + + + Gets a value indicating whether the has a fixed size. + + if the has a fixed size; otherwise, . + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the at the specified index. + The index. + Thrown from getter when is negative or not less than . + Always thrown from the setter. + The value at the specified index. + + + Represents a list that mutates with little or no memory allocations and that can produce or build on immutable list instances very efficiently. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Adds an item to the immutable list. + The item to add to the list. + + + Adds a series of elements to the end of this list. + The elements to add to the end of the list. + + + Searches the entire for an element using the default comparer and returns the zero-based index of the element. + The object to locate. The value can be null for reference types. + The default comparer cannot find an implementation of the generic interface or the interface for type T. + The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . + + + Searches the entire for an element using the specified comparer and returns the zero-based index of the element. + The object to locate. This value can be null for reference types. + The implementation to use when comparing elements, or for the default comparer. + + is , and the default comparer cannot find an implementation of the generic interface or the interface for type T. + The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . + + + Searches the specified range of the for an element using the specified comparer and returns the zero-based index of the element. + The zero-based starting index of the range to search. + The length of the range to search. + The object to locate. This value can be null for reference types. + The implementation to use when comparing elements, or for the default comparer. + + is less than 0. +-or- + + is less than 0. + + and do not denote a valid range in the . + + is , and the default comparer cannot find an implementation of the generic interface or the interface for type T. + The zero-based index of item in the , if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than . + + + Removes all items from the immutable list. + + + Determines whether the immutable list contains a specific value. + The object to locate in the list. + + if item is found in the list; otherwise, . + + + Creates a new immutable list from the list represented by this builder by using the converter function. + The converter function. + The type of the output of the delegate converter function. + A new immutable list from the list represented by this builder. + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the beginning of the target array. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + Copies the entire immutable list to a compatible one-dimensional array, starting at the specified index of the target array. + The zero-based index in the source immutable list at which copying begins. + The one-dimensional array that is the destination of the elements copied from the immutable list. The array must have zero-based indexing. + The zero-based index in at which copying begins. + The number of elements to copy. + + + Determines whether the immutable list contains elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to search for. + + if the immutable list contains one or more elements that match the conditions defined by the specified predicate; otherwise, . + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type . + + + Retrieves all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to search for. + An immutable list containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty immutable list. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the immutable list that starts at the specified index and contains the specified number of elements. + The zero-based starting index of the search. + The number of elements in the section to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. + The zero-based starting index of the search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The last element that matches the conditions defined by the specified predicate, found; otherwise, the default value for type . + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index. + The zero-based starting index of the backward search. + The number of elements in the section to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. + The zero-based starting index of the backward search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire immutable list. + The delegate that defines the conditions of the element to search for. + The zero-based index of the last occurrence of an element that matches the conditions defined by , if found; otherwise, -1. + + + Performs the specified action on each element of the list. + The delegate to perform on each element of the list. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the list. + + + Creates a shallow copy of a range of elements in the source immutable list. + The zero-based index at which the range starts. + The number of elements in the range. + A shallow copy of a range of elements in the source immutable list. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list. + The object to locate in the immutable list. The value can be for reference types. + The zero-based index of the first occurrence of within the range of elements in the immutable list, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The zero-based index of the first occurrence of item within the range of elements in the immutable list that extends from to the last element, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that starts at the specified index and contains the specified number of elements. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements in the section to search. + The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the that starts at the specified index and contains the specified number of elements. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements to search. + The value comparer to use for comparing elements for equality. + The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1 + + + Inserts an item to the immutable list at the specified index. + The zero-based index at which should be inserted. + The object to insert into the immutable list. + + + Inserts the elements of a collection into the immutable list at the specified index. + The zero-based index at which the new elements should be inserted. + The collection whose elements should be inserted into the immutable list. The collection itself cannot be , but it can contain elements that are null, if type T is a reference type. + + + Gets a read-only reference to the value for a given into the list. + The index of the desired element. + A read-only reference to the value at the specified . + + + Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. + The object to locate in the immutable list. The value can be for reference types. + The zero-based index of the last occurrence of within the entire immutable list, if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the backward search. + The zero-based index of the last occurrence of within the range of elements in the immutable list that extends from the first element to , if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the backward search. + The number of elements in the section to search. + The zero-based index of the last occurrence of within the range of elements in the immutable list that contains number of elements and ends at , if found; otherwise, -1. + + + Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index. + The object to locate in the immutable list. The value can be for reference types. + The zero-based starting index of the search. 0 (zero) is valid in an empty list. + The number of elements to search. + The value comparer to use for comparing elements for equality. + The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at and contains number of elements, if found; otherwise, -1 + + + Removes the first occurrence of a specific object from the immutable list. + The object to remove from the list. + + if item was successfully removed from the list; otherwise, . This method also returns if item is not found in the list. + + + Removes all the elements that match the conditions defined by the specified predicate. + The delegate that defines the conditions of the elements to remove. + The number of elements removed from the immutable list. + + + Removes the item at the specified index of the immutable list. + The zero-based index of the item to remove from the list. + + + Reverses the order of the elements in the entire immutable list. + + + Reverses the order of the elements in the specified range of the immutable list. + The zero-based starting index of the range to reverse. + The number of elements in the range to reverse. + + + Sorts the elements in the entire immutable list by using the default comparer. + + + Sorts the elements in the entire immutable list by using the specified comparer. + The implementation to use when comparing elements, or to use the default comparer (). + + + Sorts the elements in the entire immutable list by using the specified comparison object. + The object to use when comparing elements. + + is . + + + Sorts the elements in a range of elements in the immutable list by using the specified comparer. + The zero-based starting index of the range to sort. + The length of the range to sort. + The implementation to use when comparing elements, or to use the default comparer (). + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Copies the elements of the list to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the list. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Adds an item to the list. + The object to add to the list. + + The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection. + + + Removes all items from the list. + + + + Determines whether the list contains a specific value. + The object to locate in the list. + + + if the is found in the list; otherwise, . + + + Determines the index of a specific item in the list. + The object to locate in the list. + + The index of if found in the list; otherwise, -1. + + + Inserts an item to the list at the specified index. + The zero-based index at which should be inserted. + The object to insert into the list. + + + + Removes the first occurrence of a specific object from the list. + The object to remove from the list. + + + + Creates an immutable list based on the contents of this instance. + An immutable list. + + + Determines whether every element in the immutable list matches the conditions defined by the specified predicate. + The delegate that defines the conditions to check against the elements. + + if every element in the immutable list matches the conditions defined by the specified predicate; otherwise, . If the list has no elements, the return value is . + + + Gets the number of elements in this immutable list. + The number of elements in this list. + + + Gets or sets the value for a given index in the list. + The index of the item to get or set. + The value at the specified index. + + + Gets a value that indicates whether this instance is read-only. + Always . + + + Gets a value that indicates whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Gets a value that indicates whether the has a fixed size. + + if the has a fixed size; otherwise, . + + + Gets a value that indicates whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the at the specified index. + The index. + The object at the specified index. + + + Enumerates the contents of a binary tree. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Releases the resources used by the current instance of the class. + + + Advances enumeration to the next element of the immutable list. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the list. + + + Sets the enumerator to its initial position, which is before the first element in the immutable list. + + + Gets the element at the current position of the enumerator. + The element at the current position of the enumerator. + + + The current element. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable queue. + The type of items to be stored in the immutable queue. + An empty immutable queue. + + + Creates a new immutable queue that contains the specified item. + The item to prepopulate the queue with. + The type of items in the immutable queue. + A new immutable queue that contains the specified item. + + + Creates a new immutable queue that contains the specified array of items. + An array that contains the items to prepopulate the queue with. + The type of items in the immutable queue. + A new immutable queue that contains the specified items. + + + Creates a new immutable queue that contains the specified items. + The items to add to the queue before immutability is applied. + The type of elements in the queue. + An immutable queue that contains the specified items. + + + Removes the item at the beginning of the immutable queue, and returns the new queue. + The queue to remove the item from. + When this method returns, contains the item from the beginning of the queue. + The type of elements in the immutable queue. + The stack is empty. + The new queue with the item removed. + + + Represents an immutable queue. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the queue. + + + Removes all objects from the immutable queue. + The empty immutable queue. + + + Removes the element at the beginning of the immutable queue, and returns the new queue. + The queue is empty. + The new immutable queue; never . + + + Removes the item at the beginning of the immutable queue, and returns the new queue. + When this method returns, contains the element from the beginning of the queue. + The queue is empty. + The new immutable queue with the beginning element removed. + + + Adds an element to the end of the immutable queue, and returns the new queue. + The element to add. + The new immutable queue. + + + Returns an enumerator that iterates through the immutable queue. + An enumerator that can be used to iterate through the queue. + + + Returns the element at the beginning of the immutable queue without removing it. + The queue is empty. + The element at the beginning of the queue. + + + Gets a read-only reference to the element at the front of the queue. + The queue is empty. + Read-only reference to the element at the front of the queue. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Removes all elements from the immutable queue. + The empty immutable queue. + + + Removes the element at the beginning of the immutable queue, and returns the new queue. + Thrown when the queue is empty. + The new immutable queue; never . + + + Adds an element to the end of the immutable queue, and returns the new queue. + The element to add. + The new immutable queue. + + + Gets an empty immutable queue. + An empty immutable queue. + + + Gets a value that indicates whether this immutable queue is empty. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + if this queue is empty; otherwise, . + + + Enumerates the contents of an immutable queue without allocating any memory. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Advances the enumerator to the next element of the immutable queue. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the queue. + + + Gets the element at the current position of the enumerator. + The element at the current position of the enumerator. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable sorted dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable sorted dictionary. + + + Creates an empty immutable sorted dictionary that uses the specified key comparer. + The implementation to use to determine the equality of keys in the dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable sorted dictionary. + + + Creates an empty immutable sorted dictionary that uses the specified key and value comparers. + The implementation to use to determine the equality of keys in the dictionary. + The implementation to use to determine the equality of values in the dictionary. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + An empty immutable sorted dictionary. + + + Creates a new immutable sorted dictionary builder. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The immutable collection builder. + + + Creates a new immutable sorted dictionary builder. + The key comparer. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The immutable collection builder. + + + Creates a new immutable sorted dictionary builder. + The key comparer. + The value comparer. + The type of keys stored by the dictionary. + The type of values stored by the dictionary. + The immutable collection builder. + + + Creates a new immutable sorted dictionary from the specified range of items with the specified key comparer. + The comparer implementation to use to evaluate keys for equality and sorting. + The items to add to the sorted dictionary. + The type of keys stored in the dictionary. + The type of values stored in the dictionary. + The new immutable sorted dictionary that contains the specified items and uses the specified key comparer. + + + Creates a new immutable sorted dictionary from the specified range of items with the specified key and value comparers. + The comparer implementation to use to compare keys for equality and sorting. + The comparer implementation to use to compare values for equality. + The items to add to the sorted dictionary before it's immutable. + The type of keys stored in the dictionary. + The type of values stored in the dictionary. + An immutable sorted dictionary that contains the specified items and uses the specified comparers. + + + Creates an immutable sorted dictionary that contains the specified items and uses the default comparer. + The items to add to the sorted dictionary before it's immutable. + The type of keys stored in the dictionary. + The type of values stored in the dictionary. + An immutable sorted dictionary that contains the specified items. + + + Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents. + The sequence of key/value pairs to enumerate. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable sorted dictionary that contains the key/value pairs in the specified sequence. + + + Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. + The sequence of key/value pairs to enumerate. + The key comparer to use when building the immutable dictionary. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable sorted dictionary that contains the key/value pairs in the specified sequence. + + + Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. + The sequence of key/value pairs to enumerate. + The key comparer to use when building the immutable dictionary. + The value comparer to use for the immutable dictionary. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable sorted dictionary that contains the key/value pairs in the specified sequence. + + + Creates an immutable sorted dictionary from the current contents of the builder's dictionary. + The builder to create the immutable sorted dictionary from. + The type of the keys in the dictionary. + The type of the values in the dictionary. + An immutable sorted dictionary that contains the current contents in the builder's dictionary. + + + Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable sorted dictionary that contains the items in the specified sequence. + + + Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The key comparer to use for the dictionary. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable dictionary that contains the items in the specified sequence. + + + Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. + The sequence to enumerate to generate the dictionary. + The function that will produce the key for the dictionary from each sequence element. + The function that will produce the value for the dictionary from each sequence element. + The key comparer to use for the dictionary. + The value comparer to use for the dictionary. + The type of the elements in the sequence. + The type of the keys in the resulting dictionary. + The type of the values in the resulting dictionary. + An immutable sorted dictionary that contains the items in the specified sequence. + + + Represents an immutable sorted dictionary. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of the key contained in the dictionary. + The type of the value contained in the dictionary. + + + Gets an empty immutable sorted dictionary. + + + Adds an element with the specified key and value to the immutable sorted dictionary. + The key of the entry to add. + The value of entry to add. + The given key already exists in the dictionary but has a different value. + A new immutable sorted dictionary that contains the additional key/value pair. + + + Adds the specific key/value pairs to the immutable sorted dictionary. + The key/value pairs to add. + One of the given keys already exists in the dictionary but has a different value. + A new immutable dictionary that contains the additional key/value pairs. + + + Retrieves an empty immutable sorted dictionary that has the same ordering and key/value comparison rules as this dictionary instance. + An empty dictionary with equivalent ordering and key/value comparison rules. + + + Determines whether this immutable sorted dictionary contains the specified key/value pair. + The key/value pair to locate. + + if the specified key/value pair is found in the dictionary; otherwise, . + + + Determines whether this immutable sorted map contains the specified key. + The key to locate. + + if the immutable dictionary contains the specified key; otherwise, . + + + Determines whether the immutable sorted dictionary contains an element with the specified value. + The value to locate. The value can be for reference types. + + if the dictionary contains an element with the specified value; otherwise, . + + + Returns an enumerator that iterates through the immutable sorted dictionary. + An enumerator that can be used to iterate through the dictionary. + + + Removes the element with the specified value from the immutable sorted dictionary. + The value of the element to remove. + A new immutable dictionary with the specified element removed; or this instance if the specified value cannot be found in the dictionary. + + + Removes the elements with the specified keys from the immutable sorted dictionary. + The keys of the elements to remove. + A new immutable dictionary with the specified keys removed; or this instance if the specified keys cannot be found in the dictionary. + + + Sets the specified key and value in the immutable sorted dictionary, possibly overwriting an existing value for the given key. + The key of the entry to add. + The key value to set. + A new immutable sorted dictionary that contains the specified key/value pair. + + + Sets the specified key/value pairs in the immutable sorted dictionary, possibly overwriting existing values for the keys. + The key/value pairs to set in the dictionary. If any of the keys already exist in the dictionary, this method will overwrite their previous values. + An immutable dictionary that contains the specified key/value pairs. + + + Adds an item to the . + The object to add to the . + + + Removes all items from the . + + + Copies the elements of the to an , starting at a particular index. + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + if was successfully removed from the ; otherwise, . This method also returns if is not found in the original . + + + Adds an element with the provided key and value to the generic dictionary. + The object to use as the key of the element to add. + The object to use as the value of the element to add. + + is . + An element with the same key already exists in the . + The is read-only. + + + Removes the element with the specified key from the generic dictionary. + The key of the element to remove. + + is . + The is read-only. + + if the element is successfully removed; otherwise, . This method also returns if was not found in the original generic dictionary. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Copies the elements of the dictionary to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Adds an element with the provided key and value to the dictionary object. + The object to use as the key of the element to add. + The object to use as the value of the element to add. + + + Clears this instance. + The dictionary object is read-only. + + + Determines whether the immutable dictionary object contains an element with the specified key. + The key to locate in the dictionary object. + + if the dictionary contains an element with the key; otherwise, . + + + Returns an object for the immutable dictionary object. + An enumerator object for the dictionary object. + + + Removes the element with the specified key from the immutable dictionary object. + The key of the element to remove. + + + Returns an enumerator that iterates through a collection. + An enumerator object that can be used to iterate through the collection. + + + See the interface. + Key of the entry to be added. + Value of the entry to be added. + The instance. + + + See the interface. + Sequence of key/value pairs to be added. + The instance. + + + See the interface. + The instance. + + + See the interface. + Key of entry to be removed. + The instance. + + + See the interface. + Sequence of keys to be removed. + The instance. + + + See the interface. + Key of entry to be updated. + Value of entry to be updated. + The instance. + + + Applies a given set of key-value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary. + A set of key-value pairs to set on the map. + The instance. + + + Creates an immutable sorted dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces. + A collection with the same contents as this dictionary. + + + Determines whether this dictionary contains a specified key. + The key to search for. + The matching key located in the dictionary if found, or equalkey if no match is found. + + if a match for is found; otherwise, . + + + Gets the value associated with the specified key. + The key whose value will be retrieved. + When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. + + if the dictionary contains an element with the specified key; otherwise, . + + + Returns a read-only reference to the value associated with the provided . + Key of the entry to be looked up. + The is not present. + A read-only reference to the value associated with the provided . + + + Gets an instance of the immutable sorted dictionary that uses the specified key comparer. + The key comparer to use. + An instance of the immutable dictionary that uses the given comparer. + + + Gets an instance of the immutable sorted dictionary that uses the specified key and value comparers. + The key comparer to use. + The value comparer to use. + An instance of the immutable dictionary that uses the given comparers. + + + Gets the number of key/value pairs in the immutable sorted dictionary. + The number of key/value pairs in the dictionary. + + + Gets a value that indicates whether this instance of the immutable sorted dictionary is empty. + + if this instance is empty; otherwise, . + + + Gets the associated with the specified key. + The key to retrieve the value for. + The value associated with the specified key. If no results are found, the operation throws an exception. + + + Gets the key comparer for the immutable sorted dictionary. + The key comparer for the dictionary. + + + Gets the keys in the immutable sorted dictionary. + The keys in the immutable dictionary. + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the with the specified key. + The object to use as the key of the element to access. + An object of type associated with the . + + + Gets the keys. + A collection containing the keys. + + + Gets the values. + A collection containing the values. + + + Gets a value indicating whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread-safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Gets a value indicating whether the object has a fixed size. + + if the object has a fixed size; otherwise, . + + + Gets a value indicating whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the element with the specified key. + The key of the element to be accessed. + Value stored under the specified key. + + + Gets an containing the keys of the . + An containing the keys of the object that implements . + + + Gets an containing the values in the . + An containing the values in the object that implements . + + + Gets the value comparer used to determine whether values are equal. + The value comparer used to determine whether values are equal. + + + Gets the values in the immutable sorted dictionary. + The values in the dictionary. + + + Represents a sorted dictionary that mutates with little or no memory allocations and that can produce or build on immutable sorted dictionary instances very efficiently. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + + Adds an element that has the specified key and value to the immutable sorted dictionary. + The key of the element to add. + The value of the element to add. + + + Adds the specified item to the immutable sorted dictionary. + The object to add to the dictionary. + + + Adds a sequence of values to the immutable sorted dictionary. + The items to add to the dictionary. + + + Removes all items from the immutable sorted dictionary. + + + Determines whether the immutable sorted dictionary contains a specific value. + The object to locate in the dictionary. + + if is found in the dictionary; otherwise, . + + + Determines whether the immutable sorted dictionary contains an element with the specified key. + The key to locate in the dictionary. + + if the dictionary contains an element with the key; otherwise, . + + + Determines whether the immutable sorted dictionary contains an element with the specified value. + The value to locate in the dictionary. The value can be for reference types. + + if the immutable sorted dictionary contains an element with the specified value; otherwise, . + + + Returns an enumerator that iterates through the immutable sorted dictionary. + An enumerator that can be used to iterate through the dictionary. + + + Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value. + The key to search for. + The value for the key, or default(TValue) if no matching key was found. + + + Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value. + The key to search for. + The default value to return if no matching key is found in the dictionary. + The value for the key, or if no matching key was found. + + + Removes the element with the specified key from the immutable sorted dictionary. + The key of the element to remove. + + if the element is successfully removed; otherwise, . This method also returns if was not found in the original dictionary. + + + Removes the first occurrence of a specific object from the immutable sorted dictionary. + The object to remove from the dictionary. + + if was successfully removed from the dictionary; otherwise, . This method also returns if is not found in the dictionary. + + + Removes any entries with keys that match those found in the specified sequence from the immutable sorted dictionary. + The keys for entries to remove from the dictionary. + + + See . + The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + See . + An enumerator that can be used to iterate through the collection. + + + Copies the elements of the dictionary to an array, starting at a particular array index. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The one-dimensional array that is the destination of the elements copied from the dictionary. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Adds an element with the provided key and value to the dictionary object. + The key of the element to add. + The value of the element to add. + + + Determines whether the dictionary object contains an element with the specified key. + The key to locate. + + if the dictionary contains an element with the key; otherwise, . + + + Returns an object for the dictionary. + An object for the dictionary. + + + Removes the element with the specified key from the dictionary. + The key of the element to remove. + + + Returns an enumerator that iterates through a collection. + An enumerator object that can be used to iterate through the collection. + + + Creates an immutable sorted dictionary based on the contents of this instance. + An immutable sorted dictionary. + + + Determines whether this dictionary contains a specified key. + The key to search for. + The matching key located in the dictionary if found, or equalkey if no match is found. + + if a match for is found; otherwise, . + + + Gets the value associated with the specified key. + The key whose value will be retrieved. + When this method returns, contains the value associated with the specified key, if the key is found; otherwise, contains the default value for the type of the parameter. This parameter is passed uninitialized. + + if the object that implements the dictionary contains an element with the specified key; otherwise, . + + + Returns a read-only reference to the value associated with the provided . + Key of the entry to be looked up. + The is not present. + A read-only reference to the value associated with the provided . + + + Gets the number of elements in this immutable sorted dictionary. + The number of elements in this dictionary. + + + Gets or sets the value for a specified key in the immutable sorted dictionary. + The key to retrieve the value for. + The value associated with the given key. + + + Gets or sets the key comparer. + The key comparer. + + + Gets a strongly typed, read-only collection of elements. + A strongly typed, read-only collection of elements. + + + Gets a value that indicates whether this instance is read-only. + Always . + + + Returns a collection containing all keys stored in the dictionary. See . + A collection containing all keys stored in the dictionary. + + + Returns a collection containing all values stored in the dictionary. See . + A collection containing all values stored in the dictionary. + + + Gets a value that indicates whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Gets a value that indicates whether the object has a fixed size. + + if the object has a fixed size; otherwise, . + + + Gets a value that indicates whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the element with the specified key. + The key. + The value associated with the specified key. + + + Gets an containing the keys of the . + An containing the keys of the object that implements . + + + Gets an containing the values in the . + An containing the values in the object that implements . + + + Gets or sets the value comparer. + The value comparer. + + + Gets a collection that contains the values of the immutable sorted dictionary. + A collection that contains the values of the object that implements the dictionary. + + + Enumerates the contents of a binary tree. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + + Releases the resources used by the current instance of the class. + + + Advances the enumerator to the next element of the immutable sorted dictionary. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the sorted dictionary. + + + Sets the enumerator to its initial position, which is before the first element in the immutable sorted dictionary. + + + Gets the element at the current position of the enumerator. + The element at the current position of the enumerator. + + + The current element. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable sorted set. + The type of items to be stored in the immutable set. + An empty immutable sorted set. + + + Creates a new immutable sorted set that contains the specified item. + The item to prepopulate the set with. + The type of items in the immutable set. + A new immutable set that contains the specified item. + + + Creates a new immutable sorted set that contains the specified array of items. + An array that contains the items to prepopulate the set with. + The type of items in the immutable set. + A new immutable set that contains the specified items. + + + Creates an empty immutable sorted set that uses the specified comparer. + The implementation to use when comparing items in the set. + The type of items in the immutable set. + An empty immutable set. + + + Creates a new immutable sorted set that contains the specified item and uses the specified comparer. + The implementation to use when comparing items in the set. + The item to prepopulate the set with. + The type of items stored in the immutable set. + A new immutable set that contains the specified item. + + + Creates a new immutable sorted set that contains the specified array of items and uses the specified comparer. + The implementation to use when comparing items in the set. + An array that contains the items to prepopulate the set with. + The type of items in the immutable set. + A new immutable set that contains the specified items. + + + Returns a collection that can be used to build an immutable sorted set. + The type of items stored by the collection. + The immutable collection builder. + + + Returns a collection that can be used to build an immutable sorted set. + The comparer used to compare items in the set for equality. + The type of items stored by the collection. + The immutable collection. + + + Creates a new immutable collection that contains the specified items. + The comparer to use to compare elements in this set. + The items to add to the set before it's immutable. + The type of items stored by the collection. + The new immutable set that contains the specified items. + + + Creates a new immutable collection that contains the specified items. + The items to add to the set with before it's immutable. + The type of items stored by the collection. + The new immutable set that contains the specified items. + + + Enumerates a sequence and produces an immutable sorted set of its contents. + The sequence to enumerate. + The type of the elements in the sequence. + An immutable sorted set that contains the items in the specified sequence. + + + Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. + The sequence to enumerate. + The comparer to use for initializing and adding members to the sorted set. + The type of the elements in the sequence. + An immutable sorted set that contains the items in the specified sequence. + + + Creates an immutable sorted set from the current contents of the builder's set. + The builder to create the immutable sorted set from. + The type of the elements in the immutable sorted set. + An immutable sorted set that contains the current contents in the builder's set. + + + Represents an immutable sorted set implementation. + +NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of elements in the set. + + + Gets an empty immutable sorted set. + + + Adds the specified value to this immutable sorted set. + The value to add. + A new set with the element added, or this set if the element is already in this set. + + + Removes all elements from the immutable sorted set. + An empty set with the elements removed. + + + Determines whether this immutable sorted set contains the specified value. + The value to check for. + + if the set contains the specified value; otherwise, . + + + Removes a specified set of items from this immutable sorted set. + The items to remove from this set. + A new set with the items removed; or the original set if none of the items were in the set. + + + Returns an enumerator that iterates through the immutable sorted set. + An enumerator that can be used to iterate through the set. + + + Gets the position within this immutable sorted set that the specified value appears in. + The value whose position is being sought. + The index of the specified in the sorted set, if is found. If is not found and is less than one or more elements in this set, this method returns a negative number that is the bitwise complement of the index of the first element that is larger than value. If is not found and is greater than any of the elements in the set, this method returns a negative number that is the bitwise complement of the index of the last element plus 1. + + + Creates an immutable sorted set that contains elements that exist both in this set and in the specified set. + The set to intersect with this one. + A new immutable sorted set that contains any elements that exist in both sets. + + + Determines whether the current immutable sorted set is a proper (strict) subset of the specified collection. + The collection to compare to the current set. + + if the current set is a proper subset of ; otherwise, . + + + Determines whether the current immutable sorted set is a proper superset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper superset of ; otherwise, . + + + Determines whether the current immutable sorted set is a subset of a specified collection. + The collection to compare to the current set. + + if the current set is a subset of ; otherwise, . + + + Determines whether the current immutable sorted set is a superset of a specified collection. + The collection to compare to the current set. + + if the current set is a superset of ; otherwise, . + + + Gets a read-only reference of the element of the set at the given . + The 0-based index of the element in the set to return. + A read-only reference of the element at the given position. + + + Determines whether the current immutable sorted set and a specified collection share common elements. + The collection to compare to the current set. + + if the current set and share at least one common element; otherwise, . + + + Removes the specified value from this immutable sorted set. + The element to remove. + A new immutable sorted set with the element removed, or this set if the element was not found in the set. + + + Returns an that iterates over this immutable sorted set in reverse order. + An enumerator that iterates over the immutable sorted set in reverse order. + + + Determines whether the current immutable sorted set and the specified collection contain the same elements. + The collection to compare to the current set. + + if the sets are equal; otherwise, . + + + Creates an immutable sorted set that contains elements that exist either in this set or in a given sequence, but not both. + The other sequence of items. + The new immutable sorted set. + + + Adds the specified value to the collection. + The value to add. + + + Removes all the items from the collection. + + + Copies the elements of the collection to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Removes the first occurrence of a specific object from the collection. + The object to remove from the collection. + + if was successfully removed from the collection; otherwise, . + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Inserts an item in the set at the specified index. + The zero-based index at which should be inserted. + The object to insert into the set. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + The element to add to the set. + + if the element is added to the set; if the element is already in the set. + + + Removes all elements in the specified collection from the current set. + The collection of items to remove from the set. + + + Modifies the current set so that it contains only elements that are also in a specified collection. + The collection to compare to the current set. + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + The collection to compare to the current set. + + + Copies the elements of the set to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through a collection. + An enumerator object that can be used to iterate through the collection. + + + Adds an item to the set. + The object to add to the set. + The set is read-only or has a fixed size. + The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection. + + + Removes all items from the set. + Thrown in all cases. + + + Determines whether the set contains a specific value. + The object to locate in the set. + + if the object is found in the set; otherwise, . + + + Determines the index of a specific item in the set. + The object to locate in the set. + The index of if found in the list; otherwise, -1. + + + Inserts an item into the set at the specified index. + The zero-based index at which should be inserted. + The object to insert into the set. + The set is read-only or has a fixed size. + + + Removes the first occurrence of a specific object from the set. + The object to remove from the set. + The set is read-only or has a fixed size. + + + Removes the item at the specified index of the set. + The zero-based index of the item to remove. + The set is read-only or has a fixed size. + + + Adds the specified element to this immutable set. + The element to add. + A new set with the element added, or this set if the element is already in the set. + + + Retrieves an empty immutable set that has the same sorting and ordering semantics as this instance. + An empty set that has the same sorting and ordering semantics as this instance. + + + Removes the elements in the specified collection from the current immutable set. + The items to remove from this set. + The new set with the items removed; or the original set if none of the items were in the set. + + + Creates an immutable set that contains elements that exist in both this set and the specified set. + The collection to compare to the current set. + A new immutable set that contains any elements that exist in both sets. + + + Removes the specified element from this immutable set. + The element to remove. + A new set with the specified element removed, or the current set if the element cannot be found in the set. + + + Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + A new set that contains the elements that are present only in the current set or in the specified collection, but not both. + + + Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection. + The collection to add elements from. + A new immutable set with the items added; or the original set if all the items were already in the set. + + + Creates a collection that has the same contents as this immutable sorted set that can be efficiently manipulated by using standard mutable interfaces. + The sorted set builder. + + + Searches the set for a given value and returns the equal value it finds, if any. + The value to search for. + The value from the set that the search found, or the original value if the search yielded no match. + A value indicating whether the search was successful. + + + Adds a given set of items to this immutable sorted set. + The items to add. + The new set with the items added; or the original set if all the items were already in the set. + + + Returns the immutable sorted set that has the specified key comparer. + The comparer to check for. + The immutable sorted set that has the specified key comparer. + + + Gets the number of elements in the immutable sorted set. + The number of elements in the immutable sorted set. + + + Gets a value that indicates whether this immutable sorted set is empty. + + if this set is empty; otherwise, . + + + Gets the element of the immutable sorted set at the given index. + The index of the element to retrieve from the sorted set. + The element at the given index. + + + Gets the comparer used to sort keys in the immutable sorted set. + The comparer used to sort keys. + + + Gets the maximum value in the immutable sorted set, as defined by the comparer. + The maximum value in the set. + + + Gets the minimum value in the immutable sorted set, as defined by the comparer. + The minimum value in the set. + + + Returns true, since immutable collections are always read-only. See the interface. + A boolean value indicating whether the collection is read-only. + + + See the interface. + The zero-based index of the item to access. + The element stored at the specified index. + + + Returns true, since immutable collections are always thread-safe. See the interface. + A boolean value indicating whether the collection is thread-safe. + + + See . + Object used for synchronizing access to the collection. + + + Gets a value that indicates whether the has a fixed size. + + if the has a fixed size; otherwise, . + + + Gets a value that indicates whether the is read-only. + + if the is read-only; otherwise, . + + + Gets or sets the at the specified index. + The index. + + The . + + + Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Adds an element to the current set and returns a value to indicate whether the element was successfully added. + The element to add to the set. + + if the element is added to the set; if the element is already in the set. + + + Removes all elements from this set. + + + Determines whether the set contains the specified object. + The object to locate in the set. + + if is found in the set; otherwise, . + + + Removes the specified set of items from the current set. + The collection of items to remove from the set. + + + Returns an enumerator that iterates through the set. + A enumerator that can be used to iterate through the set. + + + Modifies the current set so that it contains only elements that are also in a specified collection. + The collection to compare to the current set. + + + Determines whether the current set is a proper (strict) subset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper subset of ; otherwise, . + + + Determines whether the current set is a proper (strict) superset of a specified collection. + The collection to compare to the current set. + + if the current set is a proper superset of ; otherwise, . + + + Determines whether the current set is a subset of a specified collection. + The collection is compare to the current set. + + if the current set is a subset of ; otherwise, . + + + Determines whether the current set is a superset of a specified collection. + The collection to compare to the current set. + + if the current set is a superset of ; otherwise, . + + + Gets a read-only reference to the element of the set at the given . + The 0-based index of the element in the set to return. + A read-only reference to the element at the given position. + + + Determines whether the current set overlaps with the specified collection. + The collection to compare to the current set. + + if the current set and share at least one common element; otherwise, . + + + Removes the first occurrence of the specified object from the set. + The object to remove from the set. + + if was removed from the set; if was not found in the set. + + + Returns an enumerator that iterates over the immutable sorted set in reverse order. + An enumerator that iterates over the set in reverse order. + + + Determines whether the current set and the specified collection contain the same elements. + The collection to compare to the current set. + + if the current set is equal to ; otherwise, . + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + The collection to compare to the current set. + + + Adds an element to the current set and returns a value to indicate whether the element was successfully added. + The element to add to the set. + + + Copies the elements of the collection to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through the collection. + A enumerator that can be used to iterate through the collection. + + + Copies the elements of the set to an array, starting at a particular array index. + The one-dimensional array that is the destination of the elements copied from the set. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + Returns an enumerator that iterates through the collection. + A enumerator that can be used to iterate through the collection. + + + Creates an immutable sorted set based on the contents of this instance. + An immutable set. + + + Searches the set for a given value and returns the equal value it finds, if any. + The value for which to search. + The value from the set that the search found, or the original value if the search yielded no match. + A value indicating whether the search was successful. + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + The collection to compare to the current state. + + + Gets the number of elements in the immutable sorted set. + The number of elements in this set. + + + Gets the element of the set at the given index. + The 0-based index of the element in the set to return. + The element at the given position. + + + Gets or sets the object that is used to determine equality for the values in the immutable sorted set. + The comparer that is used to determine equality for the values in the set. + + + Gets the maximum value in the immutable sorted set, as defined by the comparer. + The maximum value in the set. + + + Gets the minimum value in the immutable sorted set, as defined by the comparer. + The minimum value in the set. + + + Gets a value that indicates whether this instance is read-only. + Always . + + + Gets a value that indicates whether access to the is synchronized (thread-safe). + + if access to the is synchronized (thread-safe); otherwise, . + + + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + + Enumerates the contents of a binary tree. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Releases the resources used by the current instance of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Advances the enumerator to the next element of the immutable sorted set. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the sorted set. + + + Sets the enumerator to its initial position, which is before the first element in the immutable sorted set. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Gets the element at the current position of the enumerator. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The element at the current position of the enumerator. + + + The current element. + + + Provides a set of initialization methods for instances of the class. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Creates an empty immutable stack. + The type of items to be stored in the immutable stack. + An empty immutable stack. + + + Creates a new immutable stack that contains the specified item. + The item to prepopulate the stack with. + The type of items in the immutable stack. + A new immutable collection that contains the specified item. + + + Creates a new immutable stack that contains the specified array of items. + An array that contains the items to prepopulate the stack with. + The type of items in the immutable stack. + A new immutable stack that contains the specified items. + + + Creates a new immutable stack that contains the specified items. + The items to add to the stack before it's immutable. + The type of items in the stack. + An immutable stack that contains the specified items. + + + Removes the specified item from an immutable stack. + The stack to modify. + The item to remove from the stack. + The type of items contained in the stack. + The stack is empty. + A stack; never . + + + Represents an immutable stack. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + The type of element on the stack. + + + Removes all objects from the immutable stack. + An empty immutable stack. + + + Returns an enumerator that iterates through the immutable stack. + An enumerator that can be used to iterate through the stack. + + + Returns the object at the top of the stack without removing it. + The stack is empty. + The object at the top of the stack. + + + Gets a read-only reference to the element on the top of the stack. + Thrown when the stack is empty. + A read-only reference to the element on the top of the stack. + + + Removes the element at the top of the immutable stack and returns the stack after the removal. + The stack is empty. + A stack; never . + + + Removes the specified element from the immutable stack and returns the stack after the removal. + The value to remove from the stack. + A stack; never . + + + Inserts an object at the top of the immutable stack and returns the new stack. + The object to push onto the stack. + The new stack. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Removes all elements from the immutable stack. + The empty immutable stack. + + + Removes the element at the top of the immutable stack and returns the new stack. + The stack is empty. + The new stack; never . + + + Inserts an element at the top of the immutable stack and returns the new stack. + The element to push onto the stack. + The new stack. + + + Gets an empty immutable stack. + An empty immutable stack. + + + Gets a value that indicates whether this instance of the immutable stack is empty. + + if this instance is empty; otherwise, . + + + Enumerates the contents of an immutable stack without allocating any memory. + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + + Advances the enumerator to the next element of the immutable stack. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the stack. + + + Gets the element at the current position of the enumerator. + The element at the current position of the enumerator. + + + LINQ extension method overrides that offer greater efficiency for than the standard LINQ methods + + NuGet package: System.Collections.Immutable (about immutable collections and how to install) + + + Applies a function to a sequence of elements in a cumulative way. + The collection to apply the function to. + A function to be invoked on each element, in a cumulative way. + The type of element contained by the collection. + The final value after the cumulative function has been applied to all elements. + + + Applies a function to a sequence of elements in a cumulative way. + The collection to apply the function to. + The initial accumulator value. + A function to be invoked on each element, in a cumulative way. + The type of the accumulated value. + The type of element contained by the collection. + The final accumulator value. + + + Applies a function to a sequence of elements in a cumulative way. + The collection to apply the function to. + The initial accumulator value. + A function to be invoked on each element, in a cumulative way. + A function to transform the final accumulator value into the result type. + The type of the accumulated value. + The type of result returned by the result selector. + The type of element contained by the collection. + The final accumulator value. + + + Gets a value indicating whether all elements in this array match a given condition. + The array to check for matches. + The predicate. + The type of element contained by the collection. + + if every element of the source sequence passes the test in the specified predicate; otherwise, . + + + Returns a value indicating whether this collection contains any elements. + The builder to check for matches. + The type of elements in the array. + + if the array builder contains any elements; otherwise, . + + + Gets a value indicating whether the array contains any elements. + The array to check for elements. + The type of element contained by the collection. + + if the array contains an elements; otherwise, . + + + Gets a value indicating whether the array contains any elements that match a specified condition. + The array to check for elements. + The delegate that defines the condition to match to an element. + The type of element contained by the collection. + + if an element matches the specified condition; otherwise, . + + + Returns the element at a specified index in the array. + The array to find an element in. + The index for the element to retrieve. + The type of element contained by the collection. + The item at the specified index. + + + Returns the element at a specified index in a sequence or a default value if the index is out of range. + The array to find an element in. + The index for the element to retrieve. + The type of element contained by the collection. + The item at the specified index, or the default value if the index is not found. + + + Returns the first element in the collection. + The builder to retrieve an item from. + The type of items in the array. + If the array is empty. + The first item in the list. + + + Returns the first element in an array. + The array to get an item from. + The type of element contained by the collection. + If the array is empty. + The first item in the array. + + + Returns the first element in a sequence that satisfies a specified condition. + The array to get an item from. + The delegate that defines the conditions of the element to search for. + The type of element contained by the collection. + If the array is empty. + The first item in the list if it meets the condition specified by . + + + Returns the first element in the collection, or the default value if the collection is empty. + The builder to retrieve an element from. + The type of item in the builder. + The first item in the list, if found; otherwise the default value for the item type. + + + Returns the first element of a sequence, or a default value if the sequence contains no elements. + The array to retrieve items from. + The type of element contained by the collection. + The first item in the list, if found; otherwise the default value for the item type. + + + Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. + The array to retrieve elements from. + The delegate that defines the conditions of the element to search for. + The type of element contained by the collection. + The first item in the list, if found; otherwise the default value for the item type. + + + Returns the last element in the collection. + The builder to retrieve elements from. + The type of item in the builder. + Thrown if the collection is empty. + The last element in the builder. + + + Returns the last element of the array. + The array to retrieve items from. + The type of element contained by the array. + Thrown if the collection is empty. + The last element in the array. + + + Returns the last element of a sequence that satisfies a specified condition. + The array to retrieve elements from. + The delegate that defines the conditions of the element to retrieve. + The type of element contained by the collection. + Thrown if the collection is empty. + The last element of the array that satisfies the condition. + + + Returns the last element in the collection, or the default value if the collection is empty. + The builder to retrieve an element from. + The type of item in the builder. + The last element of a sequence, or a default value if the sequence contains no elements. + + + Returns the last element of a sequence, or a default value if the sequence contains no elements. + The array to retrieve items from. + The type of element contained by the collection. + The last element of a sequence, or a default value if the sequence contains no elements. + + + Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. + The array to retrieve an element from. + The delegate that defines the conditions of the element to search for. + The type of element contained by the collection. + The last element of a sequence, or a default value if the sequence contains no elements. + + + Projects each element of a sequence into a new form. + The immutable array to select items from. + A transform function to apply to each element. + The type of element contained by the collection. + The type of the result element. + An whose elements are the result of invoking the transform function on each element of source. + + + Projects each element of a sequence to an , flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. + The immutable array. + A transform function to apply to each element of the input sequence. + A transform function to apply to each element of the intermediate sequence. + The type of the elements of . + The type of the intermediate elements collected by . + The type of the elements of the resulting sequence. + An whose elements are the result of invoking the one-to-many transform function on each element of and then mapping each of those sequence elements and their corresponding source element to a result element. + + + Determines whether two sequences are equal according to an equality comparer. + The array to use for comparison. + The items to use for comparison. + The comparer to use to check for equality. + The type of element in the compared array. + The type of element contained by the collection. + + to indicate the sequences are equal; otherwise, . + + + Determines whether two sequences are equal according to an equality comparer. + The array to use for comparison. + The items to use for comparison. + The comparer to use to check for equality. + The type of element in the compared array. + The type of element contained by the collection. + + to indicate the sequences are equal; otherwise, . + + + Determines whether two sequences are equal according to an equality comparer. + The array to use for comparison. + The items to use for comparison. + The comparer to use to check for equality. + The type of element in the compared array. + The type of element contained by the collection. + + to indicate the sequences are equal; otherwise, . + + + Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. + The array to retrieve the element from. + The type of element contained by the collection. + The element in the sequence. + + + Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. + The immutable array to return a single element from. + The function to test whether an element should be returned. + The type of element contained by the collection. + Returns . + + + Returns the only element of the array, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. + The array. + The type of element contained by the collection. + + contains more than one element. + The element in the array, or the default value if the array is empty. + + + Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. + The array to get the element from. + The condition the element must satisfy. + The type of element contained by the collection. + More than one element satisfies the condition in . + The element if it satisfies the specified condition; otherwise the default element. + + + Copies the contents of this array to a mutable array. + The immutable array to copy into a mutable one. + The type of element contained by the collection. + The newly instantiated array. + + + Creates a dictionary based on the contents of this array. + The array to create a dictionary from. + The key selector. + The type of the key. + The type of element contained by the collection. + The newly initialized dictionary. + + + Creates a dictionary based on the contents of this array. + The array to create a dictionary from. + The key selector. + The comparer to initialize the dictionary with. + The type of the key. + The type of element contained by the collection. + The newly initialized dictionary. + + + Creates a dictionary based on the contents of this array. + The array to create a dictionary from. + The key selector. + The element selector. + The type of the key. + The type of the element. + The type of element contained by the collection. + The newly initialized dictionary. + + + Creates a dictionary based on the contents of this array. + The array to create a dictionary from. + The key selector. + The element selector. + The comparer to initialize the dictionary with. + The type of the key. + The type of the element. + The type of element contained by the collection. + The newly initialized dictionary. + + + Filters a sequence of values based on a predicate. + The array to filter. + The condition to use for filtering the array content. + The type of element contained by the collection. + Returns that contains elements that meet the condition. + + + \ No newline at end of file diff --git a/SpaceWarpPatcherLibraries/System.Memory.dll b/SpaceWarpPatcherLibraries/System.Memory.dll new file mode 100644 index 00000000..1e6aef80 Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Memory.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Memory.xml b/SpaceWarpPatcherLibraries/System.Memory.xml new file mode 100644 index 00000000..4d12fd71 --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Memory.xml @@ -0,0 +1,355 @@ + + + System.Memory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SpaceWarpPatcherLibraries/System.Numerics.Vectors.dll b/SpaceWarpPatcherLibraries/System.Numerics.Vectors.dll new file mode 100644 index 00000000..a808165a Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Numerics.Vectors.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Numerics.Vectors.xml b/SpaceWarpPatcherLibraries/System.Numerics.Vectors.xml new file mode 100644 index 00000000..51297939 --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Numerics.Vectors.xml @@ -0,0 +1,2597 @@ + + + + System.Numerics.Vectors + + + + Represents a 3x2 matrix. + + + Creates a 3x2 matrix from the specified components. + The value to assign to the first element in the first row. + The value to assign to the second element in the first row. + The value to assign to the first element in the second row. + The value to assign to the second element in the second row. + The value to assign to the first element in the third row. + The value to assign to the second element in the third row. + + + Adds each element in one matrix with its corresponding element in a second matrix. + The first matrix. + The second matrix. + The matrix that contains the summed values of value1 and value2. + + + Creates a rotation matrix using the given rotation in radians. + The amount of rotation, in radians. + The rotation matrix. + + + Creates a rotation matrix using the specified rotation in radians and a center point. + The amount of rotation, in radians. + The center point. + The rotation matrix. + + + Creates a scaling matrix from the specified X and Y components. + The value to scale by on the X axis. + The value to scale by on the Y axis. + The scaling matrix. + + + Creates a scaling matrix that scales uniformly with the specified scale with an offset from the specified center. + The uniform scale to use. + The center offset. + The scaling matrix. + + + Creates a scaling matrix that is offset by a given center point. + The value to scale by on the X axis. + The value to scale by on the Y axis. + The center point. + The scaling matrix. + + + Creates a scaling matrix that scales uniformly with the given scale. + The uniform scale to use. + The scaling matrix. + + + Creates a scaling matrix from the specified vector scale. + The scale to use. + The scaling matrix. + + + Creates a scaling matrix from the specified vector scale with an offset from the specified center point. + The scale to use. + The center offset. + The scaling matrix. + + + Creates a skew matrix from the specified angles in radians. + The X angle, in radians. + The Y angle, in radians. + The skew matrix. + + + Creates a skew matrix from the specified angles in radians and a center point. + The X angle, in radians. + The Y angle, in radians. + The center point. + The skew matrix. + + + Creates a translation matrix from the specified 2-dimensional vector. + The translation position. + The translation matrix. + + + Creates a translation matrix from the specified X and Y components. + The X position. + The Y position. + The translation matrix. + + + Returns a value that indicates whether this instance and another 3x2 matrix are equal. + The other matrix. + true if the two matrices are equal; otherwise, false. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Calculates the determinant for this matrix. + The determinant. + + + Returns the hash code for this instance. + The hash code. + + + Gets the multiplicative identity matrix. + The multiplicative identify matrix. + + + Inverts the specified matrix. The return value indicates whether the operation succeeded. + The matrix to invert. + When this method returns, contains the inverted matrix if the operation succeeded. + true if matrix was converted successfully; otherwise, false. + + + Indicates whether the current matrix is the identity matrix. + true if the current matrix is the identity matrix; otherwise, false. + + + Performs a linear interpolation from one matrix to a second matrix based on a value that specifies the weighting of the second matrix. + The first matrix. + The second matrix. + The relative weighting of matrix2. + The interpolated matrix. + + + The first element of the first row. + + + + The second element of the first row. + + + + The first element of the second row. + + + + The second element of the second row. + + + + The first element of the third row. + + + + The second element of the third row. + + + + Returns the matrix that results from multiplying two matrices together. + The first matrix. + The second matrix. + The product matrix. + + + Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. + The matrix to scale. + The scaling value to use. + The scaled matrix. + + + Negates the specified matrix by multiplying all its values by -1. + The matrix to negate. + The negated matrix. + + + Adds each element in one matrix with its corresponding element in a second matrix. + The first matrix. + The second matrix. + The matrix that contains the summed values. + + + Returns a value that indicates whether the specified matrices are equal. + The first matrix to compare. + The second matrix to compare. + true if value1 and value2 are equal; otherwise, false. + + + Returns a value that indicates whether the specified matrices are not equal. + The first matrix to compare. + The second matrix to compare. + true if value1 and value2 are not equal; otherwise, false. + + + Returns the matrix that results from multiplying two matrices together. + The first matrix. + The second matrix. + The product matrix. + + + Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. + The matrix to scale. + The scaling value to use. + The scaled matrix. + + + Subtracts each element in a second matrix from its corresponding element in a first matrix. + The first matrix. + The second matrix. + The matrix containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Negates the specified matrix by multiplying all its values by -1. + The matrix to negate. + The negated matrix. + + + Subtracts each element in a second matrix from its corresponding element in a first matrix. + The first matrix. + The second matrix. + The matrix containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Returns a string that represents this matrix. + The string representation of this matrix. + + + Gets or sets the translation component of this matrix. + The translation component of the current instance. + + + Represents a 4x4 matrix. + + + Creates a object from a specified object. + A 3x2 matrix. + + + Creates a 4x4 matrix from the specified components. + The value to assign to the first element in the first row. + The value to assign to the second element in the first row. + The value to assign to the third element in the first row. + The value to assign to the fourth element in the first row. + The value to assign to the first element in the second row. + The value to assign to the second element in the second row. + The value to assign to the third element in the second row. + The value to assign to the third element in the second row. + The value to assign to the first element in the third row. + The value to assign to the second element in the third row. + The value to assign to the third element in the third row. + The value to assign to the fourth element in the third row. + The value to assign to the first element in the fourth row. + The value to assign to the second element in the fourth row. + The value to assign to the third element in the fourth row. + The value to assign to the fourth element in the fourth row. + + + Adds each element in one matrix with its corresponding element in a second matrix. + The first matrix. + The second matrix. + The matrix that contains the summed values of value1 and value2. + + + Creates a spherical billboard that rotates around a specified object position. + The position of the object that the billboard will rotate around. + The position of the camera. + The up vector of the camera. + The forward vector of the camera. + The created billboard. + + + Creates a cylindrical billboard that rotates around a specified axis. + The position of the object that the billboard will rotate around. + The position of the camera. + The axis to rotate the billboard around. + The forward vector of the camera. + The forward vector of the object. + The billboard matrix. + + + Creates a matrix that rotates around an arbitrary vector. + The axis to rotate around. + The angle to rotate around axis, in radians. + The rotation matrix. + + + Creates a rotation matrix from the specified Quaternion rotation value. + The source Quaternion. + The rotation matrix. + + + Creates a rotation matrix from the specified yaw, pitch, and roll. + The angle of rotation, in radians, around the Y axis. + The angle of rotation, in radians, around the X axis. + The angle of rotation, in radians, around the Z axis. + The rotation matrix. + + + Creates a view matrix. + The position of the camera. + The target towards which the camera is pointing. + The direction that is "up" from the camera's point of view. + The view matrix. + + + Creates an orthographic perspective matrix from the given view volume dimensions. + The width of the view volume. + The height of the view volume. + The minimum Z-value of the view volume. + The maximum Z-value of the view volume. + The orthographic projection matrix. + + + Creates a customized orthographic projection matrix. + The minimum X-value of the view volume. + The maximum X-value of the view volume. + The minimum Y-value of the view volume. + The maximum Y-value of the view volume. + The minimum Z-value of the view volume. + The maximum Z-value of the view volume. + The orthographic projection matrix. + + + Creates a perspective projection matrix from the given view volume dimensions. + The width of the view volume at the near view plane. + The height of the view volume at the near view plane. + The distance to the near view plane. + The distance to the far view plane. + The perspective projection matrix. + nearPlaneDistance is less than or equal to zero. -or- farPlaneDistance is less than or equal to zero. -or- nearPlaneDistance is greater than or equal to farPlaneDistance. + + + Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances. + The field of view in the y direction, in radians. + The aspect ratio, defined as view space width divided by height. + The distance to the near view plane. + The distance to the far view plane. + The perspective projection matrix. + fieldOfView is less than or equal to zero. -or- fieldOfView is greater than or equal to . nearPlaneDistance is less than or equal to zero. -or- farPlaneDistance is less than or equal to zero. -or- nearPlaneDistance is greater than or equal to farPlaneDistance. + + + Creates a customized perspective projection matrix. + The minimum x-value of the view volume at the near view plane. + The maximum x-value of the view volume at the near view plane. + The minimum y-value of the view volume at the near view plane. + The maximum y-value of the view volume at the near view plane. + The distance to the near view plane. + The distance to the far view plane. + The perspective projection matrix. + nearPlaneDistance is less than or equal to zero. -or- farPlaneDistance is less than or equal to zero. -or- nearPlaneDistance is greater than or equal to farPlaneDistance. + + + Creates a matrix that reflects the coordinate system about a specified plane. + The plane about which to create a reflection. + A new matrix expressing the reflection. + + + Creates a matrix for rotating points around the X axis. + The amount, in radians, by which to rotate around the X axis. + The rotation matrix. + + + Creates a matrix for rotating points around the X axis from a center point. + The amount, in radians, by which to rotate around the X axis. + The center point. + The rotation matrix. + + + The amount, in radians, by which to rotate around the Y axis from a center point. + The amount, in radians, by which to rotate around the Y-axis. + The center point. + The rotation matrix. + + + Creates a matrix for rotating points around the Y axis. + The amount, in radians, by which to rotate around the Y-axis. + The rotation matrix. + + + Creates a matrix for rotating points around the Z axis. + The amount, in radians, by which to rotate around the Z-axis. + The rotation matrix. + + + Creates a matrix for rotating points around the Z axis from a center point. + The amount, in radians, by which to rotate around the Z-axis. + The center point. + The rotation matrix. + + + Creates a scaling matrix from the specified vector scale. + The scale to use. + The scaling matrix. + + + Creates a uniform scaling matrix that scale equally on each axis. + The uniform scaling factor. + The scaling matrix. + + + Creates a scaling matrix with a center point. + The vector that contains the amount to scale on each axis. + The center point. + The scaling matrix. + + + Creates a uniform scaling matrix that scales equally on each axis with a center point. + The uniform scaling factor. + The center point. + The scaling matrix. + + + Creates a scaling matrix from the specified X, Y, and Z components. + The value to scale by on the X axis. + The value to scale by on the Y axis. + The value to scale by on the Z axis. + The scaling matrix. + + + Creates a scaling matrix that is offset by a given center point. + The value to scale by on the X axis. + The value to scale by on the Y axis. + The value to scale by on the Z axis. + The center point. + The scaling matrix. + + + Creates a matrix that flattens geometry into a specified plane as if casting a shadow from a specified light source. + The direction from which the light that will cast the shadow is coming. + The plane onto which the new matrix should flatten geometry so as to cast a shadow. + A new matrix that can be used to flatten geometry onto the specified plane from the specified direction. + + + Creates a translation matrix from the specified 3-dimensional vector. + The amount to translate in each axis. + The translation matrix. + + + Creates a translation matrix from the specified X, Y, and Z components. + The amount to translate on the X axis. + The amount to translate on the Y axis. + The amount to translate on the Z axis. + The translation matrix. + + + Creates a world matrix with the specified parameters. + The position of the object. + The forward direction of the object. + The upward direction of the object. Its value is usually [0, 1, 0]. + The world matrix. + + + Attempts to extract the scale, translation, and rotation components from the given scale, rotation, or translation matrix. The return value indicates whether the operation succeeded. + The source matrix. + When this method returns, contains the scaling component of the transformation matrix if the operation succeeded. + When this method returns, contains the rotation component of the transformation matrix if the operation succeeded. + When the method returns, contains the translation component of the transformation matrix if the operation succeeded. + true if matrix was decomposed successfully; otherwise, false. + + + Returns a value that indicates whether this instance and another 4x4 matrix are equal. + The other matrix. + true if the two matrices are equal; otherwise, false. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Calculates the determinant of the current 4x4 matrix. + The determinant. + + + Returns the hash code for this instance. + The hash code. + + + Gets the multiplicative identity matrix. + Gets the multiplicative identity matrix. + + + Inverts the specified matrix. The return value indicates whether the operation succeeded. + The matrix to invert. + When this method returns, contains the inverted matrix if the operation succeeded. + true if matrix was converted successfully; otherwise, false. + + + Indicates whether the current matrix is the identity matrix. + true if the current matrix is the identity matrix; otherwise, false. + + + Performs a linear interpolation from one matrix to a second matrix based on a value that specifies the weighting of the second matrix. + The first matrix. + The second matrix. + The relative weighting of matrix2. + The interpolated matrix. + + + The first element of the first row. + + + + The second element of the first row. + + + + The third element of the first row. + + + + The fourth element of the first row. + + + + The first element of the second row. + + + + The second element of the second row. + + + + The third element of the second row. + + + + The fourth element of the second row. + + + + The first element of the third row. + + + + The second element of the third row. + + + + The third element of the third row. + + + + The fourth element of the third row. + + + + The first element of the fourth row. + + + + The second element of the fourth row. + + + + The third element of the fourth row. + + + + The fourth element of the fourth row. + + + + Returns the matrix that results from multiplying two matrices together. + The first matrix. + The second matrix. + The product matrix. + + + Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. + The matrix to scale. + The scaling value to use. + The scaled matrix. + + + Negates the specified matrix by multiplying all its values by -1. + The matrix to negate. + The negated matrix. + + + Adds each element in one matrix with its corresponding element in a second matrix. + The first matrix. + The second matrix. + The matrix that contains the summed values. + + + Returns a value that indicates whether the specified matrices are equal. + The first matrix to compare. + The second matrix to care + true if value1 and value2 are equal; otherwise, false. + + + Returns a value that indicates whether the specified matrices are not equal. + The first matrix to compare. + The second matrix to compare. + true if value1 and value2 are not equal; otherwise, false. + + + Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. + The matrix to scale. + The scaling value to use. + The scaled matrix. + + + Returns the matrix that results from multiplying two matrices together. + The first matrix. + The second matrix. + The product matrix. + + + Subtracts each element in a second matrix from its corresponding element in a first matrix. + The first matrix. + The second matrix. + The matrix containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Negates the specified matrix by multiplying all its values by -1. + The matrix to negate. + The negated matrix. + + + Subtracts each element in a second matrix from its corresponding element in a first matrix. + The first matrix. + The second matrix. + The matrix containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Returns a string that represents this matrix. + The string representation of this matrix. + + + Transforms the specified matrix by applying the specified Quaternion rotation. + The matrix to transform. + The rotation t apply. + The transformed matrix. + + + Gets or sets the translation component of this matrix. + The translation component of the current instance. + + + Transposes the rows and columns of a matrix. + The matrix to transpose. + The transposed matrix. + + + Represents a three-dimensional plane. + + + Creates a object from a specified four-dimensional vector. + A vector whose first three elements describe the normal vector, and whose defines the distance along that normal from the origin. + + + Creates a object from a specified normal and the distance along the normal from the origin. + The plane's normal vector. + The plane's distance from the origin along its normal vector. + + + Creates a object from the X, Y, and Z components of its normal, and its distance from the origin on that normal. + The X component of the normal. + The Y component of the normal. + The Z component of the normal. + The distance of the plane along its normal from the origin. + + + Creates a object that contains three specified points. + The first point defining the plane. + The second point defining the plane. + The third point defining the plane. + The plane containing the three points. + + + The distance of the plane along its normal from the origin. + + + + Calculates the dot product of a plane and a 4-dimensional vector. + The plane. + The four-dimensional vector. + The dot product. + + + Returns the dot product of a specified three-dimensional vector and the normal vector of this plane plus the distance () value of the plane. + The plane. + The 3-dimensional vector. + The dot product. + + + Returns the dot product of a specified three-dimensional vector and the vector of this plane. + The plane. + The three-dimensional vector. + The dot product. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Returns a value that indicates whether this instance and another plane object are equal. + The other plane. + true if the two planes are equal; otherwise, false. + + + Returns the hash code for this instance. + The hash code. + + + The normal vector of the plane. + + + + Creates a new object whose normal vector is the source plane's normal vector normalized. + The source plane. + The normalized plane. + + + Returns a value that indicates whether two planes are equal. + The first plane to compare. + The second plane to compare. + true if value1 and value2 are equal; otherwise, false. + + + Returns a value that indicates whether two planes are not equal. + The first plane to compare. + The second plane to compare. + true if value1 and value2 are not equal; otherwise, false. + + + Returns the string representation of this plane object. + A string that represents this object. + + + Transforms a normalized plane by a 4x4 matrix. + The normalized plane to transform. + The transformation matrix to apply to plane. + The transformed plane. + + + Transforms a normalized plane by a Quaternion rotation. + The normalized plane to transform. + The Quaternion rotation to apply to the plane. + A new plane that results from applying the Quaternion rotation. + + + Represents a vector that is used to encode three-dimensional physical rotations. + + + Creates a quaternion from the specified vector and rotation parts. + The vector part of the quaternion. + The rotation part of the quaternion. + + + Constructs a quaternion from the specified components. + The value to assign to the X component of the quaternion. + The value to assign to the Y component of the quaternion. + The value to assign to the Z component of the quaternion. + The value to assign to the W component of the quaternion. + + + Adds each element in one quaternion with its corresponding element in a second quaternion. + The first quaternion. + The second quaternion. + The quaternion that contains the summed values of value1 and value2. + + + Concatenates two quaternions. + The first quaternion rotation in the series. + The second quaternion rotation in the series. + A new quaternion representing the concatenation of the value1 rotation followed by the value2 rotation. + + + Returns the conjugate of a specified quaternion. + The quaternion. + A new quaternion that is the conjugate of value. + + + Creates a quaternion from a vector and an angle to rotate about the vector. + The vector to rotate around. + The angle, in radians, to rotate around the vector. + The newly created quaternion. + + + Creates a quaternion from the specified rotation matrix. + The rotation matrix. + The newly created quaternion. + + + Creates a new quaternion from the given yaw, pitch, and roll. + The yaw angle, in radians, around the Y axis. + The pitch angle, in radians, around the X axis. + The roll angle, in radians, around the Z axis. + The resulting quaternion. + + + Divides one quaternion by a second quaternion. + The dividend. + The divisor. + The quaternion that results from dividing value1 by value2. + + + Calculates the dot product of two quaternions. + The first quaternion. + The second quaternion. + The dot product. + + + Returns a value that indicates whether this instance and another quaternion are equal. + The other quaternion. + true if the two quaternions are equal; otherwise, false. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Returns the hash code for this instance. + The hash code. + + + Gets a quaternion that represents no rotation. + A quaternion whose values are (0, 0, 0, 1). + + + Returns the inverse of a quaternion. + The quaternion. + The inverted quaternion. + + + Gets a value that indicates whether the current instance is the identity quaternion. + true if the current instance is the identity quaternion; otherwise, false. + + + Calculates the length of the quaternion. + The computed length of the quaternion. + + + Calculates the squared length of the quaternion. + The length squared of the quaternion. + + + Performs a linear interpolation between two quaternions based on a value that specifies the weighting of the second quaternion. + The first quaternion. + The second quaternion. + The relative weight of quaternion2 in the interpolation. + The interpolated quaternion. + + + Returns the quaternion that results from multiplying two quaternions together. + The first quaternion. + The second quaternion. + The product quaternion. + + + Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor. + The source quaternion. + The scalar value. + The scaled quaternion. + + + Reverses the sign of each component of the quaternion. + The quaternion to negate. + The negated quaternion. + + + Divides each component of a specified by its length. + The quaternion to normalize. + The normalized quaternion. + + + Adds each element in one quaternion with its corresponding element in a second quaternion. + The first quaternion. + The second quaternion. + The quaternion that contains the summed values of value1 and value2. + + + Divides one quaternion by a second quaternion. + The dividend. + The divisor. + The quaternion that results from dividing value1 by value2. + + + Returns a value that indicates whether two quaternions are equal. + The first quaternion to compare. + The second quaternion to compare. + true if the two quaternions are equal; otherwise, false. + + + Returns a value that indicates whether two quaternions are not equal. + The first quaternion to compare. + The second quaternion to compare. + true if value1 and value2 are not equal; otherwise, false. + + + Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor. + The source quaternion. + The scalar value. + The scaled quaternion. + + + Returns the quaternion that results from multiplying two quaternions together. + The first quaternion. + The second quaternion. + The product quaternion. + + + Subtracts each element in a second quaternion from its corresponding element in a first quaternion. + The first quaternion. + The second quaternion. + The quaternion containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Reverses the sign of each component of the quaternion. + The quaternion to negate. + The negated quaternion. + + + Interpolates between two quaternions, using spherical linear interpolation. + The first quaternion. + The second quaternion. + The relative weight of the second quaternion in the interpolation. + The interpolated quaternion. + + + Subtracts each element in a second quaternion from its corresponding element in a first quaternion. + The first quaternion. + The second quaternion. + The quaternion containing the values that result from subtracting each element in value2 from its corresponding element in value1. + + + Returns a string that represents this quaternion. + The string representation of this quaternion. + + + The rotation component of the quaternion. + + + + The X value of the vector component of the quaternion. + + + + The Y value of the vector component of the quaternion. + + + + The Z value of the vector component of the quaternion. + + + + Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms. + The vector type. T can be any primitive numeric type. + + + Creates a vector whose components are of a specified type. + The numeric type that defines the type of the components in the vector. + + + Creates a vector from a specified array. + A numeric array. + values is null. + + + Creates a vector from a specified array starting at a specified index position. + A numeric array. + The starting index position from which to create the vector. + values is null. + index is less than zero. -or- The length of values minus index is less than . + + + Copies the vector instance to a specified destination array. + The array to receive a copy of the vector values. + destination is null. + The number of elements in the current vector is greater than the number of elements available in the destination array. + + + Copies the vector instance to a specified destination array starting at a specified index position. + The array to receive a copy of the vector values. + The starting index in destination at which to begin the copy operation. + destination is null. + The number of elements in the current instance is greater than the number of elements available from startIndex to the end of the destination array. + index is less than zero or greater than the last index in destination. + + + Returns the number of elements stored in the vector. + The number of elements stored in the vector. + Access to the property getter via reflection is not supported. + + + Returns a value that indicates whether this instance is equal to a specified vector. + The vector to compare with this instance. + true if the current instance and other are equal; otherwise, false. + + + Returns a value that indicates whether this instance is equal to a specified object. + The object to compare with this instance. + true if the current instance and obj are equal; otherwise, false. The method returns false if obj is null, or if obj is a vector of a different type than the current instance. + + + Returns the hash code for this instance. + The hash code. + + + Gets the element at a specified index. + The index of the element to return. + The element at index index. + index is less than zero. -or- index is greater than or equal to . + + + Returns a vector containing all ones. + A vector containing all ones. + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Returns a new vector by performing a bitwise And operation on each of the elements in two vectors. + The first vector. + The second vector. + The vector that results from the bitwise And of left and right. + + + Returns a new vector by performing a bitwise Or operation on each of the elements in two vectors. + The first vector. + The second vector. + The vector that results from the bitwise Or of the elements in left and right. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector that results from dividing left by right. + + + Returns a value that indicates whether each pair of elements in two specified vectors are equal. + The first vector to compare. + The second vector to compare. + true if left and right are equal; otherwise, false. + + + Returns a new vector by performing a bitwise XOr operation on each of the elements in two vectors. + The first vector. + The second vector. + The vector that results from the bitwise XOr of the elements in left and right. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Reinterprets the bits of the specified vector into a vector of type . + The vector to reinterpret. + The reinterpreted vector. + + + Returns a value that indicates whether any single pair of elements in the specified vectors is equal. + The first vector to compare. + The second vector to compare. + true if any element pairs in left and right are equal. false if no element pairs are equal. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiplies a vector by a specified scalar value. + The source vector. + A scalar value. + The scaled vector. + + + Multiplies a vector by the given scalar. + The scalar value. + The source vector. + The scaled vector. + + + Returns a new vector whose elements are obtained by taking the one's complement of a specified vector's elements. + The source vector. + The one's complement vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The vector that results from subtracting right from left. + + + Negates a given vector. + The vector to negate. + The negated vector. + + + Returns the string representation of this vector using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. + A or that defines the format of individual elements. + A format provider that supplies culture-specific formatting information. + The string representation of the current instance. + + + Returns the string representation of this vector using default formatting. + The string representation of this vector. + + + Returns the string representation of this vector using the specified format string to format individual elements. + A or that defines the format of individual elements. + The string representation of the current instance. + + + Returns a vector containing all zeroes. + A vector containing all zeroes. + + + Provides a collection of static convenience methods for creating, manipulating, combining, and converting generic vectors. + + + Returns a new vector whose elements are the absolute values of the given vector's elements. + The source vector. + The vector type. T can be any primitive numeric type. + The absolute value vector. + + + Returns a new vector whose values are the sum of each pair of elements from two given vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The summed vector. + + + Returns a new vector by performing a bitwise And Not operation on each pair of corresponding elements in two vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Reinterprets the bits of a specified vector into those of a vector of unsigned bytes. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a double-precision floating-point vector. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of 16-bit integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of long integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of signed bytes. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a single-precision floating-point vector. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of unsigned 16-bit integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of unsigned integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Reinterprets the bits of a specified vector into those of a vector of unsigned long integers. + The source vector. + The vector type. T can be any primitive numeric type. + The reinterpreted vector. + + + Returns a new vector by performing a bitwise And operation on each pair of elements in two vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a new vector by performing a bitwise Or operation on each pair of elements in two vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Creates a new single-precision vector with elements selected between two specified single-precision source vectors based on an integral mask vector. + The integral mask vector used to drive selection. + The first source vector. + The second source vector. + The new vector with elements selected based on the mask. + + + Creates a new double-precision vector with elements selected between two specified double-precision source vectors based on an integral mask vector. + The integral mask vector used to drive selection. + The first source vector. + The second source vector. + The new vector with elements selected based on the mask. + + + Creates a new vector of a specified type with elements selected between two specified source vectors of the same type based on an integral mask vector. + The integral mask vector used to drive selection. + The first source vector. + The second source vector. + The vector type. T can be any primitive numeric type. + The new vector with elements selected based on the mask. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a new vector whose values are the result of dividing the first vector's elements by the corresponding elements in the second vector. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The divided vector. + + + Returns the dot product of two vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The dot product. + + + Returns a new integral vector whose elements signal whether the elements in two specified double-precision vectors are equal. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new integral vector whose elements signal whether the elements in two specified integral vectors are equal. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector whose elements signal whether the elements in two specified long integer vectors are equal. + The first vector to compare. + The second vector to compare. + The resulting long integer vector. + + + Returns a new integral vector whose elements signal whether the elements in two specified single-precision vectors are equal. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector of a specified type whose elements signal whether the elements in two specified vectors of the same type are equal. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a value that indicates whether each pair of elements in the given vectors is equal. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if all elements in left and right are equal; otherwise, false. + + + Returns a value that indicates whether any single pair of elements in the given vectors is equal. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if any element pair in left and right is equal; otherwise, false. + + + Returns a new integral vector whose elements signal whether the elements in one double-precision floating-point vector are greater than their corresponding elements in a second double-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new integral vector whose elements signal whether the elements in one integral vector are greater than their corresponding elements in a second integral vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new long integer vector whose elements signal whether the elements in one long integer vector are greater than their corresponding elements in a second long integer vector. + The first vector to compare. + The second vector to compare. + The resulting long integer vector. + + + Returns a new integral vector whose elements signal whether the elements in one single-precision floating-point vector are greater than their corresponding elements in a second single-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector whose elements signal whether the elements in one vector of a specified type are greater than their corresponding elements in the second vector of the same time. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a value that indicates whether all elements in the first vector are greater than the corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if all elements in left are greater than the corresponding elements in right; otherwise, false. + + + Returns a value that indicates whether any element in the first vector is greater than the corresponding element in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if any element in left is greater than the corresponding element in right; otherwise, false. + + + Returns a new integral vector whose elements signal whether the elements in one vector are greater than or equal to their corresponding elements in the single-precision floating-point second vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new long integer vector whose elements signal whether the elements in one long integer vector are greater than or equal to their corresponding elements in the second long integer vector. + The first vector to compare. + The second vector to compare. + The resulting long integer vector. + + + Returns a new integral vector whose elements signal whether the elements in one integral vector are greater than or equal to their corresponding elements in the second integral vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new integral vector whose elements signal whether the elements in one vector are greater than or equal to their corresponding elements in the second double-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector whose elements signal whether the elements in one vector of a specified type are greater than or equal to their corresponding elements in the second vector of the same type. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a value that indicates whether all elements in the first vector are greater than or equal to all the corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if all elements in left are greater than or equal to the corresponding elements in right; otherwise, false. + + + Returns a value that indicates whether any element in the first vector is greater than or equal to the corresponding element in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if any element in left is greater than or equal to the corresponding element in right; otherwise, false. + + + Gets a value that indicates whether vector operations are subject to hardware acceleration through JIT intrinsic support. + true if vector operations are subject to hardware acceleration; otherwise, false. + + + Returns a new integral vector whose elements signal whether the elements in one double-precision floating-point vector are less than their corresponding elements in a second double-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new integral vector whose elements signal whether the elements in one integral vector are less than their corresponding elements in a second integral vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector + + + Returns a new long integer vector whose elements signal whether the elements in one long integer vector are less than their corresponding elements in a second long integer vector. + The first vector to compare. + The second vector to compare. + The resulting long integer vector. + + + Returns a new integral vector whose elements signal whether the elements in one single-precision vector are less than their corresponding elements in a second single-precision vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector of a specified type whose elements signal whether the elements in one vector are less than their corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a value that indicates whether all of the elements in the first vector are less than their corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if all of the elements in left are less than the corresponding elements in right; otherwise, false. + + + Returns a value that indicates whether any element in the first vector is less than the corresponding element in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if any element in left is less than the corresponding element in right; otherwise, false. + + + Returns a new integral vector whose elements signal whether the elements in one double-precision floating-point vector are less than or equal to their corresponding elements in a second double-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new integral vector whose elements signal whether the elements in one integral vector are less than or equal to their corresponding elements in a second integral vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new long integer vector whose elements signal whether the elements in one long integer vector are less or equal to their corresponding elements in a second long integer vector. + The first vector to compare. + The second vector to compare. + The resulting long integer vector. + + + Returns a new integral vector whose elements signal whether the elements in one single-precision floating-point vector are less than or equal to their corresponding elements in a second single-precision floating-point vector. + The first vector to compare. + The second vector to compare. + The resulting integral vector. + + + Returns a new vector whose elements signal whether the elements in one vector are less than or equal to their corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a value that indicates whether all elements in the first vector are less than or equal to their corresponding elements in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if all of the elements in left are less than or equal to the corresponding elements in right; otherwise, false. + + + Returns a value that indicates whether any element in the first vector is less than or equal to the corresponding element in the second vector. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + true if any element in left is less than or equal to the corresponding element in right; otherwise, false. + + + Returns a new vector whose elements are the maximum of each pair of elements in the two given vectors. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The maximum vector. + + + Returns a new vector whose elements are the minimum of each pair of elements in the two given vectors. + The first vector to compare. + The second vector to compare. + The vector type. T can be any primitive numeric type. + The minimum vector. + + + Returns a new vector whose values are a scalar value multiplied by each of the values of a specified vector. + The scalar value. + The vector. + The vector type. T can be any primitive numeric type. + The scaled vector. + + + Returns a new vector whose values are the product of each pair of elements in two specified vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The product vector. + + + Returns a new vector whose values are the values of a specified vector each multiplied by a scalar value. + The vector. + The scalar value. + The vector type. T can be any primitive numeric type. + The scaled vector. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a new vector whose elements are the negation of the corresponding element in the specified vector. + The source vector. + The vector type. T can be any primitive numeric type. + The negated vector. + + + Returns a new vector whose elements are obtained by taking the one's complement of a specified vector's elements. + The source vector. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Returns a new vector whose elements are the square roots of a specified vector's elements. + The source vector. + The vector type. T can be any primitive numeric type. + The square root vector. + + + Returns a new vector whose values are the difference between the elements in the second vector and their corresponding elements in the first vector. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The difference vector. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a new vector by performing a bitwise exclusive Or (XOr) operation on each pair of elements in two vectors. + The first vector. + The second vector. + The vector type. T can be any primitive numeric type. + The resulting vector. + + + Represents a vector with two single-precision floating-point values. + + + Creates a new object whose two elements have the same value. + The value to assign to both elements. + + + Creates a vector whose elements have the specified values. + The value to assign to the field. + The value to assign to the field. + + + Returns a vector whose elements are the absolute values of each of the specified vector's elements. + A vector. + The absolute value vector. + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Restricts a vector between a minimum and a maximum value. + The vector to restrict. + The minimum value. + The maximum value. + The restricted vector. + + + Copies the elements of the vector to a specified array. + The destination array. + array is null. + The number of elements in the current instance is greater than in the array. + array is multidimensional. + + + Copies the elements of the vector to a specified array starting at a specified index position. + The destination array. + The index at which to copy the first element of the vector. + array is null. + The number of elements in the current instance is greater than in the array. + index is less than zero. -or- index is greater than or equal to the array length. + array is multidimensional. + + + Computes the Euclidean distance between the two given points. + The first point. + The second point. + The distance. + + + Returns the Euclidean distance squared between two specified points. + The first point. + The second point. + The distance squared. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector resulting from the division. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The vector that results from the division. + + + Returns the dot product of two vectors. + The first vector. + The second vector. + The dot product. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Returns a value that indicates whether this instance and another vector are equal. + The other vector. + true if the two vectors are equal; otherwise, false. + + + Returns the hash code for this instance. + The hash code. + + + Returns the length of the vector. + The vector's length. + + + Returns the length of the vector squared. + The vector's length squared. + + + Performs a linear interpolation between two vectors based on the given weighting. + The first vector. + The second vector. + A value between 0 and 1 that indicates the weight of value2. + The interpolated vector. + + + Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The maximized vector. + + + Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The minimized vector. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiplies a vector by a specified scalar. + The vector to multiply. + The scalar value. + The scaled vector. + + + Multiplies a scalar value by a specified vector. + The scaled value. + The vector. + The scaled vector. + + + Negates a specified vector. + The vector to negate. + The negated vector. + + + Returns a vector with the same direction as the specified vector, but with a length of one. + The vector to normalize. + The normalized vector. + + + Gets a vector whose 2 elements are equal to one. + A vector whose two elements are equal to one (that is, it returns the vector (1,1). + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector that results from dividing left by right. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The result of the division. + + + Returns a value that indicates whether each pair of elements in two specified vectors is equal. + The first vector to compare. + The second vector to compare. + true if left and right are equal; otherwise, false. + + + Returns a value that indicates whether two specified vectors are not equal. + The first vector to compare. + The second vector to compare. + true if left and right are not equal; otherwise, false. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiples the specified vector by the specified scalar value. + The vector. + The scalar value. + The scaled vector. + + + Multiples the scalar value by the specified vector. + The vector. + The scalar value. + The scaled vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The vector that results from subtracting right from left. + + + Negates the specified vector. + The vector to negate. + The negated vector. + + + Returns the reflection of a vector off a surface that has the specified normal. + The source vector. + The normal of the surface being reflected off. + The reflected vector. + + + Returns a vector whose elements are the square root of each of a specified vector's elements. + A vector. + The square root vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The difference vector. + + + Returns the string representation of the current instance using default formatting. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements. + A or that defines the format of individual elements. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. + A or that defines the format of individual elements. + A format provider that supplies culture-specific formatting information. + The string representation of the current instance. + + + Transforms a vector by a specified 3x2 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Transforms a vector by a specified 4x4 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Transforms a vector by the specified Quaternion rotation value. + The vector to rotate. + The rotation to apply. + The transformed vector. + + + Transforms a vector normal by the given 3x2 matrix. + The source vector. + The matrix. + The transformed vector. + + + Transforms a vector normal by the given 4x4 matrix. + The source vector. + The matrix. + The transformed vector. + + + Gets the vector (1,0). + The vector (1,0). + + + Gets the vector (0,1). + The vector (0,1). + + + The X component of the vector. + + + + The Y component of the vector. + + + + Returns a vector whose 2 elements are equal to zero. + A vector whose two elements are equal to zero (that is, it returns the vector (0,0). + + + Represents a vector with three single-precision floating-point values. + + + Creates a new object whose three elements have the same value. + The value to assign to all three elements. + + + Creates a new object from the specified object and the specified value. + The vector with two elements. + The additional value to assign to the field. + + + Creates a vector whose elements have the specified values. + The value to assign to the field. + The value to assign to the field. + The value to assign to the field. + + + Returns a vector whose elements are the absolute values of each of the specified vector's elements. + A vector. + The absolute value vector. + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Restricts a vector between a minimum and a maximum value. + The vector to restrict. + The minimum value. + The maximum value. + The restricted vector. + + + Copies the elements of the vector to a specified array. + The destination array. + array is null. + The number of elements in the current instance is greater than in the array. + array is multidimensional. + + + Copies the elements of the vector to a specified array starting at a specified index position. + The destination array. + The index at which to copy the first element of the vector. + array is null. + The number of elements in the current instance is greater than in the array. + index is less than zero. -or- index is greater than or equal to the array length. + array is multidimensional. + + + Computes the cross product of two vectors. + The first vector. + The second vector. + The cross product. + + + Computes the Euclidean distance between the two given points. + The first point. + The second point. + The distance. + + + Returns the Euclidean distance squared between two specified points. + The first point. + The second point. + The distance squared. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The vector that results from the division. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector resulting from the division. + + + Returns the dot product of two vectors. + The first vector. + The second vector. + The dot product. + + + Returns a value that indicates whether this instance and another vector are equal. + The other vector. + true if the two vectors are equal; otherwise, false. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Returns the hash code for this instance. + The hash code. + + + Returns the length of this vector object. + The vector's length. + + + Returns the length of the vector squared. + The vector's length squared. + + + Performs a linear interpolation between two vectors based on the given weighting. + The first vector. + The second vector. + A value between 0 and 1 that indicates the weight of value2. + The interpolated vector. + + + Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The maximized vector. + + + Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The minimized vector. + + + Multiplies a scalar value by a specified vector. + The scaled value. + The vector. + The scaled vector. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiplies a vector by a specified scalar. + The vector to multiply. + The scalar value. + The scaled vector. + + + Negates a specified vector. + The vector to negate. + The negated vector. + + + Returns a vector with the same direction as the specified vector, but with a length of one. + The vector to normalize. + The normalized vector. + + + Gets a vector whose 3 elements are equal to one. + A vector whose three elements are equal to one (that is, it returns the vector (1,1,1). + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector that results from dividing left by right. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The result of the division. + + + Returns a value that indicates whether each pair of elements in two specified vectors is equal. + The first vector to compare. + The second vector to compare. + true if left and right are equal; otherwise, false. + + + Returns a value that indicates whether two specified vectors are not equal. + The first vector to compare. + The second vector to compare. + true if left and right are not equal; otherwise, false. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiples the specified vector by the specified scalar value. + The vector. + The scalar value. + The scaled vector. + + + Multiples the scalar value by the specified vector. + The vector. + The scalar value. + The scaled vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The vector that results from subtracting right from left. + + + Negates the specified vector. + The vector to negate. + The negated vector. + + + Returns the reflection of a vector off a surface that has the specified normal. + The source vector. + The normal of the surface being reflected off. + The reflected vector. + + + Returns a vector whose elements are the square root of each of a specified vector's elements. + A vector. + The square root vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The difference vector. + + + Returns the string representation of the current instance using default formatting. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements. + A or that defines the format of individual elements. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. + A or that defines the format of individual elements. + A format provider that supplies culture-specific formatting information. + The string representation of the current instance. + + + Transforms a vector by a specified 4x4 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Transforms a vector by the specified Quaternion rotation value. + The vector to rotate. + The rotation to apply. + The transformed vector. + + + Transforms a vector normal by the given 4x4 matrix. + The source vector. + The matrix. + The transformed vector. + + + Gets the vector (1,0,0). + The vector (1,0,0). + + + Gets the vector (0,1,0). + The vector (0,1,0).. + + + Gets the vector (0,0,1). + The vector (0,0,1). + + + The X component of the vector. + + + + The Y component of the vector. + + + + The Z component of the vector. + + + + Gets a vector whose 3 elements are equal to zero. + A vector whose three elements are equal to zero (that is, it returns the vector (0,0,0). + + + Represents a vector with four single-precision floating-point values. + + + Creates a new object whose four elements have the same value. + The value to assign to all four elements. + + + Constructs a new object from the specified object and a W component. + The vector to use for the X, Y, and Z components. + The W component. + + + Creates a new object from the specified object and a Z and a W component. + The vector to use for the X and Y components. + The Z component. + The W component. + + + Creates a vector whose elements have the specified values. + The value to assign to the field. + The value to assign to the field. + The value to assign to the field. + The value to assign to the field. + + + Returns a vector whose elements are the absolute values of each of the specified vector's elements. + A vector. + The absolute value vector. + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Restricts a vector between a minimum and a maximum value. + The vector to restrict. + The minimum value. + The maximum value. + The restricted vector. + + + Copies the elements of the vector to a specified array. + The destination array. + array is null. + The number of elements in the current instance is greater than in the array. + array is multidimensional. + + + Copies the elements of the vector to a specified array starting at a specified index position. + The destination array. + The index at which to copy the first element of the vector. + array is null. + The number of elements in the current instance is greater than in the array. + index is less than zero. -or- index is greater than or equal to the array length. + array is multidimensional. + + + Computes the Euclidean distance between the two given points. + The first point. + The second point. + The distance. + + + Returns the Euclidean distance squared between two specified points. + The first point. + The second point. + The distance squared. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector resulting from the division. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The vector that results from the division. + + + Returns the dot product of two vectors. + The first vector. + The second vector. + The dot product. + + + Returns a value that indicates whether this instance and another vector are equal. + The other vector. + true if the two vectors are equal; otherwise, false. + + + Returns a value that indicates whether this instance and a specified object are equal. + The object to compare with the current instance. + true if the current instance and obj are equal; otherwise, false```. If <code data-dev-comment-type="paramref">obj</code> isnull, the method returnsfalse`. + + + Returns the hash code for this instance. + The hash code. + + + Returns the length of this vector object. + The vector's length. + + + Returns the length of the vector squared. + The vector's length squared. + + + Performs a linear interpolation between two vectors based on the given weighting. + The first vector. + The second vector. + A value between 0 and 1 that indicates the weight of value2. + The interpolated vector. + + + Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The maximized vector. + + + Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. + The first vector. + The second vector. + The minimized vector. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiplies a vector by a specified scalar. + The vector to multiply. + The scalar value. + The scaled vector. + + + Multiplies a scalar value by a specified vector. + The scaled value. + The vector. + The scaled vector. + + + Negates a specified vector. + The vector to negate. + The negated vector. + + + Returns a vector with the same direction as the specified vector, but with a length of one. + The vector to normalize. + The normalized vector. + + + Gets a vector whose 4 elements are equal to one. + Returns . + + + Adds two vectors together. + The first vector to add. + The second vector to add. + The summed vector. + + + Divides the first vector by the second. + The first vector. + The second vector. + The vector that results from dividing left by right. + + + Divides the specified vector by a specified scalar value. + The vector. + The scalar value. + The result of the division. + + + Returns a value that indicates whether each pair of elements in two specified vectors is equal. + The first vector to compare. + The second vector to compare. + true if left and right are equal; otherwise, false. + + + Returns a value that indicates whether two specified vectors are not equal. + The first vector to compare. + The second vector to compare. + true if left and right are not equal; otherwise, false. + + + Multiplies two vectors together. + The first vector. + The second vector. + The product vector. + + + Multiples the specified vector by the specified scalar value. + The vector. + The scalar value. + The scaled vector. + + + Multiples the scalar value by the specified vector. + The vector. + The scalar value. + The scaled vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The vector that results from subtracting right from left. + + + Negates the specified vector. + The vector to negate. + The negated vector. + + + Returns a vector whose elements are the square root of each of a specified vector's elements. + A vector. + The square root vector. + + + Subtracts the second vector from the first. + The first vector. + The second vector. + The difference vector. + + + Returns the string representation of the current instance using default formatting. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements. + A or that defines the format of individual elements. + The string representation of the current instance. + + + Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. + A or that defines the format of individual elements. + A format provider that supplies culture-specific formatting information. + The string representation of the current instance. + + + Transforms a four-dimensional vector by the specified Quaternion rotation value. + The vector to rotate. + The rotation to apply. + The transformed vector. + + + Transforms a four-dimensional vector by a specified 4x4 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Transforms a three-dimensional vector by the specified Quaternion rotation value. + The vector to rotate. + The rotation to apply. + The transformed vector. + + + Transforms a two-dimensional vector by a specified 4x4 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Transforms a two-dimensional vector by the specified Quaternion rotation value. + The vector to rotate. + The rotation to apply. + The transformed vector. + + + Transforms a three-dimensional vector by a specified 4x4 matrix. + The vector to transform. + The transformation matrix. + The transformed vector. + + + Gets the vector (0,0,0,1). + The vector (0,0,0,1). + + + Gets the vector (1,0,0,0). + The vector (1,0,0,0). + + + Gets the vector (0,1,0,0). + The vector (0,1,0,0).. + + + Gets a vector whose 4 elements are equal to zero. + The vector (0,0,1,0). + + + The W component of the vector. + + + + The X component of the vector. + + + + The Y component of the vector. + + + + The Z component of the vector. + + + + Gets a vector whose 4 elements are equal to zero. + A vector whose four elements are equal to zero (that is, it returns the vector (0,0,0,0). + + + \ No newline at end of file diff --git a/SpaceWarpPatcherLibraries/System.Reflection.Metadata.dll b/SpaceWarpPatcherLibraries/System.Reflection.Metadata.dll new file mode 100644 index 00000000..9aa903c8 Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Reflection.Metadata.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Reflection.Metadata.xml b/SpaceWarpPatcherLibraries/System.Reflection.Metadata.xml new file mode 100644 index 00000000..27db6fa5 --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Reflection.Metadata.xml @@ -0,0 +1,8275 @@ + + + + System.Reflection.Metadata + + + + + Content type masked bits that correspond to values of . + + + Just-In-Time (JIT) compiler optimization is disabled for the assembly. + + + Just-In-Time (JIT) compiler tracking is enabled for the assembly. + + + The assembly reference holds the full (unhashed) public key. Not applicable on assembly definition. + + + The implementation of the referenced assembly used at runtime is not expected to match the version seen at compile time. + + + The assembly contains Windows Runtime code. + + + Specifies the hash algorithms used for hashing assembly files and for generating the strong name. + + + + Retrieves the MD5 message-digest algorithm. + Due to collision problems with MD5, Microsoft recommends SHA256. + MD5 was developed by Rivest in 1991. It is basically MD4 with safety-belts and, while it is slightly slower than MD4, it helps provide more security. The algorithm consists of four distinct rounds, which has a slightly different design from that of MD4. Message-digest size, as well as padding requirements, remain the same. + + + + + A mask indicating that there is no hash algorithm. + If you specify for a multi-module assembly, the common language runtime defaults to the SHA1 algorithm, since multi-module assemblies need to generate a hash. + + + + + Retrieves a revision of the Secure Hash Algorithm that corrects an unpublished flaw in SHA. + Due to collision problems with SHA1, Microsoft recommends SHA256. + + + + Retrieves a version of the Secure Hash Algorithm with a hash size of 256 bits. + + + Retrieves a version of the Secure Hash Algorithm with a hash size of 384 bits. + + + Retrieves a version of the Secure Hash Algorithm with a hash size of 512 bits. + + + Specifies the security actions that can be performed using declarative security. + + + The calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource. + + + Check that all callers in the call chain have been granted the specified permission. + + + Without further checks refuse Demand for the specified permission. + + + The derived class inheriting the class or overriding a method is required to have the specified permission. + + + Check that the immediate caller has been granted the specified permission. + + + No declarative security action. + + + Without further checks, refuse the demand for all permissions other than those specified. + + + Request the minimum permissions required for code to run. This action can only be used within the scope of the assembly. + + + Request additional permissions that are optional (not required to run). This request implicitly refuses all other permissions not specifically requested. This action can only be used within the scope of the assembly. + + + Request that permissions that might be misused not be granted to the calling code. This action can only be used within the scope of the assembly. + + + + The resource is not exported from the assembly. + + + The resource is exported from the assembly. + + + Masks just the visibility-related attributes. + + + Represents the shape of an array type. + + + Initializes a new instance of the structure. + The number of dimensions in the array. + The size of each dimension. + The lower-bound of each dimension. + + + Gets the lower-bounds of all dimensions. Length may be smaller than rank, in which case the trailing dimensions have unspecified lower bounds. + An array of lower-bounds. + + + Gets the number of dimensions in the array. + The number of dimensions. + + + Gets the sizes of all dimensions. + An array of sizes. + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets a value that indicates whether the file contains metadata. + + if the file contains metadata, otherwise. + + + Gets the hash value of the file content calculated using . + A instance representing the hash value of the file content. + + + Gets the file name, including its extension. + A instance representing the file name with its extension. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of . + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + A collection of assembly references. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + The builder is not writable; it has been linked with another one. + + + + + + + Compares the current content of this writer with another one. + A instance to compare with this one. + Content is not available; the builder has been linked with another one. + + if equal; otherwise, . + + + + + Returns a sequence of all blobs that represent the content of the builder. + Content is not available; the builder has been linked with another one. + A sequence of blobs. + + + + + is . + The builder is not writable; it has been linked with another one. + + + + + is . + The builder is not writable; it has been linked with another one. + + + + The builder is not writable; it has been linked with another one. + + + Reserves a contiguous block of bytes. + + + is negative. + The builder is not writable; it has been linked with another one. + + + Content is not available; the builder has been linked with another one. + + + + + The range specified by and falls outside of the bounds of the buffer content. + Content is not available; the builder has been linked with another one. + + + Content is not available; the builder has been linked with another one. + + + + + The range specified by and falls outside of the bounds of the buffer content. + Content is not available; the builder has been linked with another one. + + + Attempts to write a sequence of bytes to the builder. A return value indicates the number of bytes successfully written. + + + + is . + + is negative. + The builder is not writable; it has been linked with another one. + The number of bytes successfully written from . + + + Writes a value to the builder. + The value to write. + The builder is not writable; it has been linked with another one. + + + Writes a value to the builder. + The value to write. + The builder is not writable; it has been linked with another one. + + + Writes a specified number of bytes from a buffer to the builder. + + The number of bytes to write. + + is . + + is negative. + The builder is not writable, it has been linked with another one. + + + Writes a specified number of occurrences of a byte value to the builder. + + The number of occurences of to write. + + is negative. + The builder is not writable, it has been linked with another one. + + + Writes the contents of a byte array to the builder. + The byte array to write. + + is . + The builder is not writable; it has been linked with another one. + + + Writes a specified number of bytes starting at a specified index in a byte array to the builder. + + + The number of bytes to write. + + is . + The range specified by and falls outside of the bounds of . + The builder is not writable; it has been linked with another one. + + + Writes the contents of an immutable byte array to the builder. + The array to write. + + is . + The builder is not writable; it has been linked with another one. + + + Writes a specified number of bytes starting at a specified index of an immutable array to the builder. + + + The number of bytes to write. + + is . + The range specified by and falls outside of the bounds of the . + The builder is not writable; it has been linked with another one. + + + Implements compressed unsigned integer encoding as defined by ECMA-335-II chapter 23.2: Blobs and signatures. + The value to write. + + can't be represented as a compressed unsigned integer. + The builder is not writable; it has been linked with another one. + + + Implements compressed signed integer encoding as defined by ECMA-335-II chapter 23.2: Blobs and signatures. + The value to write. + + can't be represented as a compressed signed integer. + The builder is not writable; it has been linked with another one. + + + Writes a constant value (see ECMA-335 Partition II section 22.9) at the current position. + The constant value to write. + + is not of a constant type. + The builder is not writable; it has been linked with another one. + + + + + is . + Content is not available, the builder has been linked with another one. + + + + + is . + Content is not available, the builder has been linked with another one. + + + + + is default (). + Content is not available, the builder has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + Writes a reference to a heap (heap offset) or a table (row number). + Heap offset or table row number. + + to encode the reference as a 16-bit integer; to encode it as a 32-bit integer. + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + Writes a string in SerString format (see ECMA-335-II 23.3 Custom attributes). + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + + Builder is not writable, it has been linked with another one. + + + Writes a string in User String (#US) heap format (see ECMA-335-II 24.2.4 #US and #Blob heaps). + + Builder is not writable, it has been linked with another one. + + + Writes a UTF16 (little-endian) encoded character array at the current position. + + + is . + Builder is not writable, it has been linked with another one. + + + Writes UTF16 (little-endian) encoded string at the current position. + + + is . + Builder is not writable, it has been linked with another one. + + + Writes a UTF8 encoded string at the current position. + Constant value. + + to encode unpaired surrogates as specified; to replace them with a U+FFFD character. + + is . + Builder is not writable, it has been linked with another one. + + + + + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + Creates a reader of the specified memory block. + A pointer to the start of the memory block. + Length in bytes of the memory block. + + is and is greater than zero. + + is negative. + The current platform is not little-endian. + + + Repositions the reader forward by the number of bytes required to satisfy the given alignment. + + + + Searches for a specified byte in the blob following the current position. + The byte value to find. + The index relative to the current position, or -1 if the byte is not found in the blob following the current position. + + + Reads a Blob heap handle encoded as a compressed integer. + + + + + Reads bytes starting at the current position. + The number of bytes to read. + + bytes not available. + The byte array. + + + Reads bytes starting at the current position and writes them to the specified buffer starting at the specified offset. + The number of bytes to read. + The destination buffer the bytes read will be written to. + The offset in the destination buffer where the bytes read will be written. + + bytes not available. + + + + Reads an unsigned compressed integer value. See Metadata Specification section II.23.2: Blobs and signatures. + The data at the current position was not a valid compressed integer. + The value of the compressed integer that was read. + + + Reads a signed compressed integer value. See Metadata Specification section II.23.2: Blobs and signatures. + The data at the current position was not a valid compressed integer. + The value of the compressed integer that was read. + + + Reads a constant value (see ECMA-335 Partition II section 22.9) from the current position. + + Error while reading from the blob. + + is not a valid . + A boxed constant value. To avoid allocating the object use Read* methods directly. + + + + Reads a number. + The data at the current position was not a valid number. + + + + + + + + + Reads a type code encoded in a serialized custom attribute value. + + if the encoding is invalid. + + + Reads a string encoded as a compressed integer containing its length followed by its contents in UTF8. Null strings are encoded as a single 0xFF byte. + The encoding is invalid. + A string value, or . + + + + Reads a type code encoded in a signature. + The type code encoded in the serialized custom attribute value if the encoding is valid, or if the encoding is invalid. + + + + Reads a type handle encoded in a signature as TypeDefOrRefOrSpecEncoded (see ECMA-335 II.23.2.8). + The handle when the encoding is valid. Otherwise, a handle where the property is . + + + + + + Reads a UTF16 (little-endian) encoded string starting at the current position. + The number of bytes to read. + + bytes not available. + The string. + + + Reads a UTF8 encoded string starting at the current position. + The number of bytes to read. + + bytes not available. + The string. + + + Repositions the reader to the start of the underlying memory block. + + + Reads an unsigned compressed integer value. See Metadata Specification section II.23.2: Blobs and signatures. + The value of the compressed integer that was read. + + if the value was read successfully. if the data at the current position was not a valid compressed integer. + + + Reads a signed compressed integer value. See Metadata Specification section II.23.2: Blobs and signatures. + The value of the compressed integer that was read. + + if the value was read successfully. if the data at the current position was not a valid compressed integer. + + + Gets a pointer to the byte at the current position of the reader. + + + Gets the total length of the underlying memory block. + + + Gets or sets the offset from the start of the blob to the current position. + The offset is set outside the bounds of the underlying reader. + + + Gets the number of bytes remaining from current position to the end of the underlying memory block. + + + Gets a pointer to the byte at the start of the underlying memory block. + + + + + + + + + + + + + + + + + + + + + + Compares the current content of this writer with another one. + + + + + + + + + + The range specified by and falls outside of the bounds of the buffer content. + + + + + + Range specified by and falls outside of the bounds of the buffer content. + + + + + + + + + + + + is . + + is negative. + + + + + + is negative. + + + + + is . + + + + + + + is . + Range specified by and falls outside of the bounds of the . + + + + + is . + + + + + + + is . + Range specified by and falls outside of the bounds of the . + + + + + + is . + + is negative. + + + + + is . + + + Implements compressed unsigned integer encoding as defined by ECMA-335-II chapter 23.2: Blobs and signatures. + + + can't be represented as a compressed unsigned integer. + + + Implements compressed signed integer encoding as defined by ECMA-335-II chapter 23.2: Blobs and signatures. + + + can't be represented as a compressed signed integer. + + + Writes a constant value (see ECMA-335 Partition II section 22.9) at the current position. + + + is not of a constant type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Writes a reference to a heap (heap offset) or a table (row number). + Heap offset or table row number. + + to encode the reference as 16-bit integer, to encode as 32-bit integer. + + + + + + Writes a string in SerString format (see ECMA-335-II 23.3 Custom attributes). + + The builder is not writable; it has been linked with another one. + + + + + + + + + + + + + + + + + + + + + Writes a string in User String (#US) heap format (see ECMA-335-II 24.2.4 #US and #Blob heaps). + + Builder is not writable, it has been linked with another one. + + + Writes a UTF16 (little-endian) encoded string at the current position. + + + is . + + + Writes a UTF16 (little-endian) encoded string at the current position. + + + is . + + + Writes a UTF8 encoded string at the current position. + + + + is . + + + + + + + + Gets the parent handle (, , or ). + + + Gets a type code that identifies the type of the constant value. + + + Gets the constant value. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Specifies values that represent types of metadata constants. + + + A Boolean type. + + + An unsigned 1-byte integer. + + + A character type. + + + An 8-byte floating point type. + + + A signed 2-byte integer type. + + + A signed 4-byte integer type. + + + A signed 8-byte integer type. + + + An invalid type. + + + A null reference. + + + A signed 1-byte integer type. + + + A 4-byte floating point type. + + + A type. + + + An unsigned 2-byte integer type. + + + An unsigned 4-byte integer type. + + + An unsigned 8-byte integer type. + + + + Decodes the arguments encoded in the value blob. + + + + + Gets the constructor (the or ) of the custom attribute type. + + + Gets the handle of the metadata entity the attribute is applied to. + + + Gets the value of the attribute. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Represents a named argument decoded from a custom attribute signature. + The type used to represent types of values decoded from the custom attribute signature. + + + Initializes a new instance of the structure using the specified name, kind, type, and value. + The name of the argument. + The kind of the argument. + The type of the argument. + The value of the argument. + + + Gets the kind of argument. + The argument kind. + + + Gets the name of the argument. + The argument name. + + + Gets the type of the argument. + The argument type. + + + Gets the value of the argument. + An object containing the argument value. + + + Specifies constants that define the kinds of arguments in a custom attribute signature. + + + A field argument. + + + A property argument. + + + Represents a typed argument for a custom metadata attribute. + The type of the argument. + + + Initializes a new instance of the structure using the specified argument type and value. + The type of the argument. + The argument value. + + + Gets the type of the argument. + The argument type. + + + Gets the value of the argument. + The argument value. + + + Represents a custom attribute of the type specified by . + The attribute type. + + + Initializes a new instance of the structure using the specified fixed arguments and named arguments. + The fixed arguments. + The named arguments. + + + Gets the fixed arguments for the custom attribute. + An immutable array of arguments. + + + Gets the named arguments for the custom attribute value. + An immutable array of arguments. + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + Gets the offset (in bytes) from the start of the metadata blob to the start of the blob. + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + The source document in the debug metadata. + + + Gets the document content hash. + + + Gets the hash algorithm used to calculate the (SHA1, SHA256, etc.). + + + Gets the source code language (C#, VB, F#, etc.). + + + Gets the document name blob. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + A representing a blob on #Blob heap in Portable PDB structured as Document Name. + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + Encodes array shape. + The number of dimensions in the array (shall be 1 or more). + Dimension sizes. The array may be shorter than but not longer. + Dimension lower bounds, or default() to set all lower bounds to 0. + The array may be shorter than but not longer. + + is outside of range [1, 0xffff], smaller than , or smaller than . + + is . + + + + + + + + Encodes custom attribute signature blob. + Called first, to encode fixed arguments. + Called second, to encode named arguments. + + or is . + + + Encodes custom attribute signature blob. + Returns a pair of encoders that must be used in the order they appear in the parameter list. + Use first, to encode fixed arguments. + Use second, to encode named arguments. + + + Encodes field signature blob. + Encoder of the field type. + + + Encodes local variable signature. + Number of local variables. + + is not in range [0, 0x1fffffff]. + Encoder of a sequence of local variables. + + + Encodes method signature blob. + Calling convention. + Number of generic parameters. + + to encode an instance method signature, to encode a static method signature. + + is not in range [0, 0xffff]. + An encoder of the rest of the signature including return value and parameters. + + + Encodes method specification signature blob. + Number of generic arguments. + + is not in range [0, 0xffff]. + Encoder of generic arguments. + + + Encodes permission set arguments. + Number of arguments in the set. + Encoder of the arguments of the set. + + + Encodes a permission set blob. + Number of attributes in the set. + + is not in range [0, 0x1fffffff]. + Permission set encoder. + + + Encodes property signature blob. + + to encode an instance property signature, to encode a static property signature. + An encoder of the rest of the signature including return value and parameters, which has the same structure as method signature. + + + Encodes type specification signature. + Type encoder of the structured type represented by the type specification (it shall not encode a primitive type). + + + + + Calculates a CustomAttributeType coded index for the specified handle. + + or . + The handle type is unexpected. + + + Calculates a HasConstant coded index for the specified handle. + + , , or . + The handle type is unexpected. + + + Calculates a HasCustomAttribute coded index for the specified handle. + + , , , , , , , , , , , , , , , , , , , , or . + The handle type is unexpected. + + + Calculates a HasCustomDebugInformation coded index for the specified handle. + + , , , , , , , , , , , , , , , , , , , , , , , , , or . + The handle type is unexpected. + + + Calculates a HasDeclSecurity coded index for the specified handle. + + , , or . + The handle type is unexpected. + + + Calculates a HasFieldMarshal coded index for the specified handle. + + or . + The handle type is unexpected. + + + Calculates a HasSemantics coded index for the specified handle. + + or . + The handle type is unexpected. + + + Calculates an implementation coded index for the specified handle. + + , or . + The handle type is unexpected. + + + Calculates a MemberForwarded coded index for the specified handle. + + , . + The handle type is unexpected. + + + Calculates a MemberRefParent coded index for the specified handle. + + , , , , or . + The handle type is unexpected. + + + Calculates a MethodDefOrRef coded index for the specified handle. + + or . + The handle type is unexpected. + + + Calculates a ResolutionScope coded index for the specified handle. + + , , or . + The handle type is unexpected. + + + Calculates a TypeDefOrRef coded index for the specified handle. + + or . + The handle type is unexpected. + + + Calculates a TypeDefOrRefOrSpec coded index for the specified handle. + + , or . + The handle type is unexpected. + + + Calculates a TypeOrMethodDef coded index for the specified handle. + + or . + The handle type is unexpected. + + + + + Adds catch region. + Label marking the first instruction of the try block. + Label marking the instruction immediately following the try block. + Label marking the first instruction of the handler. + Label marking the instruction immediately following the handler. + The type of exception to be caught: , or . + A label was not defined by an instruction encoder this builder is associated with. + +-or- + + is not a valid type handle. + A label has default value. + + + Adds fault region. + Label marking the first instruction of the try block. + Label marking the instruction immediately following the try block. + Label marking the first instruction of the handler. + Label marking the instruction immediately following the handler. + A label was not defined by an instruction encoder this builder is associated with. + A label has default value. + + + Adds catch region. + Label marking the first instruction of the try block. + Label marking the instruction immediately following the try block. + Label marking the first instruction of the handler. + Label marking the instruction immediately following the handler. + Label marking the first instruction of the filter block. + A label was not defined by an instruction encoder this builder is associated with. + A label has default value. + + + Adds finally region. + Label marking the first instruction of the try block. + Label marking the instruction immediately following the try block. + Label marking the first instruction of the handler. + Label marking the instruction immediately following the handler. + A label was not defined by an instruction encoder this builder is associated with. + A label has default value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Encodes a custom modifier. + + , or . + Is optional modifier. + + is or of an unexpected kind. + Encoder of subsequent modifiers. + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + Adds an exception clause. + Clause kind. + Try block start offset. + Try block length. + Handler start offset. + Handler length. + + , or , or nil if is not . + Offset of the filter block, or 0 if the is not . + + is invalid. + + has an invalid value. + +-or- + +, , , or is out of range. + Method body was not declared to have exception regions. + Encoder for the next clause. + + + Adds a fault clause. + Try block start offset. + Try block length. + Handler start offset. + Handler length. + + , or . + + is invalid. + + , , or is out of range. + Method body was not declared to have exception regions. + Encoder for the next clause. + + + Adds a fault clause. + Try block start offset. + Try block length. + Handler start offset. + Handler length. + + , , or is out of range. + Method body was not declared to have exception regions. + Encoder for the next clause. + + + Adds a fault clause. + Try block start offset. + Try block length. + Handler start offset. + Handler length. + Offset of the filter block. + + , , or is out of range. + Method body was not declared to have exception regions. + Encoder for the next clause. + + + Adds a finally clause. + Try block start offset. + Try block length. + Handler start offset. + Handler length. + + , , or is out of range. + Method body was not declared to have exception regions. + Encoder for the next clause. + + + Returns if the region fits small format. + Start offset of the region. + Length of the region. + + + Returns if the number of exception regions first small format. + Number of exception regions. + + + The underlying builder. + + + + if the encoder uses small format. + + + Provides an extension method to access the TypeDefinitionId column of the ExportedType table. + + + Gets a hint at the likely row number of the target type in the TypeDef table of its module. + If the namespaces and names do not match, resolution falls back to a full search of the target TypeDef table. Ignored and should be zero if is . + + + + + + + + + + + + + + + + + + + + + + + + + Encodes instructions. + + + Creates an encoder backed by code and control-flow builders. + Builder to write encoded instructions to. + Builder tracking labels, branches and exception handlers. + Must be specified to be able to use some of the control-flow factory methods of , such as , , etc. + + + Encodes a branch instruction. + Branch instruction to encode. + Label of the target location in instruction stream. + + is not a branch instruction. + +-or- + + was not defined by this encoder. + + is . + + has default value. + + + Encodes call instruction and its operand. + + + + Encodes call instruction and its operand. + + + + Encodes call instruction and its operand. + + + + Encodes call instruction and its operand. + + + + Encodes calli instruction and its operand. + + + + Defines a label that can later be used to mark and refer to a location in the instruction stream. + + is . + Label handle. + + + Encodes argument load instruction. + Index of the argument. + + is negative. + + + Encodes argument address load instruction. + Index of the argument. + + is negative. + + + Encodes constant load instruction. + + + + Encodes constant load instruction. + + + + Encodes constant load instruction. + + + + Encodes constant load instruction. + + + + Encodes local variable load instruction. + Index of the local variable slot. + + is negative. + + + Encodes local variable address load instruction. + Index of the local variable slot. + + is negative. + + + Encodes ldstr instruction and its operand. + + + + Associates specified label with the current IL offset. + Label to mark. + + is . + + was not defined by this encoder. + + has default value. + + + Encodes specified op-code. + + + + Encodes argument store instruction. + Index of the argument. + + is negative. + + + Encodes local variable store instruction. + Index of the local variable slot. + + is negative. + + + Encodes a token. + + + + Encodes a token. + + + + Underlying builder where encoded instructions are written to. + + + Builder tracking labels, branches and exception handlers. + + + Offset of the next encoded instruction. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + 1-based id identifying the label within the context of a . + + + + Provides methods for encoding literals. + + + Creates a new instance of the class with the specified blob builder. + + + Returns the encoder used to encode the literal value. + The encoder of the literal value. + + + Encodes the type and the value of a literal using the specified delegates. + A delegate used to encode the type of the literal. Called first by this method. + A delegate used to encode the value of the literal. Called second by this method. + + or is . + + + Returns a pair of encoders that must be used to encode the type and value of a literal in the order they appear in the parameter list. + When this method returns, a custom attribute element type encoder used to encode the type of the literal. + When this method returns, a scalar encoded used to encode the value of the literal. + + + Encodes the type and the items of a vector literal using the specified delegates. + A delegate used to encode the type of the vector. Called first by this method. + A delegate used to encode the items of the vector. Called second by this method. + + or is . + + + Returns a pair of encoders that must be used to encode the type and the items of a vector literal in the order they appear in the parameter list. + When this method returns, a custom attribute array type encoder used to encode the type of the vector. + When this method returns, a vector encoder used to encode the items of the vector. + + + Gets a vector encoder used to encode the items of a vector. + A vector encoder used to encode the items of a vector. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calculates the handle of the entity within the metadata generation it is defined in, given a handle of an entity in an aggregate metadata. + Handle of an entity in an aggregate metadata. + The generation the entity is defined in. + Handle of the entity within the metadata . + + + The MetadataBuilder class reads and writes metadata for an assembly in a highly performant manner. It is designed for use by compilers and other assembly generation tools. + + + Creates a builder for metadata tables and heaps. + The start offset of the User String heap. The cumulative size of User String heaps of all previous EnC generations should be 0 unless the metadata is EnC delta metadata. + The start offset of the String heap. The cumulative size of String heaps of all previous EnC generations should be 0 unless the metadata is EnC delta metadata. + The start offset of the Blob heap. The cumulative size of Blob heaps of all previous EnC generations should be 0 unless the metadata is EnC delta metadata. + The start offset of the Guid heap. The cumulative size of Guid heaps of all previous EnC generations should be 0 unless the metadata is EnC delta metadata. + Offset is too big. + Offset is negative. + + is not a multiple of size of GUID. + + + + + + + + + + + + + + + + + + + + + + + + Adds a default value for a parameter, field or property. + The parent entity handle, which can be one of the following: , , or . + The constant value. + + doesn't have the expected handle kind. + A handle to the added constant. + + + Adds a custom attribute. + An entity to attach the custom attribute to: a , , , , , , , , , , , , , , , , , , , , , or a . + A custom attribute constructor: a or . + A custom attribute value blob. + + doesn't have the expected handle kind. + A handle to the added custom attribute. + + + Adds custom debug information. + An entity to attach the debug information to: a , , , , , , , , , , , , , , , , , , , , , , , , , , or a . + The information kind. Determines the structure of the blob. + The custom debug information blob. + + doesn't have the expected handle kind. + A handle to the added custom debug information. + + + Adds a declarative security attribute to a type, method, or assembly. + The parent entity handle, which can be one of the following: a , , or a . + A declarative security action. + The permission set blob. + + doesn't have the expected handle kind. + A handle to the added declarative security attribute. + + + Adds document debug information. + The document name blob. + THe GUID of the hash algorithm used to calculate the value of . + The hash of the document content. + The GUID of the language. + A handle to the added document. + + + + + + + + + + Adds an event definition. + The event attributes. + The event name. + The type of the event: a , , or . + + doesn't have the expected handle kind. + A handle to the added event definition. + + + + + + + Adds an exported type. + The type attributes. + The type namespace. + The type name. + The implementation entity handle, which can be one of the following: an , , or . + The type definition ID. + + doesn't have the expected handle kind. + A handle to the added exported type. + + + Adds a field definition. + The field attributes. + The field name. + The field signature. Use to construct the blob. + A handle to the added field definition. + + + Defines a field layout of a field definition. + The field definition handle. + The byte offset of the field within the declaring type instance. + + + Adds a mapping from a field to its initial value stored in the PE image. + The field definition handle. + The offset within the block in the PE image that stores initial values of mapped fields (usually in the .text section). + + is negative. + + + Adds a generic parameter definition. + The parent entity handle, which can be either a or . + The generic parameter attributes. + The parameter name. + The zero-based parameter index. + + doesn't have the expected handle kind. + + is greater than . + A handle to the added generic parameter. + + + Adds a type constraint to a generic parameter. + The generic parameter to constrain. + The type constraint, which can be one of the following: a , or a . + + doesn't have the expected handle kind. + A handle to the added generic parameter constraint. + + + Adds local scope debug information. + The parent scope handle. + The import scope handle. + A handle to the added import scope. + + + Adds an interface implementation to a type. + The type implementing the interface. + The interface being implemented, which can be one of the following: , , or . + + doesn't have the expected handle kind. + A handle to the added interface implementation. + + + Adds local constant debug information. + The name of the variable. + The LocalConstantSig blob. + A handle to the added local constant. + + + Adds local scope debug information. + The containing method. + The handle of the associated import scope. + If the scope declares variables, set this to the handle of the first one. Otherwise, set this to the handle of the first variable declared by the next scope definition. If no scope defines any variables, . + If the scope declares constants, set this the handle of the first one. Otherwise, set this to the handle of the first constant declared by the next scope definition. If no scope defines any constants, . + The offset of the first instruction covered by the scope. + The length (in bytes) of the scope. + A handle to the added local scope. + + + Adds local variable debug information. + The local variable attributes. + The zero-base index of the local variable in the local signature. + The name of the variable. + + is greater than . + A handle to the added local variable. + + + Adds a manifest resource. + The manifest resource attributes. + The name of the manifest resource. + The implementation entity handle, which can be one of the following: , , or . + Specifies the byte offset within the referenced file at which this resource record begins. + + doesn't have the expected handle kind. + A handle to the added manifest resource. + + + Adds marshalling information to a field or a parameter. + The parent entity handle, which can be one of the following: or . + The descriptor blob. + + doesn't have the expected handle kind. + + + Adds a MemberRef table row. + The containing entity, which can be one of the following: , , , , or . + The member name. + The member signature. + + doesn't have the expected handle kind. + A handle to the added member reference. + + + Adds method debug information. + The handle of a single document containing all sequence points of the method, or if the method doesn't have sequence points or spans multiple documents. + The sequence Points blob, or if the method doesn't have sequence points. + A handle to the added method debug information. + + + Adds a method definition. + The method attributes. + The method implementation attributes. + The method name. + The method signature. + Offset within the block in the PE image that stores method bodies (the IL stream), or -1 if the method doesn't have a body. + If the method declares parameters in the Params table, set this to the handle of the first one. Otherwise, set this to the handle of the first parameter declared by the next method definition. If no parameters are declared in the module, . + + is less than -1. + A handle to the added method definition. + + + Defines an implementation for a method declaration within a type. + The type definition. + The method body entity handle, which can be one of the following: or . + The method declaration entity handle, which can be one of the following: or . + + or doesn't have the expected handle kind. + A handle to the added method implementation. + + + Adds import information to a method definition. + The method definition handle. + The method import attributes. + The unmanaged method name. + The module containing the unmanaged method. + + + Associates a method (a getter, a setter, an adder, etc.) with a property or an event. + The association entity handle, which can be one of the following: or . + The method semantics attributes. + The method definition. + + doesn't have the expected handle kind. + + + Adds a method specification (an instantiation). + The generic method entity handle, which can be one of the following: or . + The instantiation blob encoding the generic arguments of the method. + + doesn't have the expected handle kind. + A handle to the added method specification. + + + + + + + + + + + + + Defines a nesting relationship to specified type definitions. + The nested type definition handle. + The enclosing type definition handle. + + + Adds a parameter definition. + The parameter attributes. + Optional. The parameter name. + The sequence number of the parameter. A value of 0 refers to the owner method's return type; its parameters are then numbered from 1 onward. + + is greater than . + A handle to the added parameter. + + + Adds a property definition. + The property attributes. + The property name. + The signature of the property. + A handle to the added property definition. + + + + + + + + + + Adds state machine method debug information. + The handle of the method of the state machine (the compiler-generated method). + The handle of the kickoff method (the user defined iterator/async method). + + + Adds a type definition. + The type attributes. + The type namespace. + The type name. + The base type entity handle, which can be one of the following: , , , or . + If the type declares fields, set this to the handle of the first one. Otherwise, set this to the handle of the first field declared by the next type definition. If no type defines any fields in the module, . + If the type declares methods, the handle of the first one. Otherwise, the handle of the first method declared by the next type definition. If no type defines any methods in the module, . + + doesn't have the expected handle kind. + A handle to the added type definition. + + + Defines a type layout of a type definition. + The type definition. + Specifies that fields should be placed within the type instance at byte addresses which are a multiple of , or at natural alignment for that field type, whichever is smaller. Its value should be one of the following: 0, 1, 2, 4, 8, 16, 32, 64, or 128. A value of zero indicates that the packing size used should match the default for the current platform. + Indicates a minimum size of the type instance and is intended to allow for padding. The amount of memory allocated is the maximum of the size calculated from the layout and . Note that if this directive applies to a value type, then the size will be less than 1 MB. + + + Adds a type reference. + The entity declaring the target type, which can be one of the following: , , , , or . + The type reference namespace. + The type reference name. + + doesn't have the expected handle kind. + A handle to the added type reference. + + + + + + Adds the specified blob to the Blob heap, if it's not there already. + The array containing the blob. + + is . + A handle to the added or existing blob. + + + Adds the specified blob from a byte array to the Blob heap, if it's not there already. + The array containing the blob. + + is . + A handle to the added or existing blob. + + + Adds the specified blob from an immutable byte array to the Blob heap, if it's not there already. + The blob builder instance containing the blob. + + is . + A handle to the added or existing blob. + + + Encodes a string using UTF16 encoding to a blob and adds it to the Blob heap, if it's not there already. + The string to add. + + is . + A handle to the added or existing blob. + + + Encodes a string using UTF8 encoding to a blob and adds it to the Blob heap, if it's not there already. + The value to add. + + to encode the unpaired surrogates as specified; to replace them with the U+FFFD character. + + is . + A handle to the added or existing blob. + + + Encodes a constant value to a blob and adds it to the Blob heap, if it's not there already. Uses UTF16 to encode string constants. + The constant value to add. + A handle to the added or existing blob. + + + Encodes a debug document name and adds it to the Blob heap, if it's not there already. + The document name to add. + + is . + A handle to the added or existing document name blob. + + + Adds the specified Guid to the Guid heap, if it's not there already. + The Guid to add. + A handle to the added or existing Guid. + + + Adds the specified string to the string heap, if it's not there already. + The string to add. + + is . + A handle to the added or existing string. + + + Adds the specified string to the user string heap, if it's not there already. + The string to add. + The remaining space on the heap is too small to fit the string. + + is . + A handle to the added or existing string. This value may be used in . + + + Returns the current number of items in the specified table. + The table index. + + is not a valid table index. + The number of items in the table. + + + Returns the current number of items in each table. + An array of size , with each item filled with the current row count of the corresponding table. + + + Reserves space on the Guid heap for a GUID. + The remaining space on the heap is too small to fit the string. + A handle to the reserved Guid and a representing the GUID blob as stored on the heap. + + + Reserves space on the user string heap for a string of the specified length. + The number of characters to reserve. + The remaining space on the heap is too small to fit the string. + + is negative. + A handle to the reserved user string and a representing the entire User String blob (including its length and terminal character). The handle may be used in . + Use to fill in the blob content. + + + Sets the capacity of the specified heap. + The heap index. + The number of bytes. + + is not a valid heap index. + +-or- + + is negative. + + + Sets the capacity of the specified table. + The table index. + The number of rows in the table. + + is not a valid table index. + +-or- + + is negative. + + + Provides extension methods for working with certain raw elements of the ECMA-335 metadata tables and heaps. + + + Enumerates entries of EnC log. + + + is . + + + Enumerates entries of EnC map. + + + is . + + + Returns the offset from the start of metadata to the specified heap. + + + + is . + + is not a valid heap index. + + + Returns the size of the specified heap. + + + + is . + + is not a valid heap index. + + + Returns the handle to the that follows the given one in the heap or a nil handle if it is the last one. + + + + is . + + + Returns the a handle to the string that follows the given one in the string heap, or a nil handle if it is the last one. + + + + is . + + + Returns the a handle to the UserString that follows the given one in the UserString heap or a nil handle if it is the last one. + + + + is . + + + Returns the offset from the start of metadata to the specified table. + + + + is . + + is not a valid table index. + + + Returns the number of rows in the specified table. + + + + is . + + is not a valid table index. + + + Returns the size of a row in the specified table. + + + + is . + + is not a valid table index. + + + Enumerate types that define one or more events. + + The resulting sequence corresponds exactly to entries in EventMap table, i.e. n-th returned is stored in n-th row of EventMap. + + + Enumerate types that define one or more properties. + + The resulting sequence corresponds exactly to entries in the property map table, that is, the n-th returned is stored in n-th row of the property map. + + + Given a type handle and a raw type kind found in a signature blob determines whether the target type is a value type or a reference type. + + + + + + Builder of a Metadata Root to be embedded in a Portable Executable image. + + + Creates a builder of a metadata root. + Builder populated with metadata entities stored in tables and values stored in heaps. The entities and values will be enumerated when serializing the metadata root. + The version string written to the metadata header. The default value is "v4.0.30319". + + to suppress basic validation of metadata tables during serialization; otherwise, . + + is . + + is too long (the number of bytes when UTF8-encoded must be less than 255). + + + Serializes metadata root content into the given . + Builder to write to. + The relative virtual address of the start of the method body stream. Used to calculate the final value of RVA fields of MethodDef table. + The relative virtual address of the start of the field init data stream. Used to calculate the final value of RVA fields of FieldRVA table. + + is . + + or is negative. + A metadata table is not ordered as required by the specification and is . + + + The metadata version. + A string that represents the metadata version. + + + Returns sizes of various metadata structures. + + + Determines if basic validation of metadata tables should be suppressed. The validation verifies that entries in the tables were added in order required by the ECMA specification. It does not enforce all specification requirements on metadata tables. + + to suppress basic validation of metadata tables; otherwise, . + + + Provides information on sizes of various metadata structures. + + + Returns aligned size of the specified heap. + + + + External table row count. + + + Exact (unaligned) heap sizes. + + + Table row counts. + + + + Maximum number of tables that can be present in Ecma335 metadata. + + + Maximum number of tables that can be present in Ecma335 metadata. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates an entity handle from a token value. + + + is not a valid metadata entity token. + + + Creates an from a token value. + + + + is not a valid table index. + + + + + + + + + + + + + + + + + + Gets the offset of metadata heap data that corresponds to the specified . + + Zero based offset, or -1 if can only be interpreted in a context of a specific or . + + + Gets the offset of metadata heap data that corresponds to the specified . + + 1-based index into the #Guid heap. Unlike other heaps, which are essentially byte arrays, the #Guid heap is an array of 16-byte GUIDs. + + + Gets the offset of metadata heap data that corresponds to the specified . + + An offset in the corresponding heap, or -1 if can only be interpreted in a context of a specific or . + + + Gets the offset of metadata heap data that corresponds to the specified in the context of . + + + The operation is not supported for the specified . + The is invalid. + Zero based offset, or -1 if isn't a metadata heap handle. + + + Gets the offset of metadata heap data that corresponds to the specified . + + Zero-based offset, or -1 if can only be interpreted in a context of a specific or . + + + Gets the offset of metadata heap data that corresponds to the specified . + + Zero-based offset. + + + Gets the row number of a metadata table entry that corresponds to the specified . + + One based row number, or -1 if can only be interpreted in a context of a specific . + See . + + + Gets the row number of a metadata table entry that corresponds to the specified in the context of . + + + The is not a valid metadata table handle. + One based row number. + + + Gets the metadata token of the specified . + + Metadata token, or 0 if can only be interpreted in a context of a specific . + + + Gets the metadata token of the specified . + + Handle represents a metadata entity that doesn't have a token. + A token can only be retrieved for a metadata table handle or a heap handle of type . + Metadata token, or 0 if can only be interpreted in a context of a specific . + + + Gets the metadata token of the specified in the context of . + + + The operation is not supported for the specified . + Metadata token. + + + Gets the metadata token of the specified in the context of . + + + Handle represents a metadata entity that doesn't have a token. + A token can only be retrieved for a metadata table handle or a heap handle of type . + The operation is not supported for the specified . + Metadata token. + + + + + + Creates a handle from a token value. + + + is not a valid metadata token. + It must encode a metadata table entity or an offset in the heap. + + + Creates an from a token value. + + + + is not a valid table index. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the of the heap corresponding to the specified . + Handle type. + Heap index. + + if the handle type corresponds to an Ecma335 heap; otherwise. + + + Gets the of the table corresponding to the specified . + Handle type. + Table index. + + if the handle type corresponds to an Ecma335 or Portable PDB table; otherwise. + + + + + + + + + + + + + + + Defines method body attributes. + + + Initializes any locals the method defines to zero and dynamically allocates local memory. + + + Performs no local memory initialization. + + + Provides an encoder for a method body stream. + + + + + + Encodes a method body and adds it to the method body stream, using the provided code size, maximum stack size, number of exception regions, local variables' signature handle, method body attributes and allowing to indicate whether the exception regions should be encoded in small format or not. + The number of bytes to be reserved for instructions. + The maximum stack size. + The number of exception regions. + + if the exception regions should be encoded in small format; otherwise. + The local variables' signature handle. + The method body attributes. + + , , or is out of the allowed range. + The offset of the encoded body within the method body stream. + + + Encodes a method body and adds it to the method body stream, using the provided code size, maximum stack size, number of exception regions, local variables' signature handle, method body attributes, allowing to indicate whether the exception regions should be encoded in small format or not, and allowing to indicate whether the method should allocate from the dynamic local memory pool or not. + The number of bytes to be reserved for instructions. + The maximum stack size. + The number of exception regions. + + if the exception regions should be encoded in small format; otherwise. + The local variables' signature handle. + The method body attributes. + + if the method allocates from the dynamic local memory pool (the instruction); otherwise. + + , , or is out of the allowed range. + The offset of the encoded body within the method body stream. + + + Encodes a method body and adds it to the method body stream. + The instruction encoder. + The maximum stack size. + The local variables' signature handle. + The method body attributes. + + has default value. + + is out of range [0, ]. + A label targeted by a branch in the instruction stream has not been marked, or the distance between a branch instruction and the target label doesn't fit the size of the instruction operand. + The offset of the encoded body within the method body stream. + + + Encodes a method body and adds it to the method body stream, using the provided instruction encoder, maximum stack size, local variables' signature handle, method body attributes, and allowing to indicate whether the method should allocate from the dynamic local memory pool or not. + The instruction encoder. + The maximum stack size. + The local variables' signature handle. + The method body attributes. + + if the method allocates from the dynamic local memory pool (the IL contains the instruction); otherwise. + + has default value. + + is out of range [0, ]. + A label targeted by a branch in the instruction stream has not been marked, or the distance between a branch instruction and the target label doesn't fit the size of the instruction operand. + The offset of the encoded body within the method body stream. + + + + Describes a method body. This class is meant to used along with the class. + + + Gets an encoder object that can be used to encode exception regions to the method body. + An exception region encoder instance. + + + Gets a blob reserved for instructions. + A blob reserved for instructions. + + + Gets the offset of the encoded method body in the method body stream. + The offset of the encoded method body in the method body stream. + + + Provides an encoder for method signatures. + + + + + + + Encodes the provided return type and parameters. + The number of parameters. + The method that is called first to encode the return type. + The method that is called second to encode the parameters. + + or is . + + + Encodes the provided return type and parameters, which must be used in the order they appear in the parameter list. + The number of parameters. + The method that is called first to encode the return types. + The method that is called second to encode the parameters. + + + + + + Initializes a new instance of the structure. + A builder for encoding the named argument. + + + Encodes a named argument (a field or property). + + to encode a field, to encode a property. + The method to call first to encode the type of the argument. + The method to call second to encode the name of the field or property. + The method to call third to encode the literal value of the argument. + + , or is . + + + Encodes a named argument (a field or property) and returns three encoders that must be used in the order they appear in the parameter list. + + to encode a field, to encode a property. + The method to call first to encode the type of the argument. + The method to call second to encode the name of the field or property. + The method to call third to encode the literal value of the argument. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents the builder of a Portable PDB image. + + + Creates a builder of a Portable PDB image. + A builder populated with debug metadata entities stored in tables and values stored in heaps. The entities and values are enumerated when serializing the Portable PDB image. + The row counts of all tables that the associated type system metadata contain. Each slot in the array corresponds to a table (). The length of the array must be equal . + An entry point method definition handle. + A function that calculates the ID of content represented as a sequence of blobs. If not specified, a default function that ignores the content and returns a content ID based on the current time is used (). You must specify a deterministic function to produce a deterministic Portable PDB image. + + or is . + + + Serializes portable PDB content into the given . + The builder to write to. + + is . + The ID of the serialized content. + + + + + + + + + + + + + + + + + + + + + Encodes a constant literal. + A constant of type , , , , , , , , , , , (encoded as a two-byte Unicode character), (encoded as SerString), or (encoded as the underlying integer value). + Unexpected constant type. + + + Encodes a literal of type . + + + Encodes a literal of type (which can possibly be ). + The name of the type, or . + + is empty. + + + + Decodes signature blobs. + + + + + Creates a new . + The provider used to obtain type symbols as the signature is decoded. + The metadata reader from which the signature was obtained. It may be if the given provider allows it. + Additional context needed to resolve generic parameters. + + + Decodes a field signature blob and advances the reader past the signature. + The blob reader positioned at a field signature. + The decoded field type. + + + Decodes a local variable signature blob and advances the reader past the signature. + The blob reader positioned at a local variable signature. + The local variable signature is invalid. + The local variable types. + + + Decodes a method (definition, reference, or standalone) or a property signature blob. + A blob reader positioned at a method signature. + The method signature is invalid. + The decoded method signature. + + + Decodes a method specification signature blob and advances the reader past the signature. + A blob reader positioned at a valid method specification signature. + The types used to instantiate a generic method via the method specification. + + + Decodes a type embedded in a signature and advances the reader past the type. + The blob reader positioned at the leading . + + to allow a to follow a (CLASS | VALUETYPE) in the signature; otherwise. + The reader was not positioned at a valid signature type. + The decoded type. + + + + + + + Encodes an array type. + Called first, to encode the type of the element. + Called second, to encode the shape of the array. + + or is . + + + Encodes an array type. Returns a pair of encoders that must be used in the order they appear in the parameter list. + Use first, to encode the type of the element. + Use second, to encode the shape of the array. + + + + + + Starts a signature of a type with custom modifiers. + + + + Starts a function pointer signature. + Calling convention. + Function pointer attributes. + Generic parameter count. + + is invalid. + + is not in range [0, 0xffff]. + + + Starts a generic instantiation signature. + + or . + Generic argument count. + + to mark the type as value type, to mark it as a reference type in the signature. + + doesn't have the expected handle kind. + + is not in range [1, 0xffff]. + + + Encodes a reference to type parameter of a containing generic method. + Parameter index. + + is not in range [0, 0xffff]. + + + Encodes a reference to type parameter of a containing generic type. + Parameter index. + + is not in range [0, 0xffff]. + + + + + + + + Starts pointer signature. + + + Writes primitive type code. + Any primitive type code except for and . + + is not valid in this context. + + + + + + Starts SZ array (vector) signature. + + + Encodes a reference to a type. + + or . + + to mark the type as value type, to mark it as a reference type in the signature. + + doesn't have the expected handle kind. + + + + + + + Encodes a void pointer (void*). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a metadata entity (such as a type reference, type definition, type specification, method definition, or custom attribute). + + + + + Returns a value that indicates whether the current instance and the specified object are equal. + The object to compare with the current instance. + + if is an and is equal to the current instance; otherwise, . + + + Returns a value that indicates whether the current instance and the specified are equal. + The value to compare with the current instance. + + if the current instance and are equal; otherwise, . + + + Returns the hash code for this instance. + The hash code for this instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + Gets a TypeRef, TypeDef, or TypeSpec handle if the region represents a catch, or a nil token otherwise (()). + + + Gets the IL offset of the start of the filter block, or -1 if the region is not a filter. + + + Gets the length in bytes of the exception handler. + + + Gets the starting IL offset of the exception handler. + + + + Gets the length in bytes of the try block. + + + Gets the starting IL offset of the try block. + + + + + + + + + + + Gets a handle to resolve the implementation of the target type. + + + + + representing another module in the assembly. + + + + representing another assembly if is . + + + + representing the declaring exported type in which this was is nested. + + + + + + + Gets the name of the target type, or if the type is nested or defined in a root namespace. + A struct instance. + + + Gets the full name of the namespace that contains the target type, or if the type is nested or defined in a root namespace. + + + Gets the definition handle of the namespace where the target type is defined, or if the type is nested or defined in a root namespace. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of instances. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + Returns the field layout offset, or -1 if it is not available. + The field definition offset, or -1 if it is not available. + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + Gets the attributes specifying variance and constraints. + + + Gets the zero-based index of the parameter within the declaring generic type or method declaration. + + + Gets the name of the generic parameter. + + + Gets a or that represents the parent of this generic parameter. + + + + + Gets the constrained . + + + Gets a handle (, , or ) + specifying from which type this generic parameter is constrained to derive, + or which interface this generic parameter is constrained to implement. + An instance. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of constraints of a generic type parameter. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Gets the element at the specified index in the read-only list. + The zero-based index of the element to get. + The element at the specified index in the read-only list. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of generic type parameters of a method or type. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Gets the element at the specified index in the read-only list. + The zero-based index of the element to get. + The element at the specified index in the read-only list. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + Represents any metadata entity (such as a type reference, a type definition, a type specification, a method definition, or a custom attribute) or value (a string, blob, guid, or user string). + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + Compares two entity handles. + The first entity handle to compare. + The second entity handle to compare. + Zero if the two entity handles are equal, and a non-zero value of they are not. + + + Compares two handles. + The first handle to compare. + The second handle to compare. + Zero if the two handles are equal, and a non-zero value if they are not. + + + Determines whether the specified objects are equal. + The first object of type to compare. + The second object of type to compare. + + if the specified objects are equal; otherwise, . + + + Determines whether the specified objects are equal. + The first object of type to compare. + The second object of type to compare. + + if the specified objects are equal; otherwise, . + + + Returns a hash code for the specified object. + The for which a hash code is to be returned. + A hash code for the specified object. + + + Returns a hash code for the specified object. + The for which a hash code is to be returned. + A hash code for the specified object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the type symbol for a generalized array of the given element type and shape. + The type of the elements in the array. + The shape (rank, sizes, and lower bounds) of the array. + + + Gets the type symbol for a managed pointer to the given element type. + + + + Gets the type symbol for a generic instantiation of the given generic type with the given type arguments. + + + + + Gets the type symbol for an unmanaged pointer to the given element type. + + + + + + + Gets the representation for . + + + Gets the type symbol for the given serialized type name. + The serialized type name in so-called "reflection notation" format (as understood by the method.) + The name is malformed. + A instance. + + + Gets the underlying type of the given enum type symbol. + An enum type. + The given type symbol does not represent an enum. + A type code that indicates the underlying type of the enumeration. + + + Verifies if the given type represents . + The type to verify. + + if the given type is a , otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calculates the size of the specified branch instruction operand. + The branch op-code. + The specified is not a branch op-code. + 1 if is a short branch, or 4 if it is a long branch. + + + Gets a long form of the specified branch op-code. + The branch op-code. + The specified is not a branch op-code. + The long form of the branch op-code. + + + Gets a short form of the specified branch op-code. + The branch op-code. + The specified is not a branch op-code. + The short form of the branch op-code. + + + Verifies if the specified op-code is a branch to a label. + + + if the specified op-code is a branch to a label, otherwise. + + + The exception that is thrown when an attempt to write metadata exceeds a limit given by the format specification. For example, when the heap size limit is exceeded. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class with serialized data. + The object that holds the serialized object data. + The contextual information about the source or destination. + + + Initializes a new instance of the class with a specified error message. + The error message that explains the reason for this exception. + + + Initializes a new instance of the class with a specified error message and the exception that is the cause of this exception. + The error message that explains the reason for this exception. + The exception that is the cause of the current exception, or if no inner exception is specified. + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + + Advances the enumerator to the next element of the collection. + Invalid blob format. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + Provides information about the lexical scope within which a group of imports are available. This information is stored in debug metadata. + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the interface that is implemented (, , or ). + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + Gets the type symbol for the function pointer type of the given method . + + The type symbol for the function pointer type. + + + Gets the type symbol for the generic method parameter at the given zero-based . + + + The type symbol for the generic method parameter at . + + + Gets the type symbol for the generic type parameter at the given zero-based . + + + The type symbol for the generic type parameter at the given zero-based . + + + Gets the type symbol for a type with a custom modifier applied. + The modifier type applied. + The type symbol of the underlying type without modifiers applied. + + if the modifier is required, if it's optional. + The type symbol. + + + Gets the type symbol for a local variable type that is marked as pinned. + + The type symbol for the local variable type. + + + Gets the type symbol for a type specification. + The metadata reader that was passed to the signature decoder. It may be . + The context that was passed to the signature decoder. + The type specification handle. + The kind of the type, as specified in the signature. To interpret this value, use . + The type symbol for the type specification. + + + + + + Gets the type symbol for a primitive type. + + The type symbol for . + + + Gets the type symbol for a type definition. + The metadata reader that was passed to the signature decoder. It may be . + The type definition handle. + The kind of the type, as specified in the signature. To interpret this value use . + The type symbol. + + + Gets the type symbol for a type reference. + The metadata reader that was passed to the signature decoder. It may be . + The type definition handle. + The kind of the type as specified in the signature. To interpret this value, use . + The type symbol. + + + + + + Gets the type symbol for a single-dimensional array of the given element type with a lower bounds of zero. + + A instance. + + + Provides information about local constants. This information is stored in debug metadata. + + + + Gets the constant signature. + The constant signature. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Provides information about the scope of local variables and constants. This information is stored in debug metadata. + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Provides information about local variables. This information is stored in debug metadata. + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + Gets the manifest resource attributes. + A bitwise combination of the enumeration values that specify the manifest resource attributes. + + + Gets the implementation entity handle. + An EntityHandle instance. If the property is , the returned handle will have default values. + + + Gets the resource name. + The resource name. + + + Gets the byte offset within the referenced file at which this resource record begins. + The byte offset within the referenced file at which this resource record begins. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of instances. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + + + + Determines if the member reference is to a method or field. + The member reference signature is invalid. + One of the enumeration values that indicates the kind of member reference. + + + + Gets the parent entity handle. + An entity handle instance. If the property is , the returned handle will have default values. + + + Gets a handle to the signature blob. + A handle to the signature blob. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a collection of instances. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Specifies constants that indicate whether a references a method or field. + + + The references a field. + + + The references a method. + + + + CLI metadata. + + + Windows metadata generated by managed compilers. + + + Windows metadata. + + + Reads metadata as defined by the ECMA 335 CLI specification. + + + Initializes a new instance of the class from the metadata stored at the given memory location. + A pointer to the first byte in a block of metadata. + The number of bytes in the block. + + + Initializes a new instance of the class from the metadata stored at the given memory location. + + + + + + Initializes a new instance of the class from the metadata stored at the given memory location. + + + + + + is not positive. + + is . + The encoding of is not . + The current platform is big-endian. + Bad metadata header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the information decoded from #Pdb stream, or if the stream is not present. + The information decoded from #Pdb stream, or if the stream is not present. + + + + + + + + + Gets a value that indicates whether the metadata represents an assembly. + + if the metadata represents an assembly; otherwise, . + + + + + + + + Gets the metadata kind. + One of the enumeration values that specifies the metadata kind. + + + Gets the length of the underlying data. + The length of the underlying data. + + + Gets the pointer to the underlying data. + The pointer to the underlying data. + + + Gets the version string read from metadata header. + The version string read from metadata header. + + + + + Gets the passed to the constructor. + A bitwise combination of the enumeration values that describes the enum value. + + + + Gets the comparer used to compare strings stored in metadata. + The comparer used to compare strings stored in metadata. + + + + + Gets the decoder used by the reader to produce string instances from UTF8-encoded byte sequences. + The decoder used by the reader to produce string instances from UTF8-encoded byte sequences. + + + + Windows Runtime projections are enabled (on by default). + + + The options that are used when a is obtained via an overload that does not take a argument. + + + All options are disabled. + + + Provides a for metadata stored in an array of bytes, a memory block, or a stream. + + + Disposes all memory allocated by the reader. + + + Creates a metadata provider over an image stored in memory. + Pointer to the start of the metadata blob. + The size of the metadata blob. + + is . + + is negative. + The new metadata provider. + + + Creates a provider over a byte array. + Metadata image. + + is . + The new provider. + + + Creates a provider for a stream of the specified size beginning at its current position. + A instance. + Options specifying how sections of the image are read from the stream. + Size of the metadata blob in the stream. If not specified, the metadata blob is assumed to span to the end of the stream. + + is . + + doesn't support read and seek operations. + Size is negative or extends past the end of the stream. + Error reading from the stream (only when is specified). + The new provider. + + + Creates a portable PDB metadata provider over a blob stored in memory. + Pointer to the start of the portable PDB blob. + The size of the portable PDB blob. + + is . + + is negative. + The new portable PDB metadata provider. + + + Creates a portable PDB metadata provider over a byte array. + A portable PDB image. + + is . + The new portable PDB metadata provider . + + + Creates a provider for a stream of the specified size beginning at its current position. + The stream. + Options specifying how sections of the image are read from the stream. + Size of the metadata blob in the stream. If not specified, the metadata blob is assumed to span to the end of the stream. + + is . + + doesn't support read and seek operations. + Size is negative or extends past the end of the stream. + A instance. + + + Gets a from a . + A bitwise combination of the enumeration values that represent the configuration when reading the metadata. + The encoding to use. + The encoding of is not . + The current platform is big-endian. + IO error while reading from the underlying stream. + Provider has been disposed. + A instance. + + + + By default, the stream is disposed when is disposed and sections of the PE image are read lazily. + + + Keeps the stream open when the is disposed. + + + + Reads PDB metadata into memory right away. + The underlying file may be closed and even deleted after the is constructed. closes the stream automatically by the time the constructor returns unless is specified. + + + + Provides string comparison helpers to query strings in metadata while avoiding allocation if possible. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides the with a custom mechanism for decoding byte sequences in metadata that represent text. + + + Initializes a new instance of the class using the given encoding. + The encoding to use. + + + Obtains strings for byte sequences in metadata. Override this to cache strings if required. Otherwise, it is implemented by forwarding straight to and every call will allocate a new string. + Pointer to bytes to decode. + Number of bytes to decode. + The decoded string. + + + Gets the default decoder used by to decode UTF-8 when no decoder is provided to the constructor. + The default decoder used by to decode UTF-8. + + + Gets the encoding used by this instance. + The encoding used by this instance. + + + + + + + + + + + + + + Gets the size of the method body, including the header, IL, and exception regions. + The size of the method body. + + + Provides debug information associated with a method definition. This information is stored in debug metadata. + + + Returns a collection of sequence points decoded from . + A collection of sequence points. + + + Returns the kickoff method of the state machine. + The kickoff method of the state machine, if the method is a MoveNext method of a state machine. Otherwise, it returns a handle whose property is . + + + Gets the handle of the single document containing all sequence points of the method. + The handle of the single document containing all sequence points of the method, or a handle whose property is if the method doesn't have sequence points or spans multiple documents. + + + Returns a local signature handle. + A local signature handle, or a handle whose property is if the method doesn't define any local variables. + + + Returns a blob encoding sequence points. + A blob encoding sequence points, or a handle whose property is if the method doesn't have sequence points. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + Returns a handle to a that corresponds to this handle. + A method definition handle that corresponds to this handle. + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + Returns a handle to a that corresponds to this handle. + A method debug information handle that corresponds to this handle. + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + Represents a method (definition, reference, or standalone) or property signature. In the case of properties, the signature matches that of a getter with a distinguishing . + The method type. + + + Initializes a new instance of the structure using the specified header, return type, and parameter information. + The information in the leading byte of the signature (kind, calling convention, flags). + The return type of the method. + The number of required parameters. + The number of generic type parameters. + The parameter types. + + + Gets the number of generic type parameters for the method. + The number of generic type parameters, or 0 for non-generic methods. + + + Gets the information in the leading byte of the signature (kind, calling convention, flags). + The header signature. + + + Gets the method's parameter types. + An immutable collection of parameter types. + + + Gets the number of parameters that are required for the method. + The number of required parameters. + + + Gets the return type of the method. + The return type. + + + + + + + + + + + Gets a or handle specifying which generic method this instance refers to (that is, which generic method it is an instantiation of). + A or handle specifying which generic method this instance refers to. + + + Gets a handle to the signature blob. + A handle to the signature blob. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + Gets all exported types that reside directly in a namespace. + An immutable array of exported type handles. + + + Gets the unqualified name of the namespace definition. + The unqualified name of the namespace definition. + + + Gets the namespace definitions that are direct children of the current namespace definition. + An immutable array of namespace definitions that are direct children of the current namespace definition. + + + Gets the parent namespace. + The parent namespace. + + + Gets all type definitions that reside directly in a namespace. + An immutable array of type definition handles. + + + Provides a handle to a namespace definition. + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Contains a collection of parameters of a specified method. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + Gets a from a . + The current instance. + + is . + The current platform is big-endian. + IO error while reading from the underlying stream. + A metadata reader. + + + Gets a metadata reader with the specified metadata reading configuration from a . + The current instance. + An enumeration value indicating the metadata reading configuration. + + is . + The current platform is big-endian. + IO error while reading from the underlying stream. + A metadata reader with the specified metadata reading configuration. + + + Gets a metadata reader with the specified metadata reading configuration and encoding configuration from a . + The current instance. + An enumeration value indicating the metadata reading configuration. + A metadata string decoder with the encoding configuration. + + is . + The encoding of is not . + The current platform is big-endian. + IO error while reading from the underlying stream. + >A metadata reader with the specified metadata reading configuration and encoding configuration. + + + Returns a body block of a method with the specified Relative Virtual Address (RVA). + The current instance. + The Relative Virtual Address (RVA). + + is . + The body is not found in the metadata or is invalid. + The section where the method is stored is not available. + IO error occurred while reading from the underlying stream. + A method block body instance. + + + Specifies constants that define the type codes used to encode types of primitive values in a value blob. + + + A type. + + + An unsigned 1-byte integer type. + + + A type. + + + An 8-byte floating point type. + + + A signed 2-byte integer type. + + + A signed 4-byte integer type. + + + A signed 8-byte integer type. + + + A signed 1-byte integer type. + + + A 4-byte floating point type. + + + A type. + + + An unsigned 2-byte integer type. + + + An unsigned 4-byte integer type. + + + An unsigned 8-byte integer type. + + + Specifies constants that define primitive types found in metadata signatures. + + + A type. + + + A type. + + + A type. + + + A type. + + + An type. + + + An type. + + + An type. + + + An type. + + + An type. + + + An type. + + + A type. + + + A type. + + + A typed reference. + + + A type. + + + A type. + + + A type. + + + A type. + + + A type. + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Represents a handle and a corresponding blob on a metadata heap that was reserved for future content update. + + + + Returns a to be used to update the content. + A blob writer to be used to update the content. + + + + Gets the reserved blob handle. + The reserved bloc handle. + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Specifies type codes used to encode the types of values in a blob. + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + The attribute argument is an Enum instance. + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + The attribute argument is "boxed" (passed to a parameter, field, or property of type object) and carries type information in the attribute blob. + + + The attribute argument is a instance. + + + A value equivalent to . + + + A value equivalent to . + + + A value equivalent to . + + + Specifies additional flags that can be applied to method signatures. The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a structure. + + + Indicates the first explicitly declared parameter that represents the instance pointer. + + + A generic method. + + + + An instance method. + The Ecma 335 CLI Specification refers to this flag as . + + + + No flags. + + + Specifies how arguments in a given signature are passed from the caller to the callee. The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a structure. + + + An unmanaged C/C++ style calling convention where the call stack is cleaned by the caller. + + + A managed calling convention with a fixed-length argument list. + + + An unmanaged calling convention where arguments are passed in registers when possible. + + + An unmanaged calling convention where the call stack is cleaned up by the callee. + + + An unmanaged C++ style calling convention for calling instance member functions with a fixed argument list. + + + Indicates that the specifics of the unmanaged calling convention are encoded as modopts. + + + A managed calling convention for passing extra arguments. + + + Represents the signature characteristics specified by the leading byte of signature blobs. + + + Gets the mask value for the calling convention or signature kind. The default value is 15 (0x0F). + + + Initializes a new instance of the structure using the specified byte value. + The byte. + + + Initializes a new instance of the structure using the specified signature kind, calling convention and signature attributes. + The signature kind. + The calling convention. + The signature attributes. + + + Compares the specified object with this for equality. + The object to compare. + + if the objects are equal; otherwise, . + + + Compares two values for equality. + The value to compare. + + if the values are equal; otherwise, . + + + Gets a hash code for the current object. + A hash code for the current object. + + + Compares two values for equality. + The first value to compare. + The second value to compare. + + if the values are equal; otherwise, . + + + Determines whether two values are unequal. + The first value to compare. + The second value to compare. + + if the values are unequal; otherwise, . + + + Returns a string that represents the current object. + A string that represents the current object. + + + Gets the signature attributes. + The attributes. + + + Gets the calling convention. + The calling convention. + + + Gets a value that indicates whether this structure has the signature attribute. + + if the attribute is present; otherwise, . + + + Gets a value that indicates whether this structure has the signature attribute. + + if the attribute is present; otherwise, . + + + Gets a value that indicates whether this structure has the signature attribute. + + if the attribute is present; otherwise, . + + + Gets the signature kind. + The signature kind. + + + Gets the raw value of the header byte. + The raw value of the header byte. + + + Specifies the signature kind. The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a structure. + + + A field signature. + + + A local variables signature. + + + A method reference, method definition, or standalone method signature. + + + A method specification signature. + + + A property signature. + + + Specifies constants that define type codes used in signature encoding. + + + Represents a generalized in signatures. + + + Represents a in signatures. + + + Represents managed pointers (byref return values and parameters) in signatures. It is followed in the blob by the signature encoding of the underlying type. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents function pointer types in signatures. + + + Represents a generic method parameter used within a signature. + + + Represents the instantiation of a generic type in signatures. + + + Represents a generic type parameter used within a signature. + + + Represents an in signatures. + + + Represents an in signatures. + + + Represents an in signatures. + + + Represents an in signatures. + + + Represents an invalid or uninitialized type code. It will not appear in valid signatures. + + + Represents an in signatures. + + + Represents a custom modifier applied to a type within a signature that the caller can ignore. + + + Represents a local variable that is pinned by garbage collector. + + + Represents an unmanaged pointer in signatures. It is followed in the blob by the signature encoding of the underlying type. + + + Represents a custom modifier applied to a type within a signature that the caller must understand. + + + Represents an in signatures. + + + Represents a marker to indicate the end of fixed arguments and the beginning of variable arguments. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents a single dimensional with a lower bound of 0. + + + Represents a typed reference in signatures. + + + Precedes a type in signatures. In raw metadata, this is encoded as either ELEMENT_TYPE_CLASS (0x12) for reference types or ELEMENT_TYPE_VALUETYPE (0x11) for value types. This is collapsed to a single code because Windows Runtime projections can project from class to value type or vice-versa, and the raw code is misleading in those cases. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents a in signatures. + + + Represents in signatures. + + + Indicates the type definition of the signature. + + + The type definition or reference refers to a class. + + + It isn't known in the current context if the type reference or definition is a class or value type. + + + The type definition or reference refers to a value type. + + + + + + + + + + + + + + + + + Determines the kind of signature, which can be or . + The signature is invalid. + An enumeration value that indicates the signature kind. + + + Gets a handle to the signature blob. + A handle to the signature blob. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether a represents a standalone method or local variable signature. + + + The references a local variable signature. + + + The represents a standalone method signature. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + Returns the enclosing type of a specified nested type. + The enclosing type of the specified nested type, or a handle a handle whose property is if the type is not nested. + + + + + + + + + + Returns an array of types nested in the specified type. + An immutable array of type definition handles that represent types nested in the specified type. + + + + + Gets the base type of the type definition: either , or . + The base type of the type definition. + + + Gets a value that indicates whether this is a nested type. + + if it is a nested type, otherwise. + + + Gets the name of the type. + The name of the type. + + + Gets the full name of the namespace where the type is defined. + The full name of the namespace where the type is defined, or a handle whose property is if the type is nested or defined in a root namespace. + + + Gets the definition handle of the namespace where the type is defined. + The definition handle of the namespace where the type is defined, or a handle whose property is if the type is nested or defined in a root namespace. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Contains a collection of instances. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + Gets the name of the target type. + The name of the target type. + + + Gets the full name of the namespace where the target type is defined. + The full name of the namespace where the target type is defined, or a handle whose the property is if the type is nested or defined in a root namespace. + + + Gets the resolution scope in which the target type is defined and is uniquely identified by the specified and . + The resolution scope in which the target type is uniquely defined. + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Contains a collection of instances. + + + + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + + Advances the enumerator to the next element of the collection. + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + + + + + + + + + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + + + + + + + Represents a handle to the user string heap. + + + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + + if the current object is equal to the parameter; otherwise, . + + + + + + + + + + + + + + + + + + + Specifies flags for the unmanaged method import attributes. + + + Specifies that the best-fit mapping behavior when converting Unicode characters to ANSI characters is disabled. + + + Specifies that the best-fit mapping behavior when converting Unicode characters to ANSI characters is enabled. + + + Specifies whether the best-fit mapping behavior when converting Unicode characters to ANSI characters is enabled or disabled. + + + Specifies that the calling convention is CDecl. + + + Specifies that the calling convention is FastCall. + + + Specifies the calling convention. + + + Specifies that the calling convention is StdCall. + + + Specifies that the calling convention is ThisCall. + + + Specifies that the default platform calling convention is used (StdCall on Windows x86, CDecl on Linux x86). + + + Specifies that strings are marshalled as multiple-byte character strings: the system default Windows (ANSI) code page on Windows, and UTF-8 on Unix. + + + Specifies that the character set is chosen automatically. See Charsets and marshaling for details. + + + Specifies the character set used for string marshalling. + + + Specifies that strings are marshalled as Unicode 2-byte character strings. + + + Specifies that the Common Language Runtime should not try an entry-point names with charset-specific suffixes when searching for the imported method. + + + Specifies default method import attributes. + + + Specifies that the imported method calls the SetLastError Windows API function before returning. + + + Specifies that an exception should not be thrown when an unmappable Unicode character is converted to an ANSI character. + + + Specifies that an exception should be thrown when an unmappable Unicode character is converted to an ANSI character. + + + Specifies whether an exception should be thrown when an unmappable Unicode character is converted to an ANSI character. + + + + + Used to add a handler for an event. Corresponds to the flag in the Ecma 335 CLI specification. + CLS-compliant adders are named the with prefix. + + + + + Reads the value of the property. + CLS-compliant getters are named with get_ prefix. + + + + Other method for a property (not a getter or setter) or an event (not an adder, remover, or raiser). + + + + Used to indicate that an event has occurred. Corresponds to the flag in the Ecma 335 CLI specification. + CLS-compliant raisers are named with the prefix. + + + + + Used to remove a handler for an event. Corresponds to the flag in the Ecma 335 CLI specification. + CLS-compliant removers are named with the prefix. + + + + + Used to modify the value of the property. + CLS-compliant setters are named with the prefix. + + + + + + + + + + + + + + + + + + + + Provides information about a Program Debug Database (PDB) file. + + + The iteration of the PDB. The first iteration is 1. The iteration is incremented each time the PDB content is augmented. + + + The Globally Unique Identifier (GUID) of the associated PDB. + + + The path to the .pdb file that contains debug information for the PE/COFF file. + + + Represents the header of a COFF file. + + + Gets the flags that indicate the attributes of the file. + The flags that indicate the attributes of the file. + + + Gets the type of the target machine. + The type of the target machine. + + + Gets the number of sections. This indicates the size of the section table, which immediately follows the headers. + The number of sections. + + + Gets the number of entries in the symbol table. This data can be used to locate the string table, which immediately follows the symbol table. This value should be zero for a PE image. + + + Gets the file pointer to the COFF symbol table. + The file pointer to the COFF symbol table, or zero if no COFF symbol table is present. This value should be zero for a PE image. + + + Gets the size of the optional header, which is required for executable files but not for object files. This value should be zero for an object file. + The size of the optional header. + + + Gets a value that indicates when the file was created. + The low 32 bits of the number of seconds since 00:00 January 1, 1970, which indicates when the file was created. + + + COR20Flags. + + + + + + + + + + + + + + + + + + + + + + + Initializes a new instance of the class. + + + Adds a CodeView entry. + The path to the PDB. It should not be empty. + The unique id of the PDB content. + The version of Portable PDB format (e.g. 0x0100 for 1.0), or 0 if the PDB is not portable. + + is . + + contains a NUL character. + + is smaller than 0x0100. + + + Adds a CodeView entry. + The path to the PDB. It should not be empty. + The unique id of the PDB content. + The version of Portable PDB format (e.g. 0x0100 for 1.0), or 0 if the PDB is not portable. + Age (iteration) of the PDB. Shall be 1 for Portable PDBs. + + is . + + contains a NUL character. + + Either is smaller than 0x0100 or is less than 1. + + + Adds an Embedded Portable PDB entry. + A Portable PDB metadata builder. + The version of Portable PDB format (e.g. 0x0100 for 1.0). + + is . + + is smaller than 0x0100. + + + Adds an entry of the specified type. + The entry type. + The entry version. + The entry stamp. + + + Adds an entry of the specified type and serializes its data. + The entry type. + The entry version. + The entry stamp. + The data to pass to . + A serializer for serializing data to a . + The type of the data passed to . + + + Adds PDB checksum entry. + The hash algorithm name (for example, "SHA256"). + The checksum. + + or is . + + or is empty. + + + Adds a reproducible entry. + + + Identifies the location, size and format of a block of debug information. + + + Initializes a new instance of the structure. + + + + + + + + + + Gets the file pointer to the debug data. + The file pointer to the debug data. + + + Gets the address of the debug data when loaded, relative to the image base. + The address of the debug data relative to the image base. + + + Gets the size of the debug data (not including the debug directory itself). + the size of the debug data (excluding the debug directory). + + + Gets a value that indicates if the entry is a entry that points to a Portable PDB. + + if the entry is a entry pointing to a Portable PDB; otherwise, . + + + Gets the major version number of the debug data format. + The major version number of the debug data format. + + + Gets the minor version number of the debug data format. + The minor version number of the debug data format. + + + Get the time and date that the debug data was created if the PE/COFF file is not deterministic; otherwise, gets a value based on the hash of the content. + for a non-deterministic PE/COFF file, the time and date that the debug data was created; otherwise, a value based on the hash of the content. + + + Gets the format of the debugging information. + The format of the debugging information. + + + An enumeration that describes the format of the debugging information of a . + + + Associated PDB file description. For more information, see the specification. + + + The COFF debug information (line numbers, symbol table, and string table). This type of debug information is also pointed to by fields in the file headers. + + + + The entry points to a blob containing Embedded Portable PDB. The Embedded Portable PDB blob has the following format: + - blob ::= uncompressed-size data + - Data spans the remainder of the blob and contains a Deflate-compressed Portable PDB. + For more information, see the specification. + + + + The entry stores a crypto hash of the content of the symbol file the PE/COFF file was built with. The hash can be used to validate that a given PDB file was built with the PE/COFF file and not altered in any way. More than one entry can be present if multiple PDBs were produced during the build of the PE/COFF file (for example, private and public symbols). For more information, see the specification. + + + + The presence of this entry indicates a deterministic PE/COFF file. See the Remarks section for more information. + The tool that produced the deterministic PE/COFF file guarantees that the entire content of the file is based solely on documented inputs given to the tool (such as source files, resource files, and compiler options) rather than ambient environment variables (such as the current time, the operating system, and the bitness of the process running the tool). + The value of field TimeDateStamp in COFF File Header of a deterministic PE/COFF file does not indicate the date and time when the file was produced and should not be interpreted that way. Instead, the value of the field is derived from a hash of the file content. The algorithm to calculate this value is an implementation detail of the tool that produced the file. + The debug directory entry of type must have all fields, except for Type zeroed. + For more information, see the specification. + + + + An unknown value that should be ignored by all tools. + + + + + + + + + + Describes the characteristics of a dynamic link library. + + + The image must run inside an AppContainer. + + + The DLL can be relocated. + + + The image can handle a high entropy 64-bit virtual address space. + + + Do not bind this image. + + + The image understands isolation and doesn't want it. + + + The image does not use SEH. No SE handler may reside in this image. + + + The image is NX compatible. + + + Reserved. + + + Reserved. + + + The image is Terminal Server aware. + + + Reserved. + + + Reserved. + + + The driver uses the WDM model. + + + Specifies the target machine's CPU architecture. + + + Alpha. + + + ALPHA64. + + + Matsushita AM33. + + + AMD64 (K8). + + + ARM little endian. + + + ARM64. + + + ARM Thumb-2 little endian. + + + EFI Byte Code. + + + Intel 386. + + + Intel 64. + + + M32R little-endian. + + + MIPS. + + + MIPS with FPU. + + + MIPS16 with FPU. + + + IBM PowerPC little endian. + + + PowerPCFP. + + + Hitachi SH3 little endian. + + + Hitachi SH3 DSP. + + + Hitachi SH3 little endian. + + + Hitachi SH4 little endian. + + + Hitachi SH5. + + + Thumb. + + + Infineon. + + + The target CPU is unknown or not specified. + + + MIPS little-endian WCE v2. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a PDB Checksum debug directory entry. + + + The name of the crypto hash algorithm used to calculate the checksum. + A string representing the name of the crypto hash algorithm used to calculate the checksum. + + + The checksum of the PDB content. + An immutable array of bytes representing the checksum of the PDB content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Builds PE directories. + + + Initializes an instance of the class. + + + The address of the entry point relative to the image base when the PE file is loaded into memory. + For program images, this is the starting address. For device drivers, this is the address of the initialization function. An entry point is optional for DLLs. When no entry point is present, this field must be zero. + + + The base relocation table image directory entry. + A directory entry instance. + + + The bound import image directory entry. + A directory entry instance. + + + The copyright/architecture image directory entry. + A directory entry instance. + + + The COM descriptortable image directory entry. + A directory entry instance. + + + The debug table image directory entry. + A directory entry instance. + + + The delay import table image directory entry. + A directory entry instance. + + + The exception table image directory entry. + A directory entry instance. + + + The export table image directory entry. + A directory entry instance. + + + The global pointer table image directory entry. + A directory entry instance. + + + The import address table (IAT) image directory entry. + A directory entry instance. + + + The import table image directory entry. + A directory entry instance. + + + The load configuration table image directory entry. + A directory entry instance. + + + The resource table image directory entry. + A directory entry instance. + + + The thread local storage (TLS) table image directory entry. + A directory entry instance. + + + + Gets the address of the entry point relative to the image base when the PE file is loaded into memory. + The address of the entry point relative to the image base. + + + Gets the address of the beginning-of-code section relative to the image base when the image is loaded into memory. + The address of the beginning-of-code section relative to the image base. + + + Gets the address of the beginning-of-data section relative to the image base when the image is loaded into memory. + The address of the beginning-of-data section relative to the image base. + + + + + Gets the Certificate Table entry, which points to a table of attribute certificates. + + + Gets the image file checksum. + The image file checksum. + + + + + + + + + + Gets the alignment factor (in bytes) that is used to align the raw data of sections in the image file. + A power of 2 between 512 and 64K, inclusive. The default is 512. + + + + Gets the preferred address of the first byte of the image when it is loaded into memory. + The preferred address, which is a multiple of 64K. + + + + + + Gets a value that identifies the format of the image file. + The format of the image file. + + + Gets the major version number of the image. + The major version number of the image. + + + Gets the linker major version number. + The linker major version number. + + + Gets the major version number of the required operating system. + The major version number of the required operating system. + + + Gets the major version number of the subsystem. + The major version number of the subsystem. + + + Gets the minor version number of the image. + The minor version number of the image. + + + Gets the linker minor version number. + The linker minor version number. + + + Gets the minor version number of the required operating system. + The minor version number of the required operating system. + + + Gets the minor version number of the subsystem. + The minor version number of the subsystem. + + + Gets the number of data-directory entries in the remainder of the . Each describes a location and size. + The number of data-directory entries in the remainder of the . + + + + Gets the alignment (in bytes) of sections when they are loaded into memory. + A number greater than or equal to . The default is the page size for the architecture. + + + Gets the size of the code (text) section, or the sum of all code sections if there are multiple sections. + the size of the code (text) section, or the sum of all code sections if there are multiple sections. + + + Gets the combined size of an MS DOS stub, PE header, and section headers rounded up to a multiple of FileAlignment. + The combined size of an MS DOS stub, PE header, and section headers rounded up to a multiple of FileAlignment. + + + Gets the size of the local heap space to commit. + the size of the local heap space to commit. + + + Gets the size of the local heap space to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + The size of the local heap space to reserve. + + + Gets the size (in bytes) of the image, including all headers, as the image is loaded in memory. + The size (in bytes) of the image, which is a multiple of . + + + Gets the size of the initialized data section, or the sum of all such sections if there are multiple data sections. + + + Gets the size of the stack to commit. + The size of the stack to commit. + + + Gets the size of the stack to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + The size of the stack to reserve. + + + Gets the size of the uninitialized data section (BSS), or the sum of all such sections if there are multiple BSS sections. + The size of the uninitialized data section (BSS) or the sum of all such sections. + + + Gets the name of the subsystem that is required to run this image. + the name of the subsystem that is required to run this image. + + + + Defines the header for a portable executable (PE) file. + + + Initializes a new instance of the class. + The target machine's CPU architecture. + The alignment (in bytes) of sections when they are loaded into memory. It must be greater than or equal to . The default is the page size for the architecture. + The alignment factor (in bytes) that is used to align the raw data of sections in the image file. The value should be a power of 2 between 512 and 64K, inclusive. The default is 512. If the is less than the architecture's page size, then must match . + The preferred address of the first byte of image when loaded into memory; must be a multiple of 64K. + The linker major version number. + The linker minor version number. + The major version number of the required operating system. + The minor version number of the required operating system. + The major version number of the image. + The minor version number of the image. + The major version number of the subsystem. + The minor version number of the subsystem. + The subsystem required to run the image. + An object describing the characteristics of the dynamic link library. + An object describing the characteristics of the image. + The size of the stack to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + The size of the stack to commit. + The size of the local heap space to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + The size of the local heap space to commit. + + is not power of 2 between 512 and 64K. +-or- + + not power of 2. + +-or- + + is less than . + + + Creates an executable header. + A instance representing the executable header. + + + Creates a library header. + A instance representing the library header. + + + Returns the dynamic linker library characteristics. + An object that describes the dynamic linker library characteristics. + + + The alignment factor (in bytes) that is used to align the raw data of sections in the image file. The value should be a power of 2 between 512 and 64K, inclusive. The default is 512. If the section alignment is less than the architecture's page size, then file alignment must match the section alignment. + + + The preferred address of the first byte of image when loaded into memory; must be a multiple of 64K. + A number representing the preferred address of the first byte of image when loaded into memory. + + + Returns the image characteristics. + An object representing the image characteristics. + + + The target machine's CPU architecture. + One of the enumeration values representing the different CPU architectures. + + + The major version number of the image. + A number the size of a representing the the major version number of the image. + + + The linker major version number. + A number the size of a representing the linker major version number. + + + The major version number of the required operating system. + A number the size of a representing the major version number of the required operating system. + + + The major version number of the subsystem. + A number the size of a representing the major version number of the subsystem. + + + The minor version number of the image. + A number the size of a representing the minor version number of the image. + + + The linker minor version number. + A number the size of a representing the linker minor version number. + + + The minor version number of the required operating system. + A number the size of a representing the minor version number of the required operating system. + + + The minor version number of the subsystem. + A number the size of a representing the minor version number of the subsystem. + + + The alignment (in bytes) of sections when they are loaded into memory. + A number representing the alignment (in bytes) of sections when they are loaded into memory. It must be greater than or equal to the file alignment. The default is the page size for the architecture. + + + The size of the local heap space to commit. + A number representing the size of the local heap space to commit. + + + The size of the local heap space to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + A number representing the size of the local heap space to reserve. + + + The size of the stack to commit. + A number representing the size of the stack to commit. + + + The size of the stack to reserve. Only is committed; the rest is made available one page at a time until the reserve size is reached. + A number representing the size of the stack to reserve. + + + The subsystem that is required to run this image. + A instance. + + + Defines a type that reads PE (Portable Executable) and COFF (Common Object File Format) headers from a stream. + + + Instantiates a new instance of the class that reads the PE headers from the current location in the specified stream. + A stream containing the PE image starting at the stream's current position and ending at the end of the stream. + The data read from the stream has an invalid format. + Error reading from the stream. + The stream does not support seek operations. + + is . + + + Instantiates a new instance of the class that reads the PE headers from a stream that represents a PE image of a specified size. + A stream containing PE image of the given size starting at its current position. + The size of the PE image. + The data read from the stream has an invalid format. + Error reading from the stream. + The stream does not support seek operations. + + is . + + is negative or extends past the end of the stream. + + + Instantiates a new instance of the class that reads the PE headers from a stream that represents a PE image of a specified size and indicates whether the PE image has been loaded into memory. + The stream containing PE image of the given size starting at its current position. + The size of the PE image. + + if the PE image has been loaded into memory by the OS loader; otherwise, . + The data read from the stream has invalid format. + Error reading from the stream. + The stream does not support seek operations. + + is . + + is negative or extends past the end of the stream. + + + Searches sections of the PE image for the section that contains the specified Relative Virtual Address. + The relative virtual address to search for. + The index of the section that contains , or -1 if there the search is unsuccessful. + + + Gets the offset (in bytes) from the start of the image to the given directory data. + The PE directory entry. + When the method returns, contains the offset from the start of the image to the given directory data. + + if the directory data is found; otherwise. + + + Gets the COFF header of the image. + The COFF header of the image. + + + Gets the byte offset from the start of the PE image to the start of the COFF header. + The byte offset from the start of the PE image to the start of the COFF header. + + + Gets the COR header. + The COR header, or if the image does not have one. + + + Gets the byte offset from the start of the image to the COR header. + The byte offset from the start of the image to the COR header, or -1 if the image does not have a COR header. + + + Gets a value that indicates whether the image is Coff only. + + if the image is Coff only; otherwise, . + + + Gets a value that indicates whether the image represents a Windows console application. + + if the image is a Windows console applications; otherwise, . + + + Gets a value that indicates whether the image represents a dynamic link library. + + if the image is a DLL; otherwise, . + + + Gets a value that indicates whether the image represents an executable. + + if the image is an executable; otherwise, . + + + Gets the size of the CLI metadata. + the size of the CLI metadata, or 0 if the image does not contain metadata. + + + Gets the offset (in bytes) from the start of the PE image to the start of the CLI metadata. + The offset (in bytes) from the start of the PE image to the start of the CLI metadata, or -1 if the image does not contain metadata. + + + Gets the image's PE header. + The image's PE header, or if the image is COFF only. + + + Gets the byte offset of the header from the start of the image. + The byte offset of the header from the start of the image. + + + Gets the PE section headers. + An array containing the PE section headers. + + + + + + + Reads the contents of the entire block into an array. + An immutable byte array. + + + Reads the contents of a part of the block into an array. + The starting position in the block. + The number of bytes to read. + The specified range is not contained within the block. + An immutable array of bytes. + + + Creates a for a blob spanning the entire block. + A reader for a blob spanning the entire block. + + + Creates a for a blob spanning a part of the block. + The starting position in the block. + The number of bytes in the portion of the block. + The specified range is not contained within the block. + A reader for a blob spanning a portion of the block. + + + Gets the length of the block. + The length of the block. + + + Gets a pointer to the first byte of the block. + A pointer to the first byte of the block. + + + Provides a reader for Portable Executable format (PE) files. + + + Creates a Portable Executable reader over a PE image stored in memory. + A pointer to the start of the PE image. + The size of the PE image. + + is . + + is negative. + + + Creates a Portable Executable reader over a PE image stored in memory. A flag indicates whether the image has already been loaded into memory. + A pointer to the start of the PE image. + The size of the PE image. + + if the PE image has been loaded into memory by the OS loader; otherwise, . + + is . + + is negative. + + + Creates a Portable Executable reader over a PE image stored in a byte array. + An immutable array of bytes representing the PE image. + + is . + + + Creates a Portable Executable reader over a PE image stored in a stream. + PE image stream. + + is . + + + Creates a Portable Executable reader over a PE image stored in a stream beginning at its current position and ending at the end of the stream. + A PE image stream. + Options specifying how sections of the PE image are read from the stream. + + is . + + has an invalid value. + Error reading from the stream (only when prefetching data). + + is specified, and the PE headers of the image are invalid. + + + Creates a Portable Executable reader over a PE image of the given size beginning at the stream's current position. + A PE image stream. + Options specifying how sections of the PE image are read from the stream. + The PE image size. + + is negative or extends past the end of the stream. + Error reading from the stream (only when prefetching data). + + is specified, and the PE headers of the image are invalid. + + + Disposes all memory allocated by the reader. + + + Gets a object containing the entire PE image. + The entire PE image is not available. + A memory block that contains the entire PE image. + + + Loads a PE section that contains CLI metadata. + The PE image doesn't contain metadata ( returns ). + The PE headers contain invalid data. + IO error while reading from the underlying stream. + A memory block that contains the CLI metadata. + + + Loads the PE section that contains the specified relative virtual address into memory and returns a memory block that starts at that address and ends at the end of the containing section. + The Relative Virtual Address of the data to read. + The PE headers contain invalid data. + An IO error occurred while reading from the underlying stream. + The PE image is not available. + + is negative. + A memory block that starts at and ends at the end of the containing section, or an empty block if doesn't represent a location in any of the PE sections of this PE image. + + + Loads the PE section with the specified name into memory and returns a memory block that spans the section. + The name of the section. + + is . + The PE image is not available. + A memory block that spans the section, or an empty block if no section of the given exists in this PE image. + + + Reads the data pointed to by the specified Debug Directory entry and interprets it as CodeView. + A Debug Directory entry instance. + + is not a CodeView entry. + Bad format of the data. + IO error while reading from the underlying stream. + The PE image is not available. + A code view debug directory data instance. + + + Reads all Debug Directory table entries. + Bad format of the entry. + IO error while reading from the underlying stream. + The PE image is not available. + An array of Debug Directory table entries. + + + Reads the data pointed to by the specified Debug Directory entry and interprets it as an Embedded Portable PDB blob. + The Debug Directory entry whose data is to be read. + + is not a entry. + Bad format of the data. + PE image not available. + The provider of a metadata reader for reading a Portable PDB image. + + + Reads the data pointed to by the specified Debug Directory entry and interprets it as a PDB Checksum entry. + The Debug Directory entry whose data is to be read. + + is not a PDB Checksum entry. + Bad format of the data. + IO error while reading from the underlying stream. + The PE image is not available. + The PDB Checksum entry. + + + Opens a Portable PDB associated with this PE image. + The path to the PE image. The path is used to locate the PDB file located in the directory containing the PE file. + If specified, called to open a for a given file path. The provider is expected to either return a readable and seekable , or if the target file doesn't exist or should be ignored for some reason. The provider should throw if it fails to open the file due to an unexpected IO error. + If successful, a new instance of to be used to read the Portable PDB. + If successful and the PDB is found in a file, the path to the file, or if the PDB is embedded in the PE image itself. + + or is . + The stream returned from doesn't support read and seek operations. + No matching PDB file was found due to an error: The PE image or the PDB is invalid. + No matching PDB file was found due to an error: An IO error occurred while reading the PE image or the PDB. + + if the PE image has a PDB associated with it and the PDB has been successfully opened; otherwise, . + + + Gets a value that indicates if the PE image contains CLI metadata. + The PE headers contain invalid data. + Error reading from the underlying stream. + + if the PE image contains CLI metadata; otherwise, . + + + Gets a value that indicates if the reader can access the entire PE image. + + if the reader can access the entire PE image; otherwise, . + + + Gets a value that indicates if the PE image has been loaded into memory by the OS loader. + + if the PE image has been loaded into memory by the OS loader; otherwise, . + + + Gets the PE headers. + The headers contain invalid data. + Error reading from the stream. + The PE headers for this PE image. + + + Provides options that specify how sections of a PE image are read from a stream. + + + By default, the stream is disposed when the is disposed, and sections of the PE image are read lazily. + + + Indicates that the underlying PE image has been loaded into memory by the OS loader. + + + Keeps the stream open when the is disposed. + + + Reads the entire image into memory right away. closes the stream automatically by the time the constructor returns unless is specified. + + + + Reads the metadata section into memory right away. + Reading from other sections of the file is not allowed ( is thrown by the ). + + closes the stream automatically by the time the constructor returns unless is specified. The underlying file may be closed and even deleted after is constructed. + + + + Defines the base class for a PE resource section builder. Derive from to provide serialization logic for native resources. + + + Initializes a new instance of the class. + + + Serializes the specified resource. + A blob that contains the data to serialize. + The location to which to serialize . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides information about the section header of a PE/COFF file. + + + Gets the name of the section. + The name of the section. + + + Gets the number of line-number entries for the section. + The number of line-number entries for the section. + + + Gets the number of relocation entries for the section. + The number of relocation entries for the section. Its value is zero for PE images. + + + Gets the file pointer to the beginning of line-number entries for the section. + The file pointer to the beginning of line-number entries for the section, or zero if there are no COFF line numbers. + + + Gets the file pointer to the first page of the section within the COFF file. + The file pointer to the first page of the section within the COFF file. + + + Gets the file pointer to the beginning of relocation entries for the section. + The file pointer to the beginning of relocation entries for the section. It is set to zero for PE images or if there are no relocations. + + + Gets the flags that describe the characteristics of the section. + The flags that describe the characteristics of the section. + + + Gets the size of the section (for object files) or the size of the initialized data on disk (for image files). + The size of the section (for object files) or the size of the initialized data on disk (for image files). + + + Gets the virtual addess of the section. + The virtual address of the section. + + + Gets the total size of the section when loaded into memory. + The total size of the section when loaded into memory. + + + + + + + + + + Describes the subsystem requirement for the image. + + + Extensible Firmware Interface (EFI) application. + + + EFI driver with boot services. + + + EFI ROM image. + + + EFI driver with run-time services. + + + The image doesn't require a subsystem. + + + The image is a native Win9x driver. + + + The image runs in the OS/2 character subsystem. + + + The image runs in the Posix character subsystem. + + + Unknown subsystem. + + + Boot application. + + + The image runs in the Windows CE subsystem. + + + The image runs in the Windows character subsystem. + + + The image runs in the Windows GUI subsystem. + + + Xbox system. + + + \ No newline at end of file diff --git a/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.dll b/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.dll new file mode 100644 index 00000000..b17135bc Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.xml b/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.xml new file mode 100644 index 00000000..6a7cfcff --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Runtime.CompilerServices.Unsafe.xml @@ -0,0 +1,200 @@ + + + System.Runtime.CompilerServices.Unsafe + + + + Contains generic, low-level functionality for manipulating pointers. + + + Adds an element offset to the given reference. + The reference to add the offset to. + The offset to add. + The type of reference. + A new reference that reflects the addition of offset to pointer. + + + Adds an element offset to the given reference. + The reference to add the offset to. + The offset to add. + The type of reference. + A new reference that reflects the addition of offset to pointer. + + + Adds a byte offset to the given reference. + The reference to add the offset to. + The offset to add. + The type of reference. + A new reference that reflects the addition of byte offset to pointer. + + + Determines whether the specified references point to the same location. + The first reference to compare. + The second reference to compare. + The type of reference. + true if left and right point to the same location; otherwise, false. + + + Casts the given object to the specified type. + The object to cast. + The type which the object will be cast to. + The original object, casted to the given type. + + + Reinterprets the given reference as a reference to a value of type TTo. + The reference to reinterpret. + The type of reference to reinterpret.. + The desired type of the reference. + A reference to a value of type TTo. + + + Returns a pointer to the given by-ref parameter. + The object whose pointer is obtained. + The type of object. + A pointer to the given value. + + + Reinterprets the given location as a reference to a value of type T. + The location of the value to reference. + The type of the interpreted location. + A reference to a value of type T. + + + Determines the byte offset from origin to target from the given references. + The reference to origin. + The reference to target. + The type of reference. + Byte offset from origin to target i.e. target - origin. + + + Copies a value of type T to the given location. + The location to copy to. + A reference to the value to copy. + The type of value to copy. + + + Copies a value of type T to the given location. + The location to copy to. + A pointer to the value to copy. + The type of value to copy. + + + Copies bytes from the source address to the destination address. + The destination address to copy to. + The source address to copy from. + The number of bytes to copy. + + + Copies bytes from the source address to the destination address. + The destination address to copy to. + The source address to copy from. + The number of bytes to copy. + + + Copies bytes from the source address to the destination address +without assuming architecture dependent alignment of the addresses. + The destination address to copy to. + The source address to copy from. + The number of bytes to copy. + + + Copies bytes from the source address to the destination address +without assuming architecture dependent alignment of the addresses. + The destination address to copy to. + The source address to copy from. + The number of bytes to copy. + + + Initializes a block of memory at the given location with a given initial value. + The address of the start of the memory block to initialize. + The value to initialize the block to. + The number of bytes to initialize. + + + Initializes a block of memory at the given location with a given initial value. + The address of the start of the memory block to initialize. + The value to initialize the block to. + The number of bytes to initialize. + + + Initializes a block of memory at the given location with a given initial value +without assuming architecture dependent alignment of the address. + The address of the start of the memory block to initialize. + The value to initialize the block to. + The number of bytes to initialize. + + + Initializes a block of memory at the given location with a given initial value +without assuming architecture dependent alignment of the address. + The address of the start of the memory block to initialize. + The value to initialize the block to. + The number of bytes to initialize. + + + Reads a value of type T from the given location. + The location to read from. + The type to read. + An object of type T read from the given location. + + + Reads a value of type T from the given location +without assuming architecture dependent alignment of the addresses. + The location to read from. + The type to read. + An object of type T read from the given location. + + + Reads a value of type T from the given location +without assuming architecture dependent alignment of the addresses. + The location to read from. + The type to read. + An object of type T read from the given location. + + + Returns the size of an object of the given type parameter. + The type of object whose size is retrieved. + The size of an object of type T. + + + Subtracts an element offset from the given reference. + The reference to subtract the offset from. + The offset to subtract. + The type of reference. + A new reference that reflects the subraction of offset from pointer. + + + Subtracts an element offset from the given reference. + The reference to subtract the offset from. + The offset to subtract. + The type of reference. + A new reference that reflects the subraction of offset from pointer. + + + Subtracts a byte offset from the given reference. + The reference to subtract the offset from. + + The type of reference. + A new reference that reflects the subraction of byte offset from pointer. + + + Writes a value of type T to the given location. + The location to write to. + The value to write. + The type of value to write. + + + Writes a value of type T to the given location +without assuming architecture dependent alignment of the addresses. + The location to write to. + The value to write. + The type of value to write. + + + Writes a value of type T to the given location +without assuming architecture dependent alignment of the addresses. + The location to write to. + The value to write. + The type of value to write. + + + \ No newline at end of file diff --git a/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.dll b/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.dll new file mode 100644 index 00000000..dfab2347 Binary files /dev/null and b/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.dll differ diff --git a/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.xml b/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.xml new file mode 100644 index 00000000..5e02a99d --- /dev/null +++ b/SpaceWarpPatcherLibraries/System.Threading.Tasks.Extensions.xml @@ -0,0 +1,166 @@ + + + System.Threading.Tasks.Extensions + + + + + + + + + + + + + + + + + + + Provides a value type that wraps a and a TResult, only one of which is used. + The result. + + + Initializes a new instance of the class using the supplied task that represents the operation. + The task. + The task argument is null. + + + Initializes a new instance of the class using the supplied result of a successful operation. + The result. + + + Retrieves a object that represents this . + The object that is wrapped in this if one exists, or a new object that represents the result. + + + Configures an awaiter for this value. + true to attempt to marshal the continuation back to the captured context; otherwise, false. + The configured awaiter. + + + Creates a method builder for use with an async method. + The created builder. + + + Determines whether the specified object is equal to the current object. + The object to compare with the current object. + true if the specified object is equal to the current object; otherwise, false. + + + Determines whether the specified object is equal to the current object. + The object to compare with the current object. + true if the specified object is equal to the current object; otherwise, false. + + + Creates an awaiter for this value. + The awaiter. + + + Returns the hash code for this instance. + The hash code for the current object. + + + Gets a value that indicates whether this object represents a canceled operation. + true if this object represents a canceled operation; otherwise, false. + + + Gets a value that indicates whether this object represents a completed operation. + true if this object represents a completed operation; otherwise, false. + + + Gets a value that indicates whether this object represents a successfully completed operation. + true if this object represents a successfully completed operation; otherwise, false. + + + Gets a value that indicates whether this object represents a failed operation. + true if this object represents a failed operation; otherwise, false. + + + Compares two values for equality. + The first value to compare. + The second value to compare. + true if the two values are equal; otherwise, false. + + + Determines whether two values are unequal. + The first value to compare. + The seconed value to compare. + true if the two values are not equal; otherwise, false. + + + Gets the result. + The result. + + + Returns a string that represents the current object. + A string that represents the current object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/builder.py b/builder.py index 6ff74808..05f6bcfd 100644 --- a/builder.py +++ b/builder.py @@ -8,6 +8,7 @@ TEMPLATE_DIR = os.path.abspath("SpaceWarpBuildTemplate") SPACEWARP_DIR = os.path.abspath("SpaceWarp") PATCHER_DIR = os.path.abspath("SpaceWarpPatcher") +PATCHER_LIB_DIR = os.path.abspath("SpaceWarpPatcherLibraries") BUILD_DIR = os.path.abspath("build") THIRD_PARTY = os.path.abspath("ThirdParty") @@ -66,6 +67,11 @@ def build(release=False): for line in str(output.stderr, "utf-8").splitlines(): print(f" {line}") + + # patcher libraries + patcher_library_dir = os.path.join(BUILD_DIR, "SpaceWarp", "BepInEx", "patchers", "SpaceWarp", "lib") + print(f"=> Copying Patcher Libraries") + shutil.copytree(PATCHER_LIB_DIR,patcher_library_dir) # patcher build patcher_dotnet_args = ["dotnet", "build", os.path.join(PATCHER_DIR, "SpaceWarpPatcher.csproj"), "-c",