Share via


ServerDocument.AppManifest Property (2003 System)

Gets an AppManifest that represents the application manifest contained in the document.

Namespace:  Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly:  Microsoft.VisualStudio.Tools.Applications.Runtime (in Microsoft.VisualStudio.Tools.Applications.Runtime.dll)

Syntax

'Declaration
Public ReadOnly Property AppManifest As AppManifest
'Usage
Dim instance As ServerDocument
Dim value As AppManifest

value = instance.AppManifest
public AppManifest AppManifest { get; }

Property Value

Type: Microsoft.VisualStudio.Tools.Applications.Runtime.AppManifest
An AppManifest that represents the application manifest contained in the document.

Examples

The following code example creates a new ServerDocument and then uses the AppManifest property to display the contents of the application manifest in the document. This example requires a reference to the Microsoft.VisualStudio.Tools.Applications.Runtime assembly, and an Imports (for Visual Basic) or using (for C#) statement for the Microsoft.VisualStudio.Tools.Applications.Runtime namespace at the top of your code file.

Private Sub DisplayManifest(ByVal fileName As String)
    If ServerDocument.IsCustomized(fileName) Then
        Dim serverDocument1 As ServerDocument = Nothing
        Try
            serverDocument1 = New ServerDocument(fileName)
            MsgBox("The application manifest " + _
                "contains the following XML: " + vbLf + vbLf + _
                serverDocument1.AppManifest.ToXml())
        Finally
            If Not serverDocument1 Is Nothing Then
                serverDocument1.Close()
            End If
        End Try
    Else
        MsgBox("The specified document is not " + _
            "customized.")
    End If
End Sub
private void DisplayManifest(string fileName)
{   
    if (ServerDocument.IsCustomized(fileName))
    {
        ServerDocument serverDocument1 = null;
        try
        {
            serverDocument1 = new ServerDocument(fileName);
            MessageBox.Show("The application manifest " +
                "contains the following XML: \n\n" +
                serverDocument1.AppManifest.ToXml());
        }
        finally
        {
            if (serverDocument1 != null)
                serverDocument1.Close();
        }
    }
    else
    {
        MessageBox.Show("The specified document is not " +
            "customized.");
    }
}

Permissions

See Also

Reference

ServerDocument Class

ServerDocument Members

Microsoft.VisualStudio.Tools.Applications.Runtime Namespace