Exemplo n.º 1
0
        public static Horizon CreateBasicHorizon()
        {
            IFileSystem rootFs = new InMemoryFileSystem();
            var         keySet = new KeySet();

            var horizon = new Horizon(new HorizonConfiguration());

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

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

            var config = new FileSystemServerConfig();

            config.FsCreators     = defaultObjects.FsCreators;
            config.DeviceOperator = defaultObjects.DeviceOperator;
            config.ExternalKeySet = new ExternalKeySet();

            FileSystemServerInitializer.InitializeWithConfig(fsServerClient, fsServer, config);

            HorizonClient bcatServerClient = horizon.CreateHorizonClient();

            _ = new BcatServer(bcatServerClient);

            return(horizon);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        public void InitializeBcatServer()
        {
            BcatClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Bcat, StorageId.BuiltInSystem),
                                                    BcatFsPermissions);

            _ = new BcatServer(BcatClient);
        }
 public DeliveryCacheDirectoryService(BcatServer server, DeliveryCacheStorageService parent, ulong applicationId,
                                      AccessControl accessControl)
 {
     Server        = server;
     Parent        = parent;
     ApplicationId = applicationId;
     Access        = accessControl;
 }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 public DeliveryCacheStorageManager(BcatServer server)
 {
     Server         = server;
     DisableStorage = false;
 }
Exemplo n.º 7
0
 public DeliveryCacheFileMetaAccessor(BcatServer server)
 {
     Server = server;
 }
Exemplo n.º 8
0
 public DeliveryCacheStorageService(BcatServer server, ulong applicationId, AccessControl accessControl)
 {
     Server        = server;
     ApplicationId = applicationId;
     Access        = accessControl;
 }
 public DeliveryCacheDirectoryMetaAccessor(BcatServer server)
 {
     Server = server;
 }
Exemplo n.º 10
0
 public ServiceCreator(BcatServer server, string serviceName, AccessControl accessControl)
 {
     Server        = server;
     ServiceName   = serviceName;
     AccessControl = accessControl;
 }