Example #1
0
 internal InstanceContext(ServiceHostBase host, bool isUserCreated)
 {
     _host         = host ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(host));
     AutoClose     = true;
     _channels     = new ServiceChannelManager(this, NotifyEmptyCallback);
     IsUserCreated = isUserCreated;
 }
            public ChannelCollection(ServiceChannelManager channelManager, object syncRoot)
            {
                if (syncRoot == null)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(syncRoot));
                }

                this.channelManager = channelManager;
                this.syncRoot       = syncRoot;
            }
Example #3
0
 internal InstanceContext(ServiceHostBase host, object implementation, bool wellKnown, bool isUserCreated)
 {
     _host = host;
     if (implementation != null)
     {
         _userObject = implementation;
         IsWellKnown = wellKnown;
     }
     AutoClose     = false;
     _channels     = new ServiceChannelManager(this);
     IsUserCreated = isUserCreated;
 }
Example #4
0
        internal InstanceContext(ServiceHostBase host, bool isUserCreated)
        {
            // TODO: Why is it required that host != null?
            //if (host == null)
            //{
            //    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(host));
            //}

            _host          = host;
            _autoClose     = true;
            _channels      = new ServiceChannelManager(this, NotifyEmptyCallback);
            _isUserCreated = isUserCreated;
        }
 public ChannelCollection(ServiceChannelManager channelManager, object syncRoot)
 {
     _channelManager = channelManager;
     _syncRoot       = syncRoot ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(syncRoot));
 }