Beispiel #1
0
		public PublicationTests()
		{
			_serializer = new JsonMessageSerializer();
			_blobStorage = new InMemoryBlobStorage();
			_mapper = new InMemoryRecordMapper<FakePublicationRecord>();
			_publicationRegistry = new FakeRegistry(_mapper, _blobStorage, _serializer);
			_channel = new InMemoryMessageChannel();
		}
Beispiel #2
0
        public static IdentityBuilder AddSimpleStorageRoleStoreWithStorageNet <TRole>(this IdentityBuilder builder,
                                                                                      IBlobStorage blobStorage, string storageItemId)
            where TRole : IdentityRole
        {
            builder.Services.AddSingleton <IStorageProvider <TRole> >(p =>
                                                                      new StorageNetStorageProvider <TRole>(blobStorage, storageItemId));

            builder.AddSimpleStorageRoleStore <TRole>();

            return(builder);
        }
Beispiel #3
0
 public void TestInit()
 {
     _testBlob = new AzureBlobInMemory();
 }
Beispiel #4
0
 //Injecting the service
 public PersonController(IPersonService personService, IBlobStorage blobStorage)
 {
     _personService      = personService;
     _blobStorageService = blobStorage;
 }
Beispiel #5
0
 public StorageNetStorageProvider(IBlobStorage storage, string storageItemId)
 {
     this.storage       = storage;
     this.storageItemId = storageItemId;
 }
 /// <summary>
 /// Constructor to initialize variables
 /// </summary>
 /// <param name="blobStorage">blobRepository</param>
 public MeasurementService(IBlobStorage blobStorage)
 {
     this.blobStorage = blobStorage;
 }
Beispiel #7
0
        public void RegenerateV3ViewModels(AzureEventLogReader logReader, IBlobStorage blobStorage, string dbConnectionString, DateTime maxEventTime)
        {
            Database.SetInitializer<ConferenceRegistrationDbContext>(null);

            var handlers = new List<IEventHandler>();
            handlers.Add(new DraftOrderViewModelGenerator(() => new ConferenceRegistrationDbContext(dbConnectionString)));
            handlers.Add(new PricedOrderViewModelGenerator(() => new ConferenceRegistrationDbContext(dbConnectionString)));
            handlers.Add(
                new SeatAssignmentsViewModelGenerator(
                    new ConferenceDao(() => new ConferenceRegistrationDbContext(dbConnectionString)),
                    blobStorage,
                    new JsonTextSerializer()));

            var dispatcher = new EventDispatcher(handlers);
            var events = logReader.Query(new QueryCriteria { EndDate = maxEventTime });

            dispatcher.DispatchMessages(events);
        }
 public ContentAddressableStorage(IBlobStorage blob)
 {
     if ((this.blob = blob) == null) throw new ArgumentNullException(nameof(blob));
 }
Beispiel #9
0
 public AccessDataRepository(IBlobStorage blobStorage, string container, string historyContainer, string file) : base(blobStorage, container, historyContainer, file)
 {
 }
 public ChemicalPropertiesController(IBusControl bus, IMongoDatabase database, IBlobStorage blobStorage)
 {
     _bus         = bus ?? throw new ArgumentNullException(nameof(bus));
     _database    = database ?? throw new ArgumentNullException(nameof(database));
     _blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));
     _collection  = _database.GetCollection <CalculatedPropertiesResponse>(nameof(ChemicalProperties));
 }
Beispiel #11
0
 public MachineLearning(IBlobStorage blobStorage)
     : base(blobStorage)
 {
 }
Beispiel #12
0
 public Imaging(IBlobStorage blobStorage)
 {
     _blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));;
 }
Beispiel #13
0
 public BlobController(IBlobStorage storage)
 {
     this._storage = storage;
 }
 public EthereumContractRepository(string blobName, IBlobStorage blobStorage)
 {
     _blobName    = blobName;
     _blobStorage = blobStorage;
 }
Beispiel #15
0
		public FileUploader(IBlobStorage blobStorage)
		{
			_blobStorage = blobStorage;
		}
 public KycDocumentsScansRepository(IBlobStorage blobStorage)
 {
     _blobStorage = blobStorage;
 }
Beispiel #17
0
 public BlobStorageWorkflowStorageProvider(IBlobStorage blobStorage)
 {
     _blobStorage        = blobStorage;
     _serializerSettings = DefaultContentSerializer.CreateDefaultJsonSerializationSettings();
     _serializerSettings.TypeNameHandling = TypeNameHandling.All;
 }
Beispiel #18
0
 public OsdrRecordsProvider(IMongoDatabase database, IBlobStorage blobStorage)
 {
     this.database    = database ?? throw new ArgumentNullException(nameof(database));
     this.blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));
 }
Beispiel #19
0
 public CleanupFilesTask(IBlobStorage blobStorage)
 {
     BlobStorage = blobStorage;
 }
Beispiel #20
0
 public MicroscopyMetadata(IBlobStorage blobStorage)
 {
     _blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));;
 }
Beispiel #21
0
 public OrderDao(Func <ConferenceRegistrationDbContext> contextFactory, IBlobStorage blobStorage, ITextSerializer serializer)
 {
     this.contextFactory = contextFactory;
     this.blobStorage    = blobStorage;
     this.serializer     = serializer;
 }
 public StandardizationValidationController(IBusControl bus, IMongoDatabase database, IBlobStorage blobStorage)
 {
     this._bus         = bus ?? throw new ArgumentNullException(nameof(bus));
     this._database    = database ?? throw new ArgumentNullException(nameof(database));
     this._blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));
     this._standardizationsValidations = database.GetCollection <BsonDocument>("StandardizationsValidations");
 }
 public LargeMessageContentMessageReceiver(IMessageReceiver parentReceiver, IBlobStorage offloadStorage)
 {
     _parentReceiver = parentReceiver;
     _offloadStorage = offloadStorage;
 }
 public BlobStorageWorkflowStorageProvider(IOptions <BlobStorageWorkflowStorageProviderOptions> options)
 {
     _blobStorage        = options.Value.BlobStorageFactory();
     _serializerSettings = DefaultContentSerializer.CreateDefaultJsonSerializationSettings();
     _serializerSettings.TypeNameHandling = TypeNameHandling.All;
 }
Beispiel #25
0
 public UploadController(IBlobStorage storage, IGate gate)
 {
     _storage = storage;
     _gate = gate;
 }
Beispiel #26
0
 public SpectraFileParser(IBlobStorage blobStorage)
 {
     _blobStorage = blobStorage ?? throw new ArgumentNullException(nameof(blobStorage));;
 }
 public BlobStorageRecordsProvider(IBlobStorage blobStorage)
 {
     this.blobStorage = blobStorage;
 }
Beispiel #28
0
 /// <summary>
 /// Creates a connection to an application's checkpoint list
 /// </summary>
 public EventCheckpointer(IBlobStorage storage, string applicationName)
 {
     _storage         = storage;
     _applicationName = applicationName;
 }
Beispiel #29
0
 public SettingsManager(IObjectSerializer serializer, IBlobStorage storage)
 {
     this.serializer = serializer;
     this.storage    = storage;
 }
Beispiel #30
0
 public FolderUpdatedMessage(IBlobStorage blobStorage, string folderPath)
 {
     BlobStorage = blobStorage;
     FolderPath  = folderPath;
 }
Beispiel #31
0
 public EventHubStateAdapter(IBlobStorage blobStorage)
 {
     _blobStorage = blobStorage;
 }
 public SeatAssignmentsDao(IBlobStorage storage, ITextSerializer serializer)
 {
     this.storage = storage;
     this.serializer = serializer;
 }
Beispiel #33
0
 /// <summary>
 /// Deletes a single blob or a folder recursively.
 /// </summary>
 /// <param name="storage"></param>
 /// <param name="fullPath"></param>
 /// <param name="cancellationToken"></param>
 /// <returns></returns>
 public static Task DeleteAsync(
     this IBlobStorage storage,
     string fullPath, CancellationToken cancellationToken = default)
 {
     return(storage.DeleteAsync(new[] { fullPath }, cancellationToken));
 }
 public BlobStorageTests()
 {
     blobStorage = new BlobStorage(ContainerName, ConnectionString);
 }
Beispiel #35
0
 /// <summary>
 /// Gets basic blob metadata
 /// </summary>
 /// <returns>Blob metadata or null if blob doesn't exist</returns>
 public static async Task <Blob> GetBlobAsync(this IBlobStorage storage,
                                              string fullPath, CancellationToken cancellationToken = default)
 {
     return((await storage.GetBlobsAsync(new[] { fullPath }, cancellationToken)).First());
 }
Beispiel #36
0
		public BlobTester(IBlobStorage blobStorage)
		{
			_blobStorage = blobStorage;
		}
Beispiel #37
0
 /// <summary>
 /// Set blob attributes
 /// </summary>
 public static Task SetBlobAsync(this IBlobStorage storage,
                                 Blob blob, CancellationToken cancellationToken = default)
 {
     return(storage.SetBlobsAsync(new[] { blob }, cancellationToken));
 }
Beispiel #38
0
 public OrderDao(Func<ConferenceRegistrationDbContext> contextFactory, IBlobStorage blobStorage, ITextSerializer serializer)
 {
     this.contextFactory = contextFactory;
     this.blobStorage = blobStorage;
     this.serializer = serializer;
 }
 public BlobDataRepository(IBlobStorage blobStorage, string container, string historyContainer)
 {
     _blobStorage      = blobStorage;
     _container        = container;
     _historyContainer = historyContainer;
 }
 public SpellcheckService(IBlobStorage blobs, ISpellcheckerFactory spellcheckerFactory)
 {
     _blobs = blobs;
     _spellcheckerFactory = spellcheckerFactory;
 }
Beispiel #41
0
 public CreateReplayHandler(IApiDbContext apiDbContext, IBlobStorage blobStorage, IMapper mapper)
 {
     _apiDbContext = apiDbContext;
     _blobStorage  = blobStorage;
     _mapper       = mapper;
 }