C# Class Hypermedia.JsonApi.JsonApiEntityCacheExtensions

ファイルを表示 Open project: cosullivan/Hypermedia

Public Methods

Method Description
TryAdd ( this cache, JsonLite.Ast.JsonObject key, object value ) : bool

Attempts to adds an entity to the T:Hypermedia.JsonApi.IJsonApiEntityCache.

TryGetValue ( this cache, JsonLite.Ast.JsonObject key, object &value ) : bool

Attempts to get the entity from the cache.

Private Methods

Method Description
TryCreateKey ( JsonLite.Ast.JsonObject jsonObject, string &type, string &id ) : bool

Attempts to create the key components of an entity.

Method Details

TryAdd() public static method

Attempts to adds an entity to the T:Hypermedia.JsonApi.IJsonApiEntityCache.
public static TryAdd ( this cache, JsonLite.Ast.JsonObject key, object value ) : bool
cache this The cache to add the entity to.
key JsonLite.Ast.JsonObject The item that defines the key for the entity to add.
value object The object to use as the value of the element to add.
return bool

TryGetValue() public static method

Attempts to get the entity from the cache.
public static TryGetValue ( this cache, JsonLite.Ast.JsonObject key, object &value ) : bool
cache this The cache to add the entity to.
key JsonLite.Ast.JsonObject The item that defines the key for the entity to locate.
value object The entity that is associated with the given type and ID, otherwise the default value is returned.
return bool