public override void Analyze(SymbolAnalysisContext context, PXContext pxContext, PXGraphSemanticModel pxGraph)
        {
            context.CancellationToken.ThrowIfCancellationRequested();

            PXGraphCreateInstanceWalker walker = new PXGraphCreateInstanceWalker(
                context,
                pxContext,
                pxContext.CodeAnalysisSettings.IsvSpecificAnalyzersEnabled
                                        ? Descriptors.PX1057_PXGraphCreationDuringInitialization
                                        : Descriptors.PX1057_PXGraphCreationDuringInitialization_NonISV);

            foreach (GraphInitializerInfo initializer in pxGraph.Initializers)
            {
                context.CancellationToken.ThrowIfCancellationRequested();
                walker.Visit(initializer.Node);
            }

            walker = new PXGraphCreateInstanceWalker(context, pxContext,
                                                     Descriptors.PX1084_GraphCreationInDataViewDelegate);

            foreach (DataViewDelegateInfo del in pxGraph.ViewDelegates)
            {
                context.CancellationToken.ThrowIfCancellationRequested();
                walker.Visit(del.Node);
            }
        }
Exemple #2
0
        public void Analyze(SymbolAnalysisContext context, PXContext pxContext, PXGraphSemanticModel pxGraph)
        {
            context.CancellationToken.ThrowIfCancellationRequested();

            PXGraphCreateInstanceWalker walker = new PXGraphCreateInstanceWalker(context, pxContext);

            foreach (GraphInitializerInfo initializer in pxGraph.Initializers)
            {
                context.CancellationToken.ThrowIfCancellationRequested();
                walker.Visit(initializer.Node);
            }
        }