NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IPermission.Demand

Demands at run-time that all callers in the call chain have the permission specified by the current permission object. The permissions of the code that calls this method itself are not checked; rather, the check begins from the immediate caller of that code and proceeds up the stack.

[Visual Basic]
Sub Demand()
[C#]
void Demand();
[C++]
void Demand() = 0;
[JScript]
function Demand();

Exceptions

Exception Type Condition
SecurityException if any caller does not have the permission demanded.

Remarks

This method is typically used by secure libraries to ensure that callers have a particular permission. For example, a file class in a secure class library will demand the necessary FileIOPermission before performing a file operation requested by the caller.

See Also

IPermission Interface | IPermission Members | System.Security Namespace