コード例 #1
0
        /// <summary>
        /// Class initialize
        /// </summary>
        public ClientServerTest()
        {
            // Configure IP and port
            IPAddress localhost = IPAddress.Loopback;
            const int port      = 8000;

            // Start server
            m_RemoteServiceContainer = new RemoteServiceContainer();
            m_RemoteServiceContainer.RegisterService(typeof(IMyCustomService), new MyCustomService());
            m_RemoteServiceContainer.Open(localhost, port);

            // Get service proxy in client side
            var servicesChannel = new ServiceChannel(localhost, port);

            m_ProxyTarget = servicesChannel.GetRemoteService <IMyCustomService>();

            // Initialize the actual object locally. The tests may use this object as 'expected' value during assertion
            m_LocalTarget = new MyCustomService();
        }
コード例 #2
0
 public ValuesController(IMyCustomService myCustomService)
 {
     myCustomService.DoNothing();
 }
コード例 #3
0
 public MyHealthCheck(IMyCustomService dependency)
 {
     this.dependency = dependency;
 }
コード例 #4
0
 public MyCustomCheck(IMyCustomService customService)
 {
     _customService = customService;
 }
コード例 #5
0
 public ValuesController(IMyCustomService custom)
 {
     _custom = custom;
 }