本文整理汇总了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;
}
示例2: Expression
public Expression(IOperator linkingOperator, object leftOperand, IOperator comparisonOperator, object rightOperand)
{
this.linkingOperator = linkingOperator;
this.leftOperand = leftOperand;
this.comparisonOperator = comparisonOperator;
this.rightOperand = rightOperand;
}
示例3: EditBasicFilter
internal EditBasicFilter(BasicFilter target, string newName, ITag newTag, IOperator newOperator, string newCriteria)
{
_newName = newName;
_newTag = newTag;
_newCriteria = newCriteria;
_target = target;
_newOperator = newOperator;
}
示例4: BasicFilter
public BasicFilter(string name, ITag tag, IOperator filterOperator, string criteria)
: base(name)
{
_tag = tag;
_operator = filterOperator;
_tag.attachObserver(this);
this._criteria = criteria;
}
示例5: ObjectRule
public ObjectRule(ISecurityObject iobject,
IOperator ioperator,
OperatorMethod method)
{
this.securityObject = iobject;
this.ioperator = ioperator;
this.method = method;
this.ruleId = Guid.NewGuid();
}
示例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);
}
示例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);
}
示例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>();
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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.");
}
示例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, "+"));
}