public static uint GetServerNumber(string clientConfigFile) { CodeCrib.AX.Config.Client clientConfig = GetClientConfig(clientConfigFile); uint aosNumber = CodeCrib.AX.Config.Server.GetAOSNumber((uint)clientConfig.Connections[0].TCPIPPort); return(aosNumber); }
public static uint GetServerNumber(string clientConfigFile) { CodeCrib.AX.Config.Client clientConfig = GetClientConfig(clientConfigFile); if (clientConfig.Connections[0].ServerName != System.Environment.MachineName) { throw new RemoteServerException(string.Format("Build does not support remote servers, client config server name ({0}) differs from current server ({1})", clientConfig.Connections[0].ServerName, System.Environment.MachineName)); } uint aosNumber = CodeCrib.AX.Config.Server.GetAOSNumber((uint)clientConfig.Connections[0].TCPIPPort); return(aosNumber); }
public static CodeCrib.AX.Config.Server GetServerConfig(string clientConfigFile) { CodeCrib.AX.Config.Client clientConfig = GetClientConfig(clientConfigFile); var servers = CodeCrib.AX.Config.Server.GetAOSInstances(); var serverConfig = (from c in (from s in servers select CodeCrib.AX.Config.Server.GetConfigFromRegistry(s)) where c.TCPIPPort == clientConfig.Connections[0].TCPIPPort && c.WSDLPort == clientConfig.Connections[0].WSDLPort select c).FirstOrDefault(); return(serverConfig); }
public static CodeCrib.AX.Config.Client GetClientConfig(string clientConfigFile) { CodeCrib.AX.Config.Client clientConfig = null; if (!string.IsNullOrEmpty(clientConfigFile)) { clientConfig = CodeCrib.AX.Config.Client.GetConfigFromFile(clientConfigFile); } else { clientConfig = CodeCrib.AX.Config.Client.GetConfigFromRegistry(); } return(clientConfig); }
public static CodeCrib.AX.Config.Server GetServerConfig(string clientConfigFile) { CodeCrib.AX.Config.Client clientConfig = GetClientConfig(clientConfigFile); if (clientConfig.Connections[0].ServerName != System.Environment.MachineName) { throw new RemoteServerException(string.Format("Build does not support remote servers, client config server name ({0}) differs from current server ({1})", clientConfig.Connections[0].ServerName, System.Environment.MachineName)); } var servers = CodeCrib.AX.Config.Server.GetAOSInstances(); var serverConfig = (from c in (from s in servers select CodeCrib.AX.Config.Server.GetConfigFromRegistry(s)) where c.TCPIPPort == clientConfig.Connections[0].TCPIPPort && c.WSDLPort == clientConfig.Connections[0].WSDLPort select c).FirstOrDefault(); return(serverConfig); }