ApplicationManifest.Compile

The Compile method parses the application manifest specified with the ApplicationManifest.CreateFromFile or ApplicationManifest.CreateFromString method and compiles the content.

Syntax

[C#]

  Copy imageCopy Code
public void Compile();

Syntax

[Visual Basic .NET]

  Copy imageCopy Code
Public Sub Compile()

Parameters

This method has no parameters.

Return Values

This method has no return values.

Remarks

This method will compile the application manifest. The message filter script in the CDATA block encapsulated by the <lc:splScript> tags must be written in Microsoft's SIP Processing Language (MSPL).

If compilation is successful, the public properties of the ApplicationManifest object will reflect the content of the XML document.

If compilation is unsuccessful, CompilerErrorException will be thrown, and the resulting exception object will contain the specific error or errors. The public properties of the ApplicationManifest object instance will not be updated until compilation is successful.

For more information about creating and implementing an application manifest, or in writing an MSPL script, see SIP Application Manifests.

Example Code

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

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

try {

myAppManifest.Compile();

}
catch (CompilerErrorException compilerErrorException) {

Console.WriteLine("The following MSPL compiler errors occurred:");
foreach (object errMsg in compilerErrorException.ErrorMessages)
{
   Console.Write("\t{0}", errMsg.ToString());
}
Console.WriteLine();

}

Requirements

Redistributable: Requires Microsoft Lync Server 2010.

Namespace:Microsoft.Rtc.Sip

Assembly: ServerAgent (in ServerAgent.dll)

See Also