RocksSists هي أداة مفيدة تتيح لك رؤية جميع الطرق في تطبيق .NET الخاص بك بطريقة واضحة وموجزة. يمكنك بسهولة فحص الأساليب ، URIs ، وحدات التحكم ، والإجراءات ، والأدوات الوسيطة في طرقك ، وتخصيص الإخراج لتناسب احتياجاتك. تعمل RocksList مع .NET Core App 3.1 و .NET5.0 و .NET 6 و .NET7.0 وصفحات Razor و ASP.NET MVC و Blazor Server.
متوافق مع:




من nuget.org
Install-Package RoutesList فقط أضف services.AddRoutesList إلى Service ConfigursureSurs.
مثال:
بدء التشغيل
\ .. .
public void ConfigureServices ( IServiceCollection services )
{
\ .. .
services . AddRoutesList ( ) ;
}وأضف إلى طريقة تكوين
مثال:
بدء التشغيل
\ .. .
public void Configure (
IApplicationBuilder app ,
IWebHostEnvironment env ,
)
{
\ .. .
app . UseRoutesList ( ) ;
} نقطة النهاية الافتراضية: http://your_application_address/routes
مثال:
برنامج
using RoutesList . Gen ;
var builder = WebApplication . CreateBuilder ( args ) ;
// Add services to the container.
builder . Services . AddRazorPages ( ) ;
builder . Services . AddRoutesList ( ) ; < -- usage
var app = builder . Build ( ) ;
// Configure the HTTP request pipeline.
if ( ! app . Environment . IsDevelopment ( ) ) {
app . UseExceptionHandler ( "/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 . UseStaticFiles ( ) ;
app . UseRouting ( ) ;
app . UseAuthorization ( ) ;
app . MapRazorPages ( ) ;
app . UseRoutesList ( ) ; < -- usage
app . Run ( ) ;
public partial class Program { } public class Program
{
public static void Main ( string [ ] args )
{
var builder = WebApplication . CreateBuilder ( args ) ;
// Add services to the container.
builder . Services . AddRazorPages ( ) ;
builder . Services . AddServerSideBlazor ( ) ;
builder . Services . AddSingleton < WeatherForecastService > ( ) ;
builder . Services . AddRoutesList ( ) ;
var app = builder . Build ( ) ;
// Configure the HTTP request pipeline.
if ( ! app . Environment . IsDevelopment ( ) ) {
app . UseExceptionHandler ( "/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 . UseStaticFiles ( ) ;
app . UseRouting ( ) ;
app . MapBlazorHub ( ) ;
app . MapFallbackToPage ( "/_Host" ) ;
app . UseRoutesList ( options => {
options . SetAppAssembly ( typeof ( Program ) . Assembly ) ; < -- setup current application webassembly with blazor component
} ) ;
app . Run ( ) ;
}
} في app.useroutesList ، يمكنك تمرير الخيارات
| اسم | وصف |
|---|---|
| نقطة النهاية | اسم نقطة النهاية |
| عنوان | عنوان موقع الويب |
| SettableClasses | أضف فئات النماذج للجدول |
| setAppassembly | اضبط مجموعة التطبيق الحالية مع مكون Blazor |
بدء التشغيل
public void Configure (
IApplicationBuilder app ,
IWebHostEnvironment env ,
)
{
IDictionary < string , string [ ] > dict = new Dictionary < string , string [ ] > ( ) ;
string [ ] classes = dict [ "table" ] = new string [ 2 ] { "table" , "table-striped" } ;
app . UseRoutesList ( options => {
options . Endpoint = "your_new_endpoints" ;
options . Tittle = "Your new Title for site" ;
options . SetTableClasses ( classes ) ;
options . SetAppAssembly ( typeof ( Program ) . Assembly )
} ) ;
}برنامج
var builder = WebApplication . CreateBuilder ( args ) ;
// Add services to the container.
builder . Services . AddRazorPages ( ) ;
builder . Services . AddControllersWithViews ( ) ;
var app = builder . Build ( ) ;
// Configure the HTTP request pipeline.
if ( ! app . Environment . IsDevelopment ( ) )
{
app . UseExceptionHandler ( "/Error" ) ;
app . UseHsts ( ) ;
}
app . UseHttpsRedirection ( ) ;
app . UseStaticFiles ( ) ;
app . UseAuthorization ( ) ;
app . MapGet ( "/hi" , ( ) => "Hello!" ) ;
app . MapDefaultControllerRoute ( ) ;
app . MapRazorPages ( ) ;
app . UseRoutesList ( options => {
options . Endpoint = "your_new_endpoints" ;
options . Tittle = "Your new Title for site" ;
options . SetTableClasses ( classes ) ;
options . SetAppAssembly ( typeof ( Program ) . Assembly )
} ) ;
app . Run ( ) ; يتم الترحيب بالمساهمات دائمًا ، سواء كانت إضافة/اقتراح ميزات جديدة أو إصلاحات الأخطاء أو توثيق تنسيقات ملفات جديدة أو ببساطة تحرير بعض القواعد. لهذا ، قم بإنشاء مشكلة github جديدة وفضح مشكلتك وأضف علامة مشكلة للأخطاء/التحسين