Get(T) Method (IDataStore)

Glimpse API

DataStoreExtensions Get T  Method (IDataStore) Glimpse API Documentation
Gets an item from store using <T> as a key. This method should be used in combination with Set<T>.

Namespace: Glimpse.Core.Extensions
Assembly: Glimpse.Core (in Glimpse.Core.dll) Version: 1.0.1.0 (1.0.1)

Syntax

public static T Get<T>(
	this IDataStore store
)
public static T Get<T>(
	this IDataStore store
)

Parameters

store
Type: Glimpse.Core.Extensibility IDataStore
The data store instance.
Type Parameters

T
The type of item to retrieve and the key when used in combination with Set<T>.

Return Value

An item of type T, null or an OnlineInvalidCastException is thrown depending on the type of store. Call Contains<T> first to ensure results.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataStore. When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
Exceptions

ExceptionCondition
OnlineSystem InvalidCastExceptionMay throw an invalid cast exception if the IDataStore item and type do not match.
See Also