ApplicationManifest.CreateFromFile(String) method

 
Microsoft Office Live Communications Server 2005 with SP1

ApplicationManifest.CreateFromFile

The CreateFromFile method creates an instance of an ApplicationManifest object from a specified application manifest file.

[C#]public static ApplicationManifest CreateFromFile(StringfileName);
[Visual Basic .NET]Public Shared Function CreateFromFile( _
  ByVal fileName As String _
) As ApplicationManifest

Parameters

  • fileName
    Specifies the name of the application manifest XML file, including the full path.

Return Values

This method returns a new ApplicationManifest object.

Remarks

This static method simply reads the supplied XML file and creates an ApplicationManifest object containing the XML content. To compile the application manifest and its associated MSPL script, the Compile method must be called on the newly created ApplicationManifest object.

The application manifest file is interpreted only as either UTF-8 or Unicode format. If the file is UTF-8, the \uXXXX syntax must be used for special characters in string literals within the file. Otherwise, the file should be saved as Unicode.

Example Code [C#]

The following sample demonstrates how to load an application manifest XML source document into the ApplicationManifest object and compile it.

ApplicationManifest myAppManifest = ApplicationManifest.CreateFromFile("C:\\xmldocs\\my_app_manifest_xml_file.xml");

try {

    myAppManifest.Compile();

}
catch (CompilerErrorException cee) {

    Console.WriteLine("The following MSPL compiler errors occurred:");
    System.Collections.IEnumerator myEnumerator = cee.ErrorMessages.GetEnumerator();
    while  (myEnumerator.MoveNext())
            Console.Write("\t{0}", myEnumerator.Current);
    Console.WriteLine();

}

Requirements

Redistributable: Requires Microsoft Office Live Communications Server 2005 with SP1.
Namespace: Microsoft.Rtc.Sip
Assembly: ServerAgent (in ServerAgent.dll)

See Also

ApplicationManifest.Compile, ApplicationManifest.CreateFromString, ApplicationManifest

  
  What did you think of this topic?
  © 2008 Microsoft Corporation. All rights reserved.