/// <summary>
        /// Initializes the when it is created directly.
        /// </summary>
        /// <param name="host">The host.</param>
        protected EndpointBase(IServiceHostBase host)
        {
            if (host == null) throw new ArgumentNullException("host");

            m_host = host;
            m_server = host.Server;
            
            SupportedServices  = new Dictionary<ExpandedNodeId,ServiceDefinition>();
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes the when it is created directly.
        /// </summary>
        /// <param name="host">The host.</param>
        protected EndpointBase(IServiceHostBase host)
        {
            if (host == null)
            {
                throw new ArgumentNullException(nameof(host));
            }

            m_host   = host;
            m_server = host.Server;

            SupportedServices = new Dictionary <ExpandedNodeId, ServiceDefinition>();
        }
Esempio n. 3
0
        protected static IServiceHostBase GetHostForContext()
        {
            // fetch the current operation context.
            OperationContext context = OperationContext.Current;

            if (context == null)
            {
                throw new ServiceResultException(StatusCodes.BadInternalError, "The current thread does not have a valid WCF operation context.");
            }

            IServiceHostBase host = context.Host as IServiceHostBase;

            if (host == null)
            {
                throw new ServiceResultException(StatusCodes.BadInternalError, "The endpoint is not associated with a host that supports IServerHostBase.");
            }

            return(host);
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes the when it is created directly.
 /// </summary>
 public SessionEndpoint(IServiceHostBase host) : base(host)
 {
     this.CreateKnownTypes();
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes the when it is created directly.
 /// </summary>
 public DiscoveryEndpoint(IServiceHostBase host) : base(host)
 {
     this.CreateKnownTypes();
 }
 /// <summary>
 /// Initializes the when it is created directly.
 /// </summary>
 public _ServiceSet_Endpoint(IServiceHostBase host) : base(host)
 {
     this.CreateKnownTypes();
 }