Class AshxServiceExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Tool.Net.dll
Ashx 核心对象扩展类
public static class AshxServiceExtensionsInheritance
object ← AshxServiceExtensions
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)
Remarks
代码由逆血提供支持
Methods
AddAshx(IServiceCollection)
启动Ashx路由模式
public static IAshxBuilder AddAshx(this IServiceCollection services)Parameters
services IServiceCollection
Returns
IAshxBuilder
AddAshx(IServiceCollection, Action<AshxOptions>)
启动Ashx路由模式
public static IAshxBuilder AddAshx(this IServiceCollection services, Action<AshxOptions> action)Parameters
services IServiceCollection
注册对象
action Action<AshxOptions>
选择委托
Returns
IAshxBuilder
AddHttpContext(IAshxBuilder)
注入HttpContext对象,实现静态获取
public static IAshxBuilder AddHttpContext(this IAshxBuilder ashxBuilder)Parameters
ashxBuilder IAshxBuilder
Ashx框架对象
Returns
IAshxBuilder
AddObject(IServiceCollection, object)
将用户自定义的数据注册进服务。
public static IServiceCollection AddObject(this IServiceCollection services, object _obj)Parameters
services IServiceCollection
Ashx框架对象
_obj object
注册的数据
Returns
IServiceCollection
AddObject<T>(IServiceCollection, T)
将用户自定义的数据注册进服务。
public static IServiceCollection AddObject<T>(this IServiceCollection services, T _obj)Parameters
services IServiceCollection
Ashx框架对象
_obj T
注册的数据
Returns
IServiceCollection
Type Parameters
T
AddObject(IServiceCollection, Type, object)
将用户自定义的数据注册进服务。
public static IServiceCollection AddObject(this IServiceCollection services, Type type, object _obj)Parameters
services IServiceCollection
主服务
type Type
注册对象类型
_obj object
注册的数据
Returns
IServiceCollection
SetFormOptions(IServiceCollection, Action<FormOptions>)
设置系统默认配置的对象属性
public static IServiceCollection SetFormOptions(this IServiceCollection app, Action<FormOptions> action)Parameters
IServiceCollection框架对象
action Action<FormOptions>
用于属性配置的方法
Returns
IServiceCollection框架对象