Show / Hide Table of Contents

Class Command

Defines a command sent into an IDistributedDataStore implementor to retrieve or change(if supported) data. A Command is a named bag of paremeters where every parameter has a name and a value. Every command has a unique Identity(GUID) which represents a token of the whole command state (name, type,all params). The identity is used for quick lookup/caching. The identity may be supplied externally as business code may map certain parameters into GUID and later reuse the same GUID to retrieve the cached command result, for example a web server app may cache command "GetPurchases(user=123, year=2015, month=3)" under session key "MY_PURCHASES_201503" to later retrieve a cached (if available) command results from the DB layer, this way the DB server does not have to store the whole commands with all params as the cache key (which would have been slow to compare and would have induced GC pressure). Warning: DO NOT CACHE command identity value on a client (i.e. web page) in an un-encrypted state, as this is a security flaw

Inheritance
System.Object
System.Collections.Generic.List<Command.Param>
Command
Implements
System.Collections.Generic.IList<Command.Param>
System.Collections.Generic.ICollection<Command.Param>
System.Collections.Generic.IReadOnlyList<Command.Param>
System.Collections.Generic.IReadOnlyCollection<Command.Param>
System.Collections.Generic.IEnumerable<Command.Param>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
INamed
IShardingPointerProvider
ICachePolicy
Inherited Members
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Add(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.AddRange(System.Collections.Generic.IEnumerable<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.AsReadOnly()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.BinarySearch(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.BinarySearch(NFX.DataAccess.Distributed.Command.Param, System.Collections.Generic.IComparer<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.BinarySearch(System.Int32, System.Int32, NFX.DataAccess.Distributed.Command.Param, System.Collections.Generic.IComparer<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Clear()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Contains(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.ConvertAll<TOutput>(System.Converter<NFX.DataAccess.Distributed.Command.Param, TOutput>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.CopyTo(NFX.DataAccess.Distributed.Command.Param[])
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.CopyTo(NFX.DataAccess.Distributed.Command.Param[], System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.CopyTo(System.Int32, NFX.DataAccess.Distributed.Command.Param[], System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Exists(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Find(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindAll(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindIndex(System.Int32, System.Int32, System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindIndex(System.Int32, System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindIndex(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindLast(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindLastIndex(System.Int32, System.Int32, System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindLastIndex(System.Int32, System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.FindLastIndex(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.ForEach(System.Action<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.GetEnumerator()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.IndexOf(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.IndexOf(NFX.DataAccess.Distributed.Command.Param, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.IndexOf(NFX.DataAccess.Distributed.Command.Param, System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Insert(System.Int32, NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.LastIndexOf(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.LastIndexOf(NFX.DataAccess.Distributed.Command.Param, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.LastIndexOf(NFX.DataAccess.Distributed.Command.Param, System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Remove(NFX.DataAccess.Distributed.Command.Param)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.RemoveAll(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.RemoveAt(System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Reverse()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Sort()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Sort(System.Collections.Generic.IComparer<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Sort(System.Comparison<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.Generic.IEnumerable<NFX.DataAccess.Distributed.Command.Param>.GetEnumerator()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.ToArray()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.TrimExcess()
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.TrueForAll(System.Predicate<NFX.DataAccess.Distributed.Command.Param>)
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Capacity
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Count
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.Item[System.Int32]
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.Generic.ICollection<NFX.DataAccess.Distributed.Command.Param>.IsReadOnly
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<NFX.DataAccess.Distributed.Command.Param>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: NFX.DataAccess.Distributed
Assembly: NFX.dll
Syntax
[Serializable]
public class Command : List<Command.Param>, IList<Command.Param>, ICollection<Command.Param>, IReadOnlyList<Command.Param>, IReadOnlyCollection<Command.Param>, IEnumerable<Command.Param>, IList, ICollection, IEnumerable, INamed, IShardingPointerProvider, ICachePolicy

Constructors

Command(Nullable<Guid>, String, Command.Param[])

Declaration
public Command(Guid? identity, string name, params Command.Param[] pars)
Parameters
Type Name Description
System.Nullable<System.Guid> identity
System.String name
Command.Param[] pars

Command(Nullable<Guid>, String, Parcel, Command.Param[])

Declaration
public Command(Guid? identity, string name, Parcel shardingParcel, params Command.Param[] pars)
Parameters
Type Name Description
System.Nullable<System.Guid> identity
System.String name
Parcel shardingParcel
Command.Param[] pars

Command(Nullable<Guid>, String, ShardingPointer, Command.Param[])

Declaration
public Command(Guid? identity, string name, ShardingPointer shardingPtr, params Command.Param[] pars)
Parameters
Type Name Description
System.Nullable<System.Guid> identity
System.String name
ShardingPointer shardingPtr
Command.Param[] pars

Properties

CacheAbsoluteExpirationUTC

Implements IParcelCachePolicy contract. The default implementation returns null. Override to supply a different absolute cache expiration UTC timestamp for this command data that may depend on particular command state (i.e. field values).

Declaration
public DateTime? CacheAbsoluteExpirationUTC { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

CachePriority

Implements IParcelCachePolicy contract. The default implementation returns null. Override to supply a relative cache priority of this command data that may depend on particular command state (i.e. param values).

Declaration
public virtual int ? CachePriority { get; }
Property Value
Type Description
System.Nullable<System.Int32>

CacheReadMaxAgeSec

Implements IParcelCachePolicy contract. The default implementation returns null. Override to supply a value for maximum validity span of cached command data that may depend on particular command state (i.e. param values).

Declaration
public virtual int ? CacheReadMaxAgeSec { get; }
Property Value
Type Description
System.Nullable<System.Int32>

CacheWriteMaxAgeSec

Implements IParcelCachePolicy contract. The default implementation returns null. Override to supply a value for maximum length of this isntance stay in cache that may depend on particular command state (i.e. param values)

Declaration
public virtual int ? CacheWriteMaxAgeSec { get; }
Property Value
Type Description
System.Nullable<System.Int32>

Identity

Returns the identity of this instance, that is - an ID that UNIQUELY identifies the instance of this command including all of the names, parameters, values. This is needed for Equality comparison and cache lookup. The identity is either generated by .ctor or supplied to it if it is cached (i.e. in a user session)

Declaration
public Guid Identity { get; }
Property Value
Type Description
System.Guid

Item[String]

Returns parameter by its name or null

Declaration
public Command.Param this[string name] { get; }
Parameters
Type Name Description
System.String name
Property Value
Type Description
Command.Param

Name

Returns Command name, providers use it to locate modules particular to backend implementation that they represent

Declaration
public virtual string Name { get; }
Property Value
Type Description
System.String

ShardingPointer

Returns the ShardingPointer for this command

Declaration
public virtual ShardingPointer ShardingPointer { get; }
Property Value
Type Description
ShardingPointer

Methods

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Explicit Interface Implementations

ICachePolicy.CacheTableName

Implements IParcelCachePolicy contract. The implementation returns null for commands

Declaration
string ICachePolicy.CacheTableName { get; }
Returns
Type Description
System.String

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
INamed
IShardingPointerProvider
ICachePolicy

Extension Methods

CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T>)
CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T, Int32>)
CollectionUtils.SkipLast<T>(IEnumerable<T>)
CollectionUtils.SkipLast<T>(IEnumerable<T>, Int32)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstOrAnyOrDefault<TResult>(IEnumerable<TResult>, Func<TResult, Boolean>)
CollectionUtils.Distinct<TResult, TKey>(IEnumerable<TResult>, Func<TResult, TKey>)
MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
LookAheadExtensions.AsLookAheadEnumerable<T>(IEnumerable<T>)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX