How do I referencing common constants and classes with different components?

Last reviewed: 12/2/2009

HOW Article ID: H090803

The information in this article applies to:

  • GrammarKit 3
  • LexiconKit 3
  • ProfileKit 3
  • SpeechKit 6
  • VoiceMarkupKit 3

Summary

The Chant enumeration constants, ChantEngine class, and HasEventArgs class (.NET) are common across GrammarKit, LexiconKit, ProfileKit, SpeechKit, and VoiceMarkupKit component libraries.

To eliminate redundancy, a new Chant shared library for .NET and Java programming languages provides a single reference library for these resources.

More Information

SpeechKit 6 introduced a new common library for enumeration constants, the ChantEngine class, and the HasEventArgs (.NET) class for the following platforms:

  • Chant.Shared.dll - .NET v1.1, .NET v2, .NET v3
  • Chant.SharedWCE.dll - .NET cf2
  • chant-shared.jar - Java

Since these constants and classes are used in GrammarKit, LexiconKit, ProfileKit, SpeechKit, and VoiceMarkupKit, the shared library provides a common version across component classes. This eliminates redundancy within the component classes, the need to use fully qualified names, and eliminate redundancy warnings in the IntelliSense editors. SpeechKit 6, ProfileKit 3, and GrammarKit 3 currently have their common resources removed and rely on the shared libraries.

To update your C# applications, do the following:

  • Add a reference to the Chant.Shared.dll (Win32) or Chant.SharedWCE.dll (WinCE)
  • Add using Chant.Shared; statement to your application
  • Remove the Chant.SpeechKit qualifier from the HasEventArgs declaration or change to Chant.Shared

To update your VB. NET applications, do the following:

  • Add a reference to the Chant.Shared.dll (Win32) or Chant.SharedWCE.dll (WinCE)
  • Add Imports Chant.Shared statement to your application
  • Remove the Chant.SpeechKit qualifier from the HasEventArgs declaration or change to Chant.Shared

To update your Java applications, do the following:

  • Copy the chant-shared.jar to your JRE lib directory and include a reference to you runtime library declarations or environment variables
  • Add imports net.chant.shared.*; statement to your application