Skip to content

Class DiySessionOptions

Namespace: Tool.Web.Session
Assembly: Tool.Net.dll

自定义的Session对象,必须完成的实现方法

csharp
public class DiySessionOptions

Inheritance

objectDiySessionOptions

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

代码由逆血提供支持

Constructors

DiySessionOptions()

初始化对象

csharp
public DiySessionOptions()

Fields

IsSign

IsAvailable为true时,特点的标志

csharp
public const string IsSign = ".1"

Field Value

string

Properties

获取或设置用户(所有用户共用配置)

csharp
public CookieOptions Cookie { get; }

Property Value

CookieOptions

GetKey

注册一个可以自由控制的开关,以及自由规则的键值。 默认提供SessionId值

返回值 为空,时取消设置SessionId行为。

csharp
public Func<HttpContext, string, Task<string>> GetKey { get; set; }

Property Value

Func<HttpContext, string, Task<string>>

SessionName

表明Session存储名称

csharp
public string SessionName { get; set; }

Property Value

string

Sign

标记值(可以设置为特定值,默认:IsSign值)

csharp
public string Sign { get; set; }

Property Value

string

Methods

GetDiySession<T>()

自定义Session必须完成的注册流程

csharp
public void GetDiySession<T>() where T : DiySession, new()

Type Parameters

T

实现的基类

基于Apache-2.0协议开源