Class NOPObjectStore
Implements ObjectStore service that does nothing
Inheritance
System.Object
NOPObjectStore
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.dll
Syntax
public sealed class NOPObjectStore : ApplicationComponent, IObjectStore, IApplicationComponent, IDisposable, ILocalizedTimeProvider
Constructors
NOPObjectStore()
Declaration
Properties
Instance
Returns a singlelton instance of the objectstore that does not do anything
Declaration
public static NOPObjectStore Instance { get; }
Property Value
LocalizedTime
Declaration
public DateTime LocalizedTime { get; }
Property Value
Type |
Description |
System.DateTime |
|
ObjectLifeSpanMS
Declaration
public int ObjectLifeSpanMS { get; }
Property Value
Type |
Description |
System.Int32 |
|
TimeLocation
Declaration
public TimeLocation TimeLocation { get; }
Property Value
Methods
CheckIn(Guid, Int32)
Puts an object reference "value" into store identified by the "key"
Declaration
public bool CheckIn(Guid key, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Int32 |
msTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
CheckIn(Guid, Object, Int32)
Puts an object reference "value" into store identified by the "key"
Declaration
public void CheckIn(Guid key, object value, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Object |
value |
|
System.Int32 |
msTimeout |
|
CheckInUnderNewKey(Guid, Guid, Object, Int32)
Puts an object reference "value" into store identified by the "oldKey" under the "newKey".
If oldKey was not checked in, then checks-in under new key as normally would
Declaration
public void CheckInUnderNewKey(Guid oldKey, Guid newKey, object value, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
oldKey |
|
System.Guid |
newKey |
|
System.Object |
value |
|
System.Int32 |
msTimeout |
|
CheckOut(Guid)
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Object is not going to be persisted until it is checked back in the store.
Declaration
public object CheckOut(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Object |
|
Delete(Guid)
Deletes object identified by key. Returns true when object was found and marked for deletion
Declaration
public bool Delete(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Fetch(Guid, Boolean)
Declaration
public object Fetch(Guid key, bool touch = false)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Boolean |
touch |
|
Returns
Type |
Description |
System.Object |
|
LocalizedTimeToUniversalTime(DateTime)
Declaration
public DateTime LocalizedTimeToUniversalTime(DateTime local)
Parameters
Type |
Name |
Description |
System.DateTime |
local |
|
Returns
Type |
Description |
System.DateTime |
|
UndoCheckout(Guid)
Reverts object state to Normal after the call to Checkout. This way the changes (if any) are not going to be persisted.
Returns true if object was found and checkout canceled. Keep in mind: this method CAN NOT revert inner object state
to its original state if it was changed, it only unmarks object as changed.
This method is reentrant just like the Checkout is
Declaration
public bool UndoCheckout(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Boolean |
|
UniversalTimeToLocalizedTime(DateTime)
Declaration
public DateTime UniversalTimeToLocalizedTime(DateTime utc)
Parameters
Type |
Name |
Description |
System.DateTime |
utc |
|
Returns
Type |
Description |
System.DateTime |
|
Implements
System.IDisposable
Extension Methods