UnsignedPublishLicense.Owner 属性

定义

获取或设置内容所有者。

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

属性值

拥有已发布内容的用户。

示例

以下示例演示如何使用此属性分配 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

注解

Owner 指定拥有 的用户 PublishLicense

Owner 还与颁发许可证可扩展权限标记语言 (XrML) 中的“所有者”节点相关联。

适用于

另请参阅