• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Estrelica
    • Core
    • CoreConfig
    • CoreConfig.Settings
  • Estrelica.Archer.AccessControl
    • AccessControlEdit
    • AccountStatus
    • ContactSubType
    • ContactType
    • IArcherGroup
    • IArcherGroupEdit
    • IArcherRole
    • IArcherRoleEdit
    • IArcherUser
    • IArcherUserEdit
    • ISecurityParameter
    • IUserContact
    • IUserProvider
    • UserType
  • Estrelica.Archer.Content
    • ArcherContentExtensions
    • ContentFilterHelper
    • ContentReportOptions
    • ContentSearchOptions
    • ContentSource
    • ContentType
    • CurrentDateOperator
    • DatafeedHistoryStatus
    • DatafeedStatus
    • DatafeedType
    • DateOffsetOperator
    • DateValueOperator
    • DisplayFieldExtensions
    • EqualityOperator
    • FieldHistoryAuditType
    • HistoryAuditType
    • IAdvancedWorkflowAudit
    • IArcherContent
    • IArcherContentAccess
    • IArcherContentEdit
    • IArcherContentIdQuery
    • IArcherDateFieldQuery
    • IArcherDocument
    • IArcherMembershipQuery<T>
    • IArcherNumericFieldQuery
    • IArcherRecord
    • IArcherRecordQuery
    • IArcherReport
    • IArcherTextFieldQuery
    • IArcherUserGroupFieldQuery
    • IArcherValuesListQuery
    • IContentHistory
    • IContentInformation
    • IContentReport
    • IContentReportOptions
    • IContentUpdateInformation
    • ICrossReferencedRecordsSelectionEdit
    • IDatafeed
    • IDatafeedHistory
    • IDatafeedHistoryMessage
    • IDatafeedRecordCount
    • IDateValueEdit
    • IDisplayField
    • IDocumentSelectionEdit
    • IEditableField
    • IExternalLink
    • IExternalLinkEdit
    • IExternalLinksSelectionEdit
    • IFieldAudit
    • IFieldHistory
    • IFieldHistoryEx
    • IFieldQuery
    • IFieldValueEdit<T>
    • IHistoryAudit
    • INumericValueEdit
    • IObjectValue
    • IReferencedRecordsSelection
    • IReferencedRecordsSelectionEdit
    • ISearchDisplayFieldOptions
    • ISearchOptions
    • ISignatureAudit
    • IStatisticsReport
    • ISubEditableField
    • ISystemUpdateInformation
    • ITextValueEdit
    • IUserGroupListSelection
    • IUserGroupListSelectionEdit
    • IValuesListBaseSelection
    • IValuesListBaseSelectionEdit
    • IValuesListSelection
    • IValuesListSelectionEdit
    • IValuesListSingleSelection
    • IValuesListSingleSelectionEdit
    • IWorkflowAction
    • IWorkflowNode
    • LastUpdatedPreference
    • NumericRangeOperator
    • RecordCountType
    • RecordStatus
    • ReportSource
    • SortField
    • SortType
    • ValueOperator
    • ValuesOperator
    • WorkflowAuditActionType
  • Estrelica.Archer.Entity
    • ArcherEntityExtensions
    • ASOStatus
    • EntityType
    • IArcherAliasableEntity
    • IArcherAliasedEntity
    • IArcherASOEntity
    • IArcherASONamedEntity
    • IArcherBase
    • IArcherContentUpdateInfoEntity
    • IArcherDescribableEntity
    • IArcherDescribedEntity
    • IArcherEntity
    • IArcherEntityBase
    • IArcherGuidEntity
    • IArcherNameableEntity
    • IArcherNamedEntity
    • IArcherUpdateInfoEntity
    • IEditableArcherEntity
    • IUpdateInformation
    • SourceAttribute
    • UpstreamPropertyAttribute
  • Estrelica.Archer.Events
    • EventActionLayoutType
    • EventActionType
    • EventDateActionType
    • EventItemActionType
    • EventSectionActionType
    • IEventAction
    • IEventRule
    • ISetDateOption
  • Estrelica.Archer.Layouts
    • ILayout
    • ILayoutEntity
    • ILayoutItem
    • ILayoutSection
    • ILayoutTab
    • LayoutItemType
    • LayoutMemberType
    • LayoutSectionType
    • LayoutTabType
  • Estrelica.Archer.Metadata
    • ArcherMetadataExtensions
    • FilterConditionType
    • FilterCriteriaOperatorType
    • IArcherApplication
    • IArcherLevel
    • IArcherModule
    • IArcherQuestionnaire
    • IArcherSolution
    • IArcherSubForm
    • IArcherValuesList
    • IArcherValuesListValue
    • IFilterCondition
    • IFilterCriteria
    • ILevelFilter
    • ILevelFilterValue
    • IModuleOwner
    • IModuleOwnerGroup
    • IModuleOwnerUser
    • IModuleReference
    • INumericRange
    • INumericRangeValue
    • IQuestionnaireRule
    • ModuleClass
    • ModuleStatus
    • ModuleType
    • QuestionnaireRuleType
    • ReportType
    • Timezone
    • ValuesListType
    • ValueSortType
  • Estrelica.Archer.Metadata.Field
    • ArcherFieldExtensions
    • DefaultDateType
    • ExternalLinkProtocol
    • FieldEncryptionState
    • FieldType
    • IArcherField
    • IAssetResponsibilitiesField
    • IAttachmentField
    • IAvailableUserGroupSelections
    • IBaseDateField
    • ICalculatedValuesListField
    • IContentAccessHistoryField
    • ICrossApplicationStatusTrackingField
    • ICrossModuleStatusTrackingField
    • ICrossReferenceField
    • IDateField
    • IDiscussionField
    • IDocumentField
    • IExternalLinksField
    • IFirstPublishedField
    • IGroupPermission
    • IHistoryLogField
    • IImageField
    • IIPAddressField
    • ILastUpdatedField
    • IMatrixField
    • ImplementsAPIKey
    • ImplementsFieldTypeAttribute
    • IMultipleReferenceDisplayField
    • INumericField
    • IPermissionInheritance
    • IQuestionnaireReferenceField
    • IRecordStatusField
    • IReferenceField
    • IRelatedRecordsField
    • IRiskAssessmentField
    • ISchedulerField
    • ISubformField
    • ITechnologiesListField
    • ITechnologyVersionsListField
    • ITextField
    • ITrackingIDField
    • IUserGroupListField
    • IUserPermission
    • IValuesListField
    • IVotingField
    • SystemFieldType
    • UserGroupType
    • VotingType
  • Estrelica.Archer.Metadata.Field.Properties
    • DisplayControl
    • FieldLayoutFormat
    • IAdvancedDisplayOption
    • IAdvancedDisplayProperty
    • IAllowLookupProperty
    • IAllowSortingProperty
    • IColumnCountProperty
    • IDisplayControlProperty
    • IDisplayInHeaderProperty
    • IEncryptionStateProperty
    • IFieldValidationTypeProperty
    • IHeightWidthProperty
    • IIncludeTimeInformationProperty
    • IIncludeUserInformationProperty
    • IIsAuditEnabledProperty
    • IIsBulkCreateEnabledProperty
    • IIsBulkUpdateEnabledProperty
    • IIsCalculatedProperty
    • IIsEditableGridDisplayProperty
    • IIsEditableInSearchProperty
    • IIsEncryptedProperty
    • IIsFindEnabledProperty
    • IIsKeyProperty
    • IIsQuestionProperty
    • IIsRequiredProperty
    • IIsRestrictedToLevelProperty
    • IIsSupressedProperty
    • IIsTrendingEnabledProperty
    • IIsUniqueProperty
    • ILinkProperty
    • ILookupReportProperty
    • IMaxAttachmentsAllowedProperty
    • IMaxFileSizeProperty
    • IMaximumSelectionProperty
    • IMaxIntValueProperty
    • IMaxLongValueProperty
    • IMinAttachmentsAllowedProperty
    • IMinimumSelectionProperty
    • IMinIntValueProperty
    • IMinLongValueProperty
    • IMinMaxSelectionProperty
    • IPrefixProperty
    • ISuffixProperty
    • ITrendingDurationProperty
    • ITrendingDurationTypeProperty
    • MatrixAxis
    • NegativeDisplayType
  • Estrelica.Archer.Metadata.Properties
    • IIsDeprecatedProperty
    • IIsDirectToEditEnabledProperty
    • IIsMobileEnabledProperty
    • IIsNotificationProperty
    • IIsTaskManagementEnabledProperty
    • IIsWaveEnabledProperty
    • IKeepLicensedProperty
    • ISearchViewProperty
  • Estrelica.Archer.Utility
    • APIExceptionExtensions
    • APIPreference
    • APISource
    • ArcherAPIException
    • ArcherEntitySerializer
    • BaseDataWrapper<K>
    • CachedResolver
    • DictionaryDataWrapper<K>
    • DomainFormat
    • EditUtilities
    • ExtensionsUnavailableException
    • FilterCriteriaHelper
    • IAccessResolver
    • IAPIFacade
    • IArcherRestAPI
    • IArcherSoapAPI
    • IArcherUndocumentedAPI
    • ICastleHillExtendedAPI
    • IContentResolver
    • ILayoutResolver
    • IMetadataResolver
    • IReportResolver
    • IValueAccessor
    • ObjectDataWrapper<T, K>
    • ObjectKeyAttribute
    • ValuesListChangeEvent
    • ValuesListChangeEventArgs
  • Estrelica.Interfaces
    • IArcherAuthProvider
    • ICacheProvider
    • IClearable
    • IDatabaseAuthProvider
    • IEditable
    • IEditable<V>
    • IEditableCollection<V>
    • IEditableEnumerable<V>
    • IEditableFieldSelection<V>
    • IEditableInterface<I>
    • IEntityResolver
    • IExtendedAPIAuthProvider
    • IHttpClientAccessor
    • ILogCleanup
    • ILogSubscriber
    • InvalidateEntity<K>
    • InvalidateEntityEventArgs<K>
    • IRecordAccess
    • IRecordAccess<T>
    • IResolverProvider
    • ISessionProvider
    • ISystemUpdateable
    • ITrafficCounter
    • LogLevel
  • Estrelica.Logging
    • BaseLogger
    • ConsoleLogger
    • FileLogger
    • FileLogger.TimestampFormat
    • Logger
    • TraceLogger
  • Estrelica.Utility
    • Arguments
    • BaseRecordAccess
    • DataReaderExtensions
    • DateTimeExtensions
    • Debouncer
    • DebugLog
    • DeferEnumerable<T>
    • DeferValue<V>
    • DictionaryExtensions
    • EnumHelper
    • ExceptionExtensions
    • GuidUtility
    • HandledException
    • HashSetExtensions
    • ICacheHandler
    • ICollectionExtensions
    • IDeferrable
    • IDeferredValue
    • IEnumerableExtensions
    • IgnoreDefaultValuesDictionary<K, V>
    • JsonDictionary<V>
    • OperationExtensions
    • Resource
    • SqlConnectionExtensions
    • SqlUtilities
    • StreamExtensions
    • StringExtensions
    • TableMapper
    • TimeoutDictionary<K, V>
    • TypeExtensions
    • XElementExtensions

Class DeferEnumerable<T>

Wraps a load delegate in order to defer an expensive load operation until we know it's actually needed (via a call from somewhere else to GetEnumerator()). Ensures that the load method will never be called more than once by holding a local reference to the loaded enumeration for return to future calls to GetEnumerator(), and by substituting an empty T[] result if the loadDelegate happens to return null. Note that this requires the loadDelegate to be parameterless since it cannot be expected to handle different parameters over time.

Inheritance
object
DeferEnumerable<T>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Estrelica.Utility
Assembly: Estrelica.Utility.dll
Syntax
[Serializable]
[DoNotObfuscateType]
public class DeferEnumerable<T> : IEnumerable<T>, IEnumerable, IDeferrable, ISerializable
Type Parameters
T

Constructors

DeferEnumerable(Func<IEnumerable<T>>, int)

Declaration
public DeferEnumerable(Func<IEnumerable<T>> loadDelegate, int reloadMinutes = 0)
Parameters
Func<IEnumerable<T>> loadDelegate

int reloadMinutes

DeferEnumerable(SerializationInfo, StreamingContext)

Declaration
protected DeferEnumerable(SerializationInfo info, StreamingContext context)
Parameters
SerializationInfo info

StreamingContext context

Properties

Reload

Declaration
public IEnumerable<T> Reload { get; }
Property Value
IEnumerable<T>

Resolved

Returns true if the deferred action has been called, false otherwise

Declaration
public bool Resolved { get; }
Property Value
bool

Implements
IDeferrable.Resolved

Methods

GetEnumerator()

Declaration
public IEnumerator<T> GetEnumerator()
Returns
IEnumerator<T>

GetObjectData(SerializationInfo, StreamingContext)

Declaration
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
SerializationInfo info

StreamingContext context

Implements
ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Reset()

Declaration
public void Reset()
Implements
IDeferrable.Reset()

Events

OnLoad

Declaration
public event EventHandler OnLoad
Event Type
EventHandler

Implements
IDeferrable.OnLoad

OnReset

Declaration
public event EventHandler OnReset
Event Type
EventHandler

Implements
IDeferrable.OnReset

Operators

implicit operator DeferEnumerable<T>(Func<IEnumerable<T>>)

Declaration
public static implicit operator DeferEnumerable<T>(Func<IEnumerable<T>> loader)
Parameters
Func<IEnumerable<T>> loader

Returns
DeferEnumerable<T>

implicit operator DeferEnumerable<T>(Expression<Func<IEnumerable<T>>>)

Declaration
public static implicit operator DeferEnumerable<T>(Expression<Func<IEnumerable<T>>> loader)
Parameters
Expression<Func<IEnumerable<T>>> loader

Returns
DeferEnumerable<T>

implicit operator DeferEnumerable<T>(LambdaExpression)

Declaration
public static implicit operator DeferEnumerable<T>(LambdaExpression loader)
Parameters
LambdaExpression loader

Returns
DeferEnumerable<T>

Extension Methods

EnumHelper.In<TEnum>(TEnum, params TEnum[])
IEnumerableExtensions.ToEnumerable<T>(T)
StringExtensions.AssertNotNull<T>(T, string)
TypeExtensions.WithDispose<T, V>(T, Func<T, V>)
DictionaryExtensions.AsArray<V>(IEnumerable<V>, bool)
DictionaryExtensions.ContainsAll<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
DictionaryExtensions.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
DictionaryExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
IEnumerableExtensions.Distinct<T, K>(IEnumerable<T>, Func<T, K>)
IEnumerableExtensions.Matches<T>(IEnumerable<T>, IEnumerable<T>, bool, bool, bool)
StringExtensions.Conjoin(IEnumerable, string, bool)
EnumHelper.CastNullable<TEnum>(object)
TypeExtensions.ConvertTo<V>(object)
TypeExtensions.TryConvert<V>(object, out V)
Back to top Copyright 2019-2023 by CastleHill Software LLC