Grammar.StgInit(Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The StgInit
method initializes a strongly-typed grammar.
protected:
void StgInit(cli::array <System::Object ^> ^ parameters);
protected void StgInit (object[] parameters);
member this.StgInit : obj[] -> unit
Protected Sub StgInit (parameters As Object())
Parameters
- parameters
- Object[]
Parameters to be passed to initialize the strongly-typed grammar. This parameter may be null.
Remarks
A strongly-typed Grammar object (IsStg
equals true
) can return strongly-typed results (objects, rather than raw text) to a client application. For example, a strongly-typed grammar might return DateTime objects rather than raw recognized input.
You can implement strongly-typed grammars by attaching code to the rules of a grammar. As a recognition engine processes any given rule, taking as input the current partial results, the associated code is executed and the textual information becomes rich type objects. This allows a client to more easily make use of enhanced semantic checking, support for multiple cultures, and internal grammar logic.
Instances of strongly-typed Grammar objects are typically obtained from resources in an assembly as a Type of the Common Language Runtime (CLR). The localized types used to support different languages are examples of such Grammar objects.
Notes to Inheritors
If a strongly-typed grammar requires initialization, StgInit
should be called in a constructor or an initialization method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기