The IPermission.IsSubSetOf helptext states:
[http://winfx.msdn.microsoft.com/libr...ssubsetof.asp]
[http://msdn.microsoft.com/library/de...etoftopic.asp]
IPermission.IsSubSetOf :
<------------ BEGIN PASTE ------------->
The current permission is a subset of the specified permission if the
current permission specifies a set of operations that is wholly
contained by the specified permission. For example, a permission that
represents access to C:\example.txt is a subset of a permission that
represents access to C:\. If this method returns true, the current
permission represents no more access to the protected resource than
does the specified permission.
The following statements are required to be true for all
implementations of the IsSubsetOf method. X, Y, and Z represent
IPermission objects that are not a null reference (Nothing in Visual
Basic).
1) X.IsSubsetOf(X) returns true.
2) X.IsSubsetOf(Y) returns the same value as Y.IsSubsetOf(X) if and
only if X and Y represent the same set of permissions.
3) If X.IsSubsetOf(Y) and Y.IsSubsetOf(Z) both return true,
X.IsSubsetOf(Z) returns true.
<------------ END PASTE ------------->
The second statement seems to be wrong:
EXAMPLE: If X gives access to C:\ and Y gives access to D:\. Clearly, X
is no subset of Y and vice verca. Therefore, these are not subsets of
eachother: X.IsSubsetOf(Y) returns false and Y.IsSubsetOf(X) returns
false. According to the second statement this would mean that y and X
represent the same set of permissions.
Shouldn't this second statement state:
2) X.IsSubsetOf(Y) returns TRUE and Y.IsSubsetOf(X) return TRUE if and
only if X and Y represent the same set of permissions.
A response to this message is greatly appreciated.
Regards,
Martijn Kaag
VECOZO BV
www.vecozo.nl