33 if (!VerifyType(target))
43 isolatedStorageFilePermission2.m_userQuota =
IsolatedStoragePermission.max(m_userQuota, isolatedStorageFilePermission.m_userQuota);
44 isolatedStorageFilePermission2.m_machineQuota =
IsolatedStoragePermission.max(m_machineQuota, isolatedStorageFilePermission.m_machineQuota);
45 isolatedStorageFilePermission2.m_expirationDays =
IsolatedStoragePermission.max(m_expirationDays, isolatedStorageFilePermission.m_expirationDays);
46 isolatedStorageFilePermission2.m_permanentData = (m_permanentData || isolatedStorageFilePermission.m_permanentData);
48 return isolatedStorageFilePermission2;
60 if (m_userQuota == 0
L && m_machineQuota == 0
L && m_expirationDays == 0
L && !m_permanentData)
73 return isolatedStorageFilePermission.m_userQuota >= m_userQuota && isolatedStorageFilePermission.m_machineQuota >= m_machineQuota && isolatedStorageFilePermission.m_expirationDays >= m_expirationDays && (isolatedStorageFilePermission.m_permanentData || !m_permanentData) && isolatedStorageFilePermission.m_allowed >= m_allowed;
91 if (!VerifyType(target))
102 return target.
Copy();
105 isolatedStorageFilePermission2.m_userQuota =
IsolatedStoragePermission.min(m_userQuota, isolatedStorageFilePermission.m_userQuota);
106 isolatedStorageFilePermission2.m_machineQuota =
IsolatedStoragePermission.min(m_machineQuota, isolatedStorageFilePermission.m_machineQuota);
107 isolatedStorageFilePermission2.m_expirationDays =
IsolatedStoragePermission.min(m_expirationDays, isolatedStorageFilePermission.m_expirationDays);
108 isolatedStorageFilePermission2.m_permanentData = (m_permanentData && isolatedStorageFilePermission.m_permanentData);
110 if (isolatedStorageFilePermission2.m_userQuota == 0
L && isolatedStorageFilePermission2.m_machineQuota == 0
L && isolatedStorageFilePermission2.m_expirationDays == 0
L && !isolatedStorageFilePermission2.m_permanentData && isolatedStorageFilePermission2.m_allowed ==
IsolatedStorageContainment.None)
114 return isolatedStorageFilePermission2;
124 isolatedStorageFilePermission.m_userQuota = m_userQuota;
125 isolatedStorageFilePermission.m_machineQuota = m_machineQuota;
126 isolatedStorageFilePermission.m_expirationDays = m_expirationDays;
127 isolatedStorageFilePermission.m_permanentData = m_permanentData;
128 isolatedStorageFilePermission.m_allowed = m_allowed;
130 return isolatedStorageFilePermission;
133 int IBuiltInPermission.GetTokenIndex()
135 return GetTokenIndex();
138 internal static int GetTokenIndex()
148 return ToXml(
"System.Security.Permissions.IsolatedStorageFilePermission");
bool IsUnrestricted()
Returns a value indicating whether the current permission is unrestricted.
The exception that is thrown for invalid casting or explicit conversion.
override bool IsSubsetOf(IPermission target)
Determines whether the current permission is a subset of the specified permission.
IPermission Copy()
Creates and returns an identical copy of the current permission.
IsolatedStorageContainment
Specifies the permitted use of isolated storage.
Provides information about, and means to manipulate, the current environment and platform....
IsolatedStorageContainment UsageAllowed
Gets or sets the type of isolated storage containment allowed.
Represents the XML object model for encoding security objects. This class cannot be inherited.
Specifies the allowed usage of a private virtual file system. This class cannot be inherited.
IsolatedStorageFilePermission(PermissionState state)
Initializes a new instance of the T:System.Security.Permissions.IsolatedStorageFilePermission class w...
Defines methods implemented by permission types.
override IPermission Union(IPermission target)
Creates a permission that is the union of the current permission and the specified permission.
The exception that is thrown when one of the arguments provided to a method is not valid.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
Specifies that the class can be serialized.
Represents access to generic isolated storage capabilities.
override SecurityElement ToXml()
Creates an XML encoding of the permission and its current state.
override IPermission Intersect(IPermission target)
Creates and returns a permission that is the intersection of the current permission and the specified...
override IPermission Copy()
Creates and returns an identical copy of the current permission.