Beispiel #1
0
            protected override ISiloBuilder PreBuild(ISiloBuilder builder)
            {
                OrleansFixture.GetAccountInfo(out this.AccountEndpoint, out this.AccountKey);

                var httpHandler = new HttpClientHandler()
                {
                    ServerCertificateCustomValidationCallback = (req, cert, chain, errors) => true
                };

                var dbClient = new CosmosClient(
                    this.AccountEndpoint,
                    this.AccountKey,
                    new CosmosClientOptions {
                    ConnectionMode = ConnectionMode.Gateway
                }
                    );

                return(builder
                       .AddCosmosDBGrainStorage(OrleansFixture.TEST_STORAGE, opt =>
                {
                    opt.Client = dbClient;
                    opt.DropDatabaseOnInit = true;
                    opt.CanCreateResources = true;
                    opt.DB = StorageDbName;
                    opt.StateFieldsToIndex.Add("NftIndexedInt");
                    opt.StateFieldsToIndex.Add("UserState.FtIndexedString");
                }));
            }
Beispiel #2
0
            protected override ISiloHostBuilder PreBuild(ISiloHostBuilder builder)
            {
                OrleansFixture.GetAccountInfo(out this.AccountEndpoint, out this.AccountKey);

                return(builder
                       .AddCosmosDBGrainStorage(OrleansFixture.TEST_STORAGE, opt =>
                {
                    opt.AccountEndpoint = this.AccountEndpoint;
                    opt.AccountKey = this.AccountKey;
                    opt.ConnectionMode = ConnectionMode.Gateway;
                    opt.DropDatabaseOnInit = true;
                    opt.AutoUpdateStoredProcedures = true;
                    opt.CanCreateResources = true;
                    opt.DB = DatabaseName;
                    opt.DatabaseThroughput = 1000;
                    opt.CollectionThroughput = 0;
                    opt.Collection = "RUTest";
                })
                       .AddCosmosDBGrainStorage("Second", opt =>
                {
                    opt.AccountEndpoint = this.AccountEndpoint;
                    opt.AccountKey = this.AccountKey;
                    opt.ConnectionMode = ConnectionMode.Gateway;
                    opt.DropDatabaseOnInit = true;
                    opt.AutoUpdateStoredProcedures = true;
                    opt.CanCreateResources = true;
                    opt.DB = DatabaseName;
                    opt.DatabaseThroughput = 1000;
                    opt.CollectionThroughput = 500;
                    opt.Collection = "RUTest2";
                }));
            }
Beispiel #3
0
            protected override ISiloHostBuilder PreBuild(ISiloHostBuilder builder)
            {
                OrleansFixture.GetAccountInfo(out this.AccountEndpoint, out this.AccountKey);

                return(builder
                       .AddCosmosDBGrainStorage <PrimaryKeyPartitionKeyProvider>(OrleansFixture.TEST_STORAGE, opt =>
                {
                    opt.AccountEndpoint = this.AccountEndpoint;
                    opt.AccountKey = this.AccountKey;
                    opt.ConnectionMode = ConnectionMode.Gateway;
                    opt.DropDatabaseOnInit = true;
                    opt.AutoUpdateStoredProcedures = true;
                    opt.CanCreateResources = true;
                    opt.DB = StorageDbName;
                }));
            }
            protected override ISiloHostBuilder PreBuild(ISiloHostBuilder builder)
            {
                OrleansFixture.GetAccountInfo(out this.AccountEndpoint, out this.AccountKey);

                return(builder
                       .AddCosmosDBGrainStorage(OrleansFixture.TEST_STORAGE, opt =>
                {
                    opt.AccountEndpoint = this.AccountEndpoint;
                    opt.AccountKey = this.AccountKey;
                    opt.ConnectionMode = ConnectionMode.Gateway;
                    opt.DropDatabaseOnInit = true;
                    opt.AutoUpdateStoredProcedures = true;
                    opt.CanCreateResources = true;
                    opt.DB = StorageDbName;
                    opt.StateFieldsToIndex.Add("NftIndexedInt");
                    opt.StateFieldsToIndex.Add("UserState.FtIndexedString");
                }));
            }
Beispiel #5
0
 static MembershipTableTestsBase()
 {
     OrleansFixture.GetAccountInfo(out accountEndpoint, out accountKey);
 }