AppManifest (Propiedad) (2003 System)
Actualización: noviembre 2007
Obtiene un AppManifest que representa el manifiesto de aplicación incluido en el documento.
Espacio de nombres: Microsoft.VisualStudio.Tools.Applications.Runtime
Ensamblado: Microsoft.VisualStudio.Tools.Applications.Runtime (en Microsoft.VisualStudio.Tools.Applications.Runtime.dll)
Sintaxis
'Declaración
Public ReadOnly Property AppManifest As AppManifest
'Uso
Dim instance As ServerDocument
Dim value As AppManifest
value = instance.AppManifest
public AppManifest AppManifest { get; }
Valor de propiedad
Tipo: Microsoft.VisualStudio.Tools.Applications.Runtime. . :: .AppManifest
AppManifest que representa el manifiesto de aplicación incluido en el documento.
Ejemplos
En el siguiente ejemplo de código se crea un nuevo ServerDocument y a continuación se utiliza la propiedad AppManifest para mostrar el contenido del manifiesto de aplicación del documento. En este ejemplo se necesita una referencia al ensamblado Microsoft.VisualStudio.Tools.Applications.Runtime y una instrucción Imports (para Visual Basic) o using (para C#) para el espacio de nombres Microsoft.VisualStudio.Tools.Applications.Runtime al principio del archivo de código.
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.");
}
}
Permisos
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.
Vea también
Referencia
Microsoft.VisualStudio.Tools.Applications.Runtime (Espacio de nombres)