Ejemplo n.º 1
0
    void ICacheable.Load(BinaryReader br)
    {
        DependencyGUID = br.ReadString();
        Flags          = (DependencyFlags)br.ReadInt32();

        var versionRange = br.ReadString();

        VersionRange = versionRange == string.Empty ? null : Range.Parse(versionRange);
    }
Ejemplo n.º 2
0
 /// <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);
 }