Commit c394367d authored by Martin Finkel's avatar Martin Finkel

Renaming Instance to LibVLC

parent 24bce78b
......@@ -26,7 +26,7 @@ namespace LibVLCSharp.Android.Sample
_videoView = new VideoView(this);
AddContentView(_videoView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent));
_videoView.MediaPlayer.Play(new Media(_videoView.Instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
_videoView.MediaPlayer.Play(new Media(_videoView.LibVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
}
protected override void OnPause()
......
open System
open LibVLCSharp.Shared
open LibVLCSharp
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
Core.Initialize()
let instance = new Instance()
let mp = new MediaPlayer(instance)
mp.Play(new Media(instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)) |> ignore
let libVLC = new LibVLC()
let mp = new MediaPlayer(libVLC)
mp.Play(new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)) |> ignore
let result = Console.ReadKey()
0
\ No newline at end of file
......@@ -14,7 +14,7 @@ namespace LibVLCSharp.Forms.Sample
{
base.OnAppearing();
videoView.MediaPlayer.Play(new Media(videoView.Instance,
videoView.MediaPlayer.Play(new Media(videoView.LibVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
}
}
......
......@@ -26,7 +26,7 @@ namespace LibVLCSharp.Forms.Platforms.Android
_videoView = new LibVLCSharp.Platforms.Android.VideoView(Context, Element.CliOptions);
SetNativeControl(_videoView);
Element.Instance = Control.Instance;
Element.LibVLC = Control.LibVLC;
Element.MediaPlayer = Control.MediaPlayer;
}
......
......@@ -20,7 +20,7 @@ namespace LibVLCSharp.Forms.Platforms.iOS
_videoView = new LibVLCSharp.Platforms.iOS.VideoView(Element.CliOptions);
SetNativeControl(_videoView);
Element.Instance = Control.Instance;
Element.LibVLC = Control.LibVLC;
Element.MediaPlayer = Control.MediaPlayer;
}
......
......@@ -21,6 +21,6 @@ namespace LibVLCSharp.Forms.Shared
public string[] CliOptions { get; }
public LibVLCSharp.Shared.MediaPlayer MediaPlayer { get; set; }
public Instance Instance { get; set; }
public LibVLC LibVLC { get; set; }
}
}
\ No newline at end of file
......@@ -14,10 +14,10 @@ namespace LibVLCSharp.Tests
[Test]
public async Task PostLogin()
{
var instance = new Instance();
var libVLC = new LibVLC();
var tcs = new TaskCompletionSource<bool>();
instance.SetDialogHandlers((title, text) => Task.CompletedTask,
libVLC.SetDialogHandlers((title, text) => Task.CompletedTask,
(dialog, title, text, username, store, token) =>
{
// show UI dialog
......@@ -30,9 +30,9 @@ namespace LibVLCSharp.Tests
(dialog, title, text, indeterminate, position, cancelText, token) => Task.CompletedTask,
(dialog, position, text) => Task.CompletedTask);
var mp = new MediaPlayer(instance)
var mp = new MediaPlayer(libVLC)
{
Media = new Media(instance, UrlRequireAuth, Media.FromType.FromLocation)
Media = new Media(libVLC, UrlRequireAuth, Media.FromType.FromLocation)
};
mp.Play();
......@@ -44,10 +44,10 @@ namespace LibVLCSharp.Tests
[Test]
public async Task ShouldThrowIfReusingSameDialogAfterLoginCall()
{
var instance = new Instance();
var libVLC = new LibVLC();
var tcs = new TaskCompletionSource<bool>();
instance.SetDialogHandlers((title, text) => Task.CompletedTask,
libVLC.SetDialogHandlers((title, text) => Task.CompletedTask,
(dialog, title, text, username, store, token) =>
{
dialog.PostLogin(Username, Password, false);
......@@ -59,9 +59,9 @@ namespace LibVLCSharp.Tests
(dialog, title, text, indeterminate, position, cancelText, token) => Task.CompletedTask,
(dialog, position, text) => Task.CompletedTask);
var mp = new MediaPlayer(instance)
var mp = new MediaPlayer(libVLC)
{
Media = new Media(instance, UrlRequireAuth, Media.FromType.FromLocation)
Media = new Media(libVLC, UrlRequireAuth, Media.FromType.FromLocation)
};
mp.Play();
......@@ -73,19 +73,19 @@ namespace LibVLCSharp.Tests
[Test]
public void ShouldUnsetDialogHandlersWhenInstanceDisposed()
{
var instance = new Instance();
var libVLC = new LibVLC();
instance.SetDialogHandlers((title, text) => Task.CompletedTask,
libVLC.SetDialogHandlers((title, text) => Task.CompletedTask,
(dialog, title, text, username, store, token) => Task.CompletedTask,
(dialog, title, text, type, cancelText, actionText, secondActionText, token) => Task.CompletedTask,
(dialog, title, text, indeterminate, position, cancelText, token) => Task.CompletedTask,
(dialog, position, text) => Task.CompletedTask);
Assert.True(instance.DialogHandlersSet);
Assert.True(libVLC.DialogHandlersSet);
instance.Dispose();
libVLC.Dispose();
Assert.False(instance.DialogHandlersSet);
Assert.False(libVLC.DialogHandlersSet);
}
}
}
\ No newline at end of file
using NUnit.Framework;
using VideoLAN.LibVLCSharp;
using LibVLCSharp.Shared;
using NUnit.Framework;
namespace LibVLCSharp.Tests
{
......
......@@ -12,7 +12,7 @@ namespace LibVLCSharp.Tests
[Test]
public void MetaChangedEventSubscribe()
{
var media = new Media(new Instance(), Path.GetTempFileName());
var media = new Media(new LibVLC(), Path.GetTempFileName());
var eventManager = media.EventManager;
var eventHandlerCalled = false;
const Media.MetadataType description = Media.MetadataType.Description;
......@@ -27,7 +27,7 @@ namespace LibVLCSharp.Tests
public void DurationChanged()
{
var media = new Media(new Instance(), RealMp3Path);
var media = new Media(new LibVLC(), RealMp3Path);
var called = false;
long duration = 0;
......@@ -46,7 +46,7 @@ namespace LibVLCSharp.Tests
[Test]
public void FreedMedia()
{
var media = new Media(new Instance(), RealMp3Path);
var media = new Media(new LibVLC(), RealMp3Path);
var eventCalled = false;
media.EventManager.MediaFreed += (sender, args) =>
{
......@@ -61,7 +61,7 @@ namespace LibVLCSharp.Tests
[Test]
public async Task StateChanged()
{
var media = new Media(new Instance(), RealMp3Path);
var media = new Media(new LibVLC(), RealMp3Path);
var tcs = new TaskCompletionSource<bool>();
var openingCalled = false;
media.EventManager.StateChanged += (sender, args) =>
......
......@@ -14,23 +14,23 @@ namespace LibVLCSharp.Tests
[Test]
public void DisposeInstanceNativeRelease()
{
var instance = new Instance();
instance.Dispose();
Assert.AreEqual(IntPtr.Zero, instance.NativeReference);
var libVLC = new LibVLC();
libVLC.Dispose();
Assert.AreEqual(IntPtr.Zero, libVLC.NativeReference);
}
[Test]
public void AddInterface()
{
var instance = new Instance();
Assert.True(instance.AddInterface(string.Empty));
var libVLC = new LibVLC();
Assert.True(libVLC.AddInterface(string.Empty));
}
[Test]
public void AudioFilters()
{
var instance = new Instance();
var audioFilters = instance.AudioFilters;
var libVLC = new LibVLC();
var audioFilters = libVLC.AudioFilters;
foreach (var filter in audioFilters)
{
Debug.WriteLine(filter.Help);
......@@ -43,8 +43,8 @@ namespace LibVLCSharp.Tests
[Test]
public void VideoFilters()
{
var instance = new Instance();
var videoFilters = instance.VideoFilters;
var libVLC = new LibVLC();
var videoFilters = libVLC.VideoFilters;
foreach (var filter in videoFilters)
{
Debug.WriteLine(filter.Longname);
......@@ -56,8 +56,8 @@ namespace LibVLCSharp.Tests
[Test]
public void AudioOutputs()
{
var instance = new Instance();
var audioOuputs = instance.AudioOutputs;
var libVLC = new LibVLC();
var audioOuputs = libVLC.AudioOutputs;
foreach (var audioOutput in audioOuputs)
{
Debug.WriteLine(audioOutput.Name);
......@@ -68,10 +68,10 @@ namespace LibVLCSharp.Tests
[Test]
public void AudioOutputDevices()
{
var instance = new Instance();
var outputs = instance.AudioOutputs;
var libVLC = new LibVLC();
var outputs = libVLC.AudioOutputs;
var name = outputs.Last().Name;
var audioOutputDevices = instance.AudioOutputDevices(name);
var audioOutputDevices = libVLC.AudioOutputDevices(name);
foreach (var audioOutputDevice in audioOutputDevices)
{
......@@ -83,22 +83,22 @@ namespace LibVLCSharp.Tests
[Test]
public void EqualityTests()
{
Assert.AreNotSame(new Instance(), new Instance());
Assert.AreNotSame(new LibVLC(), new LibVLC());
}
[Test]
public void Categories()
{
var instance = new Instance();
var md1 = instance.MediaDiscoverers(MediaDiscoverer.Category.Devices);
var md2 = instance.MediaDiscoverers(MediaDiscoverer.Category.Lan);
var md3 = instance.MediaDiscoverers(MediaDiscoverer.Category.Localdirs);
var libVLC = new LibVLC();
var md1 = libVLC.MediaDiscoverers(MediaDiscoverer.Category.Devices);
var md2 = libVLC.MediaDiscoverers(MediaDiscoverer.Category.Lan);
var md3 = libVLC.MediaDiscoverers(MediaDiscoverer.Category.Localdirs);
}
[Test]
public void SetExitHandler()
{
var instance = new Instance();
var libVLC = new LibVLC();
var called = false;
var exitCb = new ExitCallback(() =>
......@@ -106,9 +106,9 @@ namespace LibVLCSharp.Tests
called = true;
});
instance.SetExitHandler(exitCb, IntPtr.Zero);
libVLC.SetExitHandler(exitCb, IntPtr.Zero);
instance.Dispose();
libVLC.Dispose();
Assert.IsTrue(called);
}
......@@ -116,16 +116,16 @@ namespace LibVLCSharp.Tests
[Test]
public async Task SetLogCallback()
{
var instance = new Instance();
var libVLC = new LibVLC();
var logCallbackCalled = false;
void LogCallback(object sender, LogEventArgs args) => logCallbackCalled = true;
instance.Log += LogCallback;
libVLC.Log += LogCallback;
await Task.Delay(1000);
instance.Log -= LogCallback;
libVLC.Log -= LogCallback;
Assert.IsTrue(logCallbackCalled);
}
......@@ -133,10 +133,10 @@ namespace LibVLCSharp.Tests
[Test]
public void SetLogFile()
{
var instance = new Instance();
var libVLC = new LibVLC();
var path = Path.GetTempFileName();
instance.SetLogFile(path);
instance.UnsetLog();
libVLC.SetLogFile(path);
libVLC.UnsetLog();
var logs = File.ReadAllText(path);
Assert.True(logs.StartsWith("VLC media player"));
}
......
......@@ -10,9 +10,9 @@ namespace LibVLCSharp.Tests
[Test]
public void CreateStartAndStopDiscoverer()
{
var instance = new Instance();
var mds = instance.MediaDiscoverers(MediaDiscoverer.Category.Lan);
var md = new MediaDiscoverer(instance, mds.First().Name);
var libVLC = new LibVLC();
var mds = libVLC.MediaDiscoverers(MediaDiscoverer.Category.Lan);
var md = new MediaDiscoverer(libVLC, mds.First().Name);
Assert.True(md.Start());
Assert.True(md.IsRunning);
md.Stop();
......
......@@ -11,9 +11,9 @@ namespace LibVLCSharp.Tests
[Test]
public void AddAndRemoveMediaFromMediaList()
{
var instance = new Instance();
var mediaList = new MediaList(instance);
var media = new Media(instance, Path.GetTempFileName(), Media.FromType.FromPath);
var libVLC = new LibVLC();
var mediaList = new MediaList(libVLC);
var media = new Media(libVLC, Path.GetTempFileName());
var itemAdded = false;
var itemDeleted = false;
mediaList.EventManager.ItemAdded += (sender, args) => itemAdded = true;
......@@ -33,7 +33,7 @@ namespace LibVLCSharp.Tests
[Test]
public void AcquireLockTwiceThrows()
{
var mediaList = new MediaList(new Instance());
var mediaList = new MediaList(new LibVLC());
mediaList.Lock();
Assert.Throws<InvalidOperationException>(() => mediaList.Lock(), "already locked");
}
......@@ -41,7 +41,7 @@ namespace LibVLCSharp.Tests
[Test]
public void ReleaseLockTwiceThrows()
{
var mediaList = new MediaList(new Instance());
var mediaList = new MediaList(new LibVLC());
mediaList.Lock();
mediaList.Unlock();
Assert.Throws<InvalidOperationException>(() => mediaList.Unlock(), "not locked");
......
......@@ -14,7 +14,7 @@ namespace LibVLCSharp.Tests
[Test]
public void CreateAndDestroy()
{
var mp = new MediaPlayer(new Instance());
var mp = new MediaPlayer(new LibVLC());
mp.Dispose();
Assert.AreEqual(IntPtr.Zero, mp.NativeReference);
}
......@@ -22,7 +22,7 @@ namespace LibVLCSharp.Tests
[Test]
public void OutputDeviceEnum()
{
var mp = new MediaPlayer(new Instance());
var mp = new MediaPlayer(new LibVLC());
var t = mp.OutputDeviceEnum;
Debug.WriteLine(t);
}
......@@ -41,9 +41,9 @@ namespace LibVLCSharp.Tests
[Test]
public async Task TrackDescription()
{
var instance = new Instance();
var mp = new MediaPlayer(instance);
var media = new Media(instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var libVLC = new LibVLC();
var mp = new MediaPlayer(libVLC);
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var tcs = new TaskCompletionSource<bool>();
mp.Media = media;
......@@ -63,8 +63,8 @@ namespace LibVLCSharp.Tests
[Test]
public async Task Play()
{
var instance = new Instance();
var media = new Media(instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var libVLC = new LibVLC();
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var mp = new MediaPlayer(media);
var called = false;
mp.EventManager.Playing += (sender, args) =>
......
......@@ -14,9 +14,9 @@ namespace LibVLCSharp.Tests
[Test]
public void CreateMedia()
{
var instance = new Instance();
var libVLC = new LibVLC();
var media = new Media(instance, Path.GetTempFileName());
var media = new Media(libVLC, Path.GetTempFileName());
Assert.AreNotEqual(IntPtr.Zero, media.NativeReference);
}
......@@ -25,13 +25,13 @@ namespace LibVLCSharp.Tests
public void CreateMediaFail()
{
Assert.Throws<ArgumentNullException>(() => new Media(null, Path.GetTempFileName()));
Assert.Throws<ArgumentNullException>(() => new Media(new Instance(), string.Empty));
Assert.Throws<ArgumentNullException>(() => new Media(new LibVLC(), string.Empty));
}
[Test]
public void ReleaseMedia()
{
var media = new Media(new Instance(), Path.GetTempFileName());
var media = new Media(new LibVLC(), Path.GetTempFileName());
media.Dispose();
......@@ -41,23 +41,23 @@ namespace LibVLCSharp.Tests
[Test]
public void CreateMediaFromStream()
{
var media = new Media(new Instance(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
var media = new Media(new LibVLC(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
Assert.AreNotEqual(IntPtr.Zero, media.NativeReference);
}
[Test]
public void AddOption()
{
var media = new Media(new Instance(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
var media = new Media(new LibVLC(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
media.AddOption("-sout-all");
}
[Test]
public async Task CreateRealMedia()
{
using (var instance = new Instance())
using (var libVLC = new LibVLC())
{
using (var media = new Media(instance, RealStreamMediaPath, Media.FromType.FromLocation))
using (var media = new Media(libVLC, RealStreamMediaPath, Media.FromType.FromLocation))
{
Assert.False(media.IsParsed);
media.Parse();
......@@ -78,7 +78,7 @@ namespace LibVLCSharp.Tests
[Test]
public void Duplicate()
{
var media = new Media(new Instance(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
var media = new Media(new LibVLC(), new FileStream(Path.GetTempFileName(), FileMode.OpenOrCreate));
var duplicate = media.Duplicate();
Assert.AreNotEqual(duplicate.NativeReference, media.NativeReference);
}
......@@ -86,7 +86,7 @@ namespace LibVLCSharp.Tests
[Test]
public void CreateMediaFromFileStream()
{
var media = new Media(new Instance(), new FileStream(RealMp3Path, FileMode.Open, FileAccess.Read, FileShare.Read));
var media = new Media(new LibVLC(), new FileStream(RealMp3Path, FileMode.Open, FileAccess.Read, FileShare.Read));
media.Parse();
Assert.NotZero(media.Tracks.First().Data.Audio.Channels);
}
......@@ -94,7 +94,7 @@ namespace LibVLCSharp.Tests
[Test]
public void SetMetadata()
{
var media = new Media(new Instance(), Path.GetTempFileName());
var media = new Media(new LibVLC(), Path.GetTempFileName());
const string test = "test";
media.SetMeta(Media.MetadataType.ShowName, test);
Assert.True(media.SaveMeta());
......@@ -104,7 +104,7 @@ namespace LibVLCSharp.Tests
[Test]
public void GetTracks()
{
var media = new Media(new Instance(), RealMp3Path);
var media = new Media(new LibVLC(), RealMp3Path);
media.Parse();
Assert.AreEqual(1, media.Tracks);
}
......
......@@ -19,20 +19,20 @@ namespace LibVLCSharp.Tests
{
Core.Initialize();
var instance = new Instance();
var libVLC = new LibVLC();
var mp = new MediaPlayer(instance)
var mp = new MediaPlayer(libVLC)
{
Media = new Media(instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
Media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
Media.FromType.FromLocation)
};
Assert.True(mp.Play());
var rendererList = instance.RendererList;
var rendererList = libVLC.RendererList;
Assert.IsNotEmpty(rendererList);
var rendererDiscoverer = new RendererDiscoverer(instance, rendererList[0].Name);
var rendererDiscoverer = new RendererDiscoverer(libVLC, rendererList[0].Name);
var rendererItems = new List<RendererItem>();
var tcs = new TaskCompletionSource<bool>();
......
......@@ -12,11 +12,11 @@ namespace LibVLCSharp.Tests
Assert.Throws<VLCException>(UnavailableAPIMethod);
}
[LibVLC(int.MaxValue)]
[ApiVersion(int.MaxValue)]
void UnavailableAPIMethod() => Assert.Fail("should not reach here");
bool _result;
[LibVLC(major: 0, minor: 0, min: false, strict: true)]
[ApiVersion(major: 0, minor: 0, min: false, strict: true)]
public bool UnavailableAPIProperty
{
get { Assert.Fail(); return _result; }
......
......@@ -17,7 +17,7 @@ namespace LibVLCSharp.iOS.Sample
View = _videoView;
_videoView.MediaPlayer.Play(new Media(_videoView.Instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
_videoView.MediaPlayer.Play(new Media(_videoView.LibVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
}
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ namespace LibVLCSharp.Platforms.Android
public class VideoView : SurfaceView, IVLCVoutCallback, IVideoView
{
MediaPlayer _mediaPlayer;
Instance _instance;
LibVLC _libVLC;
AWindow _awindow;
LayoutChangeListener _layoutListener;
......@@ -34,7 +34,7 @@ namespace LibVLCSharp.Platforms.Android
#endregion
public LibVLCSharp.Shared.MediaPlayer MediaPlayer => _mediaPlayer;
public Instance Instance => _instance;
public LibVLC LibVLC => _libVLC;
void Attach()
{
......@@ -76,8 +76,8 @@ namespace LibVLCSharp.Platforms.Android
{
Core.Initialize();
_instance = new Instance(cliOptions);
_mediaPlayer = new MediaPlayer(_instance);
_libVLC = new LibVLC(cliOptions);
_mediaPlayer = new MediaPlayer(_libVLC);
Attach();
}
......@@ -90,7 +90,7 @@ namespace LibVLCSharp.Platforms.Android
_mediaPlayer.Media?.Dispose();
_mediaPlayer.Dispose();
_instance.Dispose();
_libVLC.Dispose();
}
}
}
\ No newline at end of file
......@@ -10,14 +10,14 @@ namespace LibVLCSharp.Platforms.iOS
{
public VideoView(string[] cliOptions = default(string[]))
{
Instance = new Instance(cliOptions);
MediaPlayer = new Shared.MediaPlayer(Instance);
LibVLC = new LibVLC(cliOptions);
MediaPlayer = new Shared.MediaPlayer(LibVLC);
Attach();
}
public Shared.MediaPlayer MediaPlayer { get; }
public Instance Instance { get; }
public LibVLC LibVLC { get; }
void Attach() => MediaPlayer.NsObject = Handle;
......@@ -31,7 +31,7 @@ namespace LibVLCSharp.Platforms.iOS
MediaPlayer.Media?.Dispose();
MediaPlayer.Dispose();
Instance.Dispose();
LibVLC.Dispose();
}
}
}
\ No newline at end of file
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
//using Cauldron.Interception;
namespace LibVLCSharp.Shared
{
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property,
AllowMultiple = true,
Inherited = false)]
public class ApiVersion : Attribute//, IMethodInterceptor, IPropertyGetterInterceptor
{
struct Native
{
/// <summary>Retrieve libvlc version.</summary>
/// <returns>a string containing the libvlc version</returns>
/// <remarks>Example: &quot;1.1.0-git The Luggage&quot;</remarks>
[SuppressUnmanagedCodeSecurity]
[DllImport("libvlc", CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_get_version")]
internal static extern IntPtr LibVLCVersion();
}
readonly Version _requiredVersion;
Version _dllVersion;
readonly bool _minimum;
readonly bool _strict;
public ApiVersion(int major, int minor = 0, bool min = true, bool strict = false)
{
_requiredVersion = new Version(major, minor);
_minimum = min;
_strict = strict;
}
Version DllVersion
{
get
{
if (_dllVersion != null) return _dllVersion;
var version = Marshal.PtrToStringAnsi(Native.LibVLCVersion());
if (string.IsNullOrEmpty(version))
throw new VLCException("Cannot retrieve native dll version");
version = version.Split('-', ' ')[0];
_dllVersion = new Version(version);
return _dllVersion;
}
}
bool Check
{
get
{
if(_minimum)
{
if(_strict)
return DllVersion.CompareTo(_requiredVersion) > 0;
return DllVersion.CompareTo(_requiredVersion) >= 0;
}
if (_strict)
return DllVersion.CompareTo(_requiredVersion) < 0;
return DllVersion.CompareTo(_requiredVersion) <= 0;
}
}
public void OnEnter(Type declaringType, object instance, MethodBase methodbase, object[] values)
{
PerformCheck();
}
public void OnException(Exception e)
{
}
public void OnExit()
{
}
//public void OnGet(PropertyInterceptionInfo propertyInterceptionInfo, object value)
//{
// PerformCheck();