Custom Security Object Samples
Currently, there are no samples on MSDN for creating custom security objects.
However, the SSCLI ships with implementations for all of the built in security objects
that shipped with the .Net framework 1.0. This source can be used as a sample
to help along with custom security object creation. The Universita Di Pisa has
posted the source code for the SSCLI on their website, so you don't even have to download
the package to view it. Here are some links that may be useful:
AllMembershipCondition.cs (A
simple membership condition)StrongNameMembershipCondition.cs (A
more complete membership condition)UnionCodeGroup.cs (A
sample code group)FileIOPermission.cs (A
permission that works on a list of strings)SecurityPermission.cs (A
permission that works on a set of flags)
Update (11/14/03) : Eugene has just posted a sample of creating
a custom permission: https://blogs.gotdotnet.com/eugenebo/PermaLink.aspx/069af686-c063-4ce4-9cac-6b8d5234918e