Partager via


UnsignedPublishLicense.Owner Propriété

Définition

Obtient ou définit le propriétaire du contenu.

public:
 property System::Security::RightsManagement::ContentUser ^ Owner { System::Security::RightsManagement::ContentUser ^ get(); void set(System::Security::RightsManagement::ContentUser ^ value); };
public System.Security.RightsManagement.ContentUser Owner { get; set; }
member this.Owner : System.Security.RightsManagement.ContentUser with get, set
Public Property Owner As ContentUser

Valeur de propriété

L'utilisateur qui possède le contenu publié.

Exemples

L’exemple suivant montre comment utiliser cette propriété pour affecter un 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;
WriteStatus("   Reading '" & xrmlFilename & "' permissions.")
Try
    Dim sr As StreamReader = File.OpenText(xrmlFile)
    xrmlString = sr.ReadToEnd()
Catch ex As Exception
    MessageBox.Show("ERROR: '" & xrmlFilename &"' open failed." & vbLf & "Exception: " & ex.Message, "XrML File Error", MessageBoxButton.OK, MessageBoxImage.Error)
    Return False
End Try

WriteStatus("   Building UnsignedPublishLicense")
WriteStatus("       from '" & xrmlFilename & "'.")
Dim unsignedLicense As New UnsignedPublishLicense(xrmlString)
Dim author As ContentUser = unsignedLicense.Owner

Remarques

Owner spécifie l’utilisateur propriétaire de PublishLicense.

Owner est également associé au nœud Propriétaire dans le langage XrML (Extensible Rights Markup Language) de licence d’émission.

S’applique à

Voir aussi