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


C# IScope类代码示例

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


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


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