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


C# IOperand类代码示例

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


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

示例1: Bucket

        private Bucket(IOperand operand)
        {
            if (operand == null)
                throw new ArgumentNullException("operand");

            _operand = operand;
        }
开发者ID:BarryDahlberg,项目名称:Comb,代码行数:7,代码来源:Bucket.cs

示例2: BinaryOperationBase

 protected BinaryOperationBase(IOperationResultBuilder operationResultBuilder,
     IOperand fieldRefOperand, IOperand valueOperand)
     : base(operationResultBuilder)
 {
     this.fieldRefOperand = fieldRefOperand;
     this.valueOperand = valueOperand;
 }
开发者ID:chutinhha,项目名称:tvmcorptvs,代码行数:7,代码来源:BinaryOperationBase.cs

示例3: BinaryOperationBase

 protected BinaryOperationBase(IOperationResultBuilder operationResultBuilder,
     IOperand columnOperand, IOperand valueOperand)
     : base(operationResultBuilder)
 {
     this.ColumnOperand = columnOperand;
     this.ValueOperand = valueOperand;
 }
开发者ID:ricardocarneiro,项目名称:sharepoint-3,代码行数:7,代码来源:BinaryOperationBase.cs

示例4: ReplaceLastOperand

        public void ReplaceLastOperand(IOperand operand)
        {
            if (Operands.Count == 0)
            {
                throw new InvalidOperationException("There are no operands to replace.");
            }


            int stealIndex = Operands.Count - 1;
            
            NativeOperation op = Operands[stealIndex] as NativeOperation;

            // Check if the "steal" target is itself something that we can steal from, if so, 
            // recurse. This rule of checkiung association type is a bit confusing, this should
            // be a property?

            if (op !=null && op.Operands.Count > 1 && op.AssociationType == AssociationType.Multiplicaton)
            {
                IOperation func = (IOperation)op;
                func.ReplaceLastOperand(operand);
            }
            else
            {
                _Operands[Operands.Count - 1] = operand;
            }
        }
开发者ID:kaleb,项目名称:CsQuery,代码行数:26,代码来源:NativeOperation.cs

示例5: GreaterThan

 public IOperand GreaterThan(IOperand rhs)
 {
     if (!(rhs is LongOperand))
         throw new RPN_Exception("Argument invalid in LongOperand.> : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = ((long)this.Value > (long)((Operand)rhs).Value) ? true : false;
     return oprResult;
 }
开发者ID:kinshuk4,项目名称:XENONParser,代码行数:8,代码来源:LongOperand.cs

示例6: EqualTo

 /// IComparisonOperators methods.  Return values are always BooleanOperands type
 public IOperand EqualTo(IOperand rhs)
 {
     if (!(rhs is LongOperand))
         throw new RPN_Exception("Argument invalid in LongOperand.== : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = (long)this.Value == (long)((Operand)rhs).Value;
     return oprResult;
 }
开发者ID:kinshuk4,项目名称:XENONParser,代码行数:9,代码来源:LongOperand.cs

示例7: Divide

 public IOperand Divide(IOperand rhs)
 {
     if (!(rhs is LongOperand))
         throw new RPN_Exception("Argument invalid in LongOperand.Divide : rhs");
     LongOperand oprResult = new LongOperand("Result", Type.GetType("System.Int64"));
     oprResult.Value = (long)this.Value / (long)((Operand)rhs).Value;
     return oprResult;
 }
开发者ID:kinshuk4,项目名称:XENONParser,代码行数:8,代码来源:LongOperand.cs

示例8: LessThanOrEqualTo

 public IOperand LessThanOrEqualTo(IOperand rhs)
 {
     if (!(rhs is LongOperand))
         throw new RPN_Exception("Argument invalid in LongOperand.<= : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = ((long)this.Value <= (long)((Operand)rhs).Value) ? true : false;
     return oprResult;
 }
开发者ID:kinshuk4,项目名称:XENONParser,代码行数:8,代码来源:LongOperand.cs

示例9: OR

 public IOperand OR(IOperand rhs)
 {
     if (!(rhs is BoolOperand))
         throw new RPN_Exception("Argument invalid in BoolOperand.|| : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = ((bool)this.Value || (bool)((Operand)rhs).Value) ? true : false;
     return oprResult;
 }
开发者ID:kinshuk4,项目名称:XENONParser,代码行数:8,代码来源:BoolOperand.cs

示例10: Match

        internal static bool Match(PackageItem package, IOperand operand)
        {
            var expression = operand as Expression;

            if (expression != null)
                return MatchExpression(package, expression);
            return MatchPredicate(package, operand);
        }
开发者ID:henjuv,项目名称:Mg2,代码行数:8,代码来源:QueryMatcher.cs

示例11: ReplaceLastOperand

        public void ReplaceLastOperand(IOperand operand)
        {
            if (Operands.Count == 0)
            {
                throw new InvalidOperationException("There are no operands to replace.");
            }

            _Operands[Operands.Count - 1] = operand;
        }
开发者ID:BenHall,项目名称:ProgNet2012-Completed,代码行数:9,代码来源:NativeOperation.cs

示例12: CopyTo

 protected override IOperand CopyTo(IOperand operand)
 {
     NativeOperation target = (NativeOperation)operand;
     foreach (var item in _Operators)
     {
         target._Operators.Add(item);
     }
     return base.CopyTo(target);
 }
开发者ID:kaleb,项目名称:CsQuery,代码行数:9,代码来源:NativeOperation.cs

示例13: DateRangesOverlapOperation

 public DateRangesOverlapOperation(IOperationResultBuilder operationResultBuilder,
     IOperand startFieldRefOperand, IOperand stopFieldRefOperand, IOperand recurrenceFieldRefOperand, IOperand dateTimeOperand)
     : base(operationResultBuilder)
 {
     this.startFieldRefOperand = startFieldRefOperand;
     this.stopFieldRefOperand = stopFieldRefOperand;
     this.recurrenceFieldRefOperand = recurrenceFieldRefOperand;
     this.dateTimeOperand = dateTimeOperand;
 }
开发者ID:chutinhha,项目名称:aiaintranet,代码行数:9,代码来源:DateRangesOverlapOperation.cs

示例14: MatchPredicate

        private static bool MatchPredicate(PackageItem package, IOperand predicate)
        {
            var unaryPredicate = predicate as UnaryPredicate;
            if (unaryPredicate != null)
                return MatchPredicate(package, unaryPredicate);

            var binaryPredicate = predicate as BinaryPredicate;
            if (binaryPredicate != null)
                return MatchPredicate(package, binaryPredicate);

            return true;
        }
开发者ID:henjuv,项目名称:Mg2,代码行数:12,代码来源:QueryMatcher.cs

示例15: Range

        private Range(IOperand min = null, IOperand max = null, bool minInclusive = false, bool maxInclusive = false)
        {
            if (min == null && max == null)
                throw new ArgumentException("Min and max cannot both be null.");

            // TODO check min < max?

            Min = min;
            Max = max;
            MinInclusive = minInclusive;
            MaxInclusive = maxInclusive;
        }
开发者ID:roberthannon,项目名称:Comb,代码行数:12,代码来源:Range.cs


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