本文整理汇总了C#中ParserContext.GetServerInstance方法的典型用法代码示例。如果您正苦于以下问题:C# ParserContext.GetServerInstance方法的具体用法?C# ParserContext.GetServerInstance怎么用?C# ParserContext.GetServerInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParserContext
的用法示例。
在下文中一共展示了ParserContext.GetServerInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlaceNameParser
//public static ParseResultCollection Parse(string text)
//{
// return ParseResultCollection.InternalParse(text,new PlaceNameParser(text));
//}
public PlaceNameParser(ParserContext context)
{
this.context = context;
if (placeNamesTrie == null)
placeNamesTrie = context.GetServerInstance();
placeNamesTrie.Connect(context.ServerEndPoint);
}
示例2: NameParser
public NameParser(ParserContext context)
{
this.context = context;
client = context.GetServerInstance();
client.Connect(context.ServerEndPoint);
prefixAndstandard.AddRange(prefixTitleList);
prefixAndstandard.AddRange(titleList);
suffixAndstandard.AddRange(suffixTitleList);
suffixAndstandard.AddRange(titleList);
}
示例3: ChineseAddressParser
public ChineseAddressParser(ParserContext context)
{
if (context.Pattern != ParserPattern.China)
throw new ArgumentOutOfRangeException("中文地址仅对ParserPattern.China有效");
this.context = context;
client = context.GetServerInstance();
client.Connect(context.ServerEndPoint);
//MongoDatabase db = server.GetDatabase("nameResearch");
//_cityNames = db.GetCollection<CityEntity>("cityNames");
//_placeNames = db.GetCollection<NameEntity>("placeNames");
}
示例4: OrgNameParser
public OrgNameParser(ParserContext context)
{
this.context = context;
orgNamesTrie = context.GetServerInstance();
orgNamesTrie.Connect(context.ServerEndPoint);
}