Ejemplo n.º 1
0
        public object GetInstance(InstanceContext instanceContext, Message message)
        {
            GetInstanceCallCount++;
            var service = new SimpleService();

            InstanceHashCode = service.GetHashCode();
            return(service);
        }
Ejemplo n.º 2
0
        public object GetInstance(InstanceContext instanceContext, Message message)
        {
            if (_asyncLockHoldObj == null)
            {
                _asyncLockHoldObj = _asyncLock.TakeLock();
            }
            GetInstanceCallCount++;
            var service = new SimpleService();

            InstanceHashCode = service.GetHashCode();
            return(service);
        }
Ejemplo n.º 3
0
        public object GetInstance(InstanceContext instanceContext, Message message)
        {
            if (!_asyncLockAquired)
            {
                _asyncLock.Wait();
                _asyncLockAquired = true;
            }
            GetInstanceCallCount++;
            var service = new SimpleService();

            InstanceHashCode = service.GetHashCode();
            return(service);
        }