CreateQueryTemplate(T) 方法 (String, String, CepStream(T))
从 LINQ 表达式创建新的查询模板。
命名空间: Microsoft.ComplexEventProcessing
程序集: Microsoft.ComplexEventProcessing(在 Microsoft.ComplexEventProcessing.dll 中)
语法
public QueryTemplate CreateQueryTemplate<T>(
string queryTemplateName,
string description,
CepStream<T> streamDefinition
)
类型参数
- T
参数
- queryTemplateName
类型:System. . :: . .String
元数据中的查询模板的名称。
- description
类型:System. . :: . .String
查询模板的说明。
- streamDefinition
类型:Microsoft.ComplexEventProcessing.Linq. . :: . .CepStream< (Of < ( <'T> ) > ) >
查询模板定义。
返回值
类型:Microsoft.ComplexEventProcessing. . :: . .QueryTemplate
正在创建的新的查询模板对象。
示例
var inputstream = CepStream{RawData}.Create("filterInput");
var filtered = from e in inputstream
where e.Value > 30
select e;
QueryTemplate filterQT = application.CreateQueryTemplate("filterLogic", "Description of the query template", filtered);