te
This commit is contained in:
parent
01151e679b
commit
57b2f0400e
265 changed files with 22828 additions and 6 deletions
71
Unused/Decal.Adapter/PluginProxy.cs
Normal file
71
Unused/Decal.Adapter/PluginProxy.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Decal.Adapter.Support;
|
||||
using Decal.Adapter.Wrappers;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Adapter;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class PluginProxy : IPlugin2, IDecalDirectory
|
||||
{
|
||||
private PluginHost mySite;
|
||||
|
||||
private PluginBase myWrapped;
|
||||
|
||||
internal PluginProxy(PluginBase toWrap)
|
||||
{
|
||||
myWrapped = toWrap;
|
||||
}
|
||||
|
||||
void IPlugin2.Initialize(PluginSite2 Site)
|
||||
{
|
||||
mySite = new PluginHost(Site);
|
||||
myWrapped.SetHost(mySite);
|
||||
try
|
||||
{
|
||||
myWrapped.standardEvent(ExtensionEvents.InternalWireup);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Util.WriteLine("InternalWireup Exception: " + ex.Message);
|
||||
}
|
||||
try
|
||||
{
|
||||
myWrapped.standardEvent(ExtensionEvents.Startup);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
Util.WriteLine("Startup Exception: " + ex2.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void IPlugin2.Terminate()
|
||||
{
|
||||
try
|
||||
{
|
||||
myWrapped.standardEvent(ExtensionEvents.Shutdown);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Util.WriteLine("Shutdown Exception: " + ex.Message);
|
||||
}
|
||||
try
|
||||
{
|
||||
myWrapped.standardEvent(ExtensionEvents.InternalUnwire);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
Util.WriteLine("InternalUnwire Exception: " + ex2.Message);
|
||||
}
|
||||
mySite.Dispose();
|
||||
mySite = null;
|
||||
myWrapped = null;
|
||||
}
|
||||
|
||||
object IDecalDirectory.Lookup(string strName)
|
||||
{
|
||||
return myWrapped.ResolvePath(strName);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue