Click or drag to resize

PageInfos Class

A collection of PageInfo objects. The primary use of this collection is the collection of all available pages in an application, accessible from the IAppContext object via PageInfos. Pages in the collection are uniquely identified by their MOP.
Inheritance Hierarchy

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class PageInfos : EAPCollectionBase, ICacheable

The PageInfos type exposes the following members.

Constructors
  NameDescription
Public methodPageInfos
Standard constructor.
Public methodPageInfos(Int32)
Standard constructor, with initial capacity.
Top
Properties
  NameDescription
Public propertyCount
The number of elements actually contained in the ArrayList.
(Inherited from EAPCollectionBase.)
Public propertyIsFixedSize
true if the ArrayList has a fixed size; otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyIsReadOnly
Returns true if the collection is read-only. (Default is false)
(Inherited from EAPCollectionBase.)
Public propertyIsSynchronized
true if access to the internal ArrayList is synchronized (thread-safe); otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyItemInt32
Pages collection indexer, by 0-based index.
Public propertyItemString
Pages collection indexer, by MOP. Use Find(String, PageFindType) to look up pages by other values such as ID.
Public propertyProperties
The Properties collection for the collection.
Public propertySyncRoot
An object that can be used to synchronize access to the ArrayList.
(Inherited from EAPCollectionBase.)
Public propertyTextItems
The TextItems localized text for the collection.
Public propertyVersion
The version of this object's assembly.
Top
Methods
  NameDescription
Public methodAdd(PageInfo)
Add a PageInfo object to the collection.
Protected methodAdd(String, Object)
Adds an object to the collection. Override. This method simply calls the Add method with CollectionAddFlags.replace as the flags.
(Inherited from EAPCollectionBase.)
Protected methodAdd(String, Object, CollectionAddFlags)
Adds an item to the collection
(Inherited from EAPCollectionBase.)
Protected methodAddAt
Adds an item to the collection at the specified index. To append an item use -1 or the collection item count as the index.
(Inherited from EAPCollectionBase.)
Public methodClear
Clears the collection
(Inherited from EAPCollectionBase.)
Public methodClone(IAppContext)
The Clone method creates a copy of this PageInfos collection.
Public methodClone(IAppContext, CloneStatusAttrs)
The Clone method creates a copy of this PageInfos collection.
Public methodContains
Determines whether an element is in the collection.
(Inherited from EAPCollectionBase.)
Public methodContainsKey
Checks for the existence of an item in the hashtable
(Inherited from EAPCollectionBase.)
Public methodCopyTo
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from EAPCollectionBase.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Locates and returns the object by searching through the collection based on the provided PageFindType. Note that the collection's native index is MOP.
Public methodGetEnumerator
Returns an enumerator that can iterate through the ArrayList.
(Inherited from EAPCollectionBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetItem(Int32)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Protected methodGetItem(String)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Public methodGetItemName
Returns the name of the item. Then name of items in this collection is the MOP.
(Overrides EAPCollectionBaseGetItemName(Object).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Returns the zero-based index of the first occurrence of an object in the internal ArrayList or in a portion of it.
(Inherited from EAPCollectionBase.)
Public methodIndexOfKey
Returns the index of the item in the collection (by key)
(Inherited from EAPCollectionBase.)
Public methodInsert
Inserts an element into the internal ArrayList at the specified index
(Inherited from EAPCollectionBase.)
Public methodIsAvailable
Gets whether or not the specified MOP is available to the current user.
Protected methodIsMarkedForDeletion
Determines if this element is marked for deletion. Note that this base implementation must be overridden in order to support RemoveMarkedItems() for a partular collection.
(Inherited from EAPCollectionBase.)
Public methodStatic memberIsMOP
Returns true if the specified string is a properly formed MOP.
Public methodIsPermissionedOut
Gets whether or not the specified MOP was permissioned out.
Public methodIsTenantSpecific
Gets whether or not the specified page is tenant-specific.
Protected methodIsTypeOK
Verifies the item is a PageInfo object.
(Overrides EAPCollectionBaseIsTypeOK(Object).)
Public methodLoad(IAppContext)
Loads the pages from the metadata database. Note that the collection is cleared first.
Public methodLoad(IAppContext, IDatabase)
Loads the pages from the specified metadata database. Note that the collection is cleared first.
Public methodLoad(IAppContext, IDatabase, Boolean)
Loads the pages from the specified metadata database, optionally ignoring permissions (not generally recommended). Note that the collection is cleared first.
Public methodLoadTenantPages
Load the tenant-specific pages (pages marked with TenantSpecific) for the current Tenant.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepareForCache
Prepares this object for cache
Protected methodRecalcHash
Recalculates the internal hash
(Inherited from EAPCollectionBase.)
Public methodReload(IAppContext, String)
Reload the meta-data for the specified MOP. Note that this will flush the cache for that MOP.
Public methodReload(IAppContext, String, Boolean)
Reload the meta-data for the specified MOP. Note that this will flush the cache for that MOP.
Public methodRemove(Object)
Removes the first occurrence of a specific object from the collection
(Inherited from EAPCollectionBase.)
Public methodRemove(String)
Remove the specified item from the collection.
(Inherited from EAPCollectionBase.)
Public methodRemoveAt
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Public methodRemoveMarkedItems
Removes the properties marked for deletion.
(Inherited from EAPCollectionBase.)
Public methodRemoveRange
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Protected methodSetItem(Int32, Object)
Sets an item's value at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodSetItem(String, Object)
Sets an item's value at the string index indicated by the parameters.
(Inherited from EAPCollectionBase.)
Public methodSort(Boolean)
Sort the list by its key value.
(Inherited from EAPCollectionBase.)
Public methodSort(IComparer)
Sort the collection using the provided comparer.
(Inherited from EAPCollectionBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTruncate
Truncate the array starting at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodUnload
Called when the collection is cleared allowing a derived class to clean up.
(Inherited from EAPCollectionBase.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
Remarks
When the pages are loaded from the database pages marked as Disabled are not loaded (though Disabled pages could be present in the collection if the Disabled attribute is later set programmatically). Where meta-data includes pages with the same MOP, only the page with the highest Priority is loaded. In addition, pages are loaded only if the Permissions are appropriate for the current user and, if the page is marked TenantSpecific, if the page is available to the current user's Tenant.
Remarks
Warning: For performance reasons the PageInfo objects in the PageInfos collection are global objects that persist across requests for the current user, and even for other users having similar roles. For this reason you should not modify these global objects programmatically unless the intent it to have a truly global change. As each page is initialized a reference to these global objects is set as the page's PageInfo value and so each page's PageInfo object is global as well and should not be modified. Clonging the page's PageInfo object and setting it back on the page sets the page up to use a non-global instance of the PageInfo object that exists only for the current request and may be freely modified without affecting other requests.
See Also