本文整理汇总了C#中OperatorType类的典型用法代码示例。如果您正苦于以下问题:C# OperatorType类的具体用法?C# OperatorType怎么用?C# OperatorType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OperatorType类属于命名空间,在下文中一共展示了OperatorType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OperatorView
public OperatorView(OperatorType type)
: base(0, 0, 10, 10)
{
Type = type;
LineWidth = 1;
LineColor = new Color(0, 0, 0);
}
示例2: PriceFilter
public PriceFilter(StockInfo stockInfo, OperatorType operatorType, PriceFilterRightOperandType rightOperandType,
double? percent = null, double? constant = null)
: base(stockInfo, operatorType, percent)
{
this.rightOperandType = rightOperandType;
this.constant = constant;
}
示例3: FieldCondition
/// <summary>
/// 构造
/// </summary>
/// <param name = "fieldName">字段名</param>
/// <param name = "operator">表达式操作符</param>
/// <param name = "value">值</param>
/// <param name = "nextUnionType">与下一个表达式的联合类型<see cref = "WhereUnionType" /></param>
public FieldCondition(string fieldName, OperatorType @operator, object value, WhereUnionType @nextUnionType)
{
FieldName = fieldName;
Operator = @operator;
Value = value;
NextUnionType = nextUnionType;
}
示例4: GetExpressionType
/// <summary>
/// Returns .NET Expression type based on Operator Type
/// </summary>
/// <param name="opType"></param>
/// <returns></returns>
public static ExpressionType GetExpressionType(OperatorType opType)
{
ExpressionType exprType;
switch ((OperatorType) opType )
{
case OperatorType.EqualsTo : exprType = ExpressionType.Equal;
break;
case OperatorType.NotEqualsTo: exprType = ExpressionType.NotEqual;
break;
case OperatorType.GreaterThan: exprType = ExpressionType.GreaterThan;
break;
case OperatorType.GreaterThanEqualsTo: exprType = ExpressionType.GreaterThanOrEqual;
break;
case OperatorType.LessThan: exprType = ExpressionType.LessThan;
break;
case OperatorType.LessThanEqualsTo: exprType = ExpressionType.LessThanOrEqual;
break;
default: exprType = ExpressionType.IsFalse;
break;
}
return exprType;
}
示例5: OperatorResolveResult
public OperatorResolveResult(OperatorType @operator, TypeDefinition operatorType, params ResolveResult[] operands)
: base(operatorType)
{
Operator = @operator;
OperatorType = operatorType;
Operands = new ReadOnlyCollection<ResolveResult>(operands);
}
示例6: OperatorToken
/// <summary>
/// Initializes a new instance of the <see cref="OperatorToken"/> class.
/// </summary>
/// <param name="op">The operator</param>
public OperatorToken(OperatorType op)
{
Operator = op;
Type = TokenType.Operator;
switch (Operator)
{
case OperatorType.Plus:
Priority = 1;
break;
case OperatorType.Minus:
Priority = 1;
break;
case OperatorType.Mult:
Priority = 2;
break;
case OperatorType.Div:
Priority = 2;
break;
case OperatorType.LeftBraket:
Priority = 0;
break;
case OperatorType.RightBraket:
break;
default:
break;
}
}
示例7: OpSlot
public OpSlot(string value, OperatorType type, int position)
: this()
{
this.Value = value;
this.Type = type;
this.Position = position;
}
示例8: CreateOpPostAssign
public static Operator CreateOpPostAssign(this Node lhs, OperatorType op, Node rhs)
{
var e_lhs = lhs as Expression;
var e_rhs = rhs as Expression;
if (e_lhs == null || e_rhs == null) return null;
OperatorType opAssign;
if (EnumHelper.TryParse(op + "Assign", out opAssign))
{
if (op == OperatorType.Add && e_rhs.IsConstOne())
{
return Operator.PostIncrement(e_lhs);
}
else if (op == OperatorType.Subtract && e_rhs.IsConstOne())
{
return Operator.PostDecrement(e_lhs);
}
else
{
return null;
}
}
else
{
return null;
}
}
示例9: QueryParameter
/// <summary>
/// parametru folosit in constructia HqlObject
/// </summary>
/// <example>memberName condition: paramName</example>
/// <param name="paramName">numele parametrului folosit</param>
/// <param name="paramValue">valoarea parametrului ce va fi inlocuit</param>
/// <param name="memberName">membrul din query ce va fi comparat</param>
/// <param name="condition">conditia de comparatie ('=', 'Like', etc)</param>
public QueryParameter(string paramName, object paramValue, string memberName, OperatorType condition)
{
this.paramName = paramName;
this.paramValue = paramValue;
this.memberName = memberName;
this.condition = condition;
}
示例10: ApplyCSG
public void ApplyCSG()
{
switch (operation) {
case OperatorType.Union:
temp = modeller.getUnion ();
break;
case OperatorType.Intersection:
temp = modeller.getIntersection ();
break;
case OperatorType.Difference:
temp = modeller.getDifference ();
break;
}
// Apply to output game object
CSGGameObject.GenerateMesh(output, ObjMaterial, temp);
// Make sure the output object has its 'solid' updated
output.GetComponent<CSGObject> ().GenerateSolid ();
// Hide the original objects
objectA.SetActive (false);
objectB.SetActive (false);
lasten = enableOperator;
lastop = operation;
}
示例11: GetCompoundBaseOperator
/// <summary>
/// Gets the underlying base operator for the given compound operator.
/// </summary>
/// <param name="compoundOperatorType"> The type of compound operator. </param>
/// <returns> The underlying base operator, or <c>null</c> if the type is not a compound
/// operator. </returns>
private static Operator GetCompoundBaseOperator(OperatorType compoundOperatorType)
{
switch (compoundOperatorType)
{
case OperatorType.CompoundAdd:
return Operator.Add;
case OperatorType.CompoundBitwiseAnd:
return Operator.BitwiseAnd;
case OperatorType.CompoundBitwiseOr:
return Operator.BitwiseOr;
case OperatorType.CompoundBitwiseXor:
return Operator.BitwiseXor;
case OperatorType.CompoundDivide:
return Operator.Divide;
case OperatorType.CompoundLeftShift:
return Operator.LeftShift;
case OperatorType.CompoundModulo:
return Operator.Modulo;
case OperatorType.CompoundMultiply:
return Operator.Multiply;
case OperatorType.CompoundSignedRightShift:
return Operator.SignedRightShift;
case OperatorType.CompoundSubtract:
return Operator.Subtract;
case OperatorType.CompoundUnsignedRightShift:
return Operator.UnsignedRightShift;
}
return null;
}
示例12: Condition
/// <summary>
/// Creates the condition based on it's region id, field, operator to evaluate to the value and whether it is case sensitive.
/// </summary>
/// <param name="regionid">The ID of the region.</param>
/// <param name="field">The name of the field.</param>
/// <param name="aValue">The value to match.</param>
/// <param name="aOperator">The operator for the comparison.</param>
/// <param name="casesensitive">Whether the value is matched with case sensitivity.</param>
public Condition(string regionid, string field, string aValue, OperatorType aOperator, bool casesensitive)
{
this.RegionID = regionid;
this.Field = field;
this.Operator = aOperator;
this.CaseSensitive = casesensitive;
this.Value = aValue;
}
示例13: Operator
public Operator(string name, OperatorType type, int precedence, AssociationType association, Func<double, double, double> body)
: base(name)
{
this.Type = type;
this.Precedence = precedence;
this.Association = association;
this.Body = body;
}
示例14: Token
public Token(OperatorType operatorType, int operandsCount, Associativity assoc)
{
this.Type = TokenType.Operator;
this.OperatorType = operatorType;
this.OperandsCount = operandsCount;
this.Associativity = assoc;
this.Precedence = GetPrecedence();
}
示例15: NumberSprite
// if numDigits = 0, don't care how much space it takes up
private NumberSprite(ContentManager Content, int number, int numDigits, ColorType color, OperatorType op)
{
this.Content = Content;
this.number = number;
this.numDigits = numDigits;
this.color = color;
this.op = op;
}