コード例 #1
0
        public AzureTableStorageHandler(string name, AzureTableStorageHandlerConfiguration configuration)
            : base(name, configuration.BatchTimeDelay, configuration.BatchSize)
        {
            this.configuration = configuration;

            Initialize();
        }
コード例 #2
0
        public StoryRuleset()
        {
            IStoryHandler storyHandler = StoryHandlers.DefaultTraceHandler;

            // Add the azure table storage story handler only if the connection string exists
            // It should be set as a connection string called "StoryTableStorage"
            var azureTableStorageConfiguration = new AzureTableStorageHandlerConfiguration();

            if (azureTableStorageConfiguration.ConnectionString != null)
            {
                storyHandler =
                    storyHandler.Compose(new AzureTableStorageHandler("AzureTable", azureTableStorageConfiguration));
            }

            Rules.Add(
                new PredicateRule(
                    story => story.IsRoot(),
                    story => storyHandler));
        }