本文整理汇总了C#中IExpr类的典型用法代码示例。如果您正苦于以下问题:C# IExpr类的具体用法?C# IExpr怎么用?C# IExpr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExpr类属于命名空间,在下文中一共展示了IExpr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetParameterMethod
internal void SetParameterMethod(string pm, IExpr[] args)
{
if (!this.p.MultiValue)
throw new ArgumentException(string.Format("{0} must be a MultiValue parameter to accept methods", this.p.Name.Nm));
if (pm == null)
{
_type = ReportParameterMethodEnum.Index;
}
else switch (pm)
{
case "Contains": _type = ReportParameterMethodEnum.Contains; break;
case "BinarySearch": _type = ReportParameterMethodEnum.BinarySearch; break;
case "Count":
_type = ReportParameterMethodEnum.Count;
if (args != null)
throw new ArgumentException("Count does not have any arguments.");
break;
case "IndexOf": _type = ReportParameterMethodEnum.IndexOf; break;
case "LastIndexOf": _type = ReportParameterMethodEnum.LastIndexOf; break;
case "Value": _type = ReportParameterMethodEnum.Value; break;
default:
throw new ArgumentException(string.Format("{0} is an unknown array method.", pm));
}
if (_type != ReportParameterMethodEnum.Count)
{
if (args == null || args.Length != 1)
throw new ArgumentException(string.Format("{0} must have exactly one argument.", pm));
_arg = args[0];
}
return;
}
开发者ID:myersBR,项目名称:My-FyiReporting,代码行数:35,代码来源:FunctionReportParameter.cs
示例2: Function
public Function(string name, IExpr fst, IExpr snd)
{
this.IsBinary = true;
this.Name = name;
this.FirstArgument = fst;
this.SecondArgument = snd;
}
开发者ID:Zaid-Ajaj,项目名称:Demos,代码行数:7,代码来源:DataStructures.cs
示例3: FunctionAggrStdevp
string _key; // key for cache when scope is dataset we can cache the result
/// <summary>
/// Aggregate function: Stdevp = (sqrt(n sum(square(x)) - square((sum(x))) / n*n)
/// Stdev assumes values are a sample of the population of data. If the data
/// is the entire representation then use Stdevp.
///
/// Return type is decimal for decimal expressions and double for all
/// other expressions.
/// </summary>
public FunctionAggrStdevp(List<ICacheData> dataCache, IExpr e, object scp)
: base(e, scp)
{
_key = "aggrstdevp" + Interlocked.Increment(ref Parser.Counter).ToString();
dataCache.Add(this);
}
开发者ID:Elboodo,项目名称:My-FyiReporting,代码行数:16,代码来源:FunctionAggrStdevp.cs
示例4: ConstantOptimization
public virtual IExpr ConstantOptimization()
{
_ArgExpr = _ArgExpr.ConstantOptimization();
if (_ArgExpr.IsConstant())
{
string o = _ArgExpr.EvaluateString(null, null);
if (o == null)
throw new Exception("Globals collection argument is null");
switch (o.ToLower())
{
case "pagenumber":
return new FunctionPageNumber();
case "totalpages":
return new FunctionTotalPages();
case "executiontime":
return new FunctionExecutionTime();
case "reportfolder":
return new FunctionReportFolder();
case "reportname":
return new FunctionReportName();
default:
throw new Exception(string.Format("Globals collection argument '{0}' is unknown.", o));
}
}
return this;
}
开发者ID:NelsonSantos,项目名称:fyiReporting-Android,代码行数:28,代码来源:FunctionGlobalCollection.cs
示例5: FunctionAggrCountDistinct
string _key; // key used for caching value
#endregion Fields
#region Constructors
/// <summary>
/// Aggregate function: CountDistinct
///
/// Return type is double
/// </summary>
public FunctionAggrCountDistinct(List<ICacheData> dataCache, IExpr e, object scp)
: base(e, scp)
{
_key = "countdistinct" + Interlocked.Increment(ref Parser.Counter).ToString();
dataCache.Add(this);
}
开发者ID:bittercoder,项目名称:odd-reports,代码行数:18,代码来源:FunctionAggrCountDistinct.cs
示例6: FunctionSystem
TypeCode _ReturnTypeCode; // the return type
/// <summary>
/// passed class name, function name, and args for evaluation
/// </summary>
public FunctionSystem(string c, string f, IExpr[] a, TypeCode type)
{
_Cls = c;
_Func = f;
_Args = a;
_ReturnTypeCode = type;
}
开发者ID:mnisl,项目名称:OD,代码行数:12,代码来源:FunctionSystem.cs
示例7: Elt
public Elt(What what, IExpr ty) {
Contract.Requires(what != What.Bottom || ty == null);
Contract.Requires(what != What.Exact || ty != null);
this.what = what;
this.ty = ty;
this.manyBounds = null;
}
开发者ID:Chenguang-Zhu,项目名称:ICE-C5,代码行数:7,代码来源:DynamicTypeLattice.cs
示例8: FunctionAggrMax
string _key; // key for caching
/// <summary>
/// Aggregate function: Max returns the highest value
/// Return type is same as input expression
/// </summary>
public FunctionAggrMax(List<ICacheData> dataCache, IExpr e, object scp)
: base(e, scp)
{
_key = "aggrmax" + Interlocked.Increment(ref Parser.Counter).ToString();
// Determine the result
_tc = e.GetTypeCode();
dataCache.Add(this);
}
开发者ID:Elboodo,项目名称:My-FyiReporting,代码行数:14,代码来源:FunctionAggrMax.cs
示例9: ExprGetMethod
public ExprGetMethod(
IExpr klassExpr,
ValueSymbol selector,
SourceInfo info
)
{
KlassExpr = klassExpr;
Selector = selector;
mInfo = info;
}
开发者ID:takuto-h,项目名称:rhea,代码行数:10,代码来源:ExprGetMethod.cs
示例10: ConstantOptimization
public IExpr ConstantOptimization()
{
_rhs = _rhs.ConstantOptimization();
if (_rhs.IsConstant())
{
decimal d = EvaluateDecimal(null, null);
return new ConstantDecimal(d);
}
return this;
}
开发者ID:bittercoder,项目名称:odd-reports,代码行数:11,代码来源:FunctionUnaryMinusDecimal.cs
示例11: FunctionAggrRvSum
private TypeCode _tc; // type of result: decimal or double
#endregion Fields
#region Constructors
/// <summary>
/// Aggregate function: RunningValue Sum returns the sum of all values of the
/// expression within the scope up to that row
/// Return type is decimal for decimal expressions and double for all
/// other expressions.
/// </summary>
public FunctionAggrRvSum(List<ICacheData> dataCache, IExpr e, object scp)
: base(e, scp)
{
_key = "aggrrvsum" + Interlocked.Increment(ref Parser.Counter).ToString();
// Determine the result
_tc = e.GetTypeCode();
if (_tc != TypeCode.Decimal) // if not decimal
_tc = TypeCode.Double; // force result to double
dataCache.Add(this);
}
开发者ID:bittercoder,项目名称:reportingcloud,代码行数:23,代码来源:FunctionAggrRvSum.cs
示例12: ConstantOptimization
public IExpr ConstantOptimization()
{
_rhs = _rhs.ConstantOptimization();
if (_rhs.IsConstant())
{
bool b = EvaluateBoolean(null, null);
return new ConstantBoolean(b);
}
return this;
}
开发者ID:bittercoder,项目名称:odd-reports,代码行数:11,代码来源:FunctionNot.cs
示例13: ConstantOptimization
public IExpr ConstantOptimization()
{
_rhs = _rhs.ConstantOptimization();
if (_rhs.IsConstant())
{
double d = EvaluateDouble(null, null);
return new ConstantInteger((int) d);
}
return this;
}
开发者ID:bittercoder,项目名称:reportingcloud,代码行数:11,代码来源:FunctionUnaryMinusInteger.cs
示例14: ExprSetMethod
public ExprSetMethod(
IExpr klassExpr,
ValueSymbol selector,
IExpr valueExpr,
SourceInfo info
)
{
mKlassExpr = klassExpr;
mSelector = selector;
mValueExpr = valueExpr;
mInfo = info;
}
开发者ID:takuto-h,项目名称:rhea,代码行数:12,代码来源:ExprSetMethod.cs
示例15: ExprSend
public ExprSend(
IExpr recvExpr,
ValueSymbol selector,
IList<IExpr> argExprs,
SourceInfo info
)
{
RecvExpr = recvExpr;
Selector = selector;
ArgExprs = argExprs;
mInfo = info;
}
开发者ID:takuto-h,项目名称:rhea,代码行数:12,代码来源:ExprSend.cs
示例16: ConstantOptimization
public IExpr ConstantOptimization()
{
_Formatee = _Formatee.ConstantOptimization();
_Format = _Format.ConstantOptimization();
if (_Formatee.IsConstant() && _Format.IsConstant())
{
string s = EvaluateString(null, null);
return new ConstantString(s);
}
return this;
}
开发者ID:mnisl,项目名称:OD,代码行数:12,代码来源:FunctionFormat.cs
示例17: FunctionCode
TypeCode _ReturnTypeCode; // the return type
#endregion Fields
#region Constructors
/// <summary>
/// passed ReportClass, function name, and args for evaluation
/// </summary>
public FunctionCode(string f, IExpr[] a, TypeCode type)
{
_Func = f;
_Args = a;
_ReturnTypeCode = type;
_ArgTypes = new Type[a.Length];
int i=0;
foreach (IExpr ex in a)
{
_ArgTypes[i++] = XmlUtil.GetTypeFromTypeCode(ex.GetTypeCode());
}
}
开发者ID:NelsonSantos,项目名称:fyiReporting-Android,代码行数:22,代码来源:FunctionCode.cs
示例18: ConstantOptimization
public IExpr ConstantOptimization()
{
_If = _If.ConstantOptimization();
_IfTrue = _IfTrue.ConstantOptimization();
_IfFalse = _IfFalse.ConstantOptimization();
if (_If.IsConstant())
{
bool result = _If.EvaluateBoolean(null, null);
return result? _IfTrue: _IfFalse;
}
return this;
}
开发者ID:romeroyonatan,项目名称:opendental,代码行数:14,代码来源:FunctionIif.cs
示例19: FunctionCustomInstance
TypeCode _ReturnTypeCode; // the return type
#endregion Fields
#region Constructors
/// <summary>
/// passed ReportClass, function name, and args for evaluation
/// </summary>
public FunctionCustomInstance(ReportClass rc, string f, IExpr[] a, TypeCode type)
{
_Cls = null;
_Func = f;
_Args = a;
_Rc = rc;
_ReturnTypeCode = type;
_ArgTypes = new Type[a.Length];
int i=0;
foreach (IExpr ex in a)
{
_ArgTypes[i++] = XmlUtil.GetTypeFromTypeCode(ex.GetTypeCode());
}
}
开发者ID:bittercoder,项目名称:odd-reports,代码行数:24,代码来源:FunctionCustomInstance.cs
示例20: FunctionCustomStatic
TypeCode _ReturnTypeCode; // the return type
#endregion Fields
#region Constructors
/// <summary>
/// passed class name, function name, and args for evaluation
/// </summary>
public FunctionCustomStatic(CodeModules cm, string c, string f, IExpr[] a, TypeCode type)
{
_Cls = c;
_Func = f;
_Args = a;
_Cm = cm;
_ReturnTypeCode = type;
_ArgTypes = new Type[a.Length];
int i=0;
foreach (IExpr ex in a)
{
_ArgTypes[i++] = XmlUtil.GetTypeFromTypeCode(ex.GetTypeCode());
}
}
开发者ID:bittercoder,项目名称:reportingcloud,代码行数:24,代码来源:FunctionCustomStatic.cs
注:本文中的IExpr类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论