public static IBlobProvider Get <TContainer>( [NotNull] this IBlobProviderSelector selector) { Check.NotNull(selector, nameof(selector)); return(selector.Get(BlobContainerNameAttribute.GetContainerName <TContainer>())); }
public BlobContainerConfigurations Configure <TContainer>( Action <BlobContainerConfiguration> configureAction) { return(Configure( BlobContainerNameAttribute.GetContainerName <TContainer>(), configureAction )); }
public BlobContainerConfigurations() { _containers = new Dictionary <string, BlobContainerConfiguration> { //Add default container [BlobContainerNameAttribute.GetContainerName <DefaultContainer>()] = new BlobContainerConfiguration() }; }
/// <summary> /// Gets a named container. /// </summary> /// <param name="blobContainerFactory">The blob container manager</param> /// <param name="cancellationToken">Cancellation token</param> /// <returns> /// The container object. /// </returns> public static IBlobContainer Create <TContainer>( this IBlobContainerFactory blobContainerFactory, CancellationToken cancellationToken = default ) { return(blobContainerFactory.Create( BlobContainerNameAttribute.GetContainerName <TContainer>(), cancellationToken )); }
public void Should_Get_Specified_Name() { BlobContainerNameAttribute .GetContainerName <TestContainer2>() .ShouldBe("Test2"); }
public void Should_Get_Full_Class_Name_If_Not_Specified() { BlobContainerNameAttribute .GetContainerName <TestContainer1>() .ShouldBe(typeof(TestContainer1).FullName); }
public BlobContainerConfiguration GetConfiguration <TContainer>() { return(GetConfiguration(BlobContainerNameAttribute.GetContainerName <TContainer>())); }