C# Class Ivony.Caching.CachePriority

缓存优先级
显示文件 Open project: Ivony/Ivony.Caching Class Usage Examples

Public Methods

Method Description
CreatePriority ( CachePriority priority, string hint ) : CachePriority

创建一个自定义的缓存优先级

Equals ( CachePriority priority ) : bool

重写 Equals 方法,比较两个缓存优先级对象(注意,只要预置的优先级一样,就会判定两个对象相同,将忽略缓存优先级提示信息)

Equals ( object obj ) : bool

重写 Equals 方法,比较两个缓存优先级对象(注意,只要预置的优先级一样,就会判定两个对象相同,将忽略缓存优先级提示信息)

GetHashCode ( ) : int

重写 GetHashCode 方法,获取正确的哈希值

Parse ( string str ) : CachePriority

从字符串中解析出缓存优先级信息

ToString ( ) : string

重写 ToString 方法,输出优先级和优先级提示信息

Private Methods

Method Description
CachePriority ( int priorityValue, string hint = null ) : System

Method Details

CreatePriority() public method

创建一个自定义的缓存优先级
public CreatePriority ( CachePriority priority, string hint ) : CachePriority
priority CachePriority 预制优先级,当缓存提供程序无法识别缓存优先级提示时使用
hint string 缓存优先级提示信息,特定的缓存提供程序可以读取该信息使用最合适的优先级
return CachePriority

Equals() public method

重写 Equals 方法,比较两个缓存优先级对象(注意,只要预置的优先级一样,就会判定两个对象相同,将忽略缓存优先级提示信息)
public Equals ( CachePriority priority ) : bool
priority CachePriority 要比较的对象
return bool

Equals() public method

重写 Equals 方法,比较两个缓存优先级对象(注意,只要预置的优先级一样,就会判定两个对象相同,将忽略缓存优先级提示信息)
public Equals ( object obj ) : bool
obj object 要比较的对象
return bool

GetHashCode() public method

重写 GetHashCode 方法,获取正确的哈希值
public GetHashCode ( ) : int
return int

Parse() public static method

从字符串中解析出缓存优先级信息
public static Parse ( string str ) : CachePriority
str string 要解析的字符串
return CachePriority

ToString() public method

重写 ToString 方法,输出优先级和优先级提示信息
public ToString ( ) : string
return string