예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }