コード例 #1
0
ファイル: Attributes.cs プロジェクト: BepInEx/BepInEx
    void ICacheable.Load(BinaryReader br)
    {
        DependencyGUID = br.ReadString();
        Flags          = (DependencyFlags)br.ReadInt32();

        var versionRange = br.ReadString();

        VersionRange = versionRange == string.Empty ? null : Range.Parse(versionRange);
    }
コード例 #2
0
ファイル: Attributes.cs プロジェクト: BepInEx/BepInEx
 /// <summary>
 ///     Marks this <see cref="BaseUnityPlugin" /> 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 <see cref="VersionRange" />, this plugin will
 ///     not load and an error will be logged instead.
 /// </summary>
 /// <param name="guid">The GUID of the referenced plugin.</param>
 /// <param name="version">The version range of the referenced plugin.</param>
 /// <remarks>When version is supplied the dependency is always treated as HardDependency</remarks>
 public BepInDependency(string guid, string version) : this(guid)
 {
     VersionRange = Range.Parse(version);
 }