private void CheckSavingChanges(SymbolAnalysisContext context, PXContext pxContext, GraphInitializerInfo initializer)
        {
            context.CancellationToken.ThrowIfCancellationRequested();

            if (initializer.Node == null)
            {
                return;
            }

            SaveChangesWalker walker = new SaveChangesWalker(context, pxContext);

            walker.Visit(initializer.Node);
        }
Exemple #2
0
        public void Analyze(SymbolAnalysisContext context, PXContext pxContext, CodeAnalysisSettings settings, PXGraphSemanticModel pxGraph)
        {
            context.CancellationToken.ThrowIfCancellationRequested();

            SaveChangesWalker walker = new SaveChangesWalker(context, pxContext, Descriptors.PX1058_PXGraphSavingChangesDuringInitialization);

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

            walker = new SaveChangesWalker(context, pxContext, Descriptors.PX1083_SavingChangesInDataViewDelegate);

            foreach (DataViewDelegateInfo del in pxGraph.ViewDelegates)
            {
                context.CancellationToken.ThrowIfCancellationRequested();
                walker.Visit(del.Node);
            }
        }