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

C# IOperator类代码示例

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

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



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

示例1: Create

        public virtual IList<Tour> Create(IPttRequest request, IOperator op, out TourFactoryStatus status)
        {
            if (op.ExtensiveLoggingNeeded)
            {
                Logger.LogProcess("TourFactory.Create trying to get html for " + request.Url + " with postdata:"+request.PostValue);
            }

            var htmlSource = op.RequestResponseBehavior.GetHtmlMaster(request, false, op.ExtensiveLoggingNeeded, op.Name);
            if(op.ExtensiveLoggingNeeded)
            {
                Logger.LogProcess("TourFactory.Create Html coming from htmlmaster");
                Logger.LogProcess(htmlSource ?? "");
            }
            if (string.IsNullOrEmpty(htmlSource))
            {
                status = new TourFactoryStatus { Success = false };
                return null;
            }

            var htmlSourceRefined = op.Refine(request, htmlSource);
            if (op.ExtensiveLoggingNeeded)
            {
                Logger.LogProcess("TourFactory.Create Html refined");
                Logger.LogProcess(htmlSourceRefined ?? "");
            }
            var html = new HtmlDocument();
            html.LoadHtml(htmlSourceRefined);
            var list = GetToursFromHtml(request, op, html, out status);
            return list;
        }
开发者ID:yukseljunk,项目名称:wps,代码行数:30,代码来源:TourFactory.cs


示例2: Expression

		public Expression(IOperator linkingOperator, object leftOperand, IOperator comparisonOperator, object rightOperand)
		{
			this.linkingOperator = linkingOperator;
			this.leftOperand = leftOperand;
			this.comparisonOperator = comparisonOperator;
			this.rightOperand = rightOperand;
		}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:7,代码来源:Expression.cs


示例3: EditBasicFilter

 internal EditBasicFilter(BasicFilter target, string newName, ITag newTag, IOperator newOperator, string newCriteria)
 {
     _newName = newName;
       _newTag = newTag;
       _newCriteria = newCriteria;
       _target = target;
       _newOperator = newOperator;
 }
开发者ID:TungTh,项目名称:Email-Reader,代码行数:8,代码来源:EditBasicFilter.cs


示例4: BasicFilter

 public BasicFilter(string name, ITag tag, IOperator filterOperator, string criteria)
     : base(name)
 {
     _tag = tag;
       _operator = filterOperator;
       _tag.attachObserver(this);
       this._criteria = criteria;
 }
开发者ID:TungTh,项目名称:Email-Reader,代码行数:8,代码来源:BasicFilter.cs


示例5: ObjectRule

 public ObjectRule(ISecurityObject iobject,
     IOperator ioperator,
     OperatorMethod method)
 {
     this.securityObject = iobject;
     this.ioperator = ioperator;
     this.method = method;
     this.ruleId = Guid.NewGuid();
 }
开发者ID:rongcheng,项目名称:benz,代码行数:9,代码来源:ObjectRule.cs


示例6: Create

 public override IList<Tour> Create(IPttRequest request, IOperator op, out TourFactoryStatus status)
 {
     if(!Biblo.TourDates.Contains(op.QueryObject.StartDate))
     {
         status = new TourFactoryStatus { Success = true, MoveToNextHotel = true};
         return null;
     }
     return base.Create(request, op, out status);
 }
开发者ID:yukseljunk,项目名称:wps,代码行数:9,代码来源:BibloTourFactory.cs


示例7: Calculate

        public string Calculate(string operandA, string operandB, IOperator operatorForAAndB)
        {
            var A = ConvertFromRomanToArabNumber(operandA);
            var B = ConvertFromRomanToArabNumber(operandB);

            var answerForExpression = operatorForAAndB.CalculateIt(A, B);

            return ConvertFromArabToRomanNumber(answerForExpression);
        }
开发者ID:Confirmit,项目名称:Students,代码行数:9,代码来源:Calculator.cs


示例8: OperatorViewModel

        public OperatorViewModel(IOperator currentOperator, IConnection connection)
        {
            if (currentOperator == null)
                throw new ArgumentNullException("currentOperator");
            if (connection == null)
                throw new ArgumentNullException("connection");

            this.connection = connection;
            this.currentOperator = currentOperator;
            this.ChatHistoryRecords = new ObservableCollection<IOperatorChatHistoryRecord>();
        }
开发者ID:KatrukSergii,项目名称:CallCenter,代码行数:11,代码来源:OperatorViewModel.cs


示例9: edit

        public void edit(string newName, ITag newTag, IOperator newFilterOperator, string newCriteria)
        {
            Data.ActionHandler.beginMacro();
              Data.ActionHandler.storeAction(new EditBasicFilter(this, _name, _tag, _operator, _criteria));
              _name = newName;
              _operator = newFilterOperator;
              _criteria = newCriteria;

              _tag.detachObserver(this);
              _tag = newTag;
              _tag.attachObserver(this);
              Data.ActionHandler.endMacro();
        }
开发者ID:TungTh,项目名称:Email-Reader,代码行数:13,代码来源:BasicFilter.cs


示例10: NodeFuzzyRelation

        internal NodeFuzzyRelation( FuzzyRelation subrelation1, FuzzyRelation subrelation2, IOperator oper)
        {
            if (
                subrelation1 == null ||
                //subrelation2 == null ||
                oper == null)
                throw new ArgumentNullException();

            _subrelation1 = subrelation1;
            _subrelation2 = subrelation2;
            _operator = oper;
            subrelation1.Parent = this;
            if (subrelation2 !=null)
                subrelation2.Parent = this;
        }
开发者ID:patrick-huyphan,项目名称:fuzzyDemo,代码行数:15,代码来源:NodeFuzzyRelation.cs


示例11: CreateOperatorShapeInfo

    public static IOperatorShapeInfo CreateOperatorShapeInfo(IOperator op) {
      IEnumerable<string> operatorParameterNames = op.Parameters.Where(p => p is IValueParameter && typeof(IOperator).IsAssignableFrom(p.DataType)).Select(p => p.Name);
      IEnumerable<string> paramaterNameValues = op.Parameters.Where(p => !(p is IValueParameter && typeof(IOperator).IsAssignableFrom(p.DataType))).Select(p => p.ToString());

      OperatorShapeInfo operatorShapeInfo = new OperatorShapeInfo(operatorParameterNames, paramaterNameValues);
      operatorShapeInfo.AddConnector(PredecessorConnector);
      operatorShapeInfo.Collapsed = true;
      operatorShapeInfo.Title = op.Name;
      operatorShapeInfo.TypeName = op.GetType().GetPrettyName();
      operatorShapeInfo.Color = Color.LightBlue;
      operatorShapeInfo.LineWidth = 1;
      operatorShapeInfo.LineColor = Color.Black;
      operatorShapeInfo.Icon = new Bitmap(op.ItemImage);

      return operatorShapeInfo;
    }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:16,代码来源:OperatorShapeInfoFactory.cs


示例12: GetOwnFunction

        /// <summary>
        /// 获取拥有的function
        /// </summary>
        /// <param name="operId"></param>
        /// <param name="method"></param>
        /// <returns></returns>
        public static DataTable GetOwnFunction(IOperator oper, OperatorMethod method)
        {
//            SecurityObjectType objType = SecurityObjectType.Function;

//            string sql = @"select f.functionId,f.FunctionName from accessControlList a,FunctionList f where
//                            [email protected] and [email protected] and [email protected] and a.ObjectId=f.FunctionId";

//            SqlParameter[] Parameters = new SqlParameter[3];


//            Parameters[0] = new SqlParameter("@operId", SqlDbType.UniqueIdentifier);
//            Parameters[1] = new SqlParameter("@operMethod", SqlDbType.TinyInt);
//            Parameters[2] = new SqlParameter("@objType", SqlDbType.TinyInt);


//            Parameters[0].Value = oper.OperatorId;
//            Parameters[1].Value = (int)method;
//            Parameters[2].Value = (int)objType;

//            return SqlHelper.ExecuteDataset(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql, Parameters).Tables[0];

            FunctionService fs = new FunctionService();
            return fs.GetOwnFunction(oper.OperatorId, (int)method);
        }
开发者ID:rongcheng,项目名称:benz,代码行数:30,代码来源:Function.cs


示例13: FindMainLoop

 private TabuSearchMainLoop FindMainLoop(IOperator start) {
   IOperator mainLoop = start;
   while (mainLoop != null && !(mainLoop is TabuSearchMainLoop))
     mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
   if (mainLoop == null) return null;
   else return (TabuSearchMainLoop)mainLoop;
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:TabuSearch.cs


示例14: ParameterizeStochasticOperator

 private void ParameterizeStochasticOperator(IOperator op) {
   if (op is IStochasticOperator) {
     IStochasticOperator stOp = (IStochasticOperator)op;
     stOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
     stOp.RandomParameter.Hidden = true;
   }
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:TabuSearch.cs


示例15: Expression

 public Expression(double arg1, double arg2, IOperator o)
 {
     _arg1 = arg1;
     _arg2 = arg2;
     _o = o;
 }
开发者ID:natallia-perets,项目名称:calc,代码行数:6,代码来源:Expression.cs


示例16: FindMainLoop

 private SimulatedAnnealingMainLoop FindMainLoop(IOperator start) {
   IOperator mainLoop = start;
   while (mainLoop != null && !(mainLoop is SimulatedAnnealingMainLoop))
     mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
   if (mainLoop == null) return null;
   else return (SimulatedAnnealingMainLoop)mainLoop;
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:SimulatedAnnealing.cs


示例17: ProcessHigherPrecendenceOperators

        private ParseErrorType ProcessHigherPrecendenceOperators(ParseContext context, IOperator currentOperator) {
            Debug.Assert(_operators.Count > 1);
            ParseErrorType errorType = ParseErrorType.None;
            Association association = currentOperator.Association;

            // At least one operator above sentinel is on the stack.
            do {
                errorType = MakeNode(context);
                if (errorType == ParseErrorType.None) {
                    IOperator nextOperatorNode = _operators.Peek();

                    if (association == Association.Left && nextOperatorNode.Precedence <= currentOperator.Precedence) {
                        break;
                    }

                    if (association == Association.Right && nextOperatorNode.Precedence < currentOperator.Precedence) {
                        break;
                    }
                }
            } while (_operators.Count > 1 && errorType == ParseErrorType.None);

            return errorType;
        }
开发者ID:int19h,项目名称:RTVS-OLD,代码行数:23,代码来源:ExpressionParser.cs


示例18: HandleFunctionOrIndexer

        private ParseErrorType HandleFunctionOrIndexer(IOperator operatorNode) {
            // Indexing or function call is performed on the topmost operand which 
            // generally should be a variable or a node that evaluates to it.
            // However, we leave syntax check to separate code.

            IRValueNode operand = this.SafeGetOperand();
            if (operand == null) {
                // Oddly, no operand
                return ParseErrorType.IndentifierExpected;
            }

            operatorNode.LeftOperand = operand;
            operatorNode.AppendChild(operand);
            _operands.Push(operatorNode);

            return ParseErrorType.None;
        }
开发者ID:int19h,项目名称:RTVS-OLD,代码行数:17,代码来源:ExpressionParser.cs


示例19: GetIndexerOrFunctionErrorRange

        private ITextRange GetIndexerOrFunctionErrorRange(ParseContext context, IOperator operatorNode) {
            ITextRange range = null;
            if (operatorNode is Indexer) {
                range = ((Indexer)operatorNode).LeftBrackets;
            } else if (operatorNode is FunctionCall) {
                range = ((FunctionCall)operatorNode).OpenBrace;
            }

            if (range == null) {
                range = context.Tokens.FirstOrDefault((x) => x.Start >= operatorNode.End);
            }

            if (range == null) {
                range = operatorNode;
            }

            return range;
        }
开发者ID:int19h,项目名称:RTVS-OLD,代码行数:18,代码来源:ExpressionParser.cs


示例20: Wrap

        /// <summary>
        /// Obtains a reflection wrapper for an operator.
        /// </summary>
        /// <param name="target">The method, or null if none.</param>
        /// <returns>The reflection wrapper, or null if none.</returns>
        public StaticMethodWrapper Wrap(IOperator target)
        {
            if (target == null)
                return null;

            StaticDeclaredTypeWrapper declaringType = MakeDeclaredTypeWithoutSubstitution(target.GetContainingType());
            return new StaticMethodWrapper(this, target, declaringType, declaringType, declaringType.Substitution);
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:13,代码来源:PsiReflectionPolicy6.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IOption类代码示例发布时间:2022-05-24
下一篇:
C# IOperationLock类代码示例发布时间: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