/// <summary>
        /// Instantiate an instance of the manager that will execute the strategies
        /// </summary>
        public TrackedMethodStrategyManager()
        {
            var info = new AppDomainSetup
            {
                ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile,
                ApplicationBase   = AppDomain.CurrentDomain.SetupInformation.ApplicationBase
            };

            _domain = AppDomain.CreateDomain("StrategySandBox", null, info);

            _proxy = (TrackedMethodStrategyProxy)_domain.CreateInstanceAndUnwrap(typeof(TrackedMethodStrategyProxy).Assembly.FullName,
                                                                                 typeof(TrackedMethodStrategyProxy).FullName);
        }
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <filterpriority>2</filterpriority>
 public void Dispose()
 {
     _proxy = null;
     if (_domain == null) return;
     try
     {
         AppDomain.Unload(_domain);
     }
     finally
     {
         _domain = null;
     }
 }
        /// <summary>
        /// Instantiate an instance of the manager that will execute the strategies  
        /// </summary>
        public TrackedMethodStrategyManager()
        {
            var info = new AppDomainSetup
                {
                    ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile,
                    ApplicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase
                };

            _domain = AppDomain.CreateDomain("StrategySandBox", null, info);

            _proxy = (TrackedMethodStrategyProxy)_domain.CreateInstanceAndUnwrap(typeof(TrackedMethodStrategyProxy).Assembly.FullName,
                                                                                 typeof (TrackedMethodStrategyProxy).FullName);
        }
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <filterpriority>2</filterpriority>
 public void Dispose()
 {
     _proxy = null;
     if (_domain == null)
     {
         return;
     }
     try
     {
         AppDomain.Unload(_domain);
     }
     finally
     {
         _domain = null;
     }
 }
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed && disposing)
     {
         _disposed = true;
         _proxy    = null;
         if (_domain == null)
         {
             return;
         }
         try
         {
             AppDomain.Unload(_domain);
         }
         finally
         {
             _domain = null;
         }
     }
 }