public void Should_Get_Specified_Name() { var name = FileContainerNameAttribute .GetContainerName <TestContainer2>(); Assert.Equal("Test2", name); }
public static IFileProvider Get <TContainer>( [NotNull] this IFileProviderSelector selector) { Check.NotNull(selector, nameof(selector)); return(selector.Get(FileContainerNameAttribute.GetContainerName <TContainer>())); }
public void GetName_By_Type() { var expected = typeof(TestContainer3).FullName; var name = FileContainerNameAttribute.GetContainerName(typeof(TestContainer3)); Assert.Equal(expected, name); }
public FileContainerConfigurations Configure <TContainer>( Action <FileContainerConfiguration> configureAction) { return(Configure( FileContainerNameAttribute.GetContainerName <TContainer>(), configureAction )); }
public FileContainerConfigurations() { _containers = new Dictionary <string, FileContainerConfiguration> { //Add default container [FileContainerNameAttribute.GetContainerName <DefaultContainer>()] = new FileContainerConfiguration() }; }
public void Should_Get_Full_Class_Name_If_Not_Specified() { var expected = typeof(TestContainer1).FullName; var name = FileContainerNameAttribute .GetContainerName <TestContainer1>(); Assert.Equal(expected, name); }
public FileContainerConfiguration GetConfiguration <TContainer>() { return(GetConfiguration(FileContainerNameAttribute.GetContainerName <TContainer>())); }