public static XjtuSiteManager CreateXjtuSiteManager() { var newInst = new XjtuSiteManager(); newInst.RegisterService(new ManualVerificationProvider()); return(newInst); }
public static void LogoutSiteManager(XjtuSiteManager m) { if (m == null) { throw new ArgumentNullException(nameof(m)); } var a = m.RequireService <AccountManager>(); a.LogoutAsync().Wait(); }
public static void LoginSiteManager(XjtuSiteManager m) { if (m == null) { throw new ArgumentNullException(nameof(m)); } var a = m.RequireService <AccountManager>(); AuthenticateCore(a); Trace.Assert(a.IsLoggedIn); }