48 [SecuritySafeCritical]
55 object usedEvidence =
null;
56 if (PolicyManager.CheckMembershipCondition(base.MembershipCondition, evidence, out usedEvidence))
59 IDelayEvaluatedEvidence delayEvaluatedEvidence = usedEvidence as IDelayEvaluatedEvidence;
60 if (delayEvaluatedEvidence !=
null && !delayEvaluatedEvidence.IsVerified)
62 policyStatement.AddDependentEvidence(delayEvaluatedEvidence);
65 IEnumerator enumerator = base.Children.GetEnumerator();
66 while (enumerator.
MoveNext() && !flag)
69 if (policyStatement2 !=
null)
71 policyStatement.InplaceUnion(policyStatement2);
78 return policyStatement;
89 if (base.MembershipCondition.Check(evidence))
91 return CalculateAssemblyPolicy(evidence);
102 if (evidence ==
null)
106 if (base.MembershipCondition.Check(evidence))
110 IEnumerator enumerator = base.Children.GetEnumerator();
114 if (codeGroup2 !=
null)
126 URLString uRLString = url.GetURLString();
127 if (
string.Compare(uRLString.Scheme,
"file",
StringComparison.OrdinalIgnoreCase) != 0)
131 string directoryName = uRLString.GetDirectoryName();
140 Url hostEvidence = evidence.GetHostEvidence<Url>();
141 if (hostEvidence !=
null)
143 policyStatement = CalculatePolicy(hostEvidence);
145 if (policyStatement ==
null)
149 return policyStatement;
157 fileCodeGroup.
Name = base.Name;
159 IEnumerator enumerator = base.Children.GetEnumerator();
164 return fileCodeGroup;
174 string text = e.Attribute(
"Access");
192 if (fileCodeGroup !=
null && base.
Equals((
object)fileCodeGroup) && m_access == fileCodeGroup.m_access)
203 return base.GetHashCode() + m_access.GetHashCode();
206 internal override string GetTypeName()
208 return "System.Security.Policy.FileCodeGroup";
abstract CodeGroup ResolveMatchingCodeGroups(Evidence evidence)
When overridden in a derived class, resolves matching code groups.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
FileIOPermissionAccess
Specifies the type of file access requested.
bool MoveNext()
Advances the enumerator to the next element of the collection.
override CodeGroup ResolveMatchingCodeGroups(Evidence evidence)
Resolves matching code groups.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
Represents the security policy levels for the common language runtime. This class cannot be inherited...
PolicyStatementAttribute
Defines special attribute flags for security policy on code groups.
string Name
Gets or sets the name of the code group.
IPermission SetPermission(IPermission perm)
Sets a permission to the T:System.Security.PermissionSet, replacing any existing permission of the sa...
Provides the URL from which a code assembly originates as evidence for policy evaluation....
Represents the statement of a T:System.Security.Policy.CodeGroup describing the permissions and other...
void AddChild(CodeGroup group)
Adds a child code group to the current code group.
static object Parse(Type enumType, string value)
Converts the string representation of the name or numeric value of one or more enumerated constants t...
override string PermissionSetName
Gets the name of the named permission set for the code group.
Provides information about, and means to manipulate, the current environment and platform....
Grants permission to manipulate files located in the code assemblies to code assemblies that match th...
IList Children
Gets or sets an ordered list of the child code groups of a code group.
Represents a collection that can contain many different types of permissions.
Defines the test to determine whether a code assembly is a member of a code group.
Provides the base class for enumerations.
Represents the XML object model for encoding security objects. This class cannot be inherited.
override string AttributeString
Gets a string representation of the attributes of the policy statement for the code group.
override void ParseXml(SecurityElement e, PolicyLevel level)
When overridden in a derived class, reconstructs properties and internal state specific to a derived ...
string Description
Gets or sets the description of the code group.
object Current
Gets the element in the collection at the current position of the enumerator.
Represents the abstract base class from which all implementations of code groups must derive.
override void CreateXml(SecurityElement element, PolicyLevel level)
When overridden in a derived class, serializes properties and internal state specific to a derived co...
override CodeGroup Copy()
Makes a deep copy of the current code group.
PolicyStatement PolicyStatement
Gets or sets the policy statement associated with the code group.
override string MergeLogic
Gets the merge logic.
override int GetHashCode()
Gets the hash code of the current code group.
static string GetFullPath(string path)
Returns the absolute path for the specified path string.
FileCodeGroup(IMembershipCondition membershipCondition, FileIOPermissionAccess access)
Initializes a new instance of the T:System.Security.Policy.FileCodeGroup class.
override PolicyStatement Resolve(Evidence evidence)
Resolves policy for the code group and its descendants for a set of evidence.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
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.
Specifies that the class can be serialized.
override bool Equals(object o)
Determines whether the specified code group is equivalent to the current code group.
Controls the ability to access files and folders. This class cannot be inherited.
PolicyStatementAttribute Attributes
Gets or sets the attributes of the policy statement.
Supports a simple iteration over a non-generic collection.
Performs operations on T:System.String instances that contain file or directory path information....
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...