当前位置: 首页>>代码示例>>C#>>正文


C# BinaryOperator类代码示例

本文整理汇总了C#中BinaryOperator的典型用法代码示例。如果您正苦于以下问题:C# BinaryOperator类的具体用法?C# BinaryOperator怎么用?C# BinaryOperator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BinaryOperator类属于命名空间,在下文中一共展示了BinaryOperator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TypeOperation

        public static IExpressionGraph TypeOperation(IExpressionGraph myLeftValueObject, IExpressionGraph myRightValueObject, BinaryOperator myOperator)
        {
            switch (myOperator)
            {
                case BinaryOperator.AND:
                    myLeftValueObject.IntersectWith(myRightValueObject);

                    break;
                case BinaryOperator.OR:
                    
                    myLeftValueObject.UnionWith(myRightValueObject);

                    break;
                case BinaryOperator.Equals:
                case BinaryOperator.GreaterOrEqualsThan:
                case BinaryOperator.GreaterThan:
                case BinaryOperator.InRange:
                case BinaryOperator.LessOrEqualsThan:
                case BinaryOperator.LessThan:
                case BinaryOperator.NotEquals:
                default:
                    throw new ArgumentOutOfRangeException("myOperator");
            }

            return myLeftValueObject;
        }
开发者ID:anukat2015,项目名称:sones,代码行数:26,代码来源:ABinaryLogicalOperator.cs

示例2: Visit

 public virtual void Visit(BinaryOperator node)
 {
     if (node != null)
     {
          AcceptChildren(node);
     }
 }
开发者ID:nuxleus,项目名称:ajaxmin,代码行数:7,代码来源:TreeVisitor.cs

示例3: Visit

 public void Visit(BinaryOperator op)
 {
     op.LeftOperand.Accept(this);
     _resultBuilder.Append(" ");
     op.RightOperand.Accept(this);
     _resultBuilder.Append("binary");
 }
开发者ID:FreeApophis,项目名称:ArithmeticParser,代码行数:7,代码来源:ReversePolishNotationVisitor.cs

示例4: BinaryExpression

        // ||, &&, ==, !=
        // +, -, *, /, %

        public BinaryExpression(CssValue left, BinaryOperator op, CssValue right)
            : base(NodeKind.Expression)
        {
            Left = left;
            Operator = op;
            Right = right;
        }
开发者ID:carbon,项目名称:Css,代码行数:10,代码来源:BinaryExpression.cs

示例5: BinaryExpression

 public BinaryExpression(BinaryOperator @operator, Expression left, Expression right,
     TypeReference expressionType, TypeSystem typeSystem, IEnumerable<Instruction> instructions, bool isOverridenOperation = false)
     : this(@operator, left, right, DetermineIsChecked(instructions), instructions, isOverridenOperation)
 {
     this.ExpressionType = expressionType;
     this.typeSystem = typeSystem;
 }
开发者ID:saravanaram,项目名称:JustDecompileEngine,代码行数:7,代码来源:BinaryExpression.cs

示例6: GetCriteria

 public static CriteriaOperator GetCriteria(Type serializationConfigurationType, ISerializationConfigurationGroup serializationConfigurationGroup)
 {
     const ISerializationConfiguration serializationConfiguration = null;
     var groupOperator = new BinaryOperator(serializationConfiguration.GetPropertyName(x => x.SerializationConfigurationGroup),serializationConfigurationGroup);
     return new GroupOperator(new BinaryOperator(serializationConfiguration.GetPropertyName(x => x.TypeToSerialize),
                               serializationConfigurationType), groupOperator);
 }
开发者ID:gvilas,项目名称:eXpand,代码行数:7,代码来源:SerializationConfigurationQuery.cs

示例7: CreateFilterCriteria

        CriteriaOperator CreateFilterCriteria()
        {
            if (!Filter_words)
            { // точное совпадение
                CriteriaOperator[] operators = new CriteriaOperator[_View.VisibleColumns.Count];
                for (int i = 0; i < _View.VisibleColumns.Count; i++)
                {
                    if (Filter_Plus)
                        operators[i] = new BinaryOperator(_View.VisibleColumns[i].FieldName, String.Format("%{0}%", _ActiveFilter), BinaryOperatorType.Like);
                    else
                        operators[i] = new BinaryOperator(_View.VisibleColumns[i].FieldName, String.Format("{0}%", _ActiveFilter), BinaryOperatorType.Like);
                }
                return new GroupOperator(GroupOperatorType.Or, operators);
            }
            else
            { // любое слово
                CriteriaOperator[] levels = new CriteriaOperator[FilterText.Length];

                for (int i = 0; i < FilterText.Length; i++)
                {
                    CriteriaOperator[] operators = new CriteriaOperator[_View.VisibleColumns.Count + 1]; // Тэги + 1
                    for (int j = 0; j < _View.VisibleColumns.Count; j++)
                    {
                        operators[j] = new BinaryOperator(_View.VisibleColumns[j].FieldName, String.Format("%{0}%", FilterText[i]), BinaryOperatorType.Like);
                    }
                    // Тэги
                    operators[_View.VisibleColumns.Count] = new BinaryOperator("TagComments", String.Format("%{0}%", FilterText[i]), BinaryOperatorType.Like);

                    levels[i] = new GroupOperator(GroupOperatorType.Or, operators);
                }
                return new GroupOperator(GroupOperatorType.And, levels);
            }
        }
开发者ID:toxig,项目名称:ParnasPlayer,代码行数:33,代码来源:GridViewFilter.cs

示例8:

 object ICriteriaVisitor.Visit(BinaryOperator theOperator){
     var propertyName = ((OperandProperty) theOperator.LeftOperand).PropertyName;
     if (_dictionary.ContainsKey(propertyName)){
         ((OperandValue) theOperator.RightOperand).Value = _dictionary[propertyName];
     }
     return theOperator;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:BinaryOperatorValueMapperCriteriaProcessor.cs

示例9: getGroupOperator

 private static BinaryOperator getGroupOperator(out BinaryOperator binaryOperator2,
                                                out CriteriaOperator groupOperator)
 {
     var binaryOperator = new BinaryOperator("dfs", 324);
     binaryOperator2 = new BinaryOperator("sdfs", 3455);
     groupOperator = new GroupOperator(binaryOperator, binaryOperator2);
     return binaryOperator;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:8,代码来源:CriteriaOperatorExtractorFixture.cs

示例10: FindDefaultTemplate

 public static ICodeTemplate FindDefaultTemplate(TemplateType templateType, Session session, Type codeTemplateType, CodeDomProvider codeDomProvider){
     const ICodeTemplate template = null;
     var binaryOperator = new BinaryOperator(template.GetPropertyName(x => x.TemplateType),templateType);
     var isDefault = new BinaryOperator(template.GetPropertyName(x => x.IsDefault),true);
     var provider = new BinaryOperator(template.GetPropertyName(x => x.CodeDomProvider),codeDomProvider);
     return session.FindObject(PersistentCriteriaEvaluationBehavior.InTransaction,
                               codeTemplateType, new GroupOperator(binaryOperator, isDefault,provider))
            as ICodeTemplate;
 }
开发者ID:akingunes,项目名称:eXpand,代码行数:9,代码来源:CodeTemplateQuery.cs

示例11: Process

 object ICriteriaVisitor.Visit(BinaryOperator theOperator) {
     Process(theOperator);
     var leftOperandValue = GetCustomFunctionOperandValue(theOperator.LeftOperand);
     if (!ReferenceEquals(leftOperandValue,null))
         theOperator.LeftOperand=leftOperandValue;
     var rightOperandValue = GetCustomFunctionOperandValue(theOperator.RightOperand);
     if (!ReferenceEquals(rightOperandValue,null))
         theOperator.RightOperand=rightOperandValue;
     return theOperator;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:10,代码来源:CustomFunctionValueProcessor.cs

示例12: BinaryFormula

		/// <summary>
		///   Initializes a new instance of the <see cref="BinaryFormula" /> class.
		/// </summary>
		/// <param name="leftOperand">The formula on the left-hand side of the binary operator.</param>
		/// <param name="binaryOperator">The operator of the binary formula.</param>
		/// <param name="rightOperand">The formula on the right-hand side of the binary operator.</param>
		internal BinaryFormula(Formula leftOperand, BinaryOperator binaryOperator, Formula rightOperand)
		{
			Requires.NotNull(leftOperand, nameof(leftOperand));
			Requires.InRange(binaryOperator, nameof(binaryOperator));
			Requires.NotNull(rightOperand, nameof(rightOperand));

			LeftOperand = leftOperand;
			Operator = binaryOperator;
			RightOperand = rightOperand;
		}
开发者ID:isse-augsburg,项目名称:ssharp,代码行数:16,代码来源:BinaryFormula.cs

示例13: Find

        public static IPersistentClassInfo Find(Session session, string referenceTypeFullName)
        {
            const IPersistentClassInfo persistentClassInfo = null;
            string propertyName = persistentClassInfo.GetPropertyName(x => x.PersistentAssemblyInfo) + "." + persistentClassInfo.GetPropertyName(x => x.PersistentAssemblyInfo.Name);
            var binaryOperator = new BinaryOperator(propertyName, referenceTypeFullName.Substring(0,referenceTypeFullName.IndexOf(".")));


            var operands = new BinaryOperator(persistentClassInfo.GetPropertyName(x=>x.Name),referenceTypeFullName.Substring(referenceTypeFullName.IndexOf(".")+1));
            return session.FindObject(PersistentCriteriaEvaluationBehavior.InTransaction, WCTypesInfo.Instance.FindBussinessObjectType<IPersistentClassInfo>(), new GroupOperator(binaryOperator, operands)) as IPersistentClassInfo;
        }
开发者ID:aries544,项目名称:eXpand,代码行数:10,代码来源:PersistentClassInfoQuery.cs

示例14: Create

        protected override BinaryExpressionBase<BinaryOperator> Create(Expression left, BinaryOperator op, Expression right)
        {
            if (!(left is AttributeBinaryExpression && right is AttributeBinaryExpression))
            {
                throw new ArgumentException("Both parameter 'left' and parameter 'right' " +
                                            "must be a AttributeBinaryExpression instance.");
            }

            return new AttributesPredicateExpression(left as AttributeBinaryExpression, op, right as AttributeBinaryExpression);
        }
开发者ID:pobingwanghai,项目名称:SharpMapV2,代码行数:10,代码来源:AttributesPredicateExpression.cs

示例15: FormatBinaryOperator

 private void FormatBinaryOperator(BinaryOperator op, bool withParenthesis)
 {
     operators.Push(op);
     if (withParenthesis) { _resultBuilder.Append("("); }
     op.LeftOperand.Accept(this);
     _resultBuilder.AppendFormat(op.ToString());
     op.RightOperand.Accept(this);
     if (withParenthesis) { _resultBuilder.Append(")"); }
     operators.Pop();
 }
开发者ID:FreeApophis,项目名称:ArithmeticParser,代码行数:10,代码来源:MinimalParenthesisVisitor.cs


注:本文中的BinaryOperator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。