ApplicationManifest.CreateFromFile(String) method
Communications Server 2007 Server SDK Documentation |
ApplicationManifest.CreateFromFile
The CreateFromFile method creates an instance of an ApplicationManifest object from a specified application manifest file.
[C#] public static ApplicationManifest CreateFromFile( String fileName );FakePre-062d4f9e41754e98a5961076f260d0bb-2d21adac287341deabbe42901a1d5317
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 Communications Server 2007.
Namespace: Microsoft.Rtc.Sip
Assembly: ServerAgent (in ServerAgent.dll)
See Also
ApplicationManifest.Compile, ApplicationManifest.CreateFromString, ApplicationManifest
What did you think of this topic? |
© 2007 Microsoft Corporation. All rights reserved. |