예제 #1
0
 protected void DisposeFormKeyAllocator(IFormKeyAllocator allocator)
 {
     if (allocator is IDisposable disposable)
     {
         disposable.Dispose();
     }
 }
예제 #2
0
 protected AMod()
 {
     this.ModKey     = ModKey.Null;
     this._allocator = new SimpleFormKeyAllocator(this);
 }
예제 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="modKey">Key to assign the mod</param>
 public AMod(ModKey modKey)
 {
     this.ModKey     = modKey;
     this._allocator = new SimpleFormKeyAllocator(this);
 }
예제 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="modKey">Key to assign the mod</param>
 /// <param name="allocator">Optional custom FormKey allocator logic</param>
 public AMod(ModKey modKey, IFormKeyAllocator?allocator = null)
 {
     this.ModKey     = modKey;
     this._allocator = allocator ?? new SimpleFormKeyAllocator(this);
 }