IL.VirtualViews 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package IL.VirtualViews --version 1.0.1                
NuGet\Install-Package IL.VirtualViews -Version 1.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="IL.VirtualViews" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IL.VirtualViews --version 1.0.1                
#r "nuget: IL.VirtualViews, 1.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 IL.VirtualViews as a Cake Addin
#addin nuget:?package=IL.VirtualViews&version=1.0.1

// Install IL.VirtualViews as a Cake Tool
#tool nuget:?package=IL.VirtualViews&version=1.0.1                

IL.VirtualViews

Library which allows virtually register *.cshtml file as .cs classes with special attributes.

How to use

  • Reference IL.VirtualViews in your project
  • Use registration extensions coming with library to activate functionality: (IServiceCollection)services.AddVirtualViewsCapabilities() or (WebApplicationBuilder)builder.AddVirtualViewsCapabilities()
  • Use [VirtualViewPath("")] attribute for your classes with path to a view you want to register virtually
  • Derive your class from IVirtualView interface and implement the content which view is supposed to have

Examples

[VirtualViewPath("/Views/Test.cshtml")]
class Sample : IVirtualView
{
    public string Content {get;} =
    """
    @model string

    @Html.Raw(Model)
    """;
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on IL.VirtualViews:

Package Downloads
IL.RulesBasedOutputCache

Rules based output cache.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.1 37 7/15/2024
1.2.0 41 7/15/2024
1.0.2 127 7/9/2024
1.0.1 68 7/9/2024