示例#1
0
        public static Horizon CreateWithDefaultFsConfig(HorizonConfiguration config, IFileSystem rootFileSystem,
                                                        KeySet keySet)
        {
            var horizon = new Horizon(config);

            HorizonClient fsServerClient = horizon.CreatePrivilegedHorizonClient();
            var           fsServer       = new FileSystemServer(fsServerClient);

            var defaultObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(rootFileSystem, keySet, fsServer);

            var fsServerConfig = new FileSystemServerConfig
            {
                DeviceOperator = defaultObjects.DeviceOperator,
                ExternalKeySet = keySet.ExternalKeySet,
                FsCreators     = defaultObjects.FsCreators,
            };

            FileSystemServerInitializer.InitializeWithConfig(fsServerClient, fsServer, fsServerConfig);

            HorizonClient bcatServerClient = horizon.CreateHorizonClient();

            _ = new BcatServer(bcatServerClient);

            return(horizon);
        }
示例#2
0
        public Horizon(HorizonConfiguration config)
        {
            _currentProcessId = InitialProcessCountMax;

            TickGenerator  = config.TickGenerator ?? new DefaultTickGenerator();
            ServiceManager = new ServiceManager();

            LoaderClient = CreatePrivilegedHorizonClient();
        }
示例#3
0
        public static Horizon CreateWithFsConfig(HorizonConfiguration config, FileSystemServerConfig fsServerConfig)
        {
            var horizon = new Horizon(config);

            HorizonClient fsServerClient = horizon.CreatePrivilegedHorizonClient();
            var           fsServer       = new FileSystemServer(fsServerClient);

            FileSystemServerInitializer.InitializeWithConfig(fsServerClient, fsServer, fsServerConfig);

            HorizonClient bcatServerClient = horizon.CreateHorizonClient();

            _ = new BcatServer(bcatServerClient);

            return(horizon);
        }