Example #1
0
        public static IGuestHandle CreateGuestHandle(IAppClient appClient)
        {
            IGuestService guestService = appClient.Lookup<IGuestService>();
            IAdminService adminService = appClient.Lookup<IAdminService>();
            IUserService userService = appClient.Lookup<IUserService>();

            IGuestHandle gh = new GuestHandle(guestService, adminService, userService);

            return gh;
        }
Example #2
0
        public UnitTest1()
        {
            ICouchContext couchContext  = new CouchContext();
            CouchDBHelper couchDBHelper = new CouchDBHelper("http",
                                                            "127.0.0.1",
                                                            "appclient",
                                                            "admin",
                                                            "1qaz2wsx");

            appclient = new AppClientRepo(couchContext, couchDBHelper);
        }
 public void Run(bool isLogged, string userName, string password,
                 IAppClient client)
 {
     Model = new AuthorizationModel(isLogged, userName, password);
     View.ApplyModel(Model);
     Client = client;
     Client.AppMsgReceived += OnAppMsgReceived;
     if (Model.IsLogged)
     {
         ApplyState <AuthorizationLoggedState>();
     }
     else
     {
         ApplyState <AuthorizationLoginState>();
     }
 }
        public void Run(PlayerAuthInfo playerAuthInfo, IAppClient client)
        {
            Model = new AuthorizationModel(playerAuthInfo.IsLogged, playerAuthInfo.UserName, playerAuthInfo.Password);
            View.ApplyModel(Model);

            Client = client;
            Client.AppMsgReceived += OnAppMsgReceived;

            if (Model.IsLogged)
            {
                ApplyState <AuthorizationLoggedState>();
            }
            else
            {
                ApplyState <AuthorizationLoginState>();
            }
        }
Example #5
0
 public GifsController(IAppClient appClient, IMapper mapper)
 {
     this._appClient = appClient;
     this._mapper    = mapper;
 }
 /// <summary>
 /// Check if the web browser exists
 /// </summary>
 public void Connect()
 {
     Callback = OperationContext.Current.GetCallbackChannel <IAppClient>();
 }