UnsignedPublishLicense.Owner 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定內容擁有者。
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) 中的擁有者節點相關聯。