Exemple #1
0
 public RoleController(IRemotingClient remoteServiceClient, IUserAppServiceClient userAppServiceClient)
 {
     _remoteServiceClient    = remoteServiceClient;
     _userAppServiceClient   = userAppServiceClient;
     this._systemRoleService = remoteServiceClient.CreateSystemRoleAppService();
     this._userRoleService   = remoteServiceClient.CreateUserRoleAppService();
 }
Exemple #2
0
 public CounController(
     IRemotingClient remotingClient,
     IUserAppServiceClient userAppServiceClient)
 {
     _remotingClient       = remotingClient;
     _userAppServiceClient = userAppServiceClient;
 }
Exemple #3
0
        private void SetProxy(IRemotingClient clientProxy)
        {
            _clientProxy = clientProxy;

            // build remote interface
            _serviceUid           = _clientProxy.BuildRemoteService(_decorated.GetType().GetInterfaces().FirstOrDefault());// build target interface
            _clientProxy.OnEvent += _proxy_OnEvent;
        }
Exemple #4
0
        public static T Create(T decorated, IRemotingClient clientProxy)
        {
            object proxy = Create <T, RemoteDecorator <T> >();

            ((RemoteDecorator <T>)proxy).SetParameters(decorated);
            ((RemoteDecorator <T>)proxy).SetProxy(clientProxy);

            return((T)proxy);
        }
Exemple #5
0
 public UserController(
     IRemotingClient remotingClient,
     IUserAppServiceClient userAppServiceClient,
     IMapper mapper,
     IUserService userService)
 {
     _remotingClient       = remotingClient;
     _mapper               = mapper;
     _userService          = userService;
     _userAppServiceClient = userAppServiceClient;
 }
Exemple #6
0
 public IntialDataController(
     IRemotingClient remotingClient,
     IUserAppServiceClient userAppServiceClient,
     IContactsClient contactsClient,
     ISimpleKeyValueService keyValueService,
     ILogger <IntialDataController> logger)
 {
     _userAppServiceClient = userAppServiceClient;
     _logger          = logger;
     _remotingClient  = remotingClient;
     _keyValueService = keyValueService;
     _contactsClient  = contactsClient;
 }
        public void Server_Client_Start_Stop()
        {
            int i = 0;

            while (i < 3)
            {
                // Prepare
                RemotingServer server = this._Provider.GetRequiredService <RemotingServer>();
                server.Start();
                IRemotingClient client = this._Provider.GetRequiredService <IRemotingClient>();

                // Pre-validate
                client.CheckBindings();


                // Perform
                client.Dispose();
                server.Stop();

                // Post-validate
                Assert.False(server.IsEnable());
            }
        }
        public void Server_Method_Invocation(int valueInt, string valueString, Unit unit)
        {
            EventHandler <Part> onDetect = (sender, e) => {
                Debug.WriteLine($"{e.GetType().ToString()} detected: {e}");
                Assert.NotNull(e);
            };

            RemotingServer server = this._Provider.GetRequiredService <RemotingServer>();

            server.Start();

            IRemotingClient client = this._Provider.GetRequiredService <IRemotingClient>();

            client.CheckBindings();

            IMyService service = this._Provider.GetRequiredService <IMyService>();

            service.OnSomeBDetect += onDetect;

            Assert.NotNull(service.Do(valueInt, valueString, unit));

            client.Dispose();
            server.Stop();
        }
Exemple #9
0
        /// <summary>
        /// Initializes the channel.
        /// </summary>
        /// <param name="client">CoreRemoting client</param>
        public void Init(IRemotingClient client)
        {
            string url =
                "ws://" +
                client.Config.ServerHostName + ":" +
                Convert.ToString(client.Config.ServerPort) +
                "/rpc";

            _webSocket = new WebSocket(url);

            _webSocket.SetCookie(new Cookie(
                                     name: "MessageEncryption",
                                     value: client.MessageEncryption ? "1" : "0"));

            if (client.MessageEncryption)
            {
                _webSocket.SetCookie(new Cookie(
                                         "ShakeHands",
                                         Convert.ToBase64String(client.PublicKey)));
            }

            _webSocket.Log.Output = (timestamp, text) => Console.WriteLine("{0}: {1}", timestamp, text);
            _webSocket.Log.Level  = LogLevel.Debug;
        }
Exemple #10
0
 public UserAppServiceClient(IRemotingClient remotingClient)
 {
     _remotingClient = remotingClient;
 }
Exemple #11
0
 public PublishUsers(IRemotingClient remoteClient, IMapper mapper, IEnumerable <IBusControl> buses)
 {
     _remoteClient = remoteClient;
     _mapper       = mapper;
     _buses        = buses;
 }
Exemple #12
0
 public ClientStore(
     IRemotingClient remoteServiceClient)
 {
     _remoteServiceClient = remoteServiceClient;
 }
 public RmBranchCommitProcessor(ITransactionMessageHandler handler, IRemotingClient remotingClient)
 {
     this.handler        = handler;
     this.remotingClient = remotingClient;
 }
 public RoleUserController(IRemotingClient remoteServiceClient, IUserAppServiceClient userAppServiceClient)
 {
     _remoteServiceClient  = remoteServiceClient;
     _userAppServiceClient = userAppServiceClient;
 }
Exemple #15
0
 public ProfileService(
     IRemotingClient remoteServiceClient)
 {
     _remoteServiceClient = remoteServiceClient;
 }
Exemple #16
0
 public ExportUserData(IRemotingClient remotingClient)
 {
     _remotingClient = remotingClient;
 }
Exemple #17
0
 public ResourceStore(
     IRemotingClient remoteServiceClient)
 {
     _remoteServiceClient = remoteServiceClient;
 }
 public PersistedGrantStore(
     IRemotingClient remoteServiceClient)
 {
     _remoteServiceClient = remoteServiceClient;
 }
 public ResourceController(IRemotingClient remoteServiceClient, IMapper mapper)
 {
     _remoteServiceClient = remoteServiceClient;
     _mapper = mapper;
 }
Exemple #20
0
 public IndexModel(
     IRemotingClient remoteServiceClient, IMapper mapper)
 {
     _remoteServiceClient = remoteServiceClient;
     _mapper = mapper;
 }
Exemple #21
0
 public IndexModel(IRemotingClient remoteServiceClient)
 {
     this._remoteServiceClient = remoteServiceClient;
     this._systemRoleService   = remoteServiceClient.CreateSystemRoleAppService();
     this._userRoleService     = remoteServiceClient.CreateUserRoleAppService();
 }
 public ScanLoginController(ISimpleKeyValueService simpleKeyValueService,
                            IRemotingClient remotingClient)
 {
     _simpleKeyValueService = simpleKeyValueService;
     _remotingClient        = remotingClient;
 }