[This is preliminary documentation and subject to change.]
Loads an instance of the AuthorizationPolicy class populated from an authorization policy stored as a XML resource in the calling assembly's manifest.
An instance of the AuthorizationPolicy class populated from the given resource.
The following example loads an authorization policy embedded as a resource named "LaMarvin.Constable.Test._doc.xml":
[Visual Basic]
Dim resourceName As String = "LaMarvin.Constable.Test._doc.xml"
Dim policy As AuthorizationPolicy = AuthorizationPolicyLoader.LoadFromXmlResource(resourceName)
[C#]
string resourceName = "LaMarvin.Constable.Test._doc.xml";
AuthorizationPolicy policy = AuthorizationPolicyLoader.LoadFromXmlResource(resourceName);
CAUTION Please note that we've qualified the name of the embedded XML file ("_doc.xml") with the default namespace that is defined for the particular assembly's project. If you're not sure what is the fully qualified name of your embedded resource, just compile the assembly and examine it with the ILDasm tool that comes with .NET Framework installation.
AuthorizationPolicyLoader Class | LaMarvin.Constable Namespace | AuthorizationPolicyLoader.LoadFromXmlResource Overload List