本文整理汇总了C#中TermType类的典型用法代码示例。如果您正苦于以下问题:C# TermType类的具体用法?C# TermType怎么用?C# TermType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TermType类属于命名空间,在下文中一共展示了TermType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TermStore
public TermStore(string name, TermType termType)
{
_name = name;
_termType = termType;
_multiValue = null;
_fieldValues = null;
}
开发者ID:dlnuckolls,项目名称:glorykidd-public,代码行数:7,代码来源:TermStore.cs
示例2: StructureFunction
public StructureFunction(string name, int arity, TermType outputType, ConstructorInfo constructor, double priority, IList<TermType> inputTypes)
: base(name, arity, priority)
{
this.outputType = outputType;
this.inputTypes = inputTypes;
this.constructor = constructor;
}
开发者ID:KULeuven-KRR,项目名称:IdpGie,代码行数:7,代码来源:StructureFunction.cs
示例3: CreateTerm
public static Term CreateTerm(TermType termType, bool systemTerm, bool IsManagedItem, Template template, bool isFilter)
{
switch (termType)
{
case TermType.Text:
return new TextTerm(systemTerm, template, isFilter);
case TermType.Date:
return new DateTerm(systemTerm, template, isFilter);
case TermType.Link:
return new LinkTerm(systemTerm, template, isFilter);
case TermType.MSO:
return new MSOTerm(systemTerm, template, isFilter);
case TermType.Renewal:
return new RenewalTerm(systemTerm, IsManagedItem, template, isFilter);
case TermType.Facility:
return new FacilityTerm(systemTerm, template, isFilter);
case TermType.PickList:
return new PickListTerm(systemTerm, template, isFilter);
case TermType.ComplexList:
return new ComplexList(systemTerm, template, false, isFilter);
case TermType.External:
throw new Exception("The CreateTerm method is not to be used when creating an external term.");
case TermType.PlaceHolderAttachments:
throw new Exception("The CreateTerm method is not to be used when creating a PlaceHolderAttachments term.");
case TermType.PlaceHolderComments:
throw new Exception("The CreateTerm method is not to be used when creating a PlaceHolderComments term.");
default:
throw new Exception(string.Format("Edit screen not implemented for TermType = {0}", termType));
}
}
开发者ID:dlnuckolls,项目名称:glorykidd-public,代码行数:30,代码来源:Helper.cs
示例4: Function
public Function(string name, int arity, TermType outputType = TermType.All, params TermType[] inputTypes)
: base(name, arity)
{
this.OutputType = outputType;
this.inputTypes = new TermType[arity];
for (int i = arity - 0x01; i >= 0x00; i--) {
this.inputTypes [i] = TermType.None;
}
this.WidenInput (inputTypes);
}
开发者ID:KULeuven-KRR,项目名称:IdpGie,代码行数:10,代码来源:Function.cs
示例5: ConvertedValue
public override object ConvertedValue(TermType target)
{
switch (target) {
case TermType.Int:
return this.Value;
case TermType.Float:
return (double)this.value;
default :
throw new InvalidCastException ();
}
}
开发者ID:KULeuven-KRR,项目名称:IdpGie,代码行数:11,代码来源:FunctionIntegerInstance.cs
示例6: TermParsedEventArgs
public TermParsedEventArgs( TermType tt,
string word,
string phrase,
long number,
string keyword,
Relation r,
bool exclude
)
{
this.termType = tt;
this.word = word;
this.phrase = phrase;
this.number = number;
this.keyword = keyword;
this.relation = r;
this.excludeTerm = exclude;
}
开发者ID:pulb,项目名称:basenji,代码行数:17,代码来源:EventHandlers.cs
示例7: Term
public Term(TermType typeofterm)
{
TypeOfTerm=typeofterm;
switch(typeofterm)
{
case TermType.ATOM: StrVal="";break;
case TermType.SMALL_ATOM: StrVal="";break;
case TermType.STRING: StrVal="";break;
case TermType.INTEGER: IntVal=0;break;
case TermType.SMALL_INTEGER: IntVal=0;break;
case TermType.LARGE_TUPLE: TupleVal=new List<Term>(); IntVal=0; break;
case TermType.LIST: TupleVal = new List<Term>(); IntVal = 0; break;
case TermType.SMALL_TUPLE: TupleVal=new List<Term>(); IntVal=0; break;
case TermType.NEW_FLOAT: FloatVal=0.0f;break;
//Default: do nothinc))
}
}
开发者ID:feamorx86,项目名称:c-sharp-utils,代码行数:20,代码来源:ExternalTermFormat+.cs
示例8: Without
protected Without (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Without.cs
示例9: IndexRename
protected IndexRename (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:IndexRename.cs
示例10: FunctionStructureAttribute
public FunctionStructureAttribute(string name, TermType outputType)
: base(name)
{
this.outputType = outputType;
}
开发者ID:KULeuven-KRR,项目名称:IdpGie,代码行数:5,代码来源:FunctionStructureAttribute.cs
示例11: Default
protected Default (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Default.cs
示例12: ConvertQuery
private static string ConvertQuery(ParseTreeNode node, TermType type) {
string result = "";
// Note that some NonTerminals don't actually get into the AST tree,
// because of some Irony's optimizations - punctuation stripping and
// transient nodes elimination. For example, ParenthesizedExpression - parentheses
// symbols get stripped off as punctuation, and child expression node
// (parenthesized content) replaces the parent ParenthesizedExpression node
switch (node.Term.Name) {
case "BinaryExpression":
string opSym = string.Empty;
string op = node.ChildNodes[1].FindTokenAndGetText().ToLower();
string sqlOp = "";
switch(op) {
case "": case "&": case "and":
sqlOp = " AND ";
type = TermType.Inflectional;
break;
case "-":
sqlOp = " AND NOT ";
break;
case "|": case "or":
sqlOp = " OR ";
break;
}//switch
result = "(" + ConvertQuery(node.ChildNodes[0], type) + sqlOp + ConvertQuery(node.ChildNodes[2], type) + ")";
break;
case "PrimaryExpression":
result = "(" + ConvertQuery(node.ChildNodes[0], type) + ")";
break;
case "ProximityList":
string[] tmp = new string[node.ChildNodes.Count];
type = TermType.Exact;
for (int i = 0; i < node.ChildNodes.Count; i++) {
tmp[i] = ConvertQuery(node.ChildNodes[i], type);
}
result = "(" + string.Join(" NEAR ", tmp) + ")";
type = TermType.Inflectional;
break;
case "Phrase":
result = '"' + node.Token.ValueString + '"';
break;
case "ThesaurusExpression":
result = " FORMSOF (THESAURUS, " +
node.ChildNodes[1].Token.ValueString + ") ";
break;
case "ExactExpression":
result = " \"" + node.ChildNodes[1].Token.ValueString + "\" ";
break;
case "Term":
switch (type) {
case TermType.Inflectional:
result = node.Token.ValueString;
if (result.EndsWith("*"))
result = "\"" + result + "\"";
else
result = " FORMSOF (INFLECTIONAL, " + result + ") ";
break;
case TermType.Exact:
result = node.Token.ValueString;
break;
}
break;
// This should never happen, even if input string is garbage
default:
throw new ApplicationException("Converter failed: unexpected term: " +
node.Term.Name + ". Please investigate.");
}
return result;
}
开发者ID:androdev4u,项目名称:XLParser,代码行数:79,代码来源:SearchGrammar.cs
示例13: March
protected March (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:March.cs
示例14: Bracket
protected Bracket (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Bracket.cs
示例15: Funcall
protected Funcall (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Funcall.cs
示例16: Poco
public Poco(TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:fiLLLip,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Poco.cs
示例17: OuterJoin
protected OuterJoin (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:OuterJoin.cs
示例18: pvariable
private static string pvariable(char[] fmt, ref int pos, out TermType type)
{
int start = pos;
for (pos = skip_null_chars(fmt, pos); pos < fmt.Length; pos++)
{
char c = fmt[pos];
if (char.IsLetterOrDigit(c) || (c == '_'))
continue;
else
break;
}
int i = pos;
int end = pos;
if (fmt.Length > i + 1 && fmt[i] == ':' && fmt[i + 1] == ':')
{
i = pos + 2;
int tps = i;
for (char c = fmt[i]; char.IsLetter(c) && i < fmt.Length - 1; c = fmt[++i]) ;
if (fmt[i] == '(' && i < fmt.Length - 1 && fmt[i + 1] == ')')
{
pos = i + 2;
string tp = new string(fmt, tps, i - tps);
switch (tp)
{
case "int":
case "integer":
type = TermType.Int;
break;
case "str":
case "string":
type = TermType.String;
break;
case "atom":
type = TermType.Atom;
break;
case "float":
case "double":
type = TermType.Double;
break;
case "binary":
type = TermType.Binary;
break;
case "bool":
case "boolean":
type = TermType.Boolean;
break;
case "byte":
type = TermType.Byte;
break;
case "char":
type = TermType.Char;
break;
case "list":
type = TermType.List;
break;
case "tuple":
type = TermType.Tuple;
break;
case "pid":
type = TermType.Pid;
break;
case "ref":
case "reference":
type = TermType.Ref;
break;
case "port":
type = TermType.Port;
break;
default:
throw new ArgumentException("Type '" + tps + "' is not supported!");
}
}
else
throw new ArgumentException("Invalid variable type specification: " +
new string(fmt, start, pos - start));
}
else
type = TermType.Object;
int len = end - start;
return new string(fmt, start, len);
}
开发者ID:saleyn,项目名称:otp.net,代码行数:89,代码来源:Format.cs
示例19: Iso8601
protected Iso8601 (TermType termType, Arguments args, OptArgs optargs) : base(termType, args, optargs)
{
}
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:3,代码来源:Iso8601.cs
示例20: ConvertedValue
public override object ConvertedValue(TermType target)
{
return this.value;
}
开发者ID:KULeuven-KRR,项目名称:IdpGie,代码行数:4,代码来源:FunctionFloatInstance.cs
注:本文中的TermType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论