SG4MVC by Mark Flanagan
NuGet / site data
Details
Info
Name: SG4MVC
Runtime helpers used by code generated by Sg4Mvc.Generator
Author: Mark Flanagan
NuGet: https://www.nuget.org/packages/SG4MVC/
You can find more details at https://github.com/SG4MVC/SG4MVC
Source: https://github.com/SG4MVC/SG4MVC
Author
Mark Flanagan
Original Readme
SG4MVC
SG4MVC is a source generator for ASP.NET MVC Core apps that creates strongly typed helpers that eliminate the use of literal strings in many places.
It is a re-implementation of R4MVC using source generators.
R4MVC runs as you build, and currently has only been tested on net6.0
Get Started?
Just want to get started? Visit the Get Started page for installation and configuration instructions.
Benefits
Instead of
@Html.ActionLink("Dinner Details", "Details", "Dinners", new \{ id = Model.DinnerID }, null)
SG4MVC lets you write
@Html.ActionLink("Dinner Details", MVC.Dinners.Details(Model.DinnerID))
When you're using tag helpers, instead of
<a asp-action="Details" asp-controller="Dinners" asp-route-id="@Model.DinnerID">Dinner Details</a>
you can write (after registering Sg4Mvc tag helpers in _ViewImports.cshtml
with the directive: @addTagHelper *, Sg4Mvc
)
<a mvc-action="MVC.Dinners.Details(Model.DinnerID)">Dinner Details</a>
and that's just the beginning!
Use the following links to get started
- Install SG4MVC is distributed using using NuGet. Visit the Get Started page
- Discuss: Discuss it on GitHub
- Contribute
- History & release notes: change history
About
Generate strong typed HTML helpers for ASP.NET MVC projects.
How to use
Example (source csproj, source files)
- CSharp Project
- Program.cs
This is the CSharp Project that references SG4MVC
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SG4MVC" Version="0.9.4-beta" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="Sg4Mvc.GenerateSg4Mvc" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>
This is the use of SG4MVC in Program.cs
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
//app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.MapStaticAssets();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}")
.WithStaticAssets();
app.Run();
Generated Files
Those are taken from $(BaseIntermediateOutputPath)\GX
- MVC.cs
- MVCDemo_Controllers_HomeController.generated.cs
- MVCPages.cs
- Sg4Mvc.generated.cs
// <auto-generated />
// This file was generated by SG4MVC.
// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance
// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed
#pragma warning disable 1591, 3008, 3009, 0108, CS8981
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Routing;
using Sg4Mvc.ActionResults;
using Sg4Mvc;
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public static partial class MVC
{
public static readonly MVCDemo.Controllers.HomeController Home = new MVCDemo.Controllers.Sg4Mvc_HomeController();
public static readonly Sg4Mvc.SharedController Shared = new Sg4Mvc.SharedController();
}
#pragma warning restore 1591, 3008, 3009, 0108, CS8981
// <auto-generated />
// This file was generated by SG4MVC.
// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance
// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed
#pragma warning disable 1591, 3008, 3009, 0108, CS8981
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Routing;
using Sg4Mvc.ActionResults;
using Sg4Mvc;
namespace MVCDemo.Controllers
{
public partial class HomeController
{
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected HomeController(Dummy d)
{
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(IActionResult result)
{
var callInfo = result.GetSg4ActionResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(Task<IActionResult> taskResult)
{
return RedirectToAction(taskResult.Result);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToActionPermanent(IActionResult result)
{
var callInfo = result.GetSg4ActionResult();
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToActionPermanent(Task<IActionResult> taskResult)
{
return RedirectToActionPermanent(taskResult.Result);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToPage(IActionResult result)
{
var callInfo = result.GetSg4ActionResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToPage(Task<IActionResult> taskResult)
{
return RedirectToPage(taskResult.Result);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToPagePermanent(IActionResult result)
{
var callInfo = result.GetSg4ActionResult();
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToPagePermanent(Task<IActionResult> taskResult)
{
return RedirectToPagePermanent(taskResult.Result);
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public HomeController Actions => MVC.Home;
[GeneratedCode("Sg4Mvc", "1.0")]
public readonly string Area = "";
[GeneratedCode("Sg4Mvc", "1.0")]
public readonly string Name = "Home";
[GeneratedCode("Sg4Mvc", "1.0")]
public const string NameConst = "Home";
[GeneratedCode("Sg4Mvc", "1.0")]
static readonly ActionNamesClass s_ActionNames = new ActionNamesClass();
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public ActionNamesClass ActionNames => s_ActionNames;
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public class ActionNamesClass
{
public readonly string Index = "Index";
public readonly string Privacy = "Privacy";
public readonly string Error = "Error";
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public class ActionNameConstants
{
public const string Index = "Index";
public const string Privacy = "Privacy";
public const string Error = "Error";
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public class ViewsClass
{
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
public _ViewNamesClass ViewNames => s_ViewNames;
public class _ViewNamesClass
{
public readonly string Index = "Index";
public readonly string Privacy = "Privacy";
}
public readonly string Index = "~/Views/Home/Index.cshtml";
public readonly string Privacy = "~/Views/Home/Privacy.cshtml";
}
[GeneratedCode("Sg4Mvc", "1.0")]
static readonly ViewsClass s_Views = new ViewsClass();
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public ViewsClass Views => s_Views;
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public partial class Sg4Mvc_HomeController : MVCDemo.Controllers.HomeController
{
public Sg4Mvc_HomeController() : base(Dummy.Instance)
{
}
[NonAction]
partial void IndexOverride(Sg4Mvc_Mvc_ActionResult callInfo);
[NonAction]
public override Microsoft.AspNetCore.Mvc.IActionResult Index()
{
var callInfo = new Sg4Mvc_Mvc_ActionResult(Area, Name, ActionNames.Index);
IndexOverride(callInfo);
return callInfo;
}
[NonAction]
partial void PrivacyOverride(Sg4Mvc_Mvc_ActionResult callInfo);
[NonAction]
public override Microsoft.AspNetCore.Mvc.IActionResult Privacy()
{
var callInfo = new Sg4Mvc_Mvc_ActionResult(Area, Name, ActionNames.Privacy);
PrivacyOverride(callInfo);
return callInfo;
}
[NonAction]
partial void ErrorOverride(Sg4Mvc_Mvc_ActionResult callInfo);
[NonAction]
public override Microsoft.AspNetCore.Mvc.IActionResult Error()
{
var callInfo = new Sg4Mvc_Mvc_ActionResult(Area, Name, ActionNames.Error);
ErrorOverride(callInfo);
return callInfo;
}
}
}
#pragma warning restore 1591, 3008, 3009, 0108, CS8981
// <auto-generated />
// This file was generated by SG4MVC.
// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance
// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed
#pragma warning disable 1591, 3008, 3009, 0108, CS8981
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Routing;
using Sg4Mvc.ActionResults;
using Sg4Mvc;
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public static partial class MVCPages
{
}
#pragma warning restore 1591, 3008, 3009, 0108, CS8981
// <auto-generated />
// This file was generated by SG4MVC.
// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance
// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed
#pragma warning disable 1591, 3008, 3009, 0108, CS8981
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Routing;
using Sg4Mvc.ActionResults;
using Sg4Mvc;
namespace Sg4Mvc
{
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public partial class SharedController
{
public class ViewsClass
{
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
public _ViewNamesClass ViewNames => s_ViewNames;
public class _ViewNamesClass
{
public readonly string Error = "Error";
public readonly string _Layout = "_Layout";
public readonly string _ValidationScriptsPartial = "_ValidationScriptsPartial";
}
public readonly string Error = "~/Views/Shared/Error.cshtml";
public readonly string _Layout = "~/Views/Shared/_Layout.cshtml";
public readonly string _ValidationScriptsPartial = "~/Views/Shared/_ValidationScriptsPartial.cshtml";
}
static readonly ViewsClass s_Views = new ViewsClass();
public ViewsClass Views => s_Views;
}
}
[GeneratedCode("Sg4Mvc", "1.0"), DebuggerNonUserCode]
public static partial class Links
{
public const string UrlPath = "~";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class css
{
public const string UrlPath = "~/css";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string site_css = Url("site.css");
}
public static partial class js
{
public const string UrlPath = "~/js";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string site_js = Url("site.js");
}
public static partial class lib
{
public const string UrlPath = "~/lib";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class bootstrap
{
public const string UrlPath = "~/lib/bootstrap";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/bootstrap/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class css
{
public const string UrlPath = "~/lib/bootstrap/dist/css";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string bootstrap_grid_css = Url("bootstrap-grid.css");
public static readonly string bootstrap_grid_css_map = Url("bootstrap-grid.css.map");
public static readonly string bootstrap_grid_min_css = Url("bootstrap-grid.min.css");
public static readonly string bootstrap_grid_min_css_map = Url("bootstrap-grid.min.css.map");
public static readonly string bootstrap_grid_rtl_css = Url("bootstrap-grid.rtl.css");
public static readonly string bootstrap_grid_rtl_css_map = Url("bootstrap-grid.rtl.css.map");
public static readonly string bootstrap_grid_rtl_min_css = Url("bootstrap-grid.rtl.min.css");
public static readonly string bootstrap_grid_rtl_min_css_map = Url("bootstrap-grid.rtl.min.css.map");
public static readonly string bootstrap_reboot_css = Url("bootstrap-reboot.css");
public static readonly string bootstrap_reboot_css_map = Url("bootstrap-reboot.css.map");
public static readonly string bootstrap_reboot_min_css = Url("bootstrap-reboot.min.css");
public static readonly string bootstrap_reboot_min_css_map = Url("bootstrap-reboot.min.css.map");
public static readonly string bootstrap_reboot_rtl_css = Url("bootstrap-reboot.rtl.css");
public static readonly string bootstrap_reboot_rtl_css_map = Url("bootstrap-reboot.rtl.css.map");
public static readonly string bootstrap_reboot_rtl_min_css = Url("bootstrap-reboot.rtl.min.css");
public static readonly string bootstrap_reboot_rtl_min_css_map = Url("bootstrap-reboot.rtl.min.css.map");
public static readonly string bootstrap_utilities_css = Url("bootstrap-utilities.css");
public static readonly string bootstrap_utilities_css_map = Url("bootstrap-utilities.css.map");
public static readonly string bootstrap_utilities_min_css = Url("bootstrap-utilities.min.css");
public static readonly string bootstrap_utilities_min_css_map = Url("bootstrap-utilities.min.css.map");
public static readonly string bootstrap_utilities_rtl_css = Url("bootstrap-utilities.rtl.css");
public static readonly string bootstrap_utilities_rtl_css_map = Url("bootstrap-utilities.rtl.css.map");
public static readonly string bootstrap_utilities_rtl_min_css = Url("bootstrap-utilities.rtl.min.css");
public static readonly string bootstrap_utilities_rtl_min_css_map = Url("bootstrap-utilities.rtl.min.css.map");
public static readonly string bootstrap_css = Url("bootstrap.css");
public static readonly string bootstrap_css_map = Url("bootstrap.css.map");
public static readonly string bootstrap_min_css = Url("bootstrap.min.css");
public static readonly string bootstrap_min_css_map = Url("bootstrap.min.css.map");
public static readonly string bootstrap_rtl_css = Url("bootstrap.rtl.css");
public static readonly string bootstrap_rtl_css_map = Url("bootstrap.rtl.css.map");
public static readonly string bootstrap_rtl_min_css = Url("bootstrap.rtl.min.css");
public static readonly string bootstrap_rtl_min_css_map = Url("bootstrap.rtl.min.css.map");
}
public static partial class js
{
public const string UrlPath = "~/lib/bootstrap/dist/js";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string bootstrap_bundle_js = Url("bootstrap.bundle.js");
public static readonly string bootstrap_bundle_js_map = Url("bootstrap.bundle.js.map");
public static readonly string bootstrap_bundle_min_js = Url("bootstrap.bundle.min.js");
public static readonly string bootstrap_bundle_min_js_map = Url("bootstrap.bundle.min.js.map");
public static readonly string bootstrap_esm_js = Url("bootstrap.esm.js");
public static readonly string bootstrap_esm_js_map = Url("bootstrap.esm.js.map");
public static readonly string bootstrap_esm_min_js = Url("bootstrap.esm.min.js");
public static readonly string bootstrap_esm_min_js_map = Url("bootstrap.esm.min.js.map");
public static readonly string bootstrap_js = Url("bootstrap.js");
public static readonly string bootstrap_js_map = Url("bootstrap.js.map");
public static readonly string bootstrap_min_js = Url("bootstrap.min.js");
public static readonly string bootstrap_min_js_map = Url("bootstrap.min.js.map");
}
}
public static readonly string LICENSE = Url("LICENSE");
}
public static partial class jquery
{
public const string UrlPath = "~/lib/jquery";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string jquery_js = Url("jquery.js");
public static readonly string jquery_min_js = Url("jquery.min.js");
public static readonly string jquery_min_map = Url("jquery.min.map");
public static readonly string jquery_slim_js = Url("jquery.slim.js");
public static readonly string jquery_slim_min_js = Url("jquery.slim.min.js");
public static readonly string jquery_slim_min_map = Url("jquery.slim.min.map");
}
public static partial class validation
{
public const string UrlPath = "~/lib/jquery-validation";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string additional_methods_js = Url("additional-methods.js");
public static readonly string additional_methods_min_js = Url("additional-methods.min.js");
public static readonly string jquery_validate_js = Url("jquery.validate.js");
public static readonly string jquery_validate_min_js = Url("jquery.validate.min.js");
}
public static partial class unobtrusive
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string jquery_validate_unobtrusive_js = Url("jquery.validate.unobtrusive.js");
public static readonly string jquery_validate_unobtrusive_min_js = Url("jquery.validate.unobtrusive.min.js");
}
public static readonly string LICENSE_txt = Url("LICENSE.txt");
}
public static readonly string LICENSE_md = Url("LICENSE.md");
}
public static partial class validation_unobtrusive
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string jquery_validate_unobtrusive_js = Url("jquery.validate.unobtrusive.js");
public static readonly string jquery_validate_unobtrusive_min_js = Url("jquery.validate.unobtrusive.min.js");
}
public static readonly string LICENSE_txt = Url("LICENSE.txt");
}
public static readonly string LICENSE_txt = Url("LICENSE.txt");
}
public static partial class jquery_validation
{
public const string UrlPath = "~/lib/jquery-validation";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string additional_methods_js = Url("additional-methods.js");
public static readonly string additional_methods_min_js = Url("additional-methods.min.js");
public static readonly string jquery_validate_js = Url("jquery.validate.js");
public static readonly string jquery_validate_min_js = Url("jquery.validate.min.js");
}
public static partial class unobtrusive
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string jquery_validate_unobtrusive_js = Url("jquery.validate.unobtrusive.js");
public static readonly string jquery_validate_unobtrusive_min_js = Url("jquery.validate.unobtrusive.min.js");
}
public static readonly string LICENSE_txt = Url("LICENSE.txt");
}
public static readonly string LICENSE_md = Url("LICENSE.md");
}
public static partial class jquery_validation_unobtrusive
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static partial class dist
{
public const string UrlPath = "~/lib/jquery-validation-unobtrusive/dist";
public static string Url() => Sg4MvcHelpers.ProcessVirtualPath(UrlPath);
public static string Url(string fileName) => Sg4MvcHelpers.ProcessVirtualPath(UrlPath + "/" + fileName);
public static readonly string jquery_validate_unobtrusive_js = Url("jquery.validate.unobtrusive.js");
public static readonly string jquery_validate_unobtrusive_min_js = Url("jquery.validate.unobtrusive.min.js");
}
public static readonly string LICENSE_txt = Url("LICENSE.txt");
}
}
public static readonly string favicon_ico = Url("favicon.ico");
}
#pragma warning restore 1591, 3008, 3009, 0108, CS8981
Useful
Download Example (.NET C#)
Share SG4MVC
https://ignatandrei.github.io/RSCG_Examples/v2/docs/SG4MVC
aaa
Category "MVC" has the following generators:
1 SG4MVC