te
This commit is contained in:
parent
01151e679b
commit
57b2f0400e
265 changed files with 22828 additions and 6 deletions
59
Unused/Decal.Adapter.Wrappers/AttributeInfoWrapper.cs
Normal file
59
Unused/Decal.Adapter.Wrappers/AttributeInfoWrapper.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Filters;
|
||||
|
||||
namespace Decal.Adapter.Wrappers;
|
||||
|
||||
[CLSCompliant(true)]
|
||||
public class AttributeInfoWrapper : MarshalByRefObject, IDisposable
|
||||
{
|
||||
private AttributeInfo myAttribInfo;
|
||||
|
||||
private bool isDisposed;
|
||||
|
||||
public int Base => myAttribInfo.Base;
|
||||
|
||||
public int Buffed => myAttribInfo.Buffed;
|
||||
|
||||
public int Creation => myAttribInfo.Creation;
|
||||
|
||||
public int Exp => myAttribInfo.Exp;
|
||||
|
||||
public string Name => myAttribInfo.Name;
|
||||
|
||||
internal AttributeInfoWrapper(AttributeInfo info)
|
||||
{
|
||||
myAttribInfo = info;
|
||||
}
|
||||
|
||||
~AttributeInfoWrapper()
|
||||
{
|
||||
Dispose(disposing: false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!isDisposed)
|
||||
{
|
||||
}
|
||||
if (myAttribInfo != null)
|
||||
{
|
||||
Marshal.ReleaseComObject(myAttribInfo);
|
||||
}
|
||||
isDisposed = true;
|
||||
}
|
||||
|
||||
protected void EnforceDisposedOnce()
|
||||
{
|
||||
if (isDisposed)
|
||||
{
|
||||
throw new ObjectDisposedException("AttributeInfoWrapper");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue