private void _CServer(string name, CServiceType type, string user = "", string password = "") { // initialize values Name = name; // ip resolution handled by get set function Id = CFunctions.GenerateUID(); if (user == "") { UserName = Environment.UserDomainName + "\\" + Environment.UserName; } else { UserName = user; } Type = type; UserPassword = password; }
public CService(string name, int type, string user = "", string password = "") { CServiceType t = new CServiceType(type); _CServer(name, t, user, password); }