當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。