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


C# IOperator类代码示例

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


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

 protected OperatorGraph(OperatorGraph original, Cloner cloner)
   : base(original, cloner) {
   operators = cloner.Clone(original.operators);
   initialOperator = cloner.Clone(original.initialOperator);
   visualizationInfo = cloner.Clone(original.visualizationInfo);
   Initialize();
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:OperatorGraph.cs

示例14: ScriptTypeConvertExpr

        public ScriptTypeConvertExpr(AstNodeArgs args)
            : base(args)
        {
            if (ChildNodes.Count == 2)
              {
            if (args.ChildNodes[0] is ScriptExpr &&
            !(args.ChildNodes[1] is ScriptExpr))
            {
              // ( Expr )
              expr = args.ChildNodes[0] as ScriptExpr;
            }
            else
            {
              //(Type) Expr
              typeExpr = args.ChildNodes[0] as ScriptExpr;
              expr = args.ChildNodes[1] as ScriptExpr;
            }
              }
              else
              {
            throw new ScriptException("Grammar error!");
              }

              @operator = RuntimeHost.GetBinaryOperator("+");
              if (@operator == null)
            throw new ScriptException("RuntimeHost did not initialize property. Can't find binary operators.");
        }
开发者ID:Temperament,项目名称:FiestaShark,代码行数:27,代码来源:ScriptTypeConvertExpr.cs

示例15: ScriptTypeConvertExpr

    public ScriptTypeConvertExpr(AstNodeArgs args)
        : base(args)
    {
      if (ChildNodes.Count == 2)
      {
        if (args.ChildNodes[0] is ScriptExpr &&
            !(args.ChildNodes[1] is ScriptExpr))
        {
          // ( Expr )
          _expr = args.ChildNodes[0] as ScriptExpr;
          _typeExpr = null;
        }
        else
        {
          //(Type) Expr
          _typeExpr = args.ChildNodes[0] as ScriptExpr;
          _expr = args.ChildNodes[1] as ScriptExpr;         
        }
      }
      else
      {
        throw new ScriptSyntaxErrorException(Strings.GrammarErrorExceptionMessage);
      }

      _operator = RuntimeHost.GetBinaryOperator("+");
      if (_operator == null)
        throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "+"));
    }
开发者ID:eightrivers,项目名称:SSharp,代码行数:28,代码来源:ScriptTypeConvertExpr.cs


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