isolated sqlite dependancy

This commit is contained in:
LukePulverenti
2013-02-20 23:37:50 -05:00
parent 509156cbc3
commit a5f9dc1bfc
27 changed files with 254 additions and 145 deletions

View File

@@ -62,8 +62,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IsoManager.cs" />
<Compile Include="IsoMount.cs" />
<Compile Include="PismoIsoManager.cs" />
<Compile Include="PismoMount.cs" />
<Compile Include="MyPfmFileMountUi.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View File

@@ -1,17 +1,20 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Logging;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.IsoMounter
{
/// <summary>
/// Class IsoManager
/// </summary>
public class IsoManager : BaseManager<IKernel>, IIsoManager
public class PismoIsoManager : IIsoManager
{
private ILogger Logger = LogManager.GetLogger("IsoManager");
/// <summary>
/// The mount semaphore - limit to four at a time.
/// </summary>
@@ -66,12 +69,7 @@ namespace MediaBrowser.IsoMounter
/// </summary>
private bool _hasInitialized;
/// <summary>
/// Initializes a new instance of the <see cref="IsoManager" /> class.
/// </summary>
/// <param name="kernel">The kernel.</param>
public IsoManager(IKernel kernel)
: base(kernel)
public PismoIsoManager()
{
}
@@ -146,14 +144,19 @@ namespace MediaBrowser.IsoMounter
throw new IOException("Unable to start mount for " + isoPath);
}
return new IsoMount(mount, isoPath, this);
return new PismoMount(mount, isoPath, this);
}
public void Dispose()
{
Dispose(true);
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected override void Dispose(bool dispose)
protected virtual void Dispose(bool dispose)
{
if (dispose)
{
@@ -166,8 +169,6 @@ namespace MediaBrowser.IsoMounter
PfmStatic.ApiUnload();
}
}
base.Dispose(dispose);
}
/// <summary>
@@ -192,7 +193,7 @@ namespace MediaBrowser.IsoMounter
/// Called when [unmount].
/// </summary>
/// <param name="mount">The mount.</param>
internal void OnUnmount(IsoMount mount)
internal void OnUnmount(PismoMount mount)
{
_mountSemaphore.Release();
}

View File

@@ -8,7 +8,7 @@ namespace MediaBrowser.IsoMounter
/// <summary>
/// Class IsoMount
/// </summary>
internal class IsoMount : IIsoMount
internal class PismoMount : IIsoMount
{
/// <summary>
/// The logger
@@ -35,15 +35,15 @@ namespace MediaBrowser.IsoMounter
/// <summary>
/// The _iso manager
/// </summary>
private readonly IsoManager _isoManager;
private readonly PismoIsoManager _isoManager;
/// <summary>
/// Prevents a default instance of the <see cref="IsoMount" /> class from being created.
/// Prevents a default instance of the <see cref="PismoMount" /> class from being created.
/// </summary>
/// <param name="mount">The mount.</param>
/// <param name="isoPath">The iso path.</param>
/// <param name="isoManager">The iso manager.</param>
internal IsoMount(PfmFileMount mount, string isoPath, IsoManager isoManager)
internal PismoMount(PfmFileMount mount, string isoPath, PismoIsoManager isoManager)
{
_pfmFileMount = mount;
IsoPath = isoPath;