Show / Hide Table of Contents

Class LookupCollection

Collection of objects that implement the Lookup interface.

Inheritance
Object
LookupCollection
Implements
ISoDataLookup
ISentryIgnorable
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
public class LookupCollection : List<ISoDataLookup>, ISoDataLookup, ISentryIgnorable

Constructors

LookupCollection()

Collection of objects that implement the Lookup interface.

Declaration
public LookupCollection()

Properties

IsSentryIgnored

Get value indicating whether sentry is ignored on the current object for the current thread.

Declaration
public bool IsSentryIgnored { get; }
Property Value
Type Description
Boolean

Methods

AddFront(ISoDataLookup)

Adds the lookup object to the front of the list. This means that the object will be asked first for its values.

Declaration
public void AddFront(ISoDataLookup obj)
Parameters
Type Name Description
ISoDataLookup obj

An object that implements the lookup interface.

BeginIgnoreSentryCheck()

Starts the process of ignoring sentry on the object implementing the interface on the current thread.

Declaration
public IgnoreSentryCheck BeginIgnoreSentryCheck()
Returns
Type Description
IgnoreSentryCheck

Disposable object that calls EndIgnoreSentryCheck() on Dispose.

EndIgnoreSentryCheck()

Ends the process of ignoring sentry on the object implementing the interface on the current thread.

Declaration
public void EndIgnoreSentryCheck()

GetFieldValue(FieldInfo)

Look up a value in the collection. The first to reply is the one used.

Declaration
public object GetFieldValue(FieldInfo field)
Parameters
Type Name Description
FieldInfo field

FieldInfo of for value to look up.

Returns
Type Description
Object

Value looked up.

GetKnownFields()

Get all known FieldInfo's from the underlying lookup object, made unique

Declaration
public List<FieldInfo> GetKnownFields()
Returns
Type Description
List<FieldInfo>

GetPersistedFieldValue(FieldInfo)

Get the persisted value of a field. One should always verify that the persisted value is known using the method IsPersistedFieldValueKnown(FieldInfo) prior to accessing it, as an exception might be thrown.

Declaration
public virtual object GetPersistedFieldValue(FieldInfo field)
Parameters
Type Name Description
FieldInfo field

Specification of a field

Returns
Type Description
Object

Field value, such as an int, DateTime, string ... Null can be returned if the value is not known.

Exceptions
Type Condition
SoNotImplementedException

Thrown if the object implementing the interface does not support it.
The corresponding IsPersistedFieldValueKnown(FieldInfo) should for such instances return false.

IsGhostField(FieldInfo)

Determine if a field is a ghost. The answer is true iff all lookups say so; if there are no lookups then we don't know. In that case the answer is false - saying true would make us believe all newly created rows are ghosts as well.

Declaration
public bool IsGhostField(FieldInfo field)
Parameters
Type Name Description
FieldInfo field
Returns
Type Description
Boolean

IsPersistedFieldValueKnown(FieldInfo)

Check if the persisted value for a dield is known.

Declaration
public virtual bool IsPersistedFieldValueKnown(FieldInfo field)
Parameters
Type Name Description
FieldInfo field

Specification of a field

Returns
Type Description
Boolean

True if the value is known.

Implements

ISoDataLookup
ISentryIgnorable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top