Esempio n. 1
0
        public void InitializeAfterShutdown()
        {
            Assert.AreEqual(0, GrpcEnvironment.GetRefCount());

            var env1 = GrpcEnvironment.AddRef();

            GrpcEnvironment.Release();

            var env2 = GrpcEnvironment.AddRef();

            GrpcEnvironment.Release();

            Assert.AreNotSame(env1, env2);
        }
Esempio n. 2
0
 public void ReleaseWithoutAddRef()
 {
     Assert.AreEqual(0, GrpcEnvironment.GetRefCount());
     Assert.Throws(typeof(InvalidOperationException), () => GrpcEnvironment.Release());
 }