static void Main(string[] args) { Console.Title = "WCF_GameClient"; ILogonService proxy = ChannelFactory <ILogonService> .CreateChannel( new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:9000/GameHostEndPoint")); for (int logonAttemptCount = 0; logonAttemptCount < 3; logonAttemptCount++) { Console.WriteLine("Enter text and hit return: "); string UserName = Console.ReadLine(); string Password = Console.ReadLine(); Guid? result = proxy.Logon(UserName, Password); Console.WriteLine("Server returned: " + result); if (result != null) { SessionToken = result; break; } } if (SessionToken != null) { GoGame(); } else { Console.WriteLine("Logon Failed"); } }
public LogonViewModel() { _dialogs = new DialogObjects(); _dialogs.SetViewModel(this); _service = new LogonService(); IsLoading(false); LogonCmd = new DelegateCommand(OnLogon); LogonReq = new AuthLogin(); UserName = string.Empty; Password = string.Empty; var b = App.Current.Properties["LoginUser"]; }
public void Setup() { _logonService = new LogonService("your-256-bit-secret", TimeSpan.FromMinutes(1)); }
public LogonController(ILogonService logonService) { _logonService = logonService; }
public Post() { _logonService = new FakeLogonService(); }
public LogonController(ILogonService service) { _service = service; }