Add File Type and Detectors and Mime Type tools and Refactor Grouping ...
This commit is contained in:
@@ -50,7 +50,29 @@ namespace xCommons.Extensions
|
||||
.GetSection(ConfigurationNodeNames.SWAGGER_NODE);
|
||||
return xSwaggerConfigSection.Get<XSwaggerConfiguration>();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve File Type Detector Configuration ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static XFileTypeDetectorConfiguration GetXFileTypeDetectorConfiguration(this IConfiguration source)
|
||||
{
|
||||
//
|
||||
var section = source
|
||||
.GetSection(ConfigurationNodeNames.FILE_TYPE_DETECTOR_NODE);
|
||||
|
||||
//
|
||||
var result = section.Get<XFileTypeDetectorConfiguration>();
|
||||
if (result.IsNull())
|
||||
{
|
||||
result = new();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a ConfigurationSection to object Representation ...
|
||||
/// </summary>
|
||||
@@ -174,6 +196,6 @@ namespace xCommons.Extensions
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user