• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BinaryOperator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetAuditTrail

 XPBaseCollection GetAuditTrail(Session session, XPBaseObject xpBaseObject, Type auditedObjectWeakReferenceType) {
     var binaryOperator = new BinaryOperator("TargetType", session.GetObjectType(xpBaseObject));
     var operands = new BinaryOperator("TargetKey", XPWeakReference.KeyToString(session.GetKeyValue(xpBaseObject)));
     var auditObjectWR = (XPWeakReference) session.FindObject(auditedObjectWeakReferenceType,new GroupOperator(binaryOperator,operands));
     if (auditObjectWR != null) {
         var baseCollection = (XPBaseCollection) auditObjectWR.ClassInfo.GetMember("AuditDataItems").GetValue(auditObjectWR);
         baseCollection.BindingBehavior = CollectionBindingBehavior.AllowNone;
         return baseCollection;
     }
     return null;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:11,代码来源:AuditTrailCollectionMemberInfo.cs


示例17: BinaryExpression

        /// <summary>
        /// Creates a new binary expression
        /// </summary>
        /// <param name="myLeftExpression">The left side of the BinaryExpression</param>
        /// <param name="myBinaryOperator">The binary operator</param>
        /// <param name="myRightExpression">The right side of the BinaryExpression</param>
        /// <param name="myExpressionIndex">The index which should be used for the expression</param>
        public BinaryExpression (IExpression myLeftExpression, 
                                    BinaryOperator myBinaryOperator, 
                                    IExpression myRightExpression,
                                    string myExpressionIndex = null)
        {
            Left = myLeftExpression;
            Right = myRightExpression;
            Operator = myBinaryOperator;

            ExpressionIndex = myExpressionIndex;
        }
开发者ID:anukat2015,项目名称:sones,代码行数:18,代码来源:BinaryExpression.cs


示例18: BinaryExpression

		public BinaryExpression(IExpression leftExpression, BinaryOperator binaryOperator, IExpression rightExpression)
		{
			if ((object)leftExpression == null)
				throw new ArgumentNullException(nameof(leftExpression));

			if ((object)rightExpression == null)
				throw new ArgumentNullException(nameof(rightExpression));

			this.leftExpression = leftExpression;
			this.binaryOperator = binaryOperator;
			this.rightExpression = rightExpression;
		}
开发者ID:textmetal,项目名称:main,代码行数:12,代码来源:BinaryExpression.cs


示例19: lstBoxApplications_SelectedValueChanged

        private void lstBoxApplications_SelectedValueChanged(object sender, EventArgs e)
        {   
                BinaryOperator bOper = new BinaryOperator("Application", lstBoxApplications.SelectedValue);

                //  CriteriaOperator cri = BinaryOperator
                ColumnFilterInfo d = new ColumnFilterInfo(bOper);

                ((ColumnView)gridConfig.Views[0]).Columns[0].FilterInfo = d;

         

        }
开发者ID:smoo7h,项目名称:PDFScanAndSort,代码行数:12,代码来源:ConfigForm.cs


示例20: AssignmentOperators

 public void AssignmentOperators(BinaryOperator @operator, bool space, string expected)
 {
     Test(
         expected,
         Syntax.BinaryExpression(
             @operator,
             Syntax.ParseName("a"),
             Syntax.LiteralExpression(1)
         ),
         p => p.Spaces.AroundOperators.AssignmentOperators = space
     );
 }
开发者ID:modulexcite,项目名称:CSharpSyntax,代码行数:12,代码来源:SpacesAroundOperatorsFixture.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BinaryOperatorExpression类代码示例发布时间:2022-05-24
下一篇:
C# BinaryOpStorage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap