UnsignedPublishLicense.Owner Property

 

Gets or sets the content owner.

Namespace:   System.Security.RightsManagement
Assembly:  WindowsBase (in WindowsBase.dll)

public ContentUser Owner { get; set; }

Property Value

Type: System.Security.RightsManagement.ContentUser

The user who owns the published content.

Owner specifies the user who owns the PublishLicense.

Owner is also associated with the Owner node in the issuance license Extensible Rights Markup Language (XrML).

The following example shows how to use this property to assign a ContentUser.

WriteStatus("   Reading '" + xrmlFilename + "' permissions.");
try
{
    StreamReader sr = File.OpenText(xrmlFile);
    xrmlString = sr.ReadToEnd();
}
catch (Exception ex)
{
    MessageBox.Show("ERROR: '"+xrmlFilename+"' open failed.\n"+
        "Exception: " + ex.Message, "XrML File Error",
        MessageBoxButton.OK, MessageBoxImage.Error);
    return false;
}

WriteStatus("   Building UnsignedPublishLicense");
WriteStatus("       from '" + xrmlFilename + "'.");
UnsignedPublishLicense unsignedLicense =
    new UnsignedPublishLicense(xrmlString);
ContentUser author = unsignedLicense.Owner;

.NET Framework
Available since 3.0
Return to top
Show: