diff --git a/Source/Main/NProxy.Core/Internal/Caching/AnonymousDisposable.cs b/Source/Main/NProxy.Core/Internal/Caching/Disposable.cs similarity index 78% rename from Source/Main/NProxy.Core/Internal/Caching/AnonymousDisposable.cs rename to Source/Main/NProxy.Core/Internal/Caching/Disposable.cs index 77c7bd2..52a4498 100644 --- a/Source/Main/NProxy.Core/Internal/Caching/AnonymousDisposable.cs +++ b/Source/Main/NProxy.Core/Internal/Caching/Disposable.cs @@ -19,9 +19,9 @@ namespace NProxy.Core.Internal.Caching { /// - /// Represents an anonymous disposable. + /// Represents a disposable. /// - internal sealed class AnonymousDisposable : IDisposable + internal sealed class Disposable : IDisposable { /// /// The dispose action. @@ -29,15 +29,15 @@ internal sealed class AnonymousDisposable : IDisposable private readonly Action _dispose; /// - /// A value indicating whether this was already disposed. + /// A value indicating whether this was already disposed. /// private bool _disposed; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The dispose action. - public AnonymousDisposable(Action dispose) + public Disposable(Action dispose) { if (dispose == null) throw new ArgumentNullException("dispose"); @@ -49,15 +49,15 @@ public AnonymousDisposable(Action dispose) /// /// Releases unmanaged resources and performs other cleanup operations before the - /// is reclaimed by garbage collection. + /// is reclaimed by garbage collection. /// - ~AnonymousDisposable() + ~Disposable() { Dispose(false); } /// - /// Dispose this . + /// Dispose this . /// /// A value indicating whether disposing is in progress. private void Dispose(bool disposing) diff --git a/Source/Main/NProxy.Core/Internal/Caching/ReadWriteLock.cs b/Source/Main/NProxy.Core/Internal/Caching/ReadWriteLock.cs index d22b2c6..c589923 100644 --- a/Source/Main/NProxy.Core/Internal/Caching/ReadWriteLock.cs +++ b/Source/Main/NProxy.Core/Internal/Caching/ReadWriteLock.cs @@ -54,7 +54,7 @@ public ReadWriteLock() } /// - /// Dispose this . + /// Dispose this . /// /// A value indicating whether disposing is in progress. private void Dispose(bool disposing) @@ -76,7 +76,7 @@ public IDisposable UpgradeableRead() { _lock.EnterUpgradeableReadLock(); - return new AnonymousDisposable(_ => _lock.ExitUpgradeableReadLock()); + return new Disposable(_ => _lock.ExitUpgradeableReadLock()); } /// @@ -87,7 +87,7 @@ public IDisposable Read() { _lock.EnterReadLock(); - return new AnonymousDisposable(_ => _lock.ExitReadLock()); + return new Disposable(_ => _lock.ExitReadLock()); } /// @@ -98,7 +98,7 @@ public IDisposable Write() { _lock.EnterWriteLock(); - return new AnonymousDisposable(_ => _lock.ExitWriteLock()); + return new Disposable(_ => _lock.ExitWriteLock()); } #region IDisposable Members diff --git a/Source/Main/NProxy.Core/Internal/Reflection/EventInfoExtensions.cs b/Source/Main/NProxy.Core/Internal/Reflection/EventInfoExtensions.cs index a0984df..8f5424a 100644 --- a/Source/Main/NProxy.Core/Internal/Reflection/EventInfoExtensions.cs +++ b/Source/Main/NProxy.Core/Internal/Reflection/EventInfoExtensions.cs @@ -57,7 +57,6 @@ public static IEnumerable GetMethods(this EventInfo eventInfo) eventInfo.GetAddMethod(true), eventInfo.GetRemoveMethod(true) }; - var raiseMethodInfo = eventInfo.GetRaiseMethod(true); if (raiseMethodInfo != null) diff --git a/Source/Main/NProxy.Core/NProxy.Core.csproj b/Source/Main/NProxy.Core/NProxy.Core.csproj index 97de4cc..3c123ef 100644 --- a/Source/Main/NProxy.Core/NProxy.Core.csproj +++ b/Source/Main/NProxy.Core/NProxy.Core.csproj @@ -73,7 +73,7 @@ - + diff --git a/Source/Main/NProxy.Core/ProxyGenerator.cs b/Source/Main/NProxy.Core/ProxyGenerator.cs index 6390deb..3e1dbc5 100644 --- a/Source/Main/NProxy.Core/ProxyGenerator.cs +++ b/Source/Main/NProxy.Core/ProxyGenerator.cs @@ -95,19 +95,19 @@ public IProxyTemplate GenerateProxyTemplate(IProxyDefinition proxyDefinition) #region IProxyDefinitionVisitor Members /// - public void VisitInterface(Type interfaceType) + void IProxyDefinitionVisitor.VisitInterface(Type interfaceType) { _typeBuilder.AddInterface(interfaceType); } /// - public void VisitConstructor(ConstructorInfo constructorInfo) + void IProxyDefinitionVisitor.VisitConstructor(ConstructorInfo constructorInfo) { _typeBuilder.BuildConstructor(constructorInfo); } /// - public void VisitEvent(EventInfo eventInfo) + void IProxyDefinitionVisitor.VisitEvent(EventInfo eventInfo) { if (_typeBuilder.IsConcreteEvent(eventInfo) && !_interceptionFilter.AcceptEvent(eventInfo)) return; @@ -117,7 +117,7 @@ public void VisitEvent(EventInfo eventInfo) } /// - public void VisitProperty(PropertyInfo propertyInfo) + void IProxyDefinitionVisitor.VisitProperty(PropertyInfo propertyInfo) { if (_typeBuilder.IsConcreteProperty(propertyInfo) && !_interceptionFilter.AcceptProperty(propertyInfo)) return; @@ -127,7 +127,7 @@ public void VisitProperty(PropertyInfo propertyInfo) } /// - public void VisitMethod(MethodInfo methodInfo) + void IProxyDefinitionVisitor.VisitMethod(MethodInfo methodInfo) { if (_typeBuilder.IsConcreteMethod(methodInfo) && !_interceptionFilter.AcceptMethod(methodInfo)) return;