Click or drag to resize

IWizardTemplateGetClonedPageInfo Method

Gets the cloned PageInfo object for this page. If the page's PageInfo object has not net been cloned then this method clones it and sets the clone back on the page. If the page's PageInfo object has already been cloned then that object is returned. In either case the returned PageInfo object will have the ClonedByUser status. Once the page's PageInfo has been cloned and set back on the page, the cloned PageInfo object can be freely manipulated without affecting other requests by the current, or other, users.

Note that cloning the PageInfo and setting back on the page does not update any IMapper objects already set up with the original PageInfo object. However, any IMapper objects set up after the operation will use the cloned PageInfo. Performing the operation during the ApplicationPageInit event (PageInit(IAppContext, ApplicationPageArgs)) sets up the clone very early in the page life-cycle and ensure that the page's IMapper objects will use the cloned PageInfo.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
PageInfo GetClonedPageInfo()

Return Value

Type: PageInfo
The newly cloned PageInfo object if not already cloned, else the original cloned PageInfo object.
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