GetManifestCompletedEventArgs.ApplicationManifest 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 배포에 대한 ClickOnce 애플리케이션 매니페스트를 가져옵니다.
public:
property System::Xml::XmlReader ^ ApplicationManifest { System::Xml::XmlReader ^ get(); };
public System.Xml.XmlReader ApplicationManifest { get; }
member this.ApplicationManifest : System.Xml.XmlReader
Public ReadOnly Property ApplicationManifest As XmlReader
속성 값
애플리케이션 매니페스트를 나타내는 XmlReader입니다.
예제
다음 코드 예제에서 애플리케이션 매니페스트를 검사 하는 방법을 보여 줍니다는 GetManifestCompleted 기본적으로 완전 신뢰 애플리케이션에 필요한 지 여부를 결정 하는 이벤트 처리기입니다.
private bool CheckForFullTrust(XmlReader appManifest)
{
if (appManifest == null)
{
throw (new ArgumentNullException("appManifest cannot be null."));
}
XAttribute xaUnrestricted =
XDocument.Load(appManifest)
.Element("{urn:schemas-microsoft-com:asm.v1}assembly")
.Element("{urn:schemas-microsoft-com:asm.v2}trustInfo")
.Element("{urn:schemas-microsoft-com:asm.v2}security")
.Element("{urn:schemas-microsoft-com:asm.v2}applicationRequestMinimum")
.Element("{urn:schemas-microsoft-com:asm.v2}PermissionSet")
.Attribute("Unrestricted"); // Attributes never have a namespace
if (xaUnrestricted != null)
if (xaUnrestricted.Value == "true")
return true;
return false;
}
Private Function CheckForFullTrust(ByVal appManifest As XmlReader) As Boolean
Dim isFullTrust As Boolean = False
If (appManifest Is Nothing) Then
Throw New ArgumentNullException("appManifest cannot be null.")
End If
Dim xaUnrestricted As XAttribute
xaUnrestricted = XDocument.Load(appManifest) _
.Element("{urn:schemas-microsoft-com:asm.v1}assembly") _
.Element("{urn:schemas-microsoft-com:asm.v2}trustInfo") _
.Element("{urn:schemas-microsoft-com:asm.v2}security") _
.Element("{urn:schemas-microsoft-com:asm.v2}applicationRequestMinimum") _
.Element("{urn:schemas-microsoft-com:asm.v2}PermissionSet") _
.Attribute("Unrestricted") ' Attributes never have a namespace
If xaUnrestricted Then
If xaUnrestricted.Value = "true" Then
Return True
End If
End If
Return False
End Function
설명
이 변수를 사용 하 여 필요한 애플리케이션 매니페스트에서 종속성 목록과 같은 정보를 신뢰 하 등 모든 정보를 얻을 수 있습니다. 이 문서 구조에 대 한 자세한 내용은 참조 하세요. ClickOnce 애플리케이션 매니페스트합니다.