示例#1
0
        /// <summary>
        /// Get an instance of PipeServer. T represents the service implementation and U its interface
        /// </summary>
        public PipeServer()
        {
            Console.WriteLine(typeof(U).ToString() + " started...");
            this.server = new AsyncNamedPipeServer(typeof(U).ToString());
            this.server.OnMessageReceived       += Server_OnMessageReceived;
            this.server.OnPipeConnectionChanged += Server_OnPipeConnectionChanged;
            this.server.OnPipeException         += Server_OnPipeException;

            this.instance = new T();
        }