13 private SiteString m_name;
17 public string Name => m_name.ToString();
28 m_name =
new SiteString(name);
31 private Site(SiteString name)
42 return new Site(ParseSiteFromUrl(url));
45 private static SiteString ParseSiteFromUrl(
string name)
47 URLString uRLString =
new URLString(name);
48 if (
string.Compare(uRLString.Scheme,
"file",
StringComparison.OrdinalIgnoreCase) == 0)
52 return new SiteString(
new URLString(name).Host);
55 internal SiteString GetSiteString()
72 public override bool Equals(
object o)
86 return Name.GetHashCode();
93 return new Site(m_name);
111 return securityElement;
121 internal object Normalize()
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
override EvidenceBase Clone()
Creates a new object that is a copy of the current instance.
override bool Equals(object o)
Compares the current T:System.Security.Policy.Site to the specified object for equivalence.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
Provides the Web site from which a code assembly originates as evidence for policy evaluation....
static Site CreateFromUrl(string url)
Creates a new T:System.Security.Policy.Site object from the specified URL.
Provides a base class from which all objects to be used as evidence must derive.
Defines the method that creates a new identity permission.
void AddChild(SecurityElement child)
Adds a child element to the XML element.
Provides information about, and means to manipulate, the current environment and platform....
override int GetHashCode()
Returns the hash code of the current website name.
Represents the XML object model for encoding security objects. This class cannot be inherited.
string Name
Gets the website from which the code assembly originates.
Defines the identity permission for the Web site from which the code originates. This class cannot be...
override string ToString()
Returns a string representation of the current T:System.Security.Policy.Site object.
object Copy()
Creates an equivalent copy of the T:System.Security.Policy.Site object.
Defines methods implemented by permission types.
The exception that is thrown when one of the arguments provided to a method is not valid.
Defines the set of information that constitutes input to security policy decisions....
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
IPermission CreateIdentityPermission(Evidence evidence)
Creates an identity permission that corresponds to the current T:System.Security.Policy....
Specifies that the class can be serialized.
Site(string name)
Initializes a new instance of the T:System.Security.Policy.Site class with the website from which a c...
Provides information about a specific culture (called a locale for unmanaged code development)....
override string ToString()
Produces a string representation of an XML element and its constituent attributes,...