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

C# IScope类代码示例

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

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



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

示例1: Register

 /// <summary>
 /// Add built-in array functions to the scope
 /// </summary>
 internal static void Register(IScope scope)
 {
     scope.SetValue("l3.mapToMap", new MapToMap());
     scope.SetValue("l3.mapToArray", new MapToArray());
     scope.SetValue("l3.getMapKeys", new GetMapKeys());
     scope.SetValue("l3.getMapValues", new GetMapValues());
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:10,代码来源:MapFunctions.cs


示例2: SummonAction

 public SummonAction(IScope scope, ICost cost, UnitData unit, IScreenEffect screenEffect)
 {
     _scope = scope;
     _cost = cost;
     _unit = unit;
     _screenEffect = screenEffect;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:7,代码来源:SummonAction.cs


示例3: GetProviderInput

 public IMessageInput GetProviderInput(IScope scope, string name)
 {
     IMessageInput msgIn = GetLiveProviderInput(scope, name, false);
     if (msgIn == null)
         return GetVODProviderInput(scope, name);
     return msgIn;
 }
开发者ID:ByteSempai,项目名称:Ubiquitous,代码行数:7,代码来源:ProviderService.cs


示例4: ProcedureSql

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="statement">The statement.</param>
        /// <param name="sqlStatement"></param>
        /// <param name="scope"></param>
        public ProcedureSql(IScope scope, string sqlStatement, IStatement statement)
        {
            _sqlStatement = sqlStatement;
            _statement = statement;

            _dataExchangeFactory = scope.DataExchangeFactory;
        }
开发者ID:hejiquan,项目名称:iBATIS_2010,代码行数:13,代码来源:ProcedureSql.cs


示例5: ParameterScope

 public ParameterScope( IScope parent, string[] parameters )
 {
     _parent = parent;
     _contents = new StandardScope();
     foreach( string p in parameters )
     _contents.set( p, null );
 }
开发者ID:kayateia,项目名称:climoo,代码行数:7,代码来源:ParameterScope.cs


示例6: Switch

 protected internal Switch(NRefactory.SwitchStatement switchStatement, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor) {
     _switchStatement = switchStatement;
     SwitchValue = switchStatement.Expression.AcceptVisitor(Visitor, scope);
     BuildSwitchCases();
     InternalType = TypeSystem.Void;
 }
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:7,代码来源:Switch.cs


示例7: Equals

 public override bool Equals(IScope x, IScope y) {
   if (object.ReferenceEquals(x, y)) return true;
   if (x == null || y == null) return false;
   double q1 = ((DoubleValue)x.Variables[QualityVariableName].Value).Value;
   double q2 = ((DoubleValue)y.Variables[QualityVariableName].Value).Value;
   return q1.IsAlmost(q2) && CalculateSolutionSimilarity(x, y).IsAlmost(1.0);
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:SingleObjectiveSolutionSimilarityCalculator.cs


示例8: Do

        /// <summary>Read and eval all the lines in a file</summary>
        internal static void Do(string file, IScope scope)
        {
            StreamReader stream = null;
            try
            {
                List<string> lines = new List<string>();
                stream = new StreamReader(file);
                while (!stream.EndOfStream)
                    lines.Add(stream.ReadLine());

                LineConsumer consumer = new LineConsumer(lines);
                EvalLines.Do(consumer, scope);
                stream.Close();
            }
            catch (Loki3Exception e)
            {
                e.AddFileName(file);
                if (stream != null)
                    stream.Close();
                throw e;
            }
            catch (System.Exception e)
            {
                if (stream != null)
                    stream.Close();
                throw e;
            }
        }
开发者ID:loki3,项目名称:loki-pl1,代码行数:29,代码来源:EvalFile.cs


示例9: Do

 /// <summary>
 /// Eval a list of DelimiterNodes and return a Value
 /// </summary>
 internal static Value Do(List<DelimiterNode> nodes, IScope scope, ILineRequestor requestor)
 {
     ListEval eval = new ListEval(nodes, scope);
     while (eval.EvalNext(requestor))
         ;
     return eval.GetValue();
 }
开发者ID:loki3,项目名称:loki-pl1,代码行数:10,代码来源:EvalList.cs


示例10: GenerateFilename

		public string GenerateFilename(IScope scope, string name, string extension, GenerationType type) {
			string result = GetStreamDirectory(scope) + name;
			if (extension != null && !string.Empty.Equals(extension)) {
				result += extension;
			}
			return result;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:7,代码来源:DefaultStreamFilenameGenerator.cs


示例11: Invocation

        protected internal Invocation(NRefactory.InvocationExpression invocationExpression, IScope scope, INRefcatoryExpressionVisitor visitor)
            : base(scope, visitor) {
            
            var methodReference = invocationExpression.Annotation<Mono.Cecil.MethodReference>();

            _invocationExpression = invocationExpression;

            if (methodReference != null) {
                MethodInfo methodInfo = null;
                Member = methodInfo = methodReference.GetActualMethod<MethodInfo>();

                if (IsInitializeArray(methodInfo)) {
                    var first = _invocationExpression.Arguments.First().AcceptVisitor(Visitor, ParentScope);
                    var invocation = _invocationExpression.Arguments.Last() as NRefactory.InvocationExpression;
                    var second = invocation.Arguments.First();
                    var memberReference = invocationExpression.Target as NRefactory.MemberReferenceExpression;
                    var target = memberReference.Target as NRefactory.TypeReferenceExpression;
                    var type = target.Type.GetActualType();
                    var parameters = methodReference.Parameters;
                    return;
                }
            }

            BuildInvocation();
        }
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:25,代码来源:Invocation.cs


示例12: NamedExpression

 protected internal NamedExpression(NRefactory.NamedExpression namedExpression, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor) {
     Name = namedExpression.Identifier;
     _namedExpression = namedExpression;
     Expression = _namedExpression.Expression.AcceptVisitor(Visitor, ParentScope);
     InternalType = Expression.Type;
 }
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:7,代码来源:NamedExpression.cs


示例13: evaluate

        //interface
        public static IInterface evaluate(Node_Interface node, IScope scope)
        {
            IList<IInterface> inheritees = new List<IInterface>();
            IList<Callee> callees = new List<Callee>();
            IList<Breeder> breeders = new List<Breeder>();
            IList<Property> props = new List<Property>();
            IList<Method> meths = new List<Method>();

            foreach( INode_Expression inherNode in node.inheritees )
            inheritees.Add(
                Bridge.toNativeInterface(
                    Executor.executeAny(inherNode, scope)));

            foreach( Node_StatusedMember sm in node.members ) {
            //xxx member status (sm.memberStatus) is ignored
            INode_InterfaceMember member = sm.member;
            if( member is Node_Callee )
                callees.Add(evaluate(member as Node_Callee, scope));
            if( member is Node_Breeder )
                breeders.Add(evaluate(member as Node_Breeder, scope));
            if( member is Node_Property )
                props.Add(evaluate(member as Node_Property, scope));
            if( member is Node_Method )
                meths.Add(evaluate(member as Node_Method, scope));
            }

            return new Interface(
            inheritees, callees, breeders, props, meths );
        }
开发者ID:JamesJustinHarrell,项目名称:niviok,代码行数:30,代码来源:Evaluator.cs


示例14: FileConsumer

		/// <summary>
		/// Initializes a new instance of the FileConsumer class.
		/// </summary>
		/// <param name="scope">Scope of consumer.</param>
		/// <param name="file">File.</param>
		public FileConsumer(IScope scope, FileInfo file) {
			_scope = scope;
			_file = file;
			_offset = 0;
			_lastTimestamp = 0;
			_startTimestamp = -1;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:12,代码来源:FileConsumer.cs


示例15: GiveAbnormalConditionAction

 public GiveAbnormalConditionAction(IScope scope, ICost cost, IScreenEffect screenEffect, IAbnormalCondition cond)
 {
     _scope = scope;
     _cost = cost;
     _screenEffect = screenEffect;
     _cond = cond;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:7,代码来源:GiveAbnormalConditionAction.cs


示例16: VScope

 protected VScope(IScope Parent)
 {
     this.OnDateType = new Dictionary<string, List<Type>>();
     this.ScopeVariables = new List<Expression>();
     this.ScopeFunctions = new List<FunctionMeta>();
     this.Parent = Parent;
 }
开发者ID:nem-e5i5,项目名称:Autolithium.core,代码行数:7,代码来源:2+-+VScope.cs


示例17: Identifier

 protected internal Identifier(NRefactory.IdentifierExpression identifierExpression, IScope scope, INRefcatoryExpressionVisitor visitor)
     : base(scope, visitor) {
     _identifierExpression = identifierExpression;
     Expression = scope.Find(_identifierExpression.Identifier);
     InternalType = Expression.Type;
     Name = _identifierExpression.Identifier;
 }
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:7,代码来源:Identifier.cs


示例18: RunTimeView

        public RunTimeView(IEnterInterpreterHost pEnterClientInterface, Epi.View pView, int pParentRecordId, string pParentGlobalRecordId, IScope pScope = null)
        {
            // to do set the enter interpreter
            // application domain.
            Assembly a = Assembly.Load(pView.Project.EnterMakeviewIntepreter);
            // Get the type to use.
            Type myType = a.GetType(pView.Project.EnterMakeviewIntepreter + ".EpiInterpreterParser");

            // Create an instance.
            if (pScope == null)
            {
                this.mEpiInterpreter = (IEnterInterpreter)Activator.CreateInstance(myType, new object[] { pEnterClientInterface });
            }
            else
            {
                this.mEpiInterpreter = (IEnterInterpreter)Activator.CreateInstance(myType, new object[] { pEnterClientInterface, pScope });
            }
            this.mEpiInterpreter.Context.Scope.Name = pView.Name;
            this.mEpiInterpreter.Host = pEnterClientInterface;

            this.EnterClientInterface = pEnterClientInterface;
            this.AfterStack = new Stack<KeyValuePair<EventActionEnum, StackCommand>>();
            this.parentViewRecordId = pParentRecordId;
            this.parentViewGlobalRecordId = pParentGlobalRecordId;
            this.RecordNumberMap = new Dictionary<int, int>();
            this.mView = pView;
            this.mView.ForeignKeyField.CurrentRecordValueString = this.ParentGlobalRecordId;
        }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:28,代码来源:RunTimeView.cs


示例19: Index

        protected internal Index(NRefactory.IndexerExpression indexerExpression, IScope scope, INRefcatoryExpressionVisitor visitor)
            : base(scope, visitor) {
            bool isAssignment = false;
            PropertyReference propertyReference = null;

            _indexerExpression = indexerExpression;
            isAssignment = IsAssignment();
            Target = indexerExpression.Target.AcceptVisitor(Visitor, ParentScope);
            TryGetArguments();

            if (indexerExpression.HasAnnotationOf<PropertyReference>(out propertyReference)) {
                var propertyInfo = Target.Type.GetProperty(propertyReference.Name);

                InternalType = propertyInfo.PropertyType;
                _indexer = propertyInfo;
            }
            else {
                _isArrayIndex = true;
                var targetType = Target.Type;

                if (targetType.HasElementType) {
                    targetType = Target.Type.GetElementType();
                }

                InternalType = targetType;
                _methodCall = _isAssignment ? Expression.ArrayAccess : (Func<Expression, IEnumerable<Expression>, Expression>)Expression.ArrayAccess;
            }
        }
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:28,代码来源:Index.cs


示例20: DoBuildHtml

 private void DoBuildHtml(IReportContext context, IScope scope) {
     var htmlconfig = new HtmlConfig();
     bool standalone = context.Request.Standalone;
     if (standalone) {
         htmlconfig.DocHeader = RenderXml(context, scope, DocHeader, null, "DocHeader");
     }
     htmlconfig.Header = RenderXml(context, scope, Header, null, "Header");
     htmlconfig.Content = RenderXml(context, scope, Content, null, "Content");
     var items = context.Data.arr("items");
     IList<ItemXml> xitems = new List<ItemXml>();
     if (null != items) {
         var i = 0;
         foreach (var item in items) {
             var itemScope = new Scope(scope);
             itemScope["_item"] = item;
             itemScope["_idx"] = i;
             var xitem = new ItemXml();
             xitem.Before = RenderXml(context, itemScope, BeforeItem, item, "BeforeItem");
             xitem.Item = RenderXml(context, itemScope, Item, item, "Item");
             xitem.After = RenderXml(context, itemScope, AfterItem, item, "AfterItem");
             if (null != (xitem.Before ?? xitem.After ?? xitem.Before)) {
                 xitems.Add(xitem);
             }
             i++;
         }
     }
     htmlconfig.Items = xitems;
     htmlconfig.Footer = RenderXml(context, scope, Footer, null, "Footer");
     XElement docfooter = null;
     if (standalone) {
         htmlconfig.DocFooter = RenderXml(context, scope, DocFooter, null, "DocFooter");
     }
     var xmlhtml = CompileHtml(context, scope, htmlconfig);
     context.Write(xmlhtml.ToString());
 }
开发者ID:Qorpent,项目名称:qorpent.sys,代码行数:35,代码来源:TemplateRenderAgent.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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