Flowsy.Content 4.0.1

dotnet add package Flowsy.Content --version 4.0.1                
NuGet\Install-Package Flowsy.Content -Version 4.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Flowsy.Content" Version="4.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Flowsy.Content --version 4.0.1                
#r "nuget: Flowsy.Content, 4.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Flowsy.Content as a Cake Addin
#addin nuget:?package=Flowsy.Content&version=4.0.1

// Install Flowsy.Content as a Cake Tool
#tool nuget:?package=Flowsy.Content&version=4.0.1                

Flowsy Content

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.

Usage

// 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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.1 89 10/29/2024
4.0.0 92 10/3/2024
3.2.3 329 9/28/2023
3.2.2 621 3/25/2023
3.2.1 721 2/27/2023
3.2.0 779 2/8/2023
3.1.1 313 2/8/2023
3.1.0 819 12/4/2022
3.0.5 439 11/20/2022
3.0.4 509 11/9/2022
3.0.3 429 11/8/2022
3.0.2 304 11/8/2022
3.0.1 305 11/8/2022
3.0.0 320 11/6/2022
2.1.1 623 11/6/2022
2.1.0 456 11/6/2022
2.0.0 464 11/6/2022
1.0.1 431 11/6/2022
1.0.0 432 11/6/2022