{
"api/IPA.Config.Data.Integer.html": {
"href": "api/IPA.Config.Data.Integer.html",
"title": "Class Integer",
"keywords": "Class Integer A Value representing an integer. This may hold a Int64 's worth of data. Inheritance Object Value Integer Inherited Members Value.Null() Value.List() Value.Map() Value.From(String) Value.Text(String) Value.From(Int64) Value.Integer(Int64) Value.From(Decimal) Value.Float(Decimal) Value.From(Boolean) Value.Bool(Boolean) Value.From(IEnumerable) Value.From(IDictionary) Value.From(IEnumerable>) Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Config.Data Assembly : IPA.Loader.dll Syntax public sealed class Integer : Value Properties | Improve this Doc View Source Value The actual value of the Integer object. Declaration public long Value { get; set; } Property Value Type Description Int64 Methods | Improve this Doc View Source AsFloat() Coerces this Integer into a FloatingPoint . Declaration public FloatingPoint AsFloat() Returns Type Description FloatingPoint a FloatingPoint representing the closest approximation of Value | Improve this Doc View Source ToString() Converts this Value into a human-readable format. Declaration public override string ToString() Returns Type Description String the result of Value.ToString() Overrides Value.ToString() Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Config.Data.Boolean.html": {
"href": "api/IPA.Config.Data.Boolean.html",
"title": "Class Boolean",
"keywords": "Class Boolean A Value representing a boolean value. Inheritance Object Value Boolean Inherited Members Value.Null() Value.List() Value.Map() Value.From(String) Value.Text(String) Value.From(Int64) Value.Integer(Int64) Value.From(Decimal) Value.Float(Decimal) Value.From(Boolean) Value.Bool(Boolean) Value.From(IEnumerable) Value.From(IDictionary) Value.From(IEnumerable>) Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Config.Data Assembly : IPA.Loader.dll Syntax public sealed class Boolean : Value Properties | Improve this Doc View Source Value The actual value fo this Boolean object. Declaration public bool Value { get; set; } Property Value Type Description Boolean Methods | Improve this Doc View Source ToString() Converts this Value into a human-readable format. Declaration public override string ToString() Returns Type Description String the result of Value.ToString().ToLower() Overrides Value.ToString() Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Utilities.Utils.html": {
"href": "api/IPA.Utilities.Utils.html",
"title": "Class Utils",
"keywords": "Class Utils A class providing static utility functions that in any other language would just exist . Inheritance Object Utils Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public static class Utils Properties | Improve this Doc View Source CanUseDateTimeNowSafely Whether you can safely use Now without Mono throwing a fit. Declaration public static bool CanUseDateTimeNowSafely { get; } Property Value Type Description Boolean true if you can use Now safely, false otherwise Methods | Improve this Doc View Source ByteArrayToString(Byte[]) Converts a byte array to a hex string. Declaration public static string ByteArrayToString(byte[] ba) Parameters Type Name Description Byte [] ba the byte array Returns Type Description String the hex form of the array | Improve this Doc View Source CopyAll(DirectoryInfo, DirectoryInfo, String, Func) Copies all files from source to target . Declaration public static void CopyAll(DirectoryInfo source, DirectoryInfo target, string appendFileName = \"\", Func onCopyException = null) Parameters Type Name Description DirectoryInfo source the source directory DirectoryInfo target the destination directory String appendFileName the filename of the file to append together Func < Exception , FileInfo , Boolean > onCopyException a delegate called when there is an error copying. Return true to keep going. | Improve this Doc View Source CurrentTime() Returns Now if supported, otherwise UtcNow . Declaration public static DateTime CurrentTime() Returns Type Description DateTime the current DateTime if supported, otherwise some indeterminant increasing value. | Improve this Doc View Source GetRelativePath(String, String) Gets a path relative to the provided folder. Declaration public static string GetRelativePath(string file, string folder) Parameters Type Name Description String file the file to relativize String folder the source folder Returns Type Description String a path to get from folder to file | Improve this Doc View Source ScopeGuard(Action) Creates a scope guard for a given Action . Declaration public static Utils.ScopeGuardObject ScopeGuard(Action action) Parameters Type Name Description Action action the Action to run on dispose Returns Type Description Utils.ScopeGuardObject a Utils.ScopeGuardObject that will run action on disposal Examples using var _ = Utils.ScopeGuard(() => RunOnScopeExit(value)); | Improve this Doc View Source StringToByteArray(String) Converts a hex string to a byte array. Declaration public static byte[] StringToByteArray(string hex) Parameters Type Name Description String hex the hex stream Returns Type Description Byte [] the corresponding byte array | Improve this Doc View Source UnsafeCompare(Byte[], Byte[]) Uses unsafe code to compare 2 byte arrays quickly. Declaration public static bool UnsafeCompare(byte[] a1, byte[] a2) Parameters Type Name Description Byte [] a1 array 1 Byte [] a2 array 2 Returns Type Description Boolean whether or not they are byte-for-byte equal | Improve this Doc View Source VersionCompareNoPrerelease(Version, Version) Compares a pair of SemVer.Version s ignoring both the prerelease and build fields. Declaration public static int VersionCompareNoPrerelease(Version l, Version r) Parameters Type Name Description SemVer.Version l the left value SemVer.Version r the right value Returns Type Description Int32 < 0 if l is less than r, 0 if they are equal in the numeric portion, or > 0 if l is greater than r"
},
"api/IPA.Utilities.Utils.ScopeGuardObject.html": {
"href": "api/IPA.Utilities.Utils.ScopeGuardObject.html",
"title": "Struct Utils.ScopeGuardObject",
"keywords": "Struct Utils.ScopeGuardObject An object used to manage scope guards. Implements IDisposable Inherited Members ValueType.Equals(Object) ValueType.GetHashCode() ValueType.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public struct ScopeGuardObject : IDisposable Examples using var _ = new Utils.ScopeGuardObject(() => RunOnScopeExit(value)); Constructors | Improve this Doc View Source ScopeGuardObject(Action) Creates a new scope guard that will invoke action when disposed. Declaration public ScopeGuardObject(Action action) Parameters Type Name Description Action action the action to run on dispose Explicit Interface Implementations | Improve this Doc View Source IDisposable.Dispose() Declaration void IDisposable.Dispose() Implements System.IDisposable Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also ScopeGuard(Action)"
},
"api/IPA.Utilities.UnityGame.html": {
"href": "api/IPA.Utilities.UnityGame.html",
"title": "Class UnityGame",
"keywords": "Class UnityGame Provides some basic utility methods and properties of Beat Saber Inheritance Object UnityGame Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public static class UnityGame Properties | Improve this Doc View Source GameVersion Provides the current game version. Declaration public static AlmostVersion GameVersion { get; } Property Value Type Description AlmostVersion the SemVer version of the game | Improve this Doc View Source InstallPath Gets the path to the game's install directory. Declaration public static string InstallPath { get; } Property Value Type Description String the path of the game install directory | Improve this Doc View Source LibraryPath The path to the Libs folder. Use only if necessary. Declaration public static string LibraryPath { get; } Property Value Type Description String the path to the library directory | Improve this Doc View Source NativeLibraryPath The path to the Libs\\Native folder. Use only if necessary. Declaration public static string NativeLibraryPath { get; } Property Value Type Description String the path to the native library directory | Improve this Doc View Source OnMainThread Checks if the currently running code is running on the Unity main thread. Declaration public static bool OnMainThread { get; } Property Value Type Description Boolean true if the curent thread is the Unity main thread, false otherwise | Improve this Doc View Source PluginsPath The directory to load plugins from. Declaration public static string PluginsPath { get; } Property Value Type Description String the path to the plugin directory | Improve this Doc View Source ReleaseType Gets the UnityGame.Release type of this installation of Beat Saber Declaration public static UnityGame.Release ReleaseType { get; } Property Value Type Description UnityGame.Release the type of release this is Remarks This only gives a | Improve this Doc View Source UserDataPath The path to the UserData folder. Declaration public static string UserDataPath { get; } Property Value Type Description String the path to the user data directory"
},
"api/IPA.Utilities.FieldAccessor-2.html": {
"href": "api/IPA.Utilities.FieldAccessor-2.html",
"title": "Class FieldAccessor",
"keywords": "Class FieldAccessor A type containing utilities for accessing non-public fields of objects. Inheritance Object FieldAccessor Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public static class FieldAccessor Type Parameters Name Description T the type that the fields are on U the type of the field to access Methods | Improve this Doc View Source Access(ref T, String) Accesses a field for an object by name. Declaration public static U Access(ref T obj, string name) Parameters Type Name Description T obj the object to access the field of String name the name of the field to access Returns Type Description U a reference to the object at the field Exceptions Type Condition MissingFieldException if the field does not exist on T See Also GetAccessor(String) | Improve this Doc View Source Get(T, String) Gets the value of a field of an object by name. Declaration public static U Get(T obj, string name) Parameters Type Name Description T obj the object to access the field of String name the name of the field to access Returns Type Description U the value of the field Exceptions Type Condition MissingFieldException if the field does not exist on T See Also Get(ref T, String) Access(ref T, String) GetAccessor(String) | Improve this Doc View Source Get(ref T, String) Gets the value of a field of an object by name. Declaration public static U Get(ref T obj, string name) Parameters Type Name Description T obj the object to access the field of String name the name of the field to access Returns Type Description U the value of the field Remarks The only good reason to use this over Get(T, String) is when you are working with a value type, as it prevents a copy. Exceptions Type Condition MissingFieldException if the field does not exist on T See Also Get(T, String) Access(ref T, String) GetAccessor(String) | Improve this Doc View Source GetAccessor(String) Gets an FieldAccessor.Accessor for the field named name on T . Declaration public static FieldAccessor.Accessor GetAccessor(string name) Parameters Type Name Description String name the field name Returns Type Description FieldAccessor.Accessor <> an accessor for the field Exceptions Type Condition MissingFieldException if the field does not exist on T | Improve this Doc View Source Set(T, String, U) Sets the value of a field for an object by name. Declaration public static void Set(T obj, string name, U value) Parameters Type Name Description T obj the object to set the field of String name the name of the field U value the value to set it to Remarks This overload cannot be safely used for value types. Use Set(ref T, String, U) instead. Exceptions Type Condition MissingFieldException if the field does not exist on T See Also Set(ref T, String, U) Access(ref T, String) GetAccessor(String) | Improve this Doc View Source Set(ref T, String, U) Sets the value of a field for an object by name. Declaration public static void Set(ref T obj, string name, U value) Parameters Type Name Description T obj the object to set the field of String name the name of the field U value the value to set it to Remarks This overload must be used for value types. Exceptions Type Condition MissingFieldException if the field does not exist on T See Also Set(T, String, U) Access(ref T, String) GetAccessor(String) See Also PropertyAccessor "
},
"api/IPA.Utilities.FieldAccessor-2.Accessor.html": {
"href": "api/IPA.Utilities.FieldAccessor-2.Accessor.html",
"title": "Delegate FieldAccessor.Accessor",
"keywords": "Delegate FieldAccessor.Accessor A delegate for a field accessor taking a T ref and returning a U ref. Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public delegate U Accessor(ref T obj); Parameters Type Name Description T obj the object to access the field of Returns Type Description U a reference to the field's value Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Utilities.Extensions.html": {
"href": "api/IPA.Utilities.Extensions.html",
"title": "Class Extensions",
"keywords": "Class Extensions A class providing various extension methods. Inheritance Object Extensions Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public static class Extensions Methods | Improve this Doc View Source GetDefault(Type) Gets the default value for a given Type . Declaration public static object GetDefault(this Type type) Parameters Type Name Description Type type the Type to get the default value for Returns Type Description Object the default value of type | Improve this Doc View Source IsSubPathOf(String, String) Returns true if path starts with the path baseDirPath . The comparison is case-insensitive, handles / and \\ slashes as folder separators and only matches if the base dir folder name is matched exactly (\"c:\\foobar\\file.txt\" is not a sub path of \"c:\\foo\"). Declaration public static bool IsSubPathOf(this string path, string baseDirPath) Parameters Type Name Description String path String baseDirPath Returns Type Description Boolean | Improve this Doc View Source Right(String, Int32) Gets the rightmost length characters from a string. Declaration public static string Right(this string value, int length) Parameters Type Name Description String value The string to retrieve the substring from. Int32 length The number of characters to retrieve. Returns Type Description String The substring. | Improve this Doc View Source Unwrap(Nullable) Unwraps a Nullable where T is Boolean such that if the value is null, it gives false . Declaration public static bool Unwrap(this bool? self) Parameters Type Name Description Nullable < Boolean > self the bool? to unwrap Returns Type Description Boolean the unwrapped value, or false if it was null | Improve this Doc View Source WithEnding(String, String) Returns str with the minimal concatenation of ending (starting from end) that results in satisfying .EndsWith(ending). Declaration public static string WithEnding(this string str, string ending) Parameters Type Name Description String str String ending Returns Type Description String Examples \"hel\".WithEnding(\"llo\") returns \"hello\", which is the result of \"hel\" + \"lo\"."
},
"api/IPA.Utilities.EnumerableExtensions.html": {
"href": "api/IPA.Utilities.EnumerableExtensions.html",
"title": "Class EnumerableExtensions",
"keywords": "Class EnumerableExtensions Extensions for IEnumerable that don't currently exist in System.Linq . Inheritance Object EnumerableExtensions Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public static class EnumerableExtensions Methods | Improve this Doc View Source Append(IEnumerable, T) Adds a value to the end of the sequence. Declaration public static IEnumerable Append(this IEnumerable seq, T app) Parameters Type Name Description IEnumerable seq a sequence of values T app the value to append to seq Returns Type Description IEnumerable a new sequence ending with app Type Parameters Name Description T the type of the elements of seq | Improve this Doc View Source NonNull(IEnumerable) LINQ-style extension method that filters null elements out of an enumeration. Declaration public static IEnumerable NonNull(this IEnumerable self) where T : class Parameters Type Name Description IEnumerable self the enumeration to filter Returns Type Description IEnumerable a filtered enumerable Type Parameters Name Description T the type of the enumeration | Improve this Doc View Source NonNull(IEnumerable>) LINQ-style extension method that filters null elements from an enumeration of nullable types. Declaration public static IEnumerable NonNull(this IEnumerable self) where T : struct Parameters Type Name Description IEnumerable < Nullable > self the enumeration to filter Returns Type Description IEnumerable a filtered enumerable Type Parameters Name Description T the underlying type of the nullable enumeration | Improve this Doc View Source NonNull(IEnumerable, Func) LINQ-style extension method that filters null elements out of an enumeration based on a converter. Declaration public static IEnumerable NonNull(this IEnumerable self, Func pred) where U : class Parameters Type Name Description IEnumerable self the enumeration to filter Func pred the predicate to select for filtering Returns Type Description IEnumerable a filtered enumerable Type Parameters Name Description T the type of the enumeration U the type to compare to null | Improve this Doc View Source NonNull(IEnumerable, Func>) LINQ-style extension method that filters null elements out of an enumeration based on a converter to a nullable type. Declaration public static IEnumerable NonNull(this IEnumerable self, Func pred) where U : struct Parameters Type Name Description IEnumerable self the enumeration to filter Func > pred the predicate to select for filtering Returns Type Description IEnumerable a filtered enumerable Type Parameters Name Description T the type of the enumeration U the type of the predicate's resulting nullable | Improve this Doc View Source Prepend(IEnumerable, T) Adds a value to the beginning of the sequence. Declaration public static IEnumerable Prepend(this IEnumerable seq, T prep) Parameters Type Name Description IEnumerable seq a sequence of values T prep the value to prepend to seq Returns Type Description IEnumerable a new sequence beginning with prep Type Parameters Name Description T the type of the elements of seq"
},
"api/IPA.Utilities.Async.Synchronization.html": {
"href": "api/IPA.Utilities.Async.Synchronization.html",
"title": "Class Synchronization",
"keywords": "Class Synchronization Utilities for inter-thread synchronization. All Locker method acquire their object immediately, and should only be used with langword_csharp_using to automatically release them. Inheritance Object Synchronization Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public static class Synchronization Examples The canonical usage of all of the member functions is as follows, substituting Lock(Mutex) with whichever member you want to use, according to your lock type. using var _locker = Synchronization.Lock(mutex); Methods | Improve this Doc View Source Lock(Mutex) Creates a locker for a mutex. Declaration public static Synchronization.MutexLocker Lock(Mutex mut) Parameters Type Name Description Mutex mut the mutex to acquire Returns Type Description Synchronization.MutexLocker the locker to use with langword_csharp_using | Improve this Doc View Source Lock(Semaphore) Creates a locker for a semaphore. Declaration public static Synchronization.SemaphoreLocker Lock(Semaphore sem) Parameters Type Name Description Semaphore sem the semaphore to acquire Returns Type Description Synchronization.SemaphoreLocker the locker to use with langword_csharp_using | Improve this Doc View Source Lock(SemaphoreSlim) Creates a locker for a slim semaphore. Declaration public static Synchronization.SemaphoreSlimLocker Lock(SemaphoreSlim sem) Parameters Type Name Description SemaphoreSlim sem the slim semaphore to acquire Returns Type Description Synchronization.SemaphoreSlimLocker the locker to use with langword_csharp_using | Improve this Doc View Source LockAsync(SemaphoreSlim) Creates a locker for a slim semaphore asynchronously. Declaration public static Task LockAsync(SemaphoreSlim sem) Parameters Type Name Description SemaphoreSlim sem the slim semaphore to acquire async Returns Type Description Task < Synchronization.SemaphoreSlimAsyncLocker > the locker to use with langword_csharp_using | Improve this Doc View Source LockRead(ReaderWriterLockSlim) Creates a locker for a read lock on a ReaderWriterLockSlim . Declaration public static Synchronization.ReaderWriterLockSlimReadLocker LockRead(ReaderWriterLockSlim rwl) Parameters Type Name Description ReaderWriterLockSlim rwl the lock to acquire in read mode Returns Type Description Synchronization.ReaderWriterLockSlimReadLocker the locker to use with langword_csharp_using | Improve this Doc View Source LockReadUpgradable(ReaderWriterLockSlim) Creates a locker for an upgradable read lock on a ReaderWriterLockSlim . Declaration public static Synchronization.ReaderWriterLockSlimUpgradableReadLocker LockReadUpgradable(ReaderWriterLockSlim rwl) Parameters Type Name Description ReaderWriterLockSlim rwl the lock to acquire in upgradable read mode Returns Type Description Synchronization.ReaderWriterLockSlimUpgradableReadLocker the locker to use with langword_csharp_using | Improve this Doc View Source LockWrite(ReaderWriterLockSlim) Creates a locker for a write lock ReaderWriterLockSlim . Declaration public static Synchronization.ReaderWriterLockSlimWriteLocker LockWrite(ReaderWriterLockSlim rwl) Parameters Type Name Description ReaderWriterLockSlim rwl the lock to acquire in write mode Returns Type Description Synchronization.ReaderWriterLockSlimWriteLocker the locker to use with langword_csharp_using"
},
"api/IPA.Utilities.Async.Synchronization.SemaphoreSlimLocker.html": {
"href": "api/IPA.Utilities.Async.Synchronization.SemaphoreSlimLocker.html",
"title": "Struct Synchronization.SemaphoreSlimLocker",
"keywords": "Struct Synchronization.SemaphoreSlimLocker A locker for a SemaphoreSlim that automatically releases when it is disposed. Create this with Lock(SemaphoreSlim) . Implements IDisposable Inherited Members ValueType.Equals(Object) ValueType.GetHashCode() ValueType.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public struct SemaphoreSlimLocker : IDisposable Explicit Interface Implementations | Improve this Doc View Source IDisposable.Dispose() Declaration void IDisposable.Dispose() Implements System.IDisposable Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also Synchronization Lock(SemaphoreSlim)"
},
"api/IPA.Utilities.Async.Synchronization.SemaphoreSlimAsyncLocker.html": {
"href": "api/IPA.Utilities.Async.Synchronization.SemaphoreSlimAsyncLocker.html",
"title": "Struct Synchronization.SemaphoreSlimAsyncLocker",
"keywords": "Struct Synchronization.SemaphoreSlimAsyncLocker A locker for a SemaphoreSlim that was created asynchronously and automatically releases when it is disposed. Create this with LockAsync(SemaphoreSlim) . Implements IDisposable Inherited Members ValueType.Equals(Object) ValueType.GetHashCode() ValueType.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public struct SemaphoreSlimAsyncLocker : IDisposable Explicit Interface Implementations | Improve this Doc View Source IDisposable.Dispose() Declaration void IDisposable.Dispose() Implements System.IDisposable Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also Synchronization LockAsync(SemaphoreSlim)"
},
"api/IPA.Utilities.Async.Synchronization.SemaphoreLocker.html": {
"href": "api/IPA.Utilities.Async.Synchronization.SemaphoreLocker.html",
"title": "Struct Synchronization.SemaphoreLocker",
"keywords": "Struct Synchronization.SemaphoreLocker A locker for a Semaphore that automatically releases when it is disposed. Create this with Lock(Semaphore) . Implements IDisposable Inherited Members ValueType.Equals(Object) ValueType.GetHashCode() ValueType.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public struct SemaphoreLocker : IDisposable Explicit Interface Implementations | Improve this Doc View Source IDisposable.Dispose() Declaration void IDisposable.Dispose() Implements System.IDisposable Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also Synchronization Lock(Semaphore)"
},
"api/IPA.Utilities.Async.SingleThreadTaskScheduler.html": {
"href": "api/IPA.Utilities.Async.SingleThreadTaskScheduler.html",
"title": "Class SingleThreadTaskScheduler",
"keywords": "Class SingleThreadTaskScheduler A single-threaded task scheduler that runs all of its tasks on the same thread. Inheritance Object TaskScheduler SingleThreadTaskScheduler Implements IDisposable Inherited Members TaskScheduler.TryDequeue(Task) TaskScheduler.FromCurrentSynchronizationContext() TaskScheduler.TryExecuteTask(Task) TaskScheduler.MaximumConcurrencyLevel TaskScheduler.Default TaskScheduler.Current TaskScheduler.Id TaskScheduler.UnobservedTaskException Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public class SingleThreadTaskScheduler : TaskScheduler, IDisposable Properties | Improve this Doc View Source IsRunning Gets whether or not the underlying thread has been started. Declaration public bool IsRunning { get; } Property Value Type Description Boolean Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. Methods | Improve this Doc View Source Dispose() Disposes this object. This puts the object into an unusable state. Declaration public void Dispose() | Improve this Doc View Source Dispose(Boolean) Disposes this object. Declaration protected virtual void Dispose(bool disposing) Parameters Type Name Description Boolean disposing whether or not to dispose managed objects | Improve this Doc View Source Exit() Terminates the runner thread, and waits for the currently running task to complete. Declaration public IEnumerable Exit() Returns Type Description IEnumerable < Task > an IEnumerable of Task s that did not execute Remarks After this method returns, this object has been disposed and is no longer in a valid state. Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. | Improve this Doc View Source GetScheduledTasks() Throws a NotSupportedException . Declaration protected override IEnumerable GetScheduledTasks() Returns Type Description IEnumerable < Task > nothing Overrides TaskScheduler.GetScheduledTasks() Exceptions Type Condition NotSupportedException Always. | Improve this Doc View Source Join() Waits for the runner thread to complete all tasks in the queue, then exits. Declaration public void Join() Remarks After this method returns, this object has been disposed and is no longer in a valid state. Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. | Improve this Doc View Source QueueTask(Task) Queues a given Task to this scheduler. The Task must> be scheduled for this TaskScheduler by the runtime. Declaration protected override void QueueTask(Task task) Parameters Type Name Description Task task the Task to queue Overrides TaskScheduler.QueueTask(Task) Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. | Improve this Doc View Source Start() Starts the thread that executes tasks scheduled with this TaskScheduler Declaration public void Start() Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. | Improve this Doc View Source TryExecuteTaskInline(Task, Boolean) Rejects any attempts to execute a task inline. Declaration protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued) Parameters Type Name Description Task task the task to attempt to execute Boolean taskWasPreviouslyQueued whether the task was previously queued to this scheduler Returns Type Description Boolean false Overrides TaskScheduler.TryExecuteTaskInline(Task, Boolean) Remarks This task scheduler always runs its tasks on the thread that it manages, therefore it doesn't make sense to run it inline. Exceptions Type Condition ObjectDisposedException Thrown if this object has already been disposed. Implements System.IDisposable Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Utilities.Async.SingleCreationValueCache-2.html": {
"href": "api/IPA.Utilities.Async.SingleCreationValueCache-2.html",
"title": "Class SingleCreationValueCache",
"keywords": "Class SingleCreationValueCache A dictionary-like type intended for thread-safe value caches whose values are created only once ever. Inheritance Object SingleCreationValueCache Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public class SingleCreationValueCache Type Parameters Name Description TKey the key type of the cache TValue the value type of the cache Remarks This object basically wraps a ConcurrentDictionary with some special handling to ensure that values are only created once ever, without having multiple parallel constructions. Constructors | Improve this Doc View Source SingleCreationValueCache() Initializes a new instance of the SingleCreationValueCache class that is empty, has the default concurrency level, has the default initial capacity, and uses the default comparer for the key type. Declaration public SingleCreationValueCache() | Improve this Doc View Source SingleCreationValueCache(IEnumerable>) Initializes a new instance of the SingleCreationValueCache class that contains elements copied from the specified IEnumerable , has the default concurrency level, has the default initial capacity, and uses the default comparer for the key type. Declaration public SingleCreationValueCache(IEnumerable> collection) Parameters Type Name Description IEnumerable < KeyValuePair > collection the IEnumerable whose element are to be used for the new cache Exceptions Type Condition ArgumentNullException when any arguments are null ArgumentException collection contains duplicate keys | Improve this Doc View Source SingleCreationValueCache(IEnumerable>, IEqualityComparer) Initializes a new instance of the SingleCreationValueCache class that contains elements copied from the specified IEnumerable has the default concurrency level, has the default initial capacity, and uses the specified IEqualityComparer . Declaration public SingleCreationValueCache(IEnumerable> collection, IEqualityComparer comparer) Parameters Type Name Description IEnumerable < KeyValuePair > collection the IEnumerable whose elements are to be used for the new cache IEqualityComparer comparer the equality comparer to use when comparing keys Exceptions Type Condition ArgumentNullException collection or comparer is null | Improve this Doc View Source SingleCreationValueCache(IEqualityComparer) Initializes a new instance of the SingleCreationValueCache class that is empty, has the default concurrency level and capacity, and uses the specified IEqualityComparer . Declaration public SingleCreationValueCache(IEqualityComparer comparer) Parameters Type Name Description IEqualityComparer comparer the equality comparer to use when comparing keys Exceptions Type Condition ArgumentNullException comparer is null Properties | Improve this Doc View Source Count Gets the number of elements that this cache contains. Declaration public int Count { get; } Property Value Type Description Int32 | Improve this Doc View Source IsEmpty Gets a value that indicates whether this cache is empty. Declaration public bool IsEmpty { get; } Property Value Type Description Boolean Methods | Improve this Doc View Source Clear() Clears the cache. Declaration public void Clear() | Improve this Doc View Source ContainsKey(TKey) Gets a value indicating whether or not this cache contains key . Declaration public bool ContainsKey(TKey key) Parameters Type Name Description TKey key the key to search for Returns Type Description Boolean true if the cache contains the key, false otherwise | Improve this Doc View Source GetOrAdd(TKey, Func) Gets the value associated with the specified key from the cache. If it does not exist, and no creators are currently running for this key, then the creator is called to create the value and the value is added to the cache. If there is a creator currently running for the key, then this waits for the creator to finish and retrieves the value. Declaration public TValue GetOrAdd(TKey key, Func creator) Parameters Type Name Description TKey key the key to search for Func creator the delegate to use to create the value if it does not exist Returns Type Description TValue the value that was found, or the result of creator | Improve this Doc View Source ToArray() Copies the key-value pairs stored by the cache to a new array, filtering all elements that are currently being created. Declaration public KeyValuePair[] ToArray() Returns Type Description KeyValuePair [] an array containing a snapshot of the key-value pairs contained in this cache | Improve this Doc View Source TryGetValue(TKey, out TValue) Attempts to get the value associated with the specified key from the cache. Declaration public bool TryGetValue(TKey key, out TValue value) Parameters Type Name Description TKey key the key to search for TValue value the value retrieved, if any Returns Type Description Boolean true if the value was found, false otherwise Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Utilities.Async.Coroutines.html": {
"href": "api/IPA.Utilities.Async.Coroutines.html",
"title": "Class Coroutines",
"keywords": "Class Coroutines A class providing coroutine helpers. Inheritance Object Coroutines Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities.Async Assembly : IPA.Loader.dll Syntax public static class Coroutines Methods | Improve this Doc View Source AsTask(IEnumerator) Binds a Task to a Unity coroutine, capturing exceptions as well as the coroutine call stack. Declaration public static Task AsTask(IEnumerator coroutine) Parameters Type Name Description IEnumerator coroutine the coroutine to bind to a task Returns Type Description Task a Task that completes when coroutine completes, and fails when it throws Remarks This may be called off of the Unity main thread. If it is, the coroutine start will be scheduled using the default UnityMainThreadTaskScheduler and will be run on the main thread as required by Unity. Unity provides a handful of coroutine helpers that are not IEnumerable s. Most of these are not terribly helpful on their own, however UnityEngine.WaitForSeconds may be. Instead, prefer to use the typical .NET Wait(TimeSpan) or similar overloads, or use UnityEngine.WaitForSecondsRealtime . | Improve this Doc View Source WaitForTask(Task) Stalls the coroutine until task completes, faults, or is canceled. Declaration public static IEnumerator WaitForTask(Task task) Parameters Type Name Description Task task the Task to wait for Returns Type Description IEnumerator a coroutine waiting for the given task | Improve this Doc View Source WaitForTask(Task, Boolean) Stalls the coroutine until task completes, faults, or is canceled. Declaration public static IEnumerator WaitForTask(Task task, bool throwOnFault = false) Parameters Type Name Description Task task the Task to wait for Boolean throwOnFault whether or not to throw if the task faulted Returns Type Description IEnumerator a coroutine waiting for the given task"
},
"api/IPA.Utilities.AlmostVersionConverter.html": {
"href": "api/IPA.Utilities.AlmostVersionConverter.html",
"title": "Class AlmostVersionConverter",
"keywords": "Class AlmostVersionConverter A ValueConverter for AlmostVersion s. Inheritance Object ValueConverter < AlmostVersion > AlmostVersionConverter Implements IValueConverter Inherited Members ValueConverter.IValueConverter.ToValue(Object, Object) ValueConverter.IValueConverter.FromValue(Value, Object) ValueConverter.IValueConverter.Type Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Utilities Assembly : IPA.Loader.dll Syntax public sealed class AlmostVersionConverter : ValueConverter, IValueConverter Methods | Improve this Doc View Source FromValue(Value, Object) Converts a Text node into an AlmostVersion . Declaration public override AlmostVersion FromValue(Value value, object parent) Parameters Type Name Description Value value the Text node to convert Object parent the owner of the new object Returns Type Description AlmostVersion Overrides IPA.Config.Stores.ValueConverter.FromValue(IPA.Config.Data.Value, System.Object) | Improve this Doc View Source ToValue(AlmostVersion, Object) Converts an AlmostVersion to a Text node. Declaration public override Value ToValue(AlmostVersion obj, object parent) Parameters Type Name Description AlmostVersion obj the AlmostVersion to convert Object parent the parent of obj Returns Type Description Value a Text node representing obj Overrides IPA.Config.Stores.ValueConverter.ToValue(IPA.Utilities.AlmostVersion, System.Object) Implements IValueConverter Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.OnStartAttribute.html": {
"href": "api/IPA.OnStartAttribute.html",
"title": "Class OnStartAttribute",
"keywords": "Class OnStartAttribute Indicates that the target method should be called when the game starts. Inheritance Object Attribute OnStartAttribute Implements _Attribute Inherited Members Attribute.GetCustomAttributes(MemberInfo, Type) Attribute.GetCustomAttributes(MemberInfo, Type, Boolean) Attribute.GetCustomAttributes(MemberInfo) Attribute.GetCustomAttributes(MemberInfo, Boolean) Attribute.IsDefined(MemberInfo, Type) Attribute.IsDefined(MemberInfo, Type, Boolean) Attribute.GetCustomAttribute(MemberInfo, Type) Attribute.GetCustomAttribute(MemberInfo, Type, Boolean) Attribute.GetCustomAttributes(ParameterInfo) Attribute.GetCustomAttributes(ParameterInfo, Type) Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean) Attribute.GetCustomAttributes(ParameterInfo, Boolean) Attribute.IsDefined(ParameterInfo, Type) Attribute.IsDefined(ParameterInfo, Type, Boolean) Attribute.GetCustomAttribute(ParameterInfo, Type) Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean) Attribute.GetCustomAttributes(Module, Type) Attribute.GetCustomAttributes(Module) Attribute.GetCustomAttributes(Module, Boolean) Attribute.GetCustomAttributes(Module, Type, Boolean) Attribute.IsDefined(Module, Type) Attribute.IsDefined(Module, Type, Boolean) Attribute.GetCustomAttribute(Module, Type) Attribute.GetCustomAttribute(Module, Type, Boolean) Attribute.GetCustomAttributes(Assembly, Type) Attribute.GetCustomAttributes(Assembly, Type, Boolean) Attribute.GetCustomAttributes(Assembly) Attribute.GetCustomAttributes(Assembly, Boolean) Attribute.IsDefined(Assembly, Type) Attribute.IsDefined(Assembly, Type, Boolean) Attribute.GetCustomAttribute(Assembly, Type) Attribute.GetCustomAttribute(Assembly, Type, Boolean) Attribute.Equals(Object) Attribute.GetHashCode() Attribute.Match(Object) Attribute.IsDefaultAttribute() Attribute._Attribute.GetTypeInfoCount(UInt32) Attribute._Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) Attribute._Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) Attribute._Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) Attribute.TypeId Object.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Object.MemberwiseClone() Namespace : IPA Assembly : IPA.Loader.dll Syntax [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class OnStartAttribute : Attribute, _Attribute, IEdgeLifecycleAttribute Remarks This attribute is interchangable with OnEnableAttribute , and is treated identically. They are seperate to allow plugin code to more clearly describe the intent of the methods. Typically, this will be used when the RuntimeOptions parameter of the plugins's PluginAttribute is SingleStartInit . The method marked by this attribute will always be called from the Unity main thread. Implements System.Runtime.InteropServices._Attribute Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also PluginAttribute OnEnableAttribute"
},
"api/IPA.Loader.Features.Feature.html": {
"href": "api/IPA.Loader.Features.Feature.html",
"title": "Class Feature",
"keywords": "Class Feature The root interface for a mod Feature. Inheritance Object Feature Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Loader.Features Assembly : IPA.Loader.dll Syntax public abstract class Feature Remarks Avoid storing any data in any subclasses. If you do, it may result in a failure to load the feature. Properties | Improve this Doc View Source InvalidMessage The message to be logged when the feature is not valid for a plugin. This should also be set whenever either BeforeLoad(PluginMetadata) or BeforeInit(PluginMetadata) returns false. Declaration public virtual string InvalidMessage { get; protected set; } Property Value Type Description String the message to show when the feature is marked invalid | Improve this Doc View Source StoreOnPlugin Defines whether or not this feature will be accessible from the plugin metadata once loaded. Declaration protected virtual bool StoreOnPlugin { get; } Property Value Type Description Boolean true if this Feature will be stored on the plugin metadata, false otherwise Methods | Improve this Doc View Source AfterInit(PluginMetadata) Called after a plugin has been fully initialized, whether or not there is an Init method. This should never throw an exception. Declaration public virtual void AfterInit(PluginMetadata plugin) Parameters Type Name Description PluginMetadata plugin the plugin that was just initialized | Improve this Doc View Source AfterInit(PluginMetadata, Object) Called after a plugin has been fully initialized, whether or not there is an Init method. This should never throw an exception. Declaration public virtual void AfterInit(PluginMetadata plugin, object pluginInstance) Parameters Type Name Description PluginMetadata plugin the plugin that was just initialized Object pluginInstance the instance of the plugin being initialized | Improve this Doc View Source BeforeInit(PluginMetadata) Called before a plugin's Init method is called. This will not be called if there is no Init method. This should never throw an exception. An exception will abort the loading of the plugin with an error. Declaration public virtual bool BeforeInit(PluginMetadata plugin) Parameters Type Name Description PluginMetadata plugin the plugin to be initialized Returns Type Description Boolean whether or not to call the Init method | Improve this Doc View Source BeforeLoad(PluginMetadata) Called before a plugin is loaded. This should never throw an exception. An exception will abort the loading of the plugin with an error. Declaration public virtual bool BeforeLoad(PluginMetadata plugin) Parameters Type Name Description PluginMetadata plugin the plugin about to be loaded Returns Type Description Boolean whether or not the plugin should be loaded Remarks The assembly will still be loaded, but the plugin will not be constructed if this returns false . Any features it defines, for example, will still be loaded. | Improve this Doc View Source Evaluate() Evaluates the Feature for use in conditional meta-Features. This should be re-calculated on every call, unless it can be proven to not change. This will be called on every feature that returns true from Initialize(PluginMetadata, String[]) Declaration public virtual bool Evaluate() Returns Type Description Boolean the truthiness of the Feature. | Improve this Doc View Source Initialize(PluginMetadata, String[]) Initializes the feature with the parameters provided in the definition. Note: When no parenthesis are provided, parameters is an empty array. Declaration public abstract bool Initialize(PluginMetadata meta, string[] parameters) Parameters Type Name Description PluginMetadata meta the metadata of the plugin that is being prepared String [] parameters the parameters passed to the feature definition, or null Returns Type Description Boolean true if the feature is valid for the plugin, false otherwise Remarks This gets called BEFORE your Init method. Returning false does not prevent the plugin from being loaded. It simply prevents the feature from being used. | Improve this Doc View Source RequireLoaded(PluginMetadata) Ensures a plugin's assembly is loaded. Do not use unless you need to. Declaration protected void RequireLoaded(PluginMetadata plugin) Parameters Type Name Description PluginMetadata plugin the plugin to ensure is loaded. Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.Loader.CannotRuntimeDisableException.html": {
"href": "api/IPA.Loader.CannotRuntimeDisableException.html",
"title": "Class CannotRuntimeDisableException",
"keywords": "Class CannotRuntimeDisableException Indicates that a plugin cannot be disabled at runtime. Generally not considered an error, however. Inheritance Object Exception CannotRuntimeDisableException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : IPA.Loader Assembly : IPA.Loader.dll Syntax [Serializable] public class CannotRuntimeDisableException : Exception, ISerializable, _Exception Constructors | Improve this Doc View Source CannotRuntimeDisableException(PluginMetadata) Creates an exception for the given plugin metadata. Declaration public CannotRuntimeDisableException(PluginMetadata plugin) Parameters Type Name Description PluginMetadata plugin the plugin that cannot be disabled | Improve this Doc View Source CannotRuntimeDisableException(PluginMetadata, String) Creats an exception with the given plugin metadata and message information. Declaration public CannotRuntimeDisableException(PluginMetadata plugin, string message) Parameters Type Name Description PluginMetadata plugin the plugin that cannot be disabled String message the message to associate with it | Improve this Doc View Source CannotRuntimeDisableException(SerializationInfo, StreamingContext) Creates an exception from a serialization context. Not currently implemented. Declaration protected CannotRuntimeDisableException(SerializationInfo serializationInfo, StreamingContext streamingContext) Parameters Type Name Description SerializationInfo serializationInfo StreamingContext streamingContext Exceptions Type Condition NotImplementedException Properties | Improve this Doc View Source Plugin The plugin that cannot be disabled at runtime. Declaration public PluginMetadata Plugin { get; } Property Value Type Description PluginMetadata Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[])"
},
"api/IPA.InitAttribute.html": {
"href": "api/IPA.InitAttribute.html",
"title": "Class InitAttribute",
"keywords": "Class InitAttribute Marks a method or a constructor as an inialization method. Inheritance Object Attribute InitAttribute Implements _Attribute Inherited Members Attribute.GetCustomAttributes(MemberInfo, Type) Attribute.GetCustomAttributes(MemberInfo, Type, Boolean) Attribute.GetCustomAttributes(MemberInfo) Attribute.GetCustomAttributes(MemberInfo, Boolean) Attribute.IsDefined(MemberInfo, Type) Attribute.IsDefined(MemberInfo, Type, Boolean) Attribute.GetCustomAttribute(MemberInfo, Type) Attribute.GetCustomAttribute(MemberInfo, Type, Boolean) Attribute.GetCustomAttributes(ParameterInfo) Attribute.GetCustomAttributes(ParameterInfo, Type) Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean) Attribute.GetCustomAttributes(ParameterInfo, Boolean) Attribute.IsDefined(ParameterInfo, Type) Attribute.IsDefined(ParameterInfo, Type, Boolean) Attribute.GetCustomAttribute(ParameterInfo, Type) Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean) Attribute.GetCustomAttributes(Module, Type) Attribute.GetCustomAttributes(Module) Attribute.GetCustomAttributes(Module, Boolean) Attribute.GetCustomAttributes(Module, Type, Boolean) Attribute.IsDefined(Module, Type) Attribute.IsDefined(Module, Type, Boolean) Attribute.GetCustomAttribute(Module, Type) Attribute.GetCustomAttribute(Module, Type, Boolean) Attribute.GetCustomAttributes(Assembly, Type) Attribute.GetCustomAttributes(Assembly, Type, Boolean) Attribute.GetCustomAttributes(Assembly) Attribute.GetCustomAttributes(Assembly, Boolean) Attribute.IsDefined(Assembly, Type) Attribute.IsDefined(Assembly, Type, Boolean) Attribute.GetCustomAttribute(Assembly, Type) Attribute.GetCustomAttribute(Assembly, Type, Boolean) Attribute.Equals(Object) Attribute.GetHashCode() Attribute.Match(Object) Attribute.IsDefaultAttribute() Attribute._Attribute.GetTypeInfoCount(UInt32) Attribute._Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) Attribute._Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) Attribute._Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) Attribute.TypeId Object.ToString() Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetType() Object.MemberwiseClone() Namespace : IPA Assembly : IPA.Loader.dll Syntax [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class InitAttribute : Attribute, _Attribute Remarks If more than one constructor is marked with this attribute, the one with the most parameters, whether or not they can be injected, will be used. Parameter injection is done with PluginInitInjector . Implements System.Runtime.InteropServices._Attribute Extension Methods ReflectionUtil.SetField(T, String, U) ReflectionUtil.GetField(T, String) ReflectionUtil.SetProperty(T, String, U) ReflectionUtil.GetProperty(T, String) ReflectionUtil.InvokeMethod(T, String, Object[]) See Also PluginAttribute PluginInitInjector"
},
"api/IPA.Config.Stores.GeneratedStore.html": {
"href": "api/IPA.Config.Stores.GeneratedStore.html",
"title": "Class GeneratedStore",
"keywords": "Class GeneratedStore A class providing an extension for Config to make it easy to use generated config stores. Inheritance Object GeneratedStore Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Config.Stores Assembly : IPA.Loader.dll Syntax public static class GeneratedStore Fields | Improve this Doc View Source AssemblyVisibilityTarget The name of the assembly that internals must be visible to to allow internal protection. Declaration public const string AssemblyVisibilityTarget = \"IPA.Config.Generated\" Field Value Type Description String Methods | Improve this Doc View Source Create() Creates a generated store outside of the context of the config system. Declaration public static T Create() where T : class Returns Type Description T a generated instance of T implementing functionality described by Generated(Config, Boolean) Type Parameters Name Description T the type to wrap Remarks See Generated(Config, Boolean) for more information about how it behaves. See Also Generated(Config, Boolean) | Improve this Doc View Source Generated(Config, Boolean) Creates a generated IConfigStore of type T , registers it to the Config object, and returns it. This also forces a synchronous config load via LoadSync() if loadSync is true . Declaration public static T Generated(this Config cfg, bool loadSync = true) where T : class Parameters Type Name Description Config cfg the Config to register to Boolean loadSync whether to synchronously load the content, or trigger an async load Returns Type Description T a generated instance of T as a special IConfigStore Type Parameters Name Description T the type to wrap Remarks T must be a public non- sealed class. It can also be internal, but in that case, then your assembly must have the following attribute to allow the generated code to reference it. [assembly: InternalsVisibleTo(IPA.Config.Stores.GeneratedStore.AssemblyVisibilityTarget)] Only fields and properties that are public or protected will be considered, and only properties where both the getter and setter are public or protected are considered. Any fields or properties with an IgnoreAttribute applied to them are also ignored. Having properties be virtual is not strictly necessary, however it allows the generated type to keep track of changes and lock around them so that the config will auto-save. All of the attributes in the IPA.Config.Stores.Attributes namespace are handled as described by them. If the T declares a public or protected, virtual method Changed() , then that method may be called to artificially signal to the runtime that the content of the object has changed. That method will also be called after the write locks are released when a property is set anywhere in the owning tree. This will only be called on the outermost generated object of the config structure, even if the change being signaled is somewhere deep into the tree. Similarly, T can declare a public or protected, virtual method OnReload() , which will be called on the filesystem reader thread after the object has been repopulated with new data values. It will be called after the write lock for this object is released. This will only be called on the outermost generated object of the config structure. Similarly, T can declare a public or protected, virtual method CopyFrom(ConfigType) (the first parameter is the type it is defined on), which may be called to copy the properties from another object of its type easily, and more importantly, as only one change. Its body will be executed after the values have been copied. Similarly, T can declare a public or protected, virtual method ChangeTransaction() returning IDisposable , which may be called to get an object representing a transactional change. This may be used to change a lot of properties at once without triggering a save multiple times. Ideally, this is used in a langword_csharp_using block or declaration. The IDisposable returned from your implementation will have its Dispose() called after Changed() is called, but before the write lock is released. Unless you have a very good reason to use the nested IDisposable , avoid it. If T is marked with NotifyPropertyChangesAttribute , the resulting object will implement INotifyPropertyChanged . Similarly, if T implements INotifyPropertyChanged , the resulting object will implement it and notify it too."
},
"api/IPA.Config.Stores.Converters.html": {
"href": "api/IPA.Config.Stores.Converters.html",
"title": "",
"keywords": "Classes CaseInsensitiveEnumConverter A converter for an enum of type T , that converts the enum to its string representation and back, ignoring the case of the serialized value for deseiralization. CollectionConverter A base class for all ICollection type converters, providing most of the functionality. CollectionConverter A CollectionConverter which default constructs a converter for use as the value converter. Converter Provides utility functions for custom converters. Converter Provides generic utilities for converters for certain types. CustomObjectConverter A ValueConverter for objects normally serialized to config via Generated(Config, Boolean) . CustomValueTypeConverter A ValueConverter for custom value types, serialized identically to the reference types serialized with Generated(Config, Boolean) . DictionaryConverter A converter for instances of Dictionary . DictionaryConverter A converter for instances of Dictionary , specifying a value converter as a type parameter. EnumConverter A converter for an enum of type T , that converts the enum to its string representation and back. IDictionaryConverter A converter for instances of IDictionary . IDictionaryConverter A converter for instances of IDictionary , specifying a value converter as a type parameter. IListConverter A CollectionConverter for an IList , creating a List when deserializing. IListConverter An IListConverter which default constructs a converter for use as the value converter. IReadOnlyDictionaryConverter A converter for instances of IReadOnlyDictionary . IReadOnlyDictionaryConverter A converter for instances of IReadOnlyDictionary , specifying a value converter as a type parameter. ISetConverter A CollectionConverter for an ISet , creating a HashSet when deserializing. ISetConverter An ISetConverter which default constructs a converter for use as the value converter. ListConverter A CollectionConverter for a List . ListConverter A ListConverter which default constructs a converter for use as the value converter. NullableConverter A converter for a Nullable . NullableConverter A converter for a Nullable that default-constructs a converter of type TConverter to use as the underlying converter. Use this in the UseConverterAttribute . NumericEnumConverter A converter for an enum of type T , that converts the enum to its underlying value for serialization."
},
"api/IPA.Config.Stores.Converters.NullableConverter-1.html": {
"href": "api/IPA.Config.Stores.Converters.NullableConverter-1.html",
"title": "Class NullableConverter",
"keywords": "Class NullableConverter A converter for a Nullable . Inheritance Object ValueConverter < Nullable > NullableConverter NullableConverter Implements IValueConverter Inherited Members ValueConverter>.IValueConverter.ToValue(Object, Object) ValueConverter>.IValueConverter.FromValue(Value, Object) ValueConverter>.IValueConverter.Type Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : IPA.Config.Stores.Converters Assembly : IPA.Loader.dll Syntax public class NullableConverter : ValueConverter, IValueConverter where T : struct Type Parameters Name Description T the underlying type of the Nullable Constructors | Improve this Doc View Source NullableConverter() Creates a converter with the default converter for the base type. Equivalent to new NullableConverter(Converter.Default) Declaration public NullableConverter() See Also NullableConverter(ValueConverter) Default | Improve this Doc View Source NullableConverter(ValueConverter) Creates a converter with the given underlying ValueConverter . Declaration public NullableConverter(ValueConverter underlying) Parameters Type Name Description ValueConverter underlying the undlerlying ValueConverter to use Methods | Improve this Doc View Source FromValue(Value, Object) Converts a Value tree to a value. Declaration public override T? FromValue(Value value, object parent) Parameters Type Name Description Value value the Value tree to convert Object parent the object which will own the created object Returns Type Description Nullable