示例#1
0
        protected override IUnitsModel GetModel()
        {
            IClassCollection collection = ProfilingViewModel.Application.ServiceContainer.Resolve <IClassCollection>();
            ClassesModel     model      = new ClassesModel(collection);

            return(model);
        }
            public InterpretedClass(ClassDeclarationExpression expression, Scope scope)
            {
                _rootscope        = scope.Root;
                _name             = expression.Name;
                _parents          = expression.Parents;
                _interfaces       = expression.Interfaces;
                _methods          = new MethodCollection();
                _fields           = new FieldCollection();
                _classes          = new ClassCollection();
                _static_variables = new VariableCollection();

                ScriptScope script_scope = null;

                scope.FindNearestScope <ScriptScope> (ss => script_scope = ss);

                foreach (ClassMethodDeclarationExpression m in expression.Methods)
                {
                    _methods.Add(new InterpretedMethod(m, script_scope));
                }

                foreach (ClassFieldDeclarationExpression f in expression.Fields)
                {
                    IVariable var = _static_variables.EnsureExists(f.Name);
                    if (f.Initializer is Expression initializer_expr)
                    {
                        var.Value = Interpreters.Execute(initializer_expr, script_scope).ResultValue;
                    }
                }
            }
示例#3
0
        protected override void Initialize()
        {
            base.Initialize();
            IClassCollection unitCollection = Session.Daemon.Container.Resolve <IClassCollection>();

            Model = new UnitCollectionModel <ClassInfo>(unitCollection);
        }
示例#4
0
 public override void VisitClassCollection <TClass, TAbstractClass, TSealedClass, TStaticClass, TPartialClassCollection>(
     IClassCollection <TClass, TAbstractClass, TSealedClass, TStaticClass, TPartialClassCollection> classCollection)
 {
     foreach (IVisitable <IGenericVisitor> @class in classCollection)
     {
         @class.Accept(this);
     }
 }
示例#5
0
 public void SetDependencies(IClassCollection classes)
 {
     _classes = classes;
     foreach (FunctionInfo unit in this)
     {
         unit.SetDependencies(_classes);
     }
 }
示例#6
0
 public ClassesModel(IClassCollection units)
 {
     Units   = units;
     Columns = new List <GridViewDynamicColumn>
     {
         new GridViewDynamicColumn("Name", "Name", FilterByName),
         new GridViewDynamicColumn("Assembly", "Assembly.Name", FilterByAssembly)
     };
 }
 public void SetDependencies(IClassCollection classes, IFunctionCollection functions)
 {
     _classes   = classes;
     _functions = functions;
     foreach (ManagedExceptionInfo unit in this)
     {
         unit.SetDependencies(_classes, _functions);
     }
 }
示例#8
0
        public RootScope(Context context)
        {
            _context   = context;
            _functions = new FunctionCollection();
            _variables = new VariableCollection();
            _classes   = new ClassCollection();
            _objects   = new ObjectCollection();
            _arrays    = new ArrayCollection();

            StandardLibrary.Populate(_functions);
            StandardLibrary.Populate(_variables);
        }
示例#9
0
        protected override IUnitsModel CreateModel(ISession session)
        {
            IClassCollection units = session.ServiceContainer.Resolve <IClassCollection>();

            return(new ClassesModel(units));
        }
 public void SetDependencies(IClassCollection classes)
 {
     _classes = classes;
 }
示例#11
0
 public FunctionCollection(IClassCollection classes)
 {
     _classes = classes;
 }
示例#12
0
 public FunctionInfo(FunctionNativeInfo functionInfo, IClassCollection classes)
     : base(functionInfo)
 {
     SetDependencies(classes);
 }
示例#13
0
 public override void VisitClassCollection <TClass, TAbstractClass, TSealedClass, TStaticClass, TPartialClassCollection>(
     IClassCollection <TClass, TAbstractClass, TSealedClass, TStaticClass, TPartialClassCollection> classCollection)
 {
     VisitChildren(classCollection.StaticClasses);
 }
示例#14
0
 public static IClassTypeDefinitionsBuilder GetClassTypeDefinitions(
     this IClassCollection classCollection,
     bool includeNestedClasses = false)
 {
     return(new ClassTypeDefinitionsBuilder(classCollection, includeNestedClasses));
 }
 public ManagedExceptionInfo(ManagedExceptionNativeInfo queryInfo, IClassCollection classes, IFunctionCollection functions)
     : base(queryInfo)
 {
     SetDependencies(classes, functions);
 }
 internal void SetDependencies(IClassCollection classes, IFunctionCollection functions)
 {
     _classes   = classes;
     _functions = functions;
 }
示例#17
0
 public FunctionInfo(Daemon.DotNet.BasicProfiler.FunctionInfo functionInfo, IClassCollection classCollection)
     : base(functionInfo)
 {
     _classCollection = classCollection;
 }
示例#18
0
 internal void SetDependencies(IClassCollection classes)
 {
     _classes = classes;
 }
示例#19
0
 public ClassTypeDefinitionsBuilder(IClassCollection classCollection, bool includeNestedClasses)
     : this(includeNestedClasses)
 {
     classCollection.AcceptChildren(this);
 }