示例#1
0
        public TcpService(string ipAddress, int port)
        {
            if (string.IsNullOrEmpty(ipAddress))
            {
                throw new ArgumentNullException("IPAddress");
            }
            if (port == 0)
            {
                throw new ArgumentNullException("Port");
            }

            gsmCommand = new TcpCommand(ipAddress, port, new ApplicationSettingKeySym());
            Connection = new TcpConnection(gsmCommand);
        }
示例#2
0
        public DbService(string connectionString, string providerName)
        {
            if (string.IsNullOrEmpty(providerName))
            {
                throw new ArgumentNullException("providerName");
            }
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException("connectionString");
            }

            gsmCommand = new DbCommand(connectionString, providerName);
            Connection = new DbConnection(gsmCommand); 
        }
示例#3
0
        public DbService(string connectionString, string providerName)
        {
            if (string.IsNullOrEmpty(providerName))
            {
                throw new ArgumentNullException("providerName");
            }
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException("connectionString");
            }

            gsmCommand = new DbCommand(connectionString, providerName);
            Connection = new DbConnection(gsmCommand);
        }
示例#4
0
        public  TcpService(string ipAddress, int port)
        { 
            if (string.IsNullOrEmpty(ipAddress))
            {
                throw new ArgumentNullException("IPAddress");
            }
            if (port == 0)
            {
                throw new ArgumentNullException("Port");
            }

            gsmCommand = new TcpCommand(ipAddress, port, new ApplicationSettingKeySym());
            Connection = new TcpConnection(gsmCommand); 
             
        }