예제 #1
0
        public CallbackServiceHost(InstanceContext serviceCtx, string baseAddress, CallbackBehaviorAttribute behaviour)
        {
            _serviceCtx = serviceCtx;
            _behaviour = behaviour;
            if (serviceCtx == null) throw new ArgumentNullException("serviceCtx");
            _baseAddress = new Uri(baseAddress,UriKind.Absolute);

            base._concurrency = _behaviour.ConcurrencyMode;
            _service = serviceCtx._contextObject;
        }
예제 #2
0
        public CallbackServiceHost(InstanceContext serviceCtx, string baseAddress, CallbackBehaviorAttribute behaviour)
        {
            _serviceCtx = serviceCtx;
            _behaviour  = behaviour;
            if (serviceCtx == null)
            {
                throw new ArgumentNullException("serviceCtx");
            }
            _baseAddress = new Uri(baseAddress, UriKind.Absolute);



            base._concurrency = _behaviour.ConcurrencyMode;
            _service          = serviceCtx._contextObject;
        }
예제 #3
0
 public InstanceContext(object contextObject)
 {
     _contextObject = contextObject;
     _behaviour = AttributesReader.GetCallbackBehavior(contextObject.GetType()) ?? new CallbackBehaviorAttribute();
     _useSynchronizationContext = _behaviour.UseSynchronizationContext;
 }