MSDN Library

PolicyArgument Class

System.Security.Policy

Summary

Represents a specific argument that can be used to test for policy. This class cannot be inherited.

Syntax

[SerializableAttribute]
public sealed class PolicyArgument

Inheritance Hierarchy

ObjectPolicyArgument

Remarks

The PolicyArgument class is used to represent a single, named argument that is used to test policy. Policy objects, such as IIdentityPermissionFactory and IApplicationIdentity, can expose arguments that can be used by security policy to make authorization decisions.

For example, a security policy might need to check the value of a specific named argument to determine if a piece of code should be granted a particular permission. The PolicyArgument class provides a standardized way to represent these arguments.

Note This class is a component of the .NET Framework security policy system, which is largely superseded by the modern security model based on Windows user accounts and ASP.NET roles.

Constructors

Constructor Details

PolicyArgument()

Initializes a new instance of the PolicyArgument class with default values.

public PolicyArgument();

Property Details

ArgumentName

Gets or sets the name of the policy argument.

public string ArgumentName { get; set; }

ArgumentValue

Gets or sets the value of the policy argument.

public object ArgumentValue { get; set; }

Method Details

CopySignature()

Creates a new object that is a copy of the current instance.

public object CopySignature();

Equals(Object obj)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj);

GetHashCode()

Serves as the default hash function.

public override int GetHashCode();

ToString()

Returns a string that represents the current object.

public override string ToString();