Exemplo n.º 1
0
        private DelegateObjectFunc[] f_arRegistration; // = { registrationCmdLine, registrationINI, registrationEnv };

        public HUsers(int iListenerId, MODE_REGISTRATION mode = MODE_REGISTRATION.USER_DOMAINNAME)
        {
            object argFReg = null;

            Logging.Logg().Action(string.Format(@"HUsers::HUsers () - ... кол-во аргументов ком./строки = {0}; MashineName::DomainUserName={1}::{2}\{3}"
                                                , +(Environment.GetCommandLineArgs().Length - 1), MachineName, Environment.UserDomainName, Environment.UserName)
                                  , Logging.INDEX_MESSAGE.NOT_SET);

            try {
                s_modeRegistration = mode;

                f_arRegistration = new DelegateObjectFunc[(int)STATE_REGISTRATION.COUNT_STATE_REGISTRATION];
                f_arRegistration[(int)STATE_REGISTRATION.CMD] = new DelegateObjectFunc(registrationCmdLine);
                //f_arRegistration[(int)STATE_REGISTRATION.INI] = new DelegateObjectFunc (registrationINI);
                f_arRegistration[(int)STATE_REGISTRATION.ENV] = new DelegateObjectFunc(registrationEnv);

                s_DataRegistration  = new object[(int)INDEX_REGISTRATION.COUNT_INDEX_REGISTRATION];
                s_StateRegistration = new STATE_REGISTRATION[(int)INDEX_REGISTRATION.COUNT_INDEX_REGISTRATION];

                ClearValues();
            } catch (Exception e) {
                Logging.Logg().Exception(e, @"HUsers::HUsers ()...", Logging.INDEX_MESSAGE.NOT_SET);
            }

            Logging.Logg().Debug(@"HUsers::HUsers () - ... очистили значения ...", Logging.INDEX_MESSAGE.NOT_SET);

            for (int i = 0; i < (int)STATE_REGISTRATION.COUNT_STATE_REGISTRATION; i++)
            {
                argFReg = null;

                if (i == (int)STATE_REGISTRATION.ENV)
                {
                    argFReg = iListenerId;
                }
                else
                {
                    ;
                }

                f_arRegistration[i](argFReg);
            }
        }
Exemplo n.º 2
0
 public HStatisticUsers(int iListenerId, MODE_REGISTRATION modeRegistration)
     : base(iListenerId, modeRegistration)
 {
     Initialize(@"роль: " + Role);
 }