Fast.Runtime 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.
System.ApiInfoAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Method)]
public class ApiInfoAttribute : AttributeAPI information
System.ApiInfoAttribute.Name
Source · Targets: net8.0, net9.0, net10.0
public string Name { get; set; }API name
System.ApiInfoAttribute.Action
Source · Targets: net8.0, net9.0, net10.0
public HttpRequestActionEnum Action { get; set; }Operation kind
System.ApiInfoAttribute.ApiInfoAttribute
Source · Targets: net8.0, net9.0, net10.0
public ApiInfoAttribute(string name)API information
- Parameter
name: API name
System.ApiInfoAttribute.ApiInfoAttribute
Source · Targets: net8.0, net9.0, net10.0
public ApiInfoAttribute(string name, HttpRequestActionEnum action)API information
- Parameter
name: API name - Parameter
action: HttpRequestActionEnum operation kind
System.FastEnumAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Enum)]
public class FastEnumAttribute : AttributeEnum attribute
Remarks: Identifies whether an enum can be written to the enum dictionary
System.FastEnumAttribute.ChName
Source · Targets: net8.0, net9.0, net10.0
public string ChName { get; set; }Chinese name
System.FastEnumAttribute.EnName
Source · Targets: net8.0, net9.0, net10.0
public string EnName { get; set; }English name
System.FastEnumAttribute.Remark
Source · Targets: net8.0, net9.0, net10.0
public string Remark { get; set; }Remarks
System.FastEnumAttribute.FastEnumAttribute
Source · Targets: net8.0, net9.0, net10.0
public FastEnumAttribute()Enum attribute
Remarks: Identifies whether an enum can be written to the enum dictionary
System.FastEnumAttribute.FastEnumAttribute
Source · Targets: net8.0, net9.0, net10.0
public FastEnumAttribute(string chName, string enName, string remark)Enum attribute
Remarks: Identifies whether an enum can be written to the enum dictionary
- Parameter
chName: Chinese display name - Parameter
enName: English display name - Parameter
remark: Additional notes
System.FastEnumAttribute.FastEnumAttribute
Source · Targets: net8.0, net9.0, net10.0
public FastEnumAttribute(string chName, string enName)Enum attribute
Remarks: Identifies whether an enum can be written to the enum dictionary
- Parameter
chName: Chinese display name - Parameter
enName: English display name
System.FastEnumAttribute.FastEnumAttribute
Source · Targets: net8.0, net9.0, net10.0
public FastEnumAttribute(string chName)Enum attribute
Remarks: Identifies whether an enum can be written to the enum dictionary
- Parameter
chName: Chinese display name
System.MapHubAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class MapHubAttribute : AttributeHub configuration attribute
System.MapHubAttribute.Pattern
Source · Targets: net8.0, net9.0, net10.0
public string Pattern { get; set; }Configures the endpoint route
System.MapHubAttribute.MapHubAttribute
Source · Targets: net8.0, net9.0, net10.0
public MapHubAttribute(string pattern)Initializes a new instance of the class
- Parameter
pattern: Pattern used to match target entries
System.SuppressSnifferAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Class
| AttributeTargets.Interface
| AttributeTargets.Method
| AttributeTargets.Enum
| AttributeTargets.Struct)]
public class SuppressSnifferAttribute : AttributeAttribute excluding an item from scanning and discovery
Remarks: Used when scanning assembly types or methods
System.ComponentModel.DataAnnotations.DateTimeRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class DateTimeRequiredAttribute : ValidationAttributeValidates a required DateTime property
Remarks: Must be between 1949-10-01 and 2099-12-31 by default
System.ComponentModel.DataAnnotations.DateTimeRequiredAttribute.MinValue
Source · Targets: net8.0, net9.0, net10.0
public DateTime MinValue { get; set; } = new(1949, 10, 01, 00, 00, 00);Minimum value
System.ComponentModel.DataAnnotations.DateTimeRequiredAttribute.MaxValue
Source · Targets: net8.0, net9.0, net10.0
public DateTime MaxValue { get; set; } = new(2099, 12, 31, 23, 59, 59);Maximum value
System.ComponentModel.DataAnnotations.DateTimeRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.DecimalRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class DecimalRequiredAttribute : ValidationAttributeValidates a required decimal property
System.ComponentModel.DataAnnotations.DecimalRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = true;Allow zero
System.ComponentModel.DataAnnotations.DecimalRequiredAttribute.AllowNegative
Source · Targets: net8.0, net9.0, net10.0
public bool AllowNegative { get; set; } = false;Allow negative numbers
System.ComponentModel.DataAnnotations.DecimalRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.DoubleRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class DoubleRequiredAttribute : ValidationAttributeValidates a required double property
System.ComponentModel.DataAnnotations.DoubleRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = true;Allow zero
System.ComponentModel.DataAnnotations.DoubleRequiredAttribute.AllowNegative
Source · Targets: net8.0, net9.0, net10.0
public bool AllowNegative { get; set; } = false;Allow negative numbers
System.ComponentModel.DataAnnotations.DoubleRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.EnumRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class EnumRequiredAttribute : ValidationAttributeValidates a required Enum property
Remarks: By default, checks whether the current value belongs to the enum; implement other validation separately
System.ComponentModel.DataAnnotations.EnumRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = false;Allow zero
Remarks: Commonly used when the default enum value is None = 0 but selecting it is prohibited
System.ComponentModel.DataAnnotations.EnumRequiredAttribute.FlagEnum
Source · Targets: net8.0, net9.0, net10.0
public bool FlagEnum { get; set; } = false;Flags enum
System.ComponentModel.DataAnnotations.EnumRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.FloatRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class FloatRequiredAttribute : ValidationAttributeValidates a required float property
System.ComponentModel.DataAnnotations.FloatRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = true;Allow zero
System.ComponentModel.DataAnnotations.FloatRequiredAttribute.AllowNegative
Source · Targets: net8.0, net9.0, net10.0
public bool AllowNegative { get; set; } = false;Allow negative numbers
System.ComponentModel.DataAnnotations.FloatRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.IntRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class IntRequiredAttribute : ValidationAttributeValidates a required int property
System.ComponentModel.DataAnnotations.IntRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = false;Allow zero
System.ComponentModel.DataAnnotations.IntRequiredAttribute.AllowNegative
Source · Targets: net8.0, net9.0, net10.0
public bool AllowNegative { get; set; } = false;Allow negative numbers
System.ComponentModel.DataAnnotations.IntRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.LongRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class LongRequiredAttribute : ValidationAttributeValidates a required long property
System.ComponentModel.DataAnnotations.LongRequiredAttribute.AllowZero
Source · Targets: net8.0, net9.0, net10.0
public bool AllowZero { get; set; } = false;Allow zero
System.ComponentModel.DataAnnotations.LongRequiredAttribute.AllowNegative
Source · Targets: net8.0, net9.0, net10.0
public bool AllowNegative { get; set; } = false;Allow negative numbers
System.ComponentModel.DataAnnotations.LongRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
System.ComponentModel.DataAnnotations.StringRequiredAttribute
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class StringRequiredAttribute : ValidationAttributeValidates a required string property
System.ComponentModel.DataAnnotations.StringRequiredAttribute.AllowEmptyString
Source · Targets: net8.0, net9.0, net10.0
public bool AllowEmptyString { get; set; } = false;Allow empty strings
System.ComponentModel.DataAnnotations.StringRequiredAttribute.AllowWhitespace
Source · Targets: net8.0, net9.0, net10.0
public bool AllowWhitespace { get; set; } = true;Allow leading and trailing spaces
System.ComponentModel.DataAnnotations.StringRequiredAttribute.IsValid
Source · Targets: net8.0, net9.0, net10.0
public override bool IsValid(object value)Documentation is inherited from an interface or base class; consult that declaration.
Fast.Runtime.UserAgentInfo
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class UserAgentInfoUser-agent information
Fast.Runtime.UserAgentInfo.Device
Source · Targets: net8.0, net9.0, net10.0
public string Device { get; set; }Device
Fast.Runtime.UserAgentInfo.OS
Source · Targets: net8.0, net9.0, net10.0
public string OS { get; set; }Operating system and version
Fast.Runtime.UserAgentInfo.Browser
Source · Targets: net8.0, net9.0, net10.0
public string Browser { get; set; }Browser and version
Fast.Runtime.WanNetIPInfo
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class WanNetIPInfoPublic IP information
Fast.Runtime.WanNetIPInfo.Ip
Source · Targets: net8.0, net9.0, net10.0
public string Ip { get; set; }IP address
Fast.Runtime.WanNetIPInfo.Province
Source · Targets: net8.0, net9.0, net10.0
public string Province { get; set; }Province
Fast.Runtime.WanNetIPInfo.ProvinceZipCode
Source · Targets: net8.0, net9.0, net10.0
public string ProvinceZipCode { get; set; }Province postal code
Fast.Runtime.WanNetIPInfo.City
Source · Targets: net8.0, net9.0, net10.0
public string City { get; set; }City
Fast.Runtime.WanNetIPInfo.CityZipCode
Source · Targets: net8.0, net9.0, net10.0
public string CityZipCode { get; set; }City postal code
Fast.Runtime.WanNetIPInfo.Address
Source · Targets: net8.0, net9.0, net10.0
public string Address { get; set; }Geographic information
Fast.Runtime.WanNetIPInfo.Operator
Source · Targets: net8.0, net9.0, net10.0
public string Operator { get; }Network operator
Fast.Runtime.ConsoleWriter
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public sealed class ConsoleWriterColor and text output context for synchronous console-write callbacks
Remarks: Use only inside the current write callback; color settings are ignored when output is redirected
Fast.Runtime.ConsoleWriter.ForegroundColor
Source · Targets: net8.0, net9.0, net10.0
public ConsoleColor ForegroundColor { get; set; }Current console foreground color; setting it has no effect when output is redirected
Fast.Runtime.ConsoleWriter.BackgroundColor
Source · Targets: net8.0, net9.0, net10.0
public ConsoleColor BackgroundColor { get; set; }Current console background color; setting it has no effect when output is redirected
Fast.Runtime.ConsoleWriter.Write
Source · Targets: net8.0, net9.0, net10.0
public void Write(string value)Writes text without appending a newline
- Parameter
value: Text to write; writes nothing whennull
Fast.Runtime.ConsoleWriter.Write
Source · Targets: net8.0, net9.0, net10.0
public void Write(object value)Writes an object's text representation without appending a newline
- Parameter
value: Object to write; writes nothing whennull
Fast.Runtime.ConsoleWriter.WriteLine
Source · Targets: net8.0, net9.0, net10.0
public void WriteLine()Writes a newline
Fast.Runtime.ConsoleWriter.WriteLine
Source · Targets: net8.0, net9.0, net10.0
public void WriteLine(string value)Writes text followed by a newline
- Parameter
value: Text to write; writes only a newline whennull
Fast.Runtime.ConsoleWriter.WriteLine
Source · Targets: net8.0, net9.0, net10.0
public void WriteLine(object value)Writes an object's text representation followed by a newline
- Parameter
value: Object to write; writes only a newline whennull
Fast.Runtime.ConsoleWriter.ResetColor
Source · Targets: net8.0, net9.0, net10.0
public void ResetColor()Restores the foreground and background colors present when the current write callback began
System.MAppContext
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class MAppContextMicrosoft App context
System.MAppContext.AssemblyVersion
Source · Targets: net8.0, net9.0, net10.0
public static readonly string AssemblyVersion;Entry assembly version
System.MAppContext.RuntimeLibraries
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<DependencyLibrary> RuntimeLibraries;Application runtime libraries
System.MAppContext.Assemblies
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<Assembly> Assemblies;Effective application assemblies
System.MAppContext.ProjectAssemblies
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<Assembly> ProjectAssemblies;Effective assemblies from locally referenced projects
System.MAppContext.Types
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<Type> Types;Types from effective assemblies
Remarks: All public types
System.MAppContext.EffectiveTypes
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<Type> EffectiveTypes;Types from effective assemblies
Remarks: Excludes types decorated with SuppressSnifferAttribute
System.MAppContext.ProjectEffectiveTypes
Source · Targets: net8.0, net9.0, net10.0
public static readonly IEnumerable<Type> ProjectEffectiveTypes;Types from effective locally referenced project assemblies
Remarks: Excludes types decorated with SuppressSnifferAttribute
System.MAppContext.UnmanagedObjects
Source · Targets: net8.0, net9.0, net10.0
public static ConcurrentBag<IDisposable> UnmanagedObjects { get; private set; }Collection of unmanaged objects
System.MAppContext.ConsoleWrite
Source · Targets: net8.0, net9.0, net10.0
public static void ConsoleWrite(Action<ConsoleWriter> action)Synchronously writes to the console and automatically restores the original foreground and background colors
- Parameter
action: Synchronous callback using the color and text output context
Remarks: Write callbacks on the same output stream run serially. Original colors are restored whether the callback completes or throws. Redirected output ignores colors and writes text only; callback exceptions propagate to the caller
- Throws
ArgumentNullException:actionisnull
System.MAppContext.CatchOrDefault
Source · Targets: net8.0, net9.0, net10.0
public static T CatchOrDefault<T>(Func<T> action, T defaultValue = null) where T : classHandles exceptions while retrieving an object
- Parameter
action: Operation delegate to execute - Parameter
defaultValue: Default value used when the operation cannot produce a result - Type parameter
T: Reference type returned by the operation - Returns: Handles exceptions while retrieving an object
System.MAppContext.GetOptionName
Source · Targets: net8.0, net9.0, net10.0
public static string GetOptionName<TOptions>() where TOptions : class, new()Gets the options name
- Type parameter
TOptions: Configuration options type - Returns: Retrieved options name
System.MAppContext.GetServiceProvider
Source · Targets: net8.0, net9.0, net10.0
public static IServiceProvider GetServiceProvider(Type serviceType, IServiceProvider rootServices,
IServiceCollection internalServices, HttpContext httpContext)Resolves the service provider
- Parameter
serviceType: Service type to look up - Parameter
rootServices: Application root service provider - Parameter
internalServices: Service collection used internally by the framework - Parameter
httpContext: Current request context - Returns: Resolved service provider
System.MAppContext.GetCurrentStartupUri
Source · Targets: net8.0, net9.0, net10.0
public static Uri GetCurrentStartupUri(IServer server)Gets the current application's startup URI
Remarks: Returns the first address by default and may be empty; do not use during application startup
- Parameter
server: Target service instance - Returns: Current application's startup URI
System.MAppContext.GetThreadId
Source · Targets: net8.0, net9.0, net10.0
public static int GetThreadId()Gets the current thread ID
- Returns: Current thread ID
System.MAppContext.GetTraceId
Source · Targets: net8.0, net9.0, net10.0
public static string GetTraceId(IServiceProvider rootServices, HttpContext httpContext)Gets the current request's TraceId
- Parameter
rootServices: Application root service provider - Parameter
httpContext: Current request context - Returns: Current request's TraceId
System.MAppContext.GetExecutionTime
Source · Targets: net8.0, net9.0, net10.0
public static long GetExecutionTime(Action action)Measures execution time for a block of code
- Parameter
action: Operation delegate to execute - Returns: Measured code execution time
System.MAppContext.AddUnmanagedObjects
Source · Targets: net8.0, net9.0, net10.0
public static void AddUnmanagedObjects(IDisposable dsp)Adds an unmanaged object
- Parameter
dsp: Service provider used to resolve dynamic services - Throws
ArgumentNullException:dspisnull
System.MAppContext.DisposeUnmanagedObjects
Source · Targets: net8.0, net9.0, net10.0
public static void DisposeUnmanagedObjects()Disposes all unmanaged objects
System.Debugging
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class DebuggingWrites event information to the event manager
System.Debugging.WriteLine
Source · Targets: net8.0, net9.0, net10.0
public static void WriteLine(int level, string message)Writes one line of event information
- Parameter
level: Information levels: trace, information, warning, error, file, tip, search, and clock - Parameter
message: Message to record or return
System.Debugging.WriteLine
Source · Targets: net8.0, net9.0, net10.0
public static void WriteLine(int level, string message, params object[] args)Writes one line of event information
- Parameter
level: Information levels: trace, information, warning, error, file, tip, search, and clock - Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message)Writes a trace event
- Parameter
message: Message to record or return
System.Debugging.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message, params object[] args)Writes a trace event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Info
Source · Targets: net8.0, net9.0, net10.0
public static void Info(string message)Writes an information event
- Parameter
message: Message to record or return
System.Debugging.Info
Source · Targets: net8.0, net9.0, net10.0
public static void Info(string message, params object[] args)Writes an information event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Warn
Source · Targets: net8.0, net9.0, net10.0
public static void Warn(string message)Writes a warning event
- Parameter
message: Message to record or return
System.Debugging.Warn
Source · Targets: net8.0, net9.0, net10.0
public static void Warn(string message, params object[] args)Writes a warning event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message)Writes an error event
- Parameter
message: Message to record or return
System.Debugging.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message, params object[] args)Writes an error event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.File
Source · Targets: net8.0, net9.0, net10.0
public static void File(string message)Writes a file event
- Parameter
message: Message to record or return
System.Debugging.File
Source · Targets: net8.0, net9.0, net10.0
public static void File(string message, params object[] args)Writes a file event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Tip
Source · Targets: net8.0, net9.0, net10.0
public static void Tip(string message)Writes a tip event
- Parameter
message: Message to record or return
System.Debugging.Tip
Source · Targets: net8.0, net9.0, net10.0
public static void Tip(string message, params object[] args)Writes a tip event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Search
Source · Targets: net8.0, net9.0, net10.0
public static void Search(string message)Writes a search event
- Parameter
message: Message to record or return
System.Debugging.Search
Source · Targets: net8.0, net9.0, net10.0
public static void Search(string message, params object[] args)Writes a search event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.Clock
Source · Targets: net8.0, net9.0, net10.0
public static void Clock(string message)Writes a clock event
- Parameter
message: Message to record or return
System.Debugging.Clock
Source · Targets: net8.0, net9.0, net10.0
public static void Clock(string message, params object[] args)Writes a clock event
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
System.Debugging.GetLevelEmoji
Source · Targets: net8.0, net9.0, net10.0
public static string GetLevelEmoji(int level)Gets the emoji for an information level
- Parameter
level: Log level - Returns: Emoji for the information level
System.AppEnvironmentEnum
Source · Targets: net8.0, net9.0, net10.0
[Flags]
[FastEnum("App运行环境枚举")]
public enum AppEnvironmentEnum : longApplication runtime environment enum
System.AppEnvironmentEnum.Web
Source · Targets: net8.0, net9.0, net10.0
[Description("Web")]
Web = 1Web
System.AppEnvironmentEnum.Windows
Source · Targets: net8.0, net9.0, net10.0
[Description("Windows")]
Windows = 2Windows
System.AppEnvironmentEnum.Mac
Source · Targets: net8.0, net9.0, net10.0
[Description("Mac")]
Mac = 4Mac
System.AppEnvironmentEnum.Linux
Source · Targets: net8.0, net9.0, net10.0
[Description("Linux")]
Linux = 8Linux
System.AppEnvironmentEnum.Android
Source · Targets: net8.0, net9.0, net10.0
[Description("Android")]
Android = 32Android
System.AppEnvironmentEnum.IOS
Source · Targets: net8.0, net9.0, net10.0
[Description("IOS")]
IOS = 64IOS
System.AppEnvironmentEnum.QuickApp
Source · Targets: net8.0, net9.0, net10.0
[Description("快应用")]
QuickApp = 128Quick App
System.AppEnvironmentEnum.WeChatMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("微信小程序")]
WeChatMiniProgram = 256WeChat Mini Program
System.AppEnvironmentEnum.WeChatOfficialAccount
Source · Targets: net8.0, net9.0, net10.0
[Description("微信公众号")]
WeChatOfficialAccount = 512WeChat public account
System.AppEnvironmentEnum.WeChatServiceAccount
Source · Targets: net8.0, net9.0, net10.0
[Description("微信服务号")]
WeChatServiceAccount = 1024WeChat service account
System.AppEnvironmentEnum.WeChatOpenPlatform
Source · Targets: net8.0, net9.0, net10.0
[Description("微信开放平台")]
WeChatOpenPlatform = 2048WeChat Open Platform
System.AppEnvironmentEnum.WorkWeChat
Source · Targets: net8.0, net9.0, net10.0
[Description("企业微信")]
WorkWeChat = 4096WeCom
System.AppEnvironmentEnum.AlipayMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("支付宝小程序")]
AlipayMiniProgram = 8192Alipay Mini Program
System.AppEnvironmentEnum.TiktokMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("抖音小程序")]
TiktokMiniProgram = 16384Douyin Mini Program
System.AppEnvironmentEnum.DingTalkMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("钉钉小程序")]
DingTalkMiniProgram = 32768DingTalk Mini Program
System.AppEnvironmentEnum.FeiShuMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("飞书小程序")]
FeiShuMiniProgram = 65536Feishu Mini Program
System.AppEnvironmentEnum.QQMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("QQ小程序")]
QQMiniProgram = 131072QQ Mini Program
System.AppEnvironmentEnum.BaiduMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("百度小程序")]
BaiduMiniProgram = 262144Baidu Mini Program
System.AppEnvironmentEnum.KuaiShouMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("快手小程序")]
KuaiShouMiniProgram = 524288Kuaishou Mini Program
System.AppEnvironmentEnum.XiaoHongShuMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("小红书小程序")]
XiaoHongShuMiniProgram = 1048576Xiaohongshu Mini Program
System.AppEnvironmentEnum.JDMiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("京东小程序")]
JDMiniProgram = 2097152JD Mini Program
System.AppEnvironmentEnum.Api
Source · Targets: net8.0, net9.0, net10.0
[Description("Api")]
Api = 2147483648API
System.AppEnvironmentEnum.Other
Source · Targets: net8.0, net9.0, net10.0
[Description("其他")]
Other = 4294967296Other
System.AppEnvironmentEnum.Desktop
Source · Targets: net8.0, net9.0, net10.0
[Description("桌面端")]
Desktop = Windows | Mac | LinuxDesktop
System.AppEnvironmentEnum.Mobile
Source · Targets: net8.0, net9.0, net10.0
[Description("移动端")]
Mobile = Android | IOSMobile
System.AppEnvironmentEnum.MobileThree
Source · Targets: net8.0, net9.0, net10.0
[Description("移动端(三端)")]
MobileThree = Android | IOS | MiniProgramMobile (three platforms)
System.AppEnvironmentEnum.MiniProgram
Source · Targets: net8.0, net9.0, net10.0
[Description("小程序")]
MiniProgram = QuickApp
| WeChatMiniProgram
| AlipayMiniProgram
| TiktokMiniProgram
| DingTalkMiniProgram
| FeiShuMiniProgram
| QQMiniProgram
| BaiduMiniProgram
| KuaiShouMiniProgram
| XiaoHongShuMiniProgram
| JDMiniProgramMini Program
System.EnvironmentTypeEnum
Source · Targets: net8.0, net9.0, net10.0
[Flags]
[FastEnum("环境类型枚举")]
public enum EnvironmentTypeEnum : byteEnvironment type enum
System.EnvironmentTypeEnum.Production
Source · Targets: net8.0, net9.0, net10.0
[Description("生产环境")]
Production = 1Production environment
Remarks: Live production environment
System.EnvironmentTypeEnum.Development
Source · Targets: net8.0, net9.0, net10.0
[Description("开发环境")]
Development = 2Development environment
Remarks: Local development environment
System.EnvironmentTypeEnum.Test
Source · Targets: net8.0, net9.0, net10.0
[Description("测试环境")]
Test = 4Test environment
Remarks: Functional testing environment for verifying features or fixes
System.EnvironmentTypeEnum.UAT
Source · Targets: net8.0, net9.0, net10.0
[Description("测试验收环境")]
UAT = 8UAT acceptance testing environment
Remarks: Acceptance testing environment for checking requirements and expectations
System.EnvironmentTypeEnum.PreProduction
Source · Targets: net8.0, net9.0, net10.0
[Description("预生产环境")]
PreProduction = 16PreProduction environment
Remarks: Preproduction environment for final testing and verification
System.EnvironmentTypeEnum.GrayDeployment
Source · Targets: net8.0, net9.0, net10.0
[Description("灰度环境")]
GrayDeployment = 32GrayDeployment environment
Remarks: Staged rollout environment for limited testing and acceptance before production deployment
System.EnvironmentTypeEnum.StressTest
Source · Targets: net8.0, net9.0, net10.0
[Description("压测环境")]
StressTest = 64StressTest environment
Remarks: Environment for load and stress testing
System.HttpRequestActionEnum
Source · Targets: net8.0, net9.0, net10.0
[FastEnum("Http请求行为枚举")]
public enum HttpRequestActionEnumHTTP request action enum
System.HttpRequestActionEnum.None
Source · Targets: net8.0, net9.0, net10.0
[Description("未知")]
None = 0Unknown
System.HttpRequestActionEnum.Auth
Source · Targets: net8.0, net9.0, net10.0
[Description("鉴权")]
Auth = 1Authentication
System.HttpRequestActionEnum.Paged
Source · Targets: net8.0, net9.0, net10.0
[Description("分页")]
Paged = 11Pagination
System.HttpRequestActionEnum.Query
Source · Targets: net8.0, net9.0, net10.0
[Description("查询")]
Query = 12Query
System.HttpRequestActionEnum.Add
Source · Targets: net8.0, net9.0, net10.0
[Description("添加")]
Add = 21Add
System.HttpRequestActionEnum.Edit
Source · Targets: net8.0, net9.0, net10.0
[Description("编辑")]
Edit = 31Edit
System.HttpRequestActionEnum.Delete
Source · Targets: net8.0, net9.0, net10.0
[Description("删除")]
Delete = 41Delete
System.HttpRequestActionEnum.Submit
Source · Targets: net8.0, net9.0, net10.0
[Description("提交")]
Submit = 51Submit
System.HttpRequestActionEnum.Upload
Source · Targets: net8.0, net9.0, net10.0
[Description("上传")]
Upload = 61Upload
System.HttpRequestActionEnum.Download
Source · Targets: net8.0, net9.0, net10.0
[Description("下载")]
Download = 62Download
System.HttpRequestActionEnum.Import
Source · Targets: net8.0, net9.0, net10.0
[Description("导入")]
Import = 71Import
System.HttpRequestActionEnum.Export
Source · Targets: net8.0, net9.0, net10.0
[Description("导出")]
Export = 72Export
System.HttpRequestActionEnum.Notify
Source · Targets: net8.0, net9.0, net10.0
[Description("通知")]
Notify = 253Notification
System.HttpRequestActionEnum.Callback
Source · Targets: net8.0, net9.0, net10.0
[Description("回调")]
Callback = 254Callback
System.HttpRequestActionEnum.Other
Source · Targets: net8.0, net9.0, net10.0
[Description("其他")]
Other = 255Other
System.HttpRequestMethodEnum
Source · Targets: net8.0, net9.0, net10.0
[FastEnum("Http请求方式枚举")]
public enum HttpRequestMethodEnumHTTP request method enum
System.HttpRequestMethodEnum.Unknown
Source · Targets: net8.0, net9.0, net10.0
[Description("未知请求")]
Unknown = 0Unknown request
Remarks: There is no current HTTP request context, or the request method is unrecognized
System.HttpRequestMethodEnum.Get
Source · Targets: net8.0, net9.0, net10.0
[Description("Get请求")]
Get = 1GET request
Remarks: Retrieves a server resource. GET parameters are sent in the URL query string. GET is idempotent: repeating the same request should have the same intended effect
System.HttpRequestMethodEnum.Post
Source · Targets: net8.0, net9.0, net10.0
[Description("Post请求")]
Post = 2POST request
Remarks: Submits data for server processing. POST sends parameters in the request body and is not necessarily idempotent; repeated requests may produce different effects
System.HttpRequestMethodEnum.Put
Source · Targets: net8.0, net9.0, net10.0
[Description("Put请求")]
Put = 4PUT request
Remarks: Updates the specified server resource by storing the request-body data at the target URL
System.HttpRequestMethodEnum.Delete
Source · Targets: net8.0, net9.0, net10.0
[Description("Delete请求")]
Delete = 8DELETE request
Remarks: Deletes the server resource identified by the target URL
System.HttpRequestMethodEnum.Patch
Source · Targets: net8.0, net9.0, net10.0
[Description("Patch请求")]
Patch = 16PATCH request
Remarks: Partially updates a server resource by applying request-body data to selected fields at the target URL
System.HttpRequestMethodEnum.Head
Source · Targets: net8.0, net9.0, net10.0
[Description("Head请求")]
Head = 32HEAD request
Remarks: Similar to GET, but the response has no entity body; mainly used to retrieve resource metadata such as response headers
System.HttpRequestMethodEnum.Options
Source · Targets: net8.0, net9.0, net10.0
[Description("Options请求")]
Options = 64OPTIONS request
Remarks: Retrieves communication options for a resource, such as supported request methods and response headers
System.HttpRequestMethodEnum.Connect
Source · Targets: net8.0, net9.0, net10.0
[Description("Connect请求")]
Connect = 128CONNECT request
Remarks: Establishes a network connection to the target resource, typically an HTTPS tunnel forwarding traffic to the HTTPS server
System.HttpRequestMethodEnum.Trace
Source · Targets: net8.0, net9.0, net10.0
[Description("Trace请求")]
Trace = 256TRACE request
Remarks: Traces the request-response path, primarily for diagnostics
Fast.Runtime.HttpContextExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class HttpContextExtensionExtensions for HttpContext
Fast.Runtime.HttpContextExtension.UnifyResponseTimestamp
Source · Targets: net8.0, net9.0, net10.0
public static void UnifyResponseTimestamp(this HttpContext httpContext, long timestamp)Sets the normalized response timestamp
- Parameter
httpContext: Current request context - Parameter
timestamp: Timestamp
Fast.Runtime.HttpContextExtension.UnifyResponseTimestamp
Source · Targets: net8.0, net9.0, net10.0
public static long UnifyResponseTimestamp(this HttpContext httpContext)Gets the normalized response timestamp
- Parameter
httpContext: Current request context - Returns: Normalized response timestamp
Fast.Runtime.HttpContextExtension.GetMetadata
Source · Targets: net8.0, net9.0, net10.0
public static TAttribute GetMetadata<TAttribute>(this HttpContext httpContext) where TAttribute : classGets the specified attribute from endpoint metadata
- Parameter
httpContext: Current request context - Type parameter
TAttribute: Attribute type to find - Returns: Matching attribute instance, or
nullwhen none is found
Fast.Runtime.HttpContextExtension.GetMetadata
Source · Targets: net8.0, net9.0, net10.0
public static object GetMetadata(this EndpointMetadataCollection metadata, Type attributeType)Gets the specified attribute from endpoint metadata
- Parameter
metadata: Current metadata - Parameter
attributeType: Attribute type to read - Returns: Matching attribute instance, or
nullwhen none is found
Fast.Runtime.HttpContextExtension.GetMetadata
Source · Targets: net8.0, net9.0, net10.0
public static object GetMetadata(this HttpContext httpContext, Type attributeType)Gets the specified attribute from endpoint metadata
- Parameter
httpContext: Current request context - Parameter
attributeType: Attribute type to read - Returns: Matching attribute instance, or
nullwhen none is found
Fast.Runtime.HttpContextExtension.SignInToSwagger
Source · Targets: net8.0, net9.0, net10.0
public static void SignInToSwagger(this HttpContext httpContext, string accessToken)Enables automatic login for normalized API documentation
- Parameter
httpContext: Current request context - Parameter
accessToken: Access token
Fast.Runtime.HttpContextExtension.SignOutToSwagger
Source · Targets: net8.0, net9.0, net10.0
public static void SignOutToSwagger(this HttpContext httpContext)Signs out of normalized API documentation
- Parameter
httpContext: Current request context
Fast.Runtime.HttpContextExtension.LocalIpv4
Source · Targets: net8.0, net9.0, net10.0
public static string LocalIpv4(this HttpContext httpContext)Local IPv4 address
- Parameter
httpContext: Current request context - Returns: Local IPv4 address; returns an empty string when there is no current request context
Fast.Runtime.HttpContextExtension.LocalIpv6
Source · Targets: net8.0, net9.0, net10.0
public static string LocalIpv6(this HttpContext httpContext)Local IPv6 address
- Parameter
httpContext: Current request context - Returns: Local IPv6 address; returns an empty string when there is no current request context
Fast.Runtime.HttpContextExtension.RemoteIpv4
Source · Targets: net8.0, net9.0, net10.0
public static string RemoteIpv4(this HttpContext httpContext)Gets the remote IPv4 address after trusted-proxy processing
- Parameter
httpContext: Current request context - Returns: Remote IPv4 address; returns an empty string when there is no request context or the remote address is not IPv4
Fast.Runtime.HttpContextExtension.RemoteIpv6
Source · Targets: net8.0, net9.0, net10.0
public static string RemoteIpv6(this HttpContext httpContext)Gets the remote IPv6 address after trusted-proxy processing
- Parameter
httpContext: Current request context - Returns: Remote IPv6 address; returns an empty string when there is no request context or the remote address is not IPv6
Fast.Runtime.HttpContextExtension.RequestUserAgent
Source · Targets: net8.0, net9.0, net10.0
public static string RequestUserAgent(this HttpContext httpContext, string userAgentHeaderKey = "User-Agent")Request User-Agent string
- Parameter
httpContext: Current request context - Parameter
userAgentHeaderKey: Name of the header containing user-agent information - Returns: Request User-Agent string
Fast.Runtime.HttpContextExtension.RequestUserAgentInfo
Source · Targets: net8.0, net9.0, net10.0
public static UserAgentInfo RequestUserAgentInfo(this HttpContext httpContext)Request user-agent information
Remarks: Requires a reference to the UAParser assembly to parse successfully; otherwise returns null
- Parameter
httpContext: Current request context - Returns: Request user-agent information; returns
nullwhen there is no current request context
Fast.Runtime.HttpContextExtension.RemoteIpv4Info
Source · Targets: net8.0, net9.0, net10.0
public static WanNetIPInfo RemoteIpv4Info(this HttpContext httpContext, string ip = null)Remote IPv4 address information
Remarks: Includes a 24-hour memory cache when memory caching is registered; otherwise caching is not used
- Parameter
httpContext: Current request context - Parameter
ip: IP address to look up; defaults tonull, which selects the current remote IPv4 address - Returns: Remote IPv4 address information; returns
nullwhen there is no current request context
Fast.Runtime.HttpContextExtension.RemoteIpv4InfoAsync
Source · Targets: net8.0, net9.0, net10.0
public static async Task<WanNetIPInfo> RemoteIpv4InfoAsync(this HttpContext httpContext, string ip = null)Remote IPv4 address information
Remarks: Includes a 24-hour memory cache when memory caching is registered; otherwise caching is not used
- Parameter
httpContext: Current request context - Parameter
ip: IP address to look up; defaults tonull, which selects the current remote IPv4 address - Returns: A task containing remote IPv4 address information; its result is
nullwhen there is no current request context
Fast.Runtime.HttpContextExtension.GetControllerActionDescriptor
Source · Targets: net8.0, net9.0, net10.0
public static ControllerActionDescriptor GetControllerActionDescriptor(this HttpContext httpContext)Gets the controller/action descriptor
- Parameter
httpContext: Current request context - Returns: Controller/action descriptor; returns
nullwhen there is no current request context
Fast.Runtime.HttpContextExtension.ReadBodyContentAsync
Source · Targets: net8.0, net9.0, net10.0
public static async Task<string> ReadBodyContentAsync(this HttpContext httpContext)Reads the request body
Remarks: First register app.EnableBuffering() in Startup.Configure
- Parameter
httpContext: Current request context - Returns: A task whose result is the request-body content
Fast.Runtime.HttpContextExtension.ReadBodyContentAsync
Source · Targets: net8.0, net9.0, net10.0
public static async Task<string> ReadBodyContentAsync(this HttpRequest httpRequest)Reads the request body
Remarks: First register app.EnableBuffering() in Startup.Configure
- Parameter
httpRequest: Current HTTP request - Returns: A task whose result is the request-body content
Fast.Runtime.HttpContextExtension.RequestUrlAddress
Source · Targets: net8.0, net9.0, net10.0
public static string RequestUrlAddress(this HttpContext httpContext)Complete request URL
- Parameter
httpContext: Current request context - Returns: Complete request URL
Fast.Runtime.HttpContextExtension.RequestUrlAddress
Source · Targets: net8.0, net9.0, net10.0
public static string RequestUrlAddress(this HttpRequest httpRequest)Complete request URL
- Parameter
httpRequest: Current HTTP request - Returns: Complete request URL
Fast.Runtime.HttpContextExtension.RefererUrlAddress
Source · Targets: net8.0, net9.0, net10.0
public static string RefererUrlAddress(this HttpContext httpContext, string refererHeaderKey = "Referer")Referrer URL
- Parameter
httpContext: Current request context - Parameter
refererHeaderKey: Name of the header containing the referrer URL - Returns: Referrer URL
Fast.Runtime.HttpContextExtension.SetResponseStatusCodes
Source · Targets: net8.0, net9.0, net10.0
public static void SetResponseStatusCodes(this HttpContext httpContext, int statusCode, int[] return200StatusCodes = null,
int[][] adaptStatusCodes = null)Sets the response status code
Remarks: Example: return200StatusCodes = [401, 403]; adaptStatusCodes = [[401, 200], [403, 200]]
- Parameter
httpContext: Current request context - Parameter
statusCode: HTTP status code - Parameter
return200StatusCodes: Status codes to return as 200; supports only codes of 400 or above, excluding 404 - Parameter
adaptStatusCodes: Status-code remapping; supports only codes of 400 or above, excluding 404
System.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class UserFriendlyException : ExceptionUser-friendly exception
System.UserFriendlyException.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
public UserFriendlyException() : base("Bad Request")Initializes a new instance of the class
System.UserFriendlyException.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
public UserFriendlyException(string message) : base(message ?? "Bad Request")Initializes a new instance of the class
- Parameter
message: Message to record or return
System.UserFriendlyException.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
public UserFriendlyException(string message, object errorCode) : base(message ?? "Bad Request")Initializes a new instance of the class
- Parameter
message: Message to record or return - Parameter
errorCode: Error code identifying the error type
System.UserFriendlyException.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
public UserFriendlyException(string message, Exception innerException) : base(message ?? "Bad Request", innerException)Initializes a new instance of the class
- Parameter
message: Message to record or return - Parameter
innerException: Inner exception that caused this exception
System.UserFriendlyException.UserFriendlyException
Source · Targets: net8.0, net9.0, net10.0
public UserFriendlyException(string message, object errorCode, Exception innerException) : base(message ?? "Bad Request",
innerException)Initializes a new instance of the class
- Parameter
message: Message to record or return - Parameter
errorCode: Error code identifying the error type - Parameter
innerException: Inner exception that caused this exception
System.UserFriendlyException.ErrorCode
Source · Targets: net8.0, net9.0, net10.0
public object ErrorCode { get; set; }Error code
System.UserFriendlyException.OriginErrorCode
Source · Targets: net8.0, net9.0, net10.0
public object OriginErrorCode { get; set; }Original error code before ErrorCode was overridden
System.UserFriendlyException.ErrorMessage
Source · Targets: net8.0, net9.0, net10.0
public object ErrorMessage { get; set; }Error message; object values are supported
System.UserFriendlyException.StatusCode
Source · Targets: net8.0, net9.0, net10.0
public int StatusCode { get; set; } = StatusCodes.Status400BadRequest;Status code
System.UserFriendlyException.ValidationException
Source · Targets: net8.0, net9.0, net10.0
public bool ValidationException { get; set; } = false;Whether this is a data-validation exception
System.UserFriendlyException.Data
Source · Targets: net8.0, net9.0, net10.0
public new object Data { get; set; }Additional data
Fast.Runtime.AssemblyExtension
Source · Targets: net8.0, net9.0, net10.0
public static class AssemblyExtensionExtensions for Assembly
Fast.Runtime.AssemblyExtension.GetEntryRuntimeLibraries
Source · Targets: net8.0, net9.0, net10.0
public static List<DependencyLibrary> GetEntryRuntimeLibraries(this Assembly assembly)Gets entry runtime libraries
Remarks: Standalone/single-file publishing is currently unsupported
- Parameter
assembly: Target assembly - Returns: Entry runtime library collection
Fast.Runtime.AssemblyExtension.GetEntryReferencedAssembly
Source · Targets: net8.0, net9.0, net10.0
public static List<Assembly> GetEntryReferencedAssembly(this Assembly assembly,
List<DependencyLibrary> dependencyLibraryList = null)Gets assemblies referenced by the entry assembly
Remarks: Standalone/single-file publishing is currently unsupported
- Parameter
assembly: Target assembly - Parameter
dependencyLibraryList: Application dependency library collection - Returns: Collection of assemblies referenced by the entry assembly
Fast.Runtime.AssemblyExtension.GetAssemblyTypes
Source · Targets: net8.0, net9.0, net10.0
public static IEnumerable<Type> GetAssemblyTypes(this Assembly assembly, Func<Type, bool> typeFilter = null)Gets all types in an assembly
Remarks: Returns publicly declared types by default; a filter can further restrict the results
- Parameter
assembly: Target assembly - Parameter
typeFilter: Delegate used to filter assembly types - Returns: Collection of types in the assembly
Fast.Runtime.IConfigurationExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IConfigurationExtensionExtensions for IConfiguration
Fast.Runtime.IConfigurationExtension.LoadPostConfigure
Source · Targets: net8.0, net9.0, net10.0
public static T LoadPostConfigure<T>(this T type) where T : IPostConfigureLoads post-configuration
- Parameter
type: Target type - Type parameter
T: Options type to post-configure - Returns: Loaded post-configuration
Fast.Runtime.IMvcBuilderExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IMvcBuilderExtensionProvides extension methods for IMvcBuilder
Fast.Runtime.IMvcBuilderExtension.AddMvcFilter
Source · Targets: net8.0, net9.0, net10.0
public static IMvcBuilder AddMvcFilter<TFilter>(this IMvcBuilder builder, Action<MvcOptions> configure = null)
where TFilter : IFilterMetadataRegisters an MVC filter
- Parameter
builder: Application builder to configure - Parameter
configure: Additional MVC configuration callback - Type parameter
TFilter: MVC filter type to register - Returns: Returns the current MVC builder for fluent calls
Fast.Runtime.IServiceCollectionExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IServiceCollectionExtensionProvides extension methods for IServiceCollection
Fast.Runtime.IServiceCollectionExtension.AddConfigurableOptions
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddConfigurableOptions<TOptions>(this IServiceCollection services, string path = null)
where TOptions : class, new()Adds options configuration
- Parameter
services: The service collection to add services to - Parameter
path: Corresponding configuration key - Type parameter
TOptions: Configuration options type - Returns: Returns the current service collection for chaining
Fast.Runtime.IServiceCollectionExtension.AddMvcFilter
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddMvcFilter<TFilter>(this IServiceCollection services, Action<MvcOptions> configure = null)
where TFilter : IFilterMetadataRegisters an MVC filter
- Parameter
services: The service collection to add services to - Parameter
configure: Additional MVC configuration callback - Type parameter
TFilter: MVC filter type to register - Returns: Returns
servicesfor chaining
Fast.Runtime.IServiceCollectionExtension.AddMvcFilter
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddMvcFilter(this IServiceCollection services, IFilterMetadata filter,
Action<MvcOptions> configure = null)Registers an MVC filter
- Parameter
services: The service collection to add services to - Parameter
filter: MVC filter instance to register - Parameter
configure: Additional MVC configuration callback - Returns: Returns
servicesfor chaining
Fast.Runtime.TypeExtension
Source · Targets: net8.0, net9.0, net10.0
public static class TypeExtensionExtensions for Type
Fast.Runtime.TypeExtension.CreatePropertySetter
Source · Targets: net8.0, net9.0, net10.0
public static Action<object, object> CreatePropertySetter(this Type type, PropertyInfo propertyInfo)Creates a property setter
- Parameter
type: Target type - Parameter
propertyInfo: Reflection metadata for the target property - Returns: Created property setter
Fast.Runtime.TypeExtension.CreateFieldSetter
Source · Targets: net8.0, net9.0, net10.0
public static Action<object, object> CreateFieldSetter(this Type type, FieldInfo fieldInfo)Creates a field setter
- Parameter
type: Target type - Parameter
fieldInfo: Reflection metadata for the target field - Returns: Created field setter
Fast.Runtime.TypeExtension.CreatePropertyGetter
Source · Targets: net8.0, net9.0, net10.0
public static Func<object, object> CreatePropertyGetter(this Type type, PropertyInfo propertyInfo)Creates a property accessor
- Parameter
type: Target type - Parameter
propertyInfo: Reflection metadata for the target property - Returns: Created property accessor
Fast.Runtime.TypeExtension.CreateFieldGetter
Source · Targets: net8.0, net9.0, net10.0
public static Func<object, object> CreateFieldGetter(this Type type, FieldInfo fieldInfo)Creates a field accessor
- Parameter
type: Target type - Parameter
fieldInfo: Reflection metadata for the target field - Returns: Created field accessor
Fast.Runtime.UserFriendlyExceptionExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class UserFriendlyExceptionExtensionProvides extension methods for UserFriendlyException
Fast.Runtime.UserFriendlyExceptionExtension.StatusCode
Source · Targets: net8.0, net9.0, net10.0
public static UserFriendlyException StatusCode(this UserFriendlyException exception,
int statusCode = StatusCodes.Status400BadRequest)Sets the exception status code
- Parameter
exception: Exception to handle - Parameter
statusCode: HTTP status code - Returns: Sets the exception status code
Fast.Runtime.UserFriendlyExceptionExtension.WithData
Source · Targets: net8.0, net9.0, net10.0
public static UserFriendlyException WithData(this UserFriendlyException exception, object data)Sets additional data
- Parameter
exception: Exception to handle - Parameter
data: Data to process or transmit - Returns: Sets additional data
Fast.Runtime.IPostConfigure
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public interface IPostConfigurePost-configuration interface
Remarks: Supplies default configuration that cannot be completed in a constructor or during options binding
Fast.Runtime.IPostConfigure.PostConfigure
Source · Targets: net8.0, net9.0, net10.0
void PostConfigure();Applies supplementary configuration after options binding completes
Fast.Runtime.DependencyLibrary
Source · Targets: net8.0, net9.0, net10.0
public class DependencyLibraryModel for entries in the libraries node of .deps.json
Fast.Runtime.DependencyLibrary.Type
Source · Targets: net8.0, net9.0, net10.0
public string Type { get; }Type
Remarks: package denotes a referenced package; project denotes a locally referenced project
Fast.Runtime.DependencyLibrary.Name
Source · Targets: net8.0, net9.0, net10.0
public string Name { get; }Assembly name
Fast.Runtime.DependencyLibrary.FileName
Source · Targets: net8.0, net9.0, net10.0
public string FileName { get; }Assembly DLL filename without its extension
Remarks: Read from the runtime node; defaults to Name when empty. May differ from Name in some cases
Fast.Runtime.DependencyLibrary.Version
Source · Targets: net8.0, net9.0, net10.0
public string Version { get; }Assembly version
Fast.Runtime.DependencyLibrary.Serviceable
Source · Targets: net8.0, net9.0, net10.0
public bool Serviceable { get; }Whether the assembly is serviceable
System.Linq.LinqExpression
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LinqExpressionProvides LINQ expression extensions
System.Linq.LinqExpression.Create
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> Create<TSource>(Expression<Func<TSource, bool>> expression)Creates a LINQ/lambda expression
- Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Created LINQ/lambda expression
System.Linq.LinqExpression.Create
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> Create<TSource>(Expression<Func<TSource, int, bool>> expression)Creates a LINQ/lambda expression with index support
- Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Created LINQ/lambda expression with index support
System.Linq.LinqExpression.And
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> And<TSource>()Creates an AND expression
- Type parameter
TSource: Source object type - Returns: Created AND expression
System.Linq.LinqExpression.IndexAnd
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> IndexAnd<TSource>()Creates an AND expression with index support
- Type parameter
TSource: Source object type - Returns: Created AND expression with index support
System.Linq.LinqExpression.Or
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> Or<TSource>()Creates an OR expression
- Type parameter
TSource: Source object type - Returns: Created OR expression
System.Linq.LinqExpression.IndexOr
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> IndexOr<TSource>()Creates an OR expression with index support
- Type parameter
TSource: Source object type - Returns: Created OR expression with index support
System.Linq.ExpressionExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class ExpressionExtensionProvides expression extensions
System.Linq.ExpressionExtension.Compose
Source · Targets: net8.0, net9.0, net10.0
public static Expression<TSource> Compose<TSource>(this Expression<TSource> expression, Expression<TSource> extendExpression,
Func<Expression, Expression, Expression> mergeWay)Composes two expressions
- Parameter
expression: Expression to compose or execute - Parameter
extendExpression: Expression used to compose two expressions - Parameter
mergeWay: Composition operation for the two expressions - Type parameter
TSource: Source object type - Returns: Composes two expressions
System.Linq.ExpressionExtension.And
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> And<TSource>(this Expression<Func<TSource, bool>> expression,
Expression<Func<TSource, bool>> extendExpression)Combines two expressions using AND
- Parameter
expression: Expression to compose or execute - Parameter
extendExpression: Expression used to combine two expressions using AND - Type parameter
TSource: Source object type - Returns: Combines two expressions using AND
System.Linq.ExpressionExtension.And
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> And<TSource>(this Expression<Func<TSource, int, bool>> expression,
Expression<Func<TSource, int, bool>> extendExpression)Combines two expressions using AND with index support
- Parameter
expression: Expression to compose or execute - Parameter
extendExpression: Expression used to combine two expressions using AND with index support - Type parameter
TSource: Source object type - Returns: Combines two expressions using AND with index support
System.Linq.ExpressionExtension.AndIf
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> AndIf<TSource>(this Expression<Func<TSource, bool>> expression, bool condition,
Expression<Func<TSource, bool>> extendExpression)Combines two expressions using AND when the condition is satisfied
- Parameter
expression: Expression to compose or execute - Parameter
condition: Condition deciding whether to apply this operation - Parameter
extendExpression: Expression used for conditional AND composition - Type parameter
TSource: Source object type - Returns: Combines two expressions using AND when the condition is satisfied
System.Linq.ExpressionExtension.AndIf
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> AndIf<TSource>(this Expression<Func<TSource, int, bool>> expression,
bool condition, Expression<Func<TSource, int, bool>> extendExpression)Conditionally combines two expressions using AND with index support
- Parameter
expression: Expression to compose or execute - Parameter
condition: Condition deciding whether to apply this operation - Parameter
extendExpression: Expression used for conditional AND composition with index support - Type parameter
TSource: Source object type - Returns: Conditionally combines two expressions using AND with index support
System.Linq.ExpressionExtension.Or
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> Or<TSource>(this Expression<Func<TSource, bool>> expression,
Expression<Func<TSource, bool>> extendExpression)Combines two expressions using OR
- Parameter
expression: Expression to compose or execute - Parameter
extendExpression: Expression used to combine two expressions using OR - Type parameter
TSource: Source object type - Returns: Combines two expressions using OR
System.Linq.ExpressionExtension.Or
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> Or<TSource>(this Expression<Func<TSource, int, bool>> expression,
Expression<Func<TSource, int, bool>> extendExpression)Combines two expressions using OR with index support
- Parameter
expression: Expression to compose or execute - Parameter
extendExpression: Expression used to combine two expressions using OR with index support - Type parameter
TSource: Source object type - Returns: Combines two expressions using OR with index support
System.Linq.ExpressionExtension.OrIf
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, bool>> OrIf<TSource>(this Expression<Func<TSource, bool>> expression, bool condition,
Expression<Func<TSource, bool>> extendExpression)Combines two expressions using OR when the condition is satisfied
- Parameter
expression: Expression to compose or execute - Parameter
condition: Condition deciding whether to apply this operation - Parameter
extendExpression: Expression used for conditional OR composition - Type parameter
TSource: Source object type - Returns: Combines two expressions using OR when the condition is satisfied
System.Linq.ExpressionExtension.OrIf
Source · Targets: net8.0, net9.0, net10.0
public static Expression<Func<TSource, int, bool>> OrIf<TSource>(this Expression<Func<TSource, int, bool>> expression,
bool condition, Expression<Func<TSource, int, bool>> extendExpression)Conditionally combines two expressions using OR with index support
- Parameter
expression: Expression to compose or execute - Parameter
condition: Condition deciding whether to apply this operation - Parameter
extendExpression: Expression used for conditional OR composition with index support - Type parameter
TSource: Source object type - Returns: Conditionally combines two expressions using OR with index support
System.Linq.ExpressionExtension.GetExpressionPropertyName
Source · Targets: net8.0, net9.0, net10.0
public static string GetExpressionPropertyName<TSource>(this Expression<Func<TSource, object>> expression)Gets the property name from a lambda; only expressions of the form u => u.Property are supported
- Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Property name from a lambda of the form u => u.Property
System.Linq.IEnumerableExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IEnumerableExtensionIEnumerable extensions
System.Linq.IEnumerableExtension.OrderBy
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> sources, bool condition,
Expression<Func<TSource, TKey>> keySelector)Applies OrderBy when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
keySelector: Delegate that produces the sort key - Type parameter
TSource: Source object type - Type parameter
TKey: Generic type - Returns: Applies OrderBy when the condition is satisfied
System.Linq.IEnumerableExtension.OrderByDescending
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> sources, bool condition,
Expression<Func<TSource, TKey>> keySelector)Applies OrderByDescending when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
keySelector: Delegate that produces the sort key - Type parameter
TSource: Source object type - Type parameter
TKey: Generic type - Returns: Applies OrderByDescending when the condition is satisfied
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources, bool condition,
Expression<Func<TSource, bool>> expression)Applies Where when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Applies Where when the condition is satisfied
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources, bool condition,
Expression<Func<TSource, int, bool>> expression)Applies Where with index support when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Applies Where with index support when the condition is satisfied
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources,
params Expression<Func<TSource, bool>>[] expressions)Combines multiple expressions using AND
- Parameter
sources: Source sequence to query or compose - Parameter
expressions: Expressions to combine - Type parameter
TSource: Source object type - Returns: Combines multiple expressions using AND
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources,
params Expression<Func<TSource, int, bool>>[] expressions)Combines multiple expressions using AND with index support
- Parameter
sources: Source sequence to query or compose - Parameter
expressions: Expressions to combine - Type parameter
TSource: Source object type - Returns: Combines multiple expressions using AND with index support
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources,
params (bool condition, Expression<Func<TSource, bool>> expression)[] conditionExpressions)Applies WhereOr when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
conditionExpressions: Expressions included conditionally in the composition - Type parameter
TSource: Source object type - Returns: Applies WhereOr when the condition is satisfied
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> sources,
params (bool condition, Expression<Func<TSource, int, bool>> expression)[] conditionExpressions)Applies WhereOr with index support when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
conditionExpressions: Expressions included conditionally in the composition - Type parameter
TSource: Source object type - Returns: Applies WhereOr with index support when the condition is satisfied
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> sources, bool condition,
Func<TSource, bool> expression)Applies Where when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Builds a collection of conditional Where expressions
System.Linq.IEnumerableExtension.Where
Source · Targets: net8.0, net9.0, net10.0
public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> sources, bool condition,
Func<TSource, int, bool> expression)Applies Where with index support when the condition is satisfied
- Parameter
sources: Source sequence to query or compose - Parameter
condition: Condition deciding whether to apply this operation - Parameter
expression: Expression to compose or execute - Type parameter
TSource: Source object type - Returns: Builds a collection of conditional Where expressions with index support
