Class BepInDependency

This attribute specifies any dependencies that this plugin has on other plugins.

Inheritance
System.Object System.Attribute BepInDependency
Implements
System.Runtime.InteropServices._Attribute ICacheable
Inherited Members
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Module) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.Module, System.Type) System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean) System.Attribute.IsDefined(System.Reflection.Assembly, System.Type) System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.Equals(System.Object) System.Attribute.GetHashCode() System.Attribute.Match(System.Object) System.Attribute.IsDefaultAttribute() System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfoCount(System.UInt32) System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfo(System.UInt32, System.UInt32, System.IntPtr) System.Attribute.System.Runtime.InteropServices._Attribute.GetIDsOfNames(System.Guid, System.IntPtr, System.UInt32, System.UInt32, System.IntPtr) System.Attribute.System.Runtime.InteropServices._Attribute.Invoke(System.UInt32, System.Guid, System.UInt32, System.Int16, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr) System.Attribute.TypeId System.Object.ToString() System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx
Assembly: BepInEx.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class BepInDependency : Attribute, _Attribute, ICacheable

Constructors

BepInDependency(String, BepInDependency.DependencyFlags)

Marks this as dependent on another plugin. The other plugin will be loaded before this one. If the other plugin doesn't exist, what happens depends on the Flags parameter.

Declaration
public BepInDependency(string DependencyGUID, BepInDependency.DependencyFlags Flags = BepInDependency.DependencyFlags.HardDependency)
Parameters
Type Name Description
System.String DependencyGUID

The GUID of the referenced plugin.

BepInDependency.DependencyFlags Flags

The flags associated with this dependency definition.

BepInDependency(String, String)

Marks this as dependent on another plugin. The other plugin will be loaded before this one. If the other plugin doesn't exist or is of a version not satisfying VersionRange, this plugin will not load and an error will be logged instead.

Declaration
public BepInDependency(string guid, string version)
Parameters
Type Name Description
System.String guid

The GUID of the referenced plugin.

System.String version

The version range of the referenced plugin.

Remarks

When version is supplied the dependency is always treated as HardDependency

Properties

DependencyGUID

The GUID of the referenced plugin.

Declaration
public string DependencyGUID { get; protected set; }
Property Value
Type Description
System.String

Flags

The flags associated with this dependency definition.

Declaration
public BepInDependency.DependencyFlags Flags { get; protected set; }
Property Value
Type Description
BepInDependency.DependencyFlags

VersionRange

The version range of the referenced plugin.

Declaration
public SemanticVersioning.Range VersionRange { get; protected set; }
Property Value
Type Description
SemanticVersioning.Range

Explicit Interface Implementations

ICacheable.Load(BinaryReader)

Declaration
void ICacheable.Load(BinaryReader br)
Parameters
Type Name Description
System.IO.BinaryReader br

ICacheable.Save(BinaryWriter)

Declaration
void ICacheable.Save(BinaryWriter bw)
Parameters
Type Name Description
System.IO.BinaryWriter bw

Implements

System.Runtime.InteropServices._Attribute
ICacheable