예제 #1
0
                public ISiloHostBuilder CreateSiloBuilder(string siloName, ClusterConfiguration clusterConfiguration)
                {
                    var builder = new SiloHostBuilder()
                                  .ConfigureSiloName(siloName)
                                  .UseConfiguration(clusterConfiguration)
                                  .ConfigureLogging(loggingBuilder => TestingUtils.ConfigureDefaultLoggingBuilder(loggingBuilder, TestingUtils.CreateTraceFileName(siloName, clusterConfiguration.Globals.ClusterId)));

                    // Setup storage feature infrastructure.
                    // - Setup infrastructure.
                    // - Set default feature implementation - optional

                    // Setup infrastructure
                    builder.UseExampleStorage();
                    // Default storage feature factory - optional
                    builder.UseAsDefaultExampleStorage <TableExampleStorageFactory>();

                    // Service will need to add types they want to use to collection
                    // - Call extension functions from each implementation assembly to register it's classes.

                    // Blob - from blob extension assembly
                    builder.UseBlobExampleStorage("Blob");
                    // Table - from table extension assembly
                    builder.UseTableExampleStorage("Table");
                    // Blarg - from blarg extension assembly
                    //builder.UseBlargExampleStorage("Blarg");

                    return(builder);
                }