public string LoginClient(string username, string password, string version) { Version ClientVersion; try { ClientVersion = Version.Parse(version); } catch (Exception) { TLogging.Log("LoginClient: invalid version, cannot be parsed: " + version); return(THttpBinarySerializer.SerializeObjectWithType(eLoginEnum.eLoginVersionMismatch)); } string WelcomeMessage; bool SystemEnabled; IPrincipal UserInfo; Int32 ClientID; eLoginEnum Result = LoginInternal(username, password, ClientVersion, out ClientID, out WelcomeMessage, out SystemEnabled, out UserInfo); if (Result != eLoginEnum.eLoginSucceeded) { return(THttpBinarySerializer.SerializeObjectWithType(Result)); } return(THttpBinarySerializer.SerializeObjectWithType(Result) + "," + THttpBinarySerializer.SerializeObjectWithType(ClientID) + "," + THttpBinarySerializer.SerializeObjectWithType(WelcomeMessage) + "," + THttpBinarySerializer.SerializeObjectWithType(SystemEnabled) + "," + THttpBinarySerializer.SerializeObjectWithType(UserInfo)); }
public string TestDateTime(string date) { DateTime outDateTomorrow; DateTime result = TMyServiceWebConnector.TestDateTime((DateTime)THttpBinarySerializer.DeserializeObject(date, "binary"), out outDateTomorrow); return(THttpBinarySerializer.SerializeObjectWithType(outDateTomorrow) + "," + THttpBinarySerializer.SerializeObjectWithType(result)); }
public string TMySubNamespace_HelloSubWorld(System.String msg) { // TModuleAccessManager.CheckUserPermissionsForMethod(); try { TLogging.Log(msg); return(THttpBinarySerializer.SerializeObjectWithType(TMyServiceWebConnector.HelloSubWorld())); } catch (Exception e) { TLogging.Log(e.ToString()); throw new Exception("Please check server log file"); } }
public string TMyUIConnector_HelloWorldUIConnector(string UIConnectorObjectID) { string ObjectID = UIConnectorObjectID + " " + DomainManager.GClientID; if (!FUIConnectors.ContainsKey(ObjectID)) { TLogging.Log( "Trying to call TMyUIConnector_HelloWorldUIConnector, but the object with this ObjectID " + ObjectID + " does not exist"); throw new Exception("this object does not exist anymore!"); } try { return(THttpBinarySerializer.SerializeObjectWithType(((TMyUIConnector)FUIConnectors[ObjectID]).HelloWorldUIConnector())); } catch (Exception e) { TLogging.Log(e.ToString()); throw new Exception("Please check server log file"); } }