IContentStoreOpenReadSession Method
|
Opens a read-only session. This session doesn't track changes to objects that were retrieved within this session, nor does it track created or deleted objects.
It is not in charge of saving changes, only for reading.
Namespace:
Ingeniux.CMS
Assembly:
Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax IUserSession OpenReadSession(
IReadonlyUser user = null
)
Function OpenReadSession (
Optional user As IReadonlyUser = Nothing
) As IUserSession
IUserSession^ OpenReadSession(
IReadonlyUser^ user = nullptr
)
abstract OpenReadSession :
?user : IReadonlyUser
(* Defaults:
let _user = defaultArg user null
*)
-> IUserSession
Parameters
- user (Optional)
- Type: Ingeniux.CMSIReadonlyUser
The user to open the session.
Return Value
Type:
IUserSessionThe read-only session.
Remarks This session throws an error upon disposal, when any of the objects loaded within it changes, or when trying to add or remove objects.
Examples IReadonlyUser currentUser = store.GetStartingUser(@"yourfirm\youruserid");
using (IUserSession session = store.OpenReadSession(currentUser))
{
......
}
See Also