Opc.Ua.EndpointBase.GetHostForContext C# (CSharp) 메소드

GetHostForContext() 개인적인 메소드

private GetHostForContext ( ) : IServiceHostBase
리턴 IServiceHostBase
        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.");
            }

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