コード例 #1
0
ファイル: RpcServer.cs プロジェクト: TijW/protobuf-csharp-rpc
 protected RpcServer(IRpcServerStub implementation)
 {
     _exceptionDetails = RpcErrorDetailBehavior.FullDetails;
     _extensions = ExtensionRegistry.CreateInstance();
     _serverPrincipalName = null;
     _implementation = implementation;
 }
コード例 #2
0
 protected RpcServer(IRpcServerStub implementation)
 {
     _exceptionDetails    = RpcErrorDetailBehavior.FullDetails;
     _extensions          = ExtensionRegistry.CreateInstance();
     _serverPrincipalName = null;
     _implementation      = implementation;
 }
コード例 #3
0
 public RpcServer EnableMultiPart()
 {
     if (!(_implementation is RpcMultiPartServerFilter))
     {
         _implementation = new RpcMultiPartServerFilter(_implementation);
     }
     return(this);
 }
コード例 #4
0
ファイル: RpcServer.cs プロジェクト: TijW/protobuf-csharp-rpc
 public RpcServer EnableMultiPart()
 {
     if (!(_implementation is RpcMultiPartServerFilter))
     {
         _implementation = new RpcMultiPartServerFilter(_implementation);
     }
     return this;
 }
            public ExampleHttpServer(ISearchService implementation)
            {
                //on the server, we create a dispatch to call the appropriate method by name
                IRpcDispatch dispatch = new SearchService.Dispatch(implementation);

                //we then wrap that dispatch in a server stub which will deserialize the wire bytes to the message
                //type appropriate for the method name being invoked.
                _stub = new SearchService.ServerStub(dispatch);
            }
コード例 #6
0
        /// <summary>
        /// Used to implement a service endpoint on an HTTP server.  This works with services generated with the
        /// service_generator_type option set to IRPCDISPATCH.
        /// </summary>
        /// <param name="stub">The service execution stub</param>
        /// <param name="methodName">The name of the method being invoked</param>
        /// <param name="options">optional arguments for the format reader/writer</param>
        /// <param name="contentType">The mime type for the input stream</param>
        /// <param name="input">The input stream</param>
        /// <param name="responseType">The mime type for the output stream</param>
        /// <param name="output">The output stream</param>
        public static void HttpCallMethod(
#if !NOEXTENSIONS
            this
#endif
            IRpcServerStub stub, string methodName, MessageFormatOptions options,
            string contentType, Stream input, string responseType, Stream output)
        {
            ICodedInputStream codedInput = MessageFormatFactory.CreateInputStream(options, contentType, input);

            codedInput.ReadMessageStart();
            IMessageLite response = stub.CallMethod(methodName, codedInput, options.ExtensionRegistry);

            codedInput.ReadMessageEnd();
            WriteTo(response, options, responseType, output);
        }
コード例 #7
0
 public InprocRpcServer(IRpcServerStub stub) : base(stub)
 {
 }
コード例 #8
0
ファイル: RpcServer.cs プロジェクト: TijW/protobuf-csharp-rpc
 public static Win32RpcServer CreateRpc(Guid iid, IRpcServerStub implementation)
 {
     return new Win32RpcServer(iid, implementation);
 }
コード例 #9
0
 public InprocRpcClient(IRpcServerStub stub)
 {
     server = new InprocRpcServer(stub);
 }
コード例 #10
0
 public InprocRpcServer(IRpcServerStub stub) : base(stub)
 {
 }
コード例 #11
0
 public Win32RpcServer(Guid iid, IRpcServerStub implementation)
     : base(implementation)
 {
     _server = new RpcServerApi(iid);
 }
コード例 #12
0
 public ImpersonatingServerStub(IRpcServerStub next)
 {
     _next = next;
 }
コード例 #13
0
 public InprocRpcClient(IRpcServerStub stub)
 {
     server = new InprocRpcServer(stub);
 }
コード例 #14
0
 public RpcMultiPartServerFilter(IRpcServerStub next)
 {
     this.next = next;
 }
コード例 #15
0
 public ImpersonatingServerStub(IRpcServerStub next)
 {
     _next = next;
 }
コード例 #16
0
 public static Win32RpcServer CreateRpc(Guid iid, IRpcServerStub implementation)
 {
     return(new Win32RpcServer(iid, implementation));
 }
コード例 #17
0
 public WcfTransportInvoke(IRpcServerStub createStub)
 {
     _createStub = createStub;
 }
コード例 #18
0
 public Win32RpcServer(Guid iid, IRpcServerStub implementation)
     : base(implementation)
 {
     _server = new RpcServerApi(iid);
 }
コード例 #19
0
 public Impersonation(IRpcServerStub stub)
 {
     _stub = stub;
 }
コード例 #20
0
 public WcfTransportInvoke(IRpcServerStub createStub)
 {
     _createStub = createStub;
 }