public AgencyContext(ServerModel server)
        {
            CryptographyProvider = new RSACryptography();


            Server = server;

            MainFactory = new MainFactory();
            MainFactory.RegisterTypes();

            RegisteredUsers = new RegisteredUsers();
            RegisteredUsers.RegisterUsers();
        }
Пример #2
0
        public Context(Dictionary <string, object> mainConfig)
        {
            if (_instance != null)
            {
                throw new Exception("More than one singletone");
            }

            fastJSON.JSON.Parameters.UseEscapedUnicode = true;
            _instance            = this;
            CryptographyProvider = new RSACryptography();
            NetworkManager       = new NetworkManager(mainConfig);
            NetworkManager.Activate();
            MainFactory = new MainFactory();
            MainFactory.RegisterTypes();
        }