System.Security.Policy.Url Class

Assembly: Mscorlib.dll
Namespace: System.Security.Policy
Summary
Provides the URL from which a code assembly originates as evidence for policy evaluation. This class cannot be inherited.
C# Syntax:
[Serializable]
public sealed class Url : IIdentityPermissionFactory
Remarks
The presence of Url evidence produces a UrlIdentityPermission in the grant set. If there is a CodeAccessPermission.Demand for UrlIdentityPermission, the UrlIdentityPermission that corresponds to the System.Security.Policy.Publisher (not supported on the shared source CLI) evidence is compared to the demanded permission.

The complete URL is considered, including the protocol (HTTP, HTTPS, FTP) and the file. For example, http://www.fourthcoffee.com/process/grind.htm is a complete URL.

URLs can be matched exactly or by a wildcard in the final position. For example, http://www.fourthcoffee.com/process/* is a wildcard URL.

See also:
System.Security.Policy Namespace

System.Security.Policy.Url Member List:

Public Constructors
ctor #1 Initializes a new instance of the Url class with the URL from which a code assembly originates.
Public Properties
Value Read-only

Gets the URL from which the code assembly originates.
Public Methods
Copy Creates a new copy of the evidence object.
CreateIdentityPermission Creates an identity permission corresponding to the current instance of the Url evidence class.
Equals Overridden:
Compares the current Url evidence object to the specified object for equivalence.
GetHashCode Overridden:
Gets the hash code of the current URL.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString Overridden:
Returns a string representation of the current Url.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Security.Policy.Url Member Details

ctor #1
Summary
Initializes a new instance of the Url class with the URL from which a code assembly originates.
C# Syntax:
public Url(
   string name
);
Parameters:

name

The URL of origin for the associated code assembly.

Exceptions
Exception Type Condition
ArgumentNullException The name parameter is null.

Return to top


Property: Value (read-only)
Summary
Gets the URL from which the code assembly originates.
C# Syntax:
public string Value {get;}

Return to top


Method: Copy()
Summary
Creates a new copy of the evidence object.
C# Syntax:
public object Copy();
Return Value:
A new, identical copy of the evidence object.

Return to top


Method: CreateIdentityPermission(
   Evidence evidence
)
Summary
Creates an identity permission corresponding to the current instance of the Url evidence class.
C# Syntax:
public IPermission CreateIdentityPermission(
   Evidence evidence
);
Parameters:

evidence

The evidence set from which to construct the identity permission.

Return Value:
A UrlIdentityPermission for the specified Url evidence.
Implements:
IIdentityPermissionFactory.CreateIdentityPermission

Return to top


Overridden Method: Equals(
   object o
)
Summary
Compares the current Url evidence object to the specified object for equivalence.
C# Syntax:
public override bool Equals(
   object o
);
Parameters:

o

The Url evidence object to test for equivalence with the current object.

Return Value:
true if the two Url objects are equal; otherwise, false.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~Url();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: GetHashCode()
Summary
Gets the hash code of the current URL.
C# Syntax:
public override int GetHashCode();
Return Value:
The hash code of the current URL.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: ToString()
Summary
Returns a string representation of the current Url.
C# Syntax:
public override string ToString();
Return Value:
A representation of the current Url.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.