Fast.NET.Core public API
Targets: net8.0;net9.0;net10.0. This is a declaration and XML-comment reference. See the module guide for usage and constraints.
Source commit: 43554c07f6c216f80b509bd535c0a5b66ae7f2e8. Maintained through scripts/export-dotnet-api.ps1 -Language en; ordinary site builds consume this file directly.
Fast.NET.Core.DaySentenceInfo
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class DaySentenceInfoDaily quotation information
Fast.NET.Core.DaySentenceInfo.Picture2
Source · Targets: net8.0, net9.0, net10.0
public string Picture2 { get; set; }Image 2
Fast.NET.Core.DaySentenceInfo.Caption
Source · Targets: net8.0, net9.0, net10.0
public string Caption { get; set; }Description
Fast.NET.Core.DaySentenceInfo.Note
Source · Targets: net8.0, net9.0, net10.0
public string Note { get; set; }Content
Fast.NET.Core.DaySentenceInfo.Content
Source · Targets: net8.0, net9.0, net10.0
public string Content { get; set; }English content
Fast.NET.Core.DaySentenceInfo.ShareImg
Source · Targets: net8.0, net9.0, net10.0
[JsonPropertyName("fenxiang_img")]
public string ShareImg { get; set; }Share image
Fast.NET.Core.DaySentenceInfo.DateTime
Source · Targets: net8.0, net9.0, net10.0
[JsonPropertyName("dateline")]
public DateTime DateTime { get; set; }Time
Fast.NET.Core.DiskInfo
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class DiskInfoDisk information
Fast.NET.Core.DiskInfo.DiskName
Source · Targets: net8.0, net9.0, net10.0
public string DiskName { get; set; }Disk name
Fast.NET.Core.DiskInfo.TypeName
Source · Targets: net8.0, net9.0, net10.0
public string TypeName { get; set; }Type name
Fast.NET.Core.DiskInfo.TotalFree
Source · Targets: net8.0, net9.0, net10.0
public decimal TotalFree { get; set; }Total free space
Fast.NET.Core.DiskInfo.TotalSize
Source · Targets: net8.0, net9.0, net10.0
public decimal TotalSize { get; set; }Total capacity
Fast.NET.Core.DiskInfo.Used
Source · Targets: net8.0, net9.0, net10.0
public decimal Used { get; set; }Used space
Fast.NET.Core.DiskInfo.AvailableFreeSpace
Source · Targets: net8.0, net9.0, net10.0
public decimal AvailableFreeSpace { get; set; }Available space
Fast.NET.Core.DiskInfo.AvailablePercent
Source · Targets: net8.0, net9.0, net10.0
public decimal AvailablePercent { get; set; }Usage percentage
Fast.NET.Core.FastContext
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class FastContextApplication context
Fast.NET.Core.FastContext.WebHostEnvironment
Source · Targets: net8.0, net9.0, net10.0
public static IWebHostEnvironment WebHostEnvironment { get; internal set; }Gets the web hosting environment
Fast.NET.Core.FastContext.HostEnvironment
Source · Targets: net8.0, net9.0, net10.0
public static IHostEnvironment HostEnvironment { get; internal set; }Gets the hosting environment
Fast.NET.Core.FastContext.InternalServices
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection InternalServices { get; internal set; }Application services
Fast.NET.Core.FastContext.WebApplication
Source · Targets: net8.0, net9.0, net10.0
public static IApplicationBuilder WebApplication { get; set; }Application builder
Fast.NET.Core.FastContext.RootServices
Source · Targets: net8.0, net9.0, net10.0
public static IServiceProvider RootServices { get; internal set; }Stores root services; may be null
Fast.NET.Core.FastContext.Configuration
Source · Targets: net8.0, net9.0, net10.0
public static IConfiguration Configuration { get; internal set; }Application configuration
Fast.NET.Core.FastContext.HttpContext
Source · Targets: net8.0, net9.0, net10.0
public static HttpContext HttpContext { get; }Request context
Fast.NET.Core.FastContext.GetService
Source · Targets: net8.0, net9.0, net10.0
public static TService GetService<TService>(IServiceProvider serviceProvider = null) where TService : classGets request-scoped services
- Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Type parameter
TService: Service type - Returns: The resolved request-scoped service
Fast.NET.Core.FastContext.GetService
Source · Targets: net8.0, net9.0, net10.0
public static object GetService(Type type, IServiceProvider serviceProvider = null)Gets request-scoped services
- Parameter
type: Target type - Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Returns: The resolved request-scoped service
Fast.NET.Core.FastContext.GetServices
Source · Targets: net8.0, net9.0, net10.0
public static IEnumerable<TService> GetServices<TService>(IServiceProvider serviceProvider = null) where TService : classGets the collection of request-scoped services
- Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Type parameter
TService: Service type - Returns: The resolved collection of request-scoped services
Fast.NET.Core.FastContext.GetServices
Source · Targets: net8.0, net9.0, net10.0
public static IEnumerable<object> GetServices(Type type, IServiceProvider serviceProvider = null)Gets the collection of request-scoped services
- Parameter
type: Target type - Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Returns: The resolved collection of request-scoped services
Fast.NET.Core.FastContext.GetRequiredService
Source · Targets: net8.0, net9.0, net10.0
public static TService GetRequiredService<TService>(IServiceProvider serviceProvider = null) where TService : classGets request-scoped services
- Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Type parameter
TService: Service type - Returns: The resolved request-scoped service
Fast.NET.Core.FastContext.GetRequiredService
Source · Targets: net8.0, net9.0, net10.0
public static object GetRequiredService(Type type, IServiceProvider serviceProvider = null)Gets request-scoped services
- Parameter
type: Target type - Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Returns: The resolved request-scoped service
Fast.NET.Core.FastContext.GetConfig
Source · Targets: net8.0, net9.0, net10.0
public static TOptions GetConfig<TOptions>(string path = null) where TOptions : class, new()Gets configuration
- Parameter
path: Corresponding configuration key - Type parameter
TOptions: Configuration options type - Returns: The retrieved configuration
Fast.NET.Core.FastContext.GetOptions
Source · Targets: net8.0, net9.0, net10.0
public static TOptions GetOptions<TOptions>() where TOptions : class, new()Configuration options
- Type parameter
TOptions: Configuration options type - Returns: Configuration options
Fast.NET.Core.FastContext.GetServiceLifetime
Source · Targets: net8.0, net9.0, net10.0
public static ServiceLifetime? GetServiceLifetime(Type serviceType)Gets the registered service lifetime
- Parameter
serviceType: Service type to look up - Returns: The registered lifetime of the service
Fast.NET.Core.CorsAccessorExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class CorsAccessorExtensionCORS extensions
Fast.NET.Core.CorsAccessorExtension.AddCorsAccessor
Source · Targets: net8.0, net9.0, net10.0
public static WebApplicationBuilder AddCorsAccessor(this WebApplicationBuilder builder)Adds CORS services
- Parameter
builder: Application builder to configure - Returns: Returns
builderfor chaining
Fast.NET.Core.CorsAccessorExtension.AddCorsAccessor
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddCorsAccessor(this IServiceCollection services, IConfiguration configuration,
string section = "CorsAccessorSettings")Adds CORS services
- Parameter
services: The service collection to add services to - Parameter
configuration: Configuration used to read module settings - Parameter
section: JSON configuration section key; defaults to CorsAccessorSettings - Returns: Returns
servicesfor chaining
Fast.NET.Core.CorsAccessorExtension.AddCorsAccessor
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddCorsAccessor(this IServiceCollection services,
Action<CorsAccessorSettingsOptions> optionAction)Adds CORS services
- Parameter
services: The service collection to add services to - Parameter
optionAction: CORS configuration callback - Returns: Returns
servicesfor chaining
Fast.NET.Core.GzipCompressionExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class GzipCompressionExtensionGzip compression extensions
Fast.NET.Core.GzipCompressionExtension.AddGzipCompression
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddGzipCompression(this IServiceCollection services)Adds Gzip compression
- Parameter
services: The service collection to add services to - Returns: Returns
servicesfor chaining
Fast.NET.Core.GzipCompressionExtension.UseGzipCompression
Source · Targets: net8.0, net9.0, net10.0
public static IApplicationBuilder UseGzipCompression(this IApplicationBuilder app)Enables Gzip compression
- Parameter
app: Application pipeline to configure - Returns: Returns
appfor chaining
Fast.NET.Core.HttpContextExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class HttpContextExtensionExtensions for HttpContext
Fast.NET.Core.HttpContextExtension.GetRequestMethod
Source · Targets: net8.0, net9.0, net10.0
public static HttpRequestMethodEnum GetRequestMethod(this HttpContext httpContext)Gets the request method
- Parameter
httpContext: Current request context - Returns: The request method, or
HttpRequestMethodEnum.Unknownwhen there is no current request context
Fast.NET.Core.IApplicationBuilderExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IApplicationBuilderExtensionExtensions for IApplicationBuilder
Fast.NET.Core.IApplicationBuilderExtension.EnableBuffering
Source · Targets: net8.0, net9.0, net10.0
public static IApplicationBuilder EnableBuffering(this IApplicationBuilder app)Enables repeated reading of the request body
Remarks: Register before app.UseRouting()
- Parameter
app: Application pipeline to configure - Returns: Returns
appfor chaining
Fast.NET.Core.IApplicationBuilderExtension.UseMapHub
Source · Targets: net8.0, net9.0, net10.0
public static IApplicationBuilder UseMapHub(this IApplicationBuilder app)Enables hubs
Remarks: Register after app.UseRouting()
- Parameter
app: Application pipeline to configure - Returns: Returns
appfor chaining
Fast.NET.Core.IConfigurationExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IConfigurationExtensionExtensions for IConfiguration
Fast.NET.Core.IConfigurationExtension.Reload
Source · Targets: net8.0, net9.0, net10.0
public static IConfiguration Reload(this IConfiguration configuration)Refreshes the configuration object
- Parameter
configuration: Configuration used to read module settings - Returns: Refreshes the configuration object
Fast.NET.Core.WebApplicationBuilderExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class WebApplicationBuilderExtensionExtensions for WebApplicationBuilder
Fast.NET.Core.WebApplicationBuilderExtension.Initialize
Source · Targets: net8.0, net9.0, net10.0
public static WebApplicationBuilder Initialize(this WebApplicationBuilder builder)Initializes the framework
- Parameter
builder: Application builder to configure - Returns: Returns
builderfor chaining
Fast.NET.Core.CorsAccessorSettingsOptions
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public sealed class CorsAccessorSettingsOptions : IPostConfigureCORS options
Fast.NET.Core.CorsAccessorSettingsOptions.PolicyName
Source · Targets: net8.0, net9.0, net10.0
[Required]
public string PolicyName { get; set; }Policy name
Fast.NET.Core.CorsAccessorSettingsOptions.WithOrigins
Source · Targets: net8.0, net9.0, net10.0
public string[] WithOrigins { get; set; }Allowed origin domains; all origins are allowed when not configured
Fast.NET.Core.CorsAccessorSettingsOptions.WithHeaders
Source · Targets: net8.0, net9.0, net10.0
public string[] WithHeaders { get; set; }Request headers; all headers are allowed when not configured
Fast.NET.Core.CorsAccessorSettingsOptions.WithExposedHeaders
Source · Targets: net8.0, net9.0, net10.0
public string[] WithExposedHeaders { get; set; }Sets response headers exposed to clients
Fast.NET.Core.CorsAccessorSettingsOptions.WithMethods
Source · Targets: net8.0, net9.0, net10.0
public string[] WithMethods { get; set; }Sets allowed CORS request methods; all are allowed when not configured
Fast.NET.Core.CorsAccessorSettingsOptions.AllowCredentials
Source · Targets: net8.0, net9.0, net10.0
public bool? AllowCredentials { get; set; }Whether credentials are allowed in cross-origin requests
Fast.NET.Core.CorsAccessorSettingsOptions.SetPreflightMaxAge
Source · Targets: net8.0, net9.0, net10.0
public int? SetPreflightMaxAge { get; set; }Sets the preflight cache lifetime
Fast.NET.Core.CorsAccessorSettingsOptions.FixedClientToken
Source · Targets: net8.0, net9.0, net10.0
public bool? FixedClientToken { get; set; }Makes token response headers accessible to frontend clients
Fast.NET.Core.CorsAccessorSettingsOptions.SignalRSupport
Source · Targets: net8.0, net9.0, net10.0
public bool? SignalRSupport { get; set; }Enables CORS support for SignalR
Fast.NET.Core.CorsAccessorSettingsOptions.PostConfigure
Source · Targets: net8.0, net9.0, net10.0
public void PostConfigure()Documentation is inherited from an interface or base class; consult that declaration.
Fast.NET.Core.AssemblyUtil
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class AssemblyUtilAssembly utilities
Fast.NET.Core.AssemblyUtil.GetAssembly
Source · Targets: net8.0, net9.0, net10.0
public static Assembly GetAssembly(string assemblyName)Gets a runtime assembly by assembly name
- Parameter
assemblyName: Target assembly name - Returns: Gets a runtime assembly by assembly name
Fast.NET.Core.AssemblyUtil.LoadAssembly
Source · Targets: net8.0, net9.0, net10.0
public static Assembly LoadAssembly(string path)Loads an assembly from a path
- Parameter
path: Absolute path - Returns: Loads an assembly from a path
Fast.NET.Core.AssemblyUtil.LoadAssembly
Source · Targets: net8.0, net9.0, net10.0
public static Assembly LoadAssembly(MemoryStream assembly)Loads an assembly from a stream
- Parameter
assembly: MemoryStream input - Returns: Loads an assembly from a stream
Fast.NET.Core.AssemblyUtil.GetType
Source · Targets: net8.0, net9.0, net10.0
public static Type GetType(string assemblyName, string typeFullName)Gets a runtime type by assembly name and fully qualified type name
- Parameter
assemblyName: Target assembly name - Parameter
typeFullName: Fully qualified target type name - Returns: Gets a runtime type by assembly name and fully qualified type name
Fast.NET.Core.AssemblyUtil.GetType
Source · Targets: net8.0, net9.0, net10.0
public static Type GetType(MemoryStream assembly, string typeFullName)Gets a runtime type from an assembly and fully qualified type name
- Parameter
assembly: MemoryStream input - Parameter
typeFullName: Fully qualified target type name - Returns: Gets a runtime type from an assembly and fully qualified type name
Fast.NET.Core.JsonUtils
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class JsonUtilsJSON utilities
Fast.NET.Core.JsonUtils.ReadJsonFile
Source · Targets: net8.0, net9.0, net10.0
public static IDictionary<string, string> ReadJsonFile(string path)Reads a JSON file
- Parameter
path: Target path - Returns: The JSON file content read
Fast.NET.Core.JsonUtils.ParseJson
Source · Targets: net8.0, net9.0, net10.0
public static IDictionary<string, string> ParseJson(string json)Parses a JSON string
- Parameter
json: JSON text to parse - Returns: The parsed JSON string
Fast.NET.Core.MachineUtil
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class MachineUtilMachine and operating system utilities
Fast.NET.Core.MachineUtil.IsUnix
Source · Targets: net8.0, net9.0, net10.0
public static bool IsUnix()Whether the operating system is Unix/Linux
- Returns: Returns
truewhen the condition is met; otherwisefalse
Fast.NET.Core.MachineUtil.IsMacOS
Source · Targets: net8.0, net9.0, net10.0
public static bool IsMacOS()Whether the operating system is macOS
- Returns: Returns
truewhen the condition is met; otherwisefalse
Fast.NET.Core.MachineUtil.GetOSDescription
Source · Targets: net8.0, net9.0, net10.0
public static string GetOSDescription()Gets the version description of the current operating system
- Returns: The macOS or Linux distribution version; on Windows, the operating system description supplied by the runtime
Fast.NET.Core.MachineUtil.GetSystemStartTime
Source · Targets: net8.0, net9.0, net10.0
public static DateTime GetSystemStartTime()Gets the system startup time
- Returns: The system startup time
Fast.NET.Core.MachineUtil.GetSystemRunTimes
Source · Targets: net8.0, net9.0, net10.0
public static string GetSystemRunTimes(string format = "dd\\ \\天\\ hh\\ \\时\\ mm\\ \\分\\ ss\\ \\秒")Gets a description of system uptime
- Parameter
format: Output format; the default uses two-digit day, hour, minute and second fields with Chinese unit labels - Returns: The formatted system uptime
Fast.NET.Core.MachineUtil.GetProgramStartTime
Source · Targets: net8.0, net9.0, net10.0
public static DateTime GetProgramStartTime()Gets the current process startup time
- Returns: The current process startup time
Fast.NET.Core.MachineUtil.GetProgramRunTimes
Source · Targets: net8.0, net9.0, net10.0
public static string GetProgramRunTimes(string format = "dd\\ \\天\\ hh\\ \\时\\ mm\\ \\分\\ ss\\ \\秒")Gets a description of current process uptime
- Parameter
format: Output format; the default uses two-digit day, hour, minute and second fields with Chinese unit labels - Returns: The formatted current process uptime
Fast.NET.Core.MachineUtil.GetSystemCpuRate
Source · Targets: net8.0, net9.0, net10.0
public static List<decimal> GetSystemCpuRate()Gets operating system CPU usage
- Returns: The collection of operating system CPU usage values
Fast.NET.Core.MachineUtil.GetProgramCpuUsage
Source · Targets: net8.0, net9.0, net10.0
public static async Task<decimal> GetProgramCpuUsage(int sleep = 500)Calculates current process CPU usage over the specified sampling interval
- Parameter
sleep: Sampling interval in milliseconds; defaults to 500 - Returns: A sampling task whose result is CPU usage as a percentage normalized by the number of logical processors
Fast.NET.Core.MachineUtil.GetSystemRamInfo
Source · Targets: net8.0, net9.0, net10.0
public static (decimal total, decimal used, decimal free) GetSystemRamInfo()Gets operating system memory information in MB
- Returns: total: total memory; used: used memory; free: available memory
Fast.NET.Core.MachineUtil.GetProgramMemoryInfo
Source · Targets: net8.0, net9.0, net10.0
public static (decimal working, decimal peakWorking, decimal virtualMemory, decimal peakVirtualMemory, decimal pagedMemory,
decimal peakPagedMemory) GetProgramMemoryInfo()Gets current process memory information in MB
- Returns: working: physical RAM; peakWorking: peak physical RAM; virtualMemory: virtual memory; peakVirtualMemory: peak virtual memory; pagedMemory: paged memory; peakPagedMemory: peak paged memory
Fast.NET.Core.MachineUtil.GetDiskInfos
Source · Targets: net8.0, net9.0, net10.0
public static List<DiskInfo> GetDiskInfos()Gets disk information
- Returns: The collection of disk information
Fast.NET.Core.RemoteRequestUtil
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class RemoteRequestUtilRemote request utilities based on HttpClient
Fast.NET.Core.RemoteRequestUtil.GetDaySentence
Source · Targets: net8.0, net9.0, net10.0
public static async Task<DaySentenceInfo> GetDaySentence()Gets the daily quotation
- Returns: A task whose result is the daily quotation
Fast.NET.Core.RemoteRequestUtil.Get
Source · Targets: net8.0, net9.0, net10.0
public static (T result, HttpResponseHeaders headers) Get<T>(string url, object param = null,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classSends an HTTP GET request
- Parameter
url: Request URL - Parameter
param: Request parameter object - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: HTTP GET request
Fast.NET.Core.RemoteRequestUtil.GetAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(T result, HttpResponseHeaders headers)> GetAsync<T>(string url, object param = null,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classAsynchronously sends an HTTP GET request
- Parameter
url: Request URL - Parameter
param: Request parameter object - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: A task representing the HTTP GET request and its result
Fast.NET.Core.RemoteRequestUtil.Get
Source · Targets: net8.0, net9.0, net10.0
public static (string result, HttpResponseHeaders headers) Get(string url, object param = null,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Sends an HTTP GET request
- Parameter
url: Request URL - Parameter
param: Request parameter object - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: HTTP GET request
Fast.NET.Core.RemoteRequestUtil.GetAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(string result, HttpResponseHeaders headers)> GetAsync(string url, object param = null,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Asynchronously sends an HTTP GET request
- Parameter
url: Request URL - Parameter
param: Request parameter object - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: A task representing the HTTP GET request and its result
Fast.NET.Core.RemoteRequestUtil.Post
Source · Targets: net8.0, net9.0, net10.0
public static (T result, HttpResponseHeaders headers) Post<T>(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classSends an HTTP POST request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: HTTP POST request
Fast.NET.Core.RemoteRequestUtil.PostAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(T result, HttpResponseHeaders headers)> PostAsync<T>(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classAsynchronously sends an HTTP POST request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: A task representing the HTTP POST request and its result
Fast.NET.Core.RemoteRequestUtil.Post
Source · Targets: net8.0, net9.0, net10.0
public static (string result, HttpResponseHeaders headers) Post(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Sends an HTTP POST request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: HTTP POST request
Fast.NET.Core.RemoteRequestUtil.PostAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(string result, HttpResponseHeaders headers)> PostAsync(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Asynchronously sends an HTTP POST request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: A task representing the HTTP POST request and its result
Fast.NET.Core.RemoteRequestUtil.Put
Source · Targets: net8.0, net9.0, net10.0
public static (T result, HttpResponseHeaders headers) Put<T>(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classSends an HTTP PUT request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: HTTP PUT request
Fast.NET.Core.RemoteRequestUtil.PutAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(T result, HttpResponseHeaders headers)> PutAsync<T>(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classAsynchronously sends an HTTP PUT request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: A task representing the HTTP PUT request and its result
Fast.NET.Core.RemoteRequestUtil.Put
Source · Targets: net8.0, net9.0, net10.0
public static (string result, HttpResponseHeaders headers) Put(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Sends an HTTP PUT request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: HTTP PUT request
Fast.NET.Core.RemoteRequestUtil.PutAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(string result, HttpResponseHeaders headers)> PutAsync(string url, object data,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Asynchronously sends an HTTP PUT request
- Parameter
url: Request URL - Parameter
data: Data to process or transmit - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: A task representing the HTTP PUT request and its result
Fast.NET.Core.RemoteRequestUtil.Delete
Source · Targets: net8.0, net9.0, net10.0
public static (T result, HttpResponseHeaders headers) Delete<T>(string url, IDictionary<string, string> headers = null,
bool paramEncode = false, int? timeout = 60) where T : classSends an HTTP DELETE request
- Parameter
url: Request URL - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: HTTP DELETE request
Fast.NET.Core.RemoteRequestUtil.DeleteAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(T result, HttpResponseHeaders headers)> DeleteAsync<T>(string url,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60) where T : classAsynchronously sends an HTTP DELETE request
- Parameter
url: Request URL - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Type parameter
T: Model type to deserialize the response body into - Returns: A task representing the HTTP DELETE request and its result
Fast.NET.Core.RemoteRequestUtil.Delete
Source · Targets: net8.0, net9.0, net10.0
public static (string result, HttpResponseHeaders headers) Delete(string url, IDictionary<string, string> headers = null,
bool paramEncode = false, int? timeout = 60)Sends an HTTP DELETE request
- Parameter
url: Request URL - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: HTTP DELETE request
Fast.NET.Core.RemoteRequestUtil.DeleteAsync
Source · Targets: net8.0, net9.0, net10.0
public static Task<(string result, HttpResponseHeaders headers)> DeleteAsync(string url,
IDictionary<string, string> headers = null, bool paramEncode = false, int? timeout = 60)Asynchronously sends an HTTP DELETE request
- Parameter
url: Request URL - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Text encoding used for request parameters - Parameter
timeout: Timeout in milliseconds - Returns: A task representing the HTTP DELETE request and its result
Fast.NET.Core.RemoteRequestUtil.SendAsync
Source · Targets: net8.0, net9.0, net10.0
public static async Task<(T result, HttpResponseHeaders headers)> SendAsync<T>(HttpMethod httpMethod, string url,
object urlParam = null, object bodyData = null, IDictionary<string, string> headers = null, bool paramEncode = false,
int? timeout = 60)Sends a request
- Parameter
httpMethod: HTTP request method - Parameter
url: Request URL - Parameter
urlParam: Query parameters appended to the request address - Parameter
bodyData: Data written to the request body - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Whether to encode URL parameters; defaults tofalse - Parameter
timeout: Request timeout; defaults to 60 seconds;nullmeans no timeout - Type parameter
T: Model type to deserialize the response body into - Returns: A task representing the request and its result
Fast.NET.Core.RemoteRequestUtil.SendAsync
Source · Targets: net8.0, net9.0, net10.0
public static async Task<(string result, HttpResponseHeaders headers)> SendAsync(HttpMethod httpMethod, string url,
object urlParam = null, object bodyData = null, IDictionary<string, string> headers = null, bool paramEncode = false,
int? timeout = 60)Sends a request
- Parameter
httpMethod: HTTP request method - Parameter
url: Request URL - Parameter
urlParam: Query parameters appended to the request address - Parameter
bodyData: Data written to the request body - Parameter
headers: HTTP headers sent with the request - Parameter
paramEncode: Whether to encode URL parameters; defaults tofalse - Parameter
timeout: Request timeout; defaults to 60 seconds;nullmeans no timeout - Returns: A task representing the request and its result
Fast.NET.Core.ShellUtil
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class ShellUtilSystem shell utilities
Fast.NET.Core.ShellUtil.Bash
Source · Targets: net8.0, net9.0, net10.0
public static string Bash(string command, int timeout = 0)Linux Bash command
- Parameter
command: Command text to execute - Parameter
timeout: Timeout in milliseconds - Returns: Linux Bash command
Fast.NET.Core.ShellUtil.Cmd
Source · Targets: net8.0, net9.0, net10.0
public static string Cmd(string command, string args = null, int timeout = 0)Windows Cmd command
- Parameter
command: Command text to execute - Parameter
args: Arguments used to format the message - Parameter
timeout: Timeout in milliseconds - Returns: Windows Cmd command
