Esempio n. 1
0
        public OrleansHubLifetimeManager <THub> CreateNewHubLifetimeManager <THub>() where THub : Hub
        {
            var options = new OrleansOptions <THub> {
                ClusterClient = _fixture.TestCluster.Client
            };

            return(new OrleansHubLifetimeManager <THub>(Options.Create(options),
                                                        new HubProxy <THub>(options.ClusterClient),
                                                        NullLogger <OrleansHubLifetimeManager <THub> > .Instance));
        }
Esempio n. 2
0
        public OrleansHubLifetimeManager <THub> CreateNewHubLifetimeManager <THub>() where THub : Hub
        {
            var groupPartitioner = new DefaultClientSetPartitioner <IGroupPartitionGrain>();
            var userPartitioner  = new DefaultClientSetPartitioner <IUserPartitionGrain>();
            var options          = new OrleansOptions <THub> {
                ClusterClient = _fixture.TestCluster.Client
            };

            return(new OrleansHubLifetimeManager <THub>(Options.Create(options),
                                                        groupPartitioner,
                                                        userPartitioner,
                                                        new DefaultUserIdProvider(),
                                                        NullLogger <OrleansHubLifetimeManager <THub> > .Instance));
        }
        private async Task CreateManagerAsync(string managerId)
        {
            var options = new OrleansOptions <SampleHub>
            {
                ClusterClient = _testCluster.Client
            };

            var manager = new OrleansHubLifetimeManager <SampleHub>(Options.Create(options),
                                                                    new HubProxy <SampleHub>(options.ClusterClient),
                                                                    _loggerFactory.CreateLogger <OrleansHubLifetimeManager <SampleHub> >());

            managers[managerId] = manager;

            await Task.CompletedTask;
        }