コード例 #1
0
ファイル: Program.cs プロジェクト: Elders/be-a-better-dev
        private static void ConfigureStorage()
        {
            var blobStorage = new BlobDocumentStorage();
            var fileStorage = new FileDocumentStorage();
            var httpInputRetriever = new HttpInputRetriever();

            InputRetriever.RegisterInputRetriever(x => x.StartsWith("http", StringComparison.Ordinal), httpInputRetriever);
            InputRetriever.RegisterInputRetriever(IsBlobStorageUrl, blobStorage);
            InputRetriever.RegisterInputRetriever(x => true, fileStorage);

            DocumentPersister.RegisterDocumentPersister(IsBlobStorageUrl, blobStorage);
            DocumentPersister.RegisterDocumentPersister(x => true, fileStorage);
        }
コード例 #2
0
        private static void ConfigureStorage()
        {
            var blobStorage        = new BlobDocumentStorage();
            var fileStorage        = new FileDocumentStorage();
            var httpInputRetriever = new HttpInputRetriever();

            InputRetriever.RegisterInputRetriever(x => x.StartsWith("http", StringComparison.Ordinal), httpInputRetriever);
            InputRetriever.RegisterInputRetriever(IsBlobStorageUrl, blobStorage);
            InputRetriever.RegisterInputRetriever(x => true, fileStorage);

            DocumentPersister.RegisterDocumentPersister(IsBlobStorageUrl, blobStorage);
            DocumentPersister.RegisterDocumentPersister(x => true, fileStorage);
        }