Release() public method

public Release ( int maxRetries = 3 ) : bool
maxRetries int
return bool
 public void TestLoadUnloadServiceProvider()
 {
     var providerLoader = new ServiceProviderLoader();
     providerLoader.Load("ServiceWrapperTests.ClassFixtures.DummyServiceProvider", "ServiceWrapperTests.dll");
     Assert.IsNotNull(providerLoader.Domain);
     Assert.IsNotNull(providerLoader.Provider);
     Assert.IsTrue(providerLoader.Release());
 }
 public void TestReleaseAppDomainWhileThreadIsSleeping()
 {
     var providerLoader = new ServiceProviderLoader();
     providerLoader.Load("ServiceWrapperTests.ClassFixtures.DummyServiceProvider", "ServiceWrapperTests.dll");
     var dummyProvider = (DummyServiceProvider) providerLoader.Provider;
     Action a = dummyProvider.ThreadSleep;
     a.BeginInvoke(null, null);
     Assert.IsTrue(providerLoader.Release());
 }
        public void TestSocketReceiveReleaseAndRebindInDifferentAppDomain()
        {
            var providerLoader = new ServiceProviderLoader();
            providerLoader.Load("ServiceWrapperTests.ClassFixtures.DummyServiceProvider", "ServiceWrapperTests.dll");
            var dummyProvider = (DummyServiceProvider)providerLoader.Provider;
            Action a = dummyProvider.SocketBlock;
            a.BeginInvoke(null, null);
            Assert.IsTrue(providerLoader.Release());

            providerLoader.Load("ServiceWrapperTests.ClassFixtures.DummyServiceProvider", "ServiceWrapperTests.dll");
            dummyProvider = (DummyServiceProvider)providerLoader.Provider;
            a = dummyProvider.SocketBlock;
            a.BeginInvoke(null, null);
            Assert.IsTrue(providerLoader.Release());
        }