Inheritance: IServiceMessage
コード例 #1
0
ファイル: Opc.Ua.Endpoints.cs プロジェクト: zryska/UA-.NET
        /// <summary>
        /// Asynchronously calls the QueryFirst service.
        /// </summary>
        public virtual IAsyncResult BeginQueryFirst(QueryFirstMessage message, AsyncCallback callback, object callbackData)
        {
            try
            {
                // check for bad data.
                if (message == null) throw new ArgumentNullException("message");

                // set the request context.
                SetRequestContext(RequestEncoding.Xml);

                // create handler.
                ProcessRequestAsyncResult result = new ProcessRequestAsyncResult(this, callback, callbackData, 0);
                return result.BeginProcessRequest(SecureChannelContext.Current, message.QueryFirstRequest);
            }
            catch (Exception e)
            {
                throw CreateSoapFault(message.QueryFirstRequest, e);
            }
        }
コード例 #2
0
ファイル: Opc.Ua.Endpoints.cs プロジェクト: yuriik83/UA-.NET
        /// <summary>
        /// The operation contract for the QueryFirst service.
        /// </summary>
        public virtual QueryFirstResponseMessage QueryFirst(QueryFirstMessage request)
        {
            QueryFirstResponse response = null;

            try
            {
                // OnRequestReceived(message.QueryFirstRequest);

                SetRequestContext(RequestEncoding.Xml);
                response = (QueryFirstResponse)QueryFirst(request.QueryFirstRequest);
                // OnResponseSent(response);
                return new QueryFirstResponseMessage(response);
            }
            catch (Exception e)
            {
                Exception fault = CreateSoapFault(request.QueryFirstRequest, e);
                // OnResponseFaultSent(fault);
                throw fault;
            }
        }
コード例 #3
0
ファイル: Opc.Ua.Endpoints.cs プロジェクト: zryska/UA-.NET
 /// <summary>
 /// The operation contract for the QueryFirst service.
 /// </summary>
 public virtual QueryFirstResponseMessage QueryFirst(QueryFirstMessage request)
 {
     try
     {
         SetRequestContext(RequestEncoding.Xml);
         QueryFirstResponse response = (QueryFirstResponse)QueryFirst(request.QueryFirstRequest);
         return new QueryFirstResponseMessage(response);
     }
     catch (Exception e)
     {
         throw CreateSoapFault(request.QueryFirstRequest, e);
     }
 }
コード例 #4
0
ファイル: MyServer.cs プロジェクト: yuriik83/UA-.NET
 public QueryFirstResponseMessage QueryFirst(QueryFirstMessage request)
 {
     throw new NotImplementedException();
 }