![]() |
VOOZH | about |
dotnet add package Flowsy.Content --version 4.0.1
NuGet\Install-Package Flowsy.Content -Version 4.0.1
<PackageReference Include="Flowsy.Content" Version="4.0.1" />
<PackageVersion Include="Flowsy.Content" Version="4.0.1" />Directory.Packages.props
<PackageReference Include="Flowsy.Content" />Project file
paket add Flowsy.Content --version 4.0.1
#r "nuget: Flowsy.Content, 4.0.1"
#:package Flowsy.Content@4.0.1
#addin nuget:?package=Flowsy.Content&version=4.0.1Install as a Cake Addin
#tool nuget:?package=Flowsy.Content&version=4.0.1Install as a Cake Tool
Foundation components for content management.
This package provides only the interfaces needed by applications to inspect document content in a uniform way, but requiring them to provide their own implementation details.
The final implementation can be powered by the toolkit best suited for every use case, such as Mime-Detective or MimeKit.
// ContentInspector.cs
// using ...
using Flowsy.Content;
// using ...
public class ContentInspector : IContentInspector
{
public ContentDescriptor Inspect(string filePath)
{
ContentDescriptor descriptor;
// Inspect the file and assign value to descriptor;
return descriptor;
}
public ContentDescriptor Inspect(Stream stream, string? fileExtension = null)
{
ContentDescriptor descriptor;
// Inspect the stream and assign value to descriptor;
return descriptor;
}
public ContentDescriptor Inspect(ImmutableArray<byte> bytes, string? fileExtension = null)
{
ContentDescriptor descriptor;
// Inspect the bytes and assign value to descriptor;
return descriptor;
}
public ContentDescriptor Inspect(IEnumerable<byte> bytes, string? fileExtension = null)
{
ContentDescriptor descriptor;
// Inspect the bytes and assign value to descriptor;
return descriptor;
}
public ContentDescriptor Inspect(object content, string? fileExtension = null)
{
ContentDescriptor descriptor;
// Inspect then content and assign value to descriptor;
return descriptor;
}
}
// using ...
using Flowsy.Content;
// using ...
public class ContentValidator
{
private readonly IContentInspector _contentInspector;
private readonly string _allowedTypes;
public SomeService(IContentInspector _contentInspector, IEnumerable<string> allowedTypes)
{
_contentInspector = _contentInspector;
_allowedTypes = allowedTypes;
}
public void ValidateContent(Stream stream)
{
var contentDescriptor = _contentInspector.Inspect(stream);
var intersection = contentDescriptor.MimeTypes.Intersect(_allowedTypes);
if (intersection.Count() != contentDescriptor.MimeTypes.Count())
{
throw new ValidationException("Invalid content type.");
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on Flowsy.Content:
| Package | Downloads |
|---|---|
|
Flowsy.Web.Api
Foundation components for Web APIs. |
|
|
Flowsy.Web.Streaming
This package includes some services to use buffering when processing multipart requests. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1 | 321 | 10/29/2024 |
| 4.0.0 | 242 | 10/3/2024 |
| 3.2.3 | 678 | 9/28/2023 |
| 3.2.2 | 885 | 3/25/2023 |
| 3.2.1 | 948 | 2/27/2023 |
| 3.2.0 | 1,042 | 2/8/2023 |
| 3.1.1 | 478 | 2/8/2023 |
| 3.1.0 | 1,033 | 12/4/2022 |
| 3.0.5 | 596 | 11/20/2022 |
| 3.0.4 | 688 | 11/9/2022 |
| 3.0.3 | 604 | 11/8/2022 |
| 3.0.2 | 466 | 11/8/2022 |
| 3.0.1 | 464 | 11/8/2022 |
| 3.0.0 | 487 | 11/6/2022 |
| 2.1.1 | 821 | 11/6/2022 |
| 2.1.0 | 632 | 11/6/2022 |
| 2.0.0 | 636 | 11/6/2022 |
| 1.0.1 | 605 | 11/6/2022 |
| 1.0.0 | 595 | 11/6/2022 |