CreateWithNewAttributes(Dictionary<string, string> attributes)
This method creates a new end-user security context with replacement attributes from a dictionary.
Declaration
// C# public OracleEndUserSecurityContext CreateWithNewAttributes(Dictionary<string, string> attributes)
Parameters
-
attributesSpecifies a dictionary of attribute context names and payloads to associate with the new security context.
Return Value
A new OracleEndUserSecurityContext containing the specified attributes.
Exceptions
ArgumentNullException - Thrown when attributes is null.
OracleException - Thrown when an attribute payload value is null or an empty string.
Remarks
This method creates a new OracleEndUserSecurityContext instance and does not modify the current instance. The returned context stores a copy of the supplied attributes dictionary as an immutable dictionary and inherits the existing database access token, end user principal, and data roles.
If the attributes dictionary contains any entries, this method generates a binary JSON representation for the attributes. Each dictionary entry is written as an attribute context name and corresponding attributes payload.
If the attributes dictionary is empty, no JSON is generated.
A null attributes dictionary value is disallowed.