te
This commit is contained in:
parent
01151e679b
commit
57b2f0400e
265 changed files with 22828 additions and 6 deletions
75
Unused/Decal.Adapter.Wrappers/HostBase.cs
Normal file
75
Unused/Decal.Adapter.Wrappers/HostBase.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
|
||||
namespace Decal.Adapter.Wrappers;
|
||||
|
||||
[CLSCompliant(true)]
|
||||
public abstract class HostBase : MarshalByRefObject, IDisposable
|
||||
{
|
||||
private HooksWrapper myInternalHooks;
|
||||
|
||||
private DecalWrapper myInternalDecal;
|
||||
|
||||
private RenderServiceWrapper myInternalRender;
|
||||
|
||||
private bool isDisposed;
|
||||
|
||||
protected bool IsDisposed => isDisposed;
|
||||
|
||||
protected DecalWrapper MyDecal
|
||||
{
|
||||
get
|
||||
{
|
||||
return myInternalDecal;
|
||||
}
|
||||
set
|
||||
{
|
||||
myInternalDecal = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected RenderServiceWrapper MyRender
|
||||
{
|
||||
get
|
||||
{
|
||||
return myInternalRender;
|
||||
}
|
||||
set
|
||||
{
|
||||
myInternalRender = value;
|
||||
}
|
||||
}
|
||||
|
||||
~HostBase()
|
||||
{
|
||||
Dispose(disposing: false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!isDisposed && disposing)
|
||||
{
|
||||
if (myInternalHooks != null)
|
||||
{
|
||||
myInternalHooks.Dispose();
|
||||
}
|
||||
if (myInternalDecal != null)
|
||||
{
|
||||
myInternalDecal.Dispose();
|
||||
}
|
||||
if (myInternalRender != null)
|
||||
{
|
||||
myInternalRender.Dispose();
|
||||
}
|
||||
}
|
||||
myInternalHooks = null;
|
||||
myInternalDecal = null;
|
||||
myInternalRender = null;
|
||||
isDisposed = true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue