/// <summary>
        /// Get all actions from graph or graph extension and its base graphs and base graph extensions (extended via Acumatica Customization).
        /// </summary>
        /// <param name="graphOrExtension">The graph Or graph extension to act on.</param>
        /// <param name="pxContext">Context.</param>
        /// <returns/>
        public static OverridableItemsCollection <ActionInfo> GetActionsFromGraphOrGraphExtensionAndBaseGraph(this ITypeSymbol graphOrExtension,
                                                                                                              PXContext pxContext)
        {
            pxContext.ThrowOnNull(nameof(pxContext));
            graphOrExtension.ThrowOnNull(nameof(graphOrExtension));

            bool isGraph = graphOrExtension.IsPXGraph(pxContext);

            if (!isGraph && !graphOrExtension.IsPXGraphExtension(pxContext))
            {
                return(new OverridableItemsCollection <ActionInfo>());
            }

            return(isGraph
                                ? graphOrExtension.GetActionSymbolsWithTypesFromGraph(pxContext)
                                : graphOrExtension.GetActionsFromGraphExtensionAndBaseGraph(pxContext));
        }
Exemple #2
0
        /// <summary>
        /// Get all actions from graph or graph extension and its base graphs and base graph extensions (extended via Acumatica Customization).
        /// </summary>
        /// <param name="graphOrExtension">The graph Or graph extension to act on.</param>
        /// <param name="pxContext">Context.</param>
        /// <returns/>
        public static ActionsOverridableCollection GetActionsFromGraphOrGraphExtensionAndBaseGraph(this ITypeSymbol graphOrExtension,
                                                                                                   PXContext pxContext)
        {
            pxContext.ThrowOnNull(nameof(pxContext));
            graphOrExtension.ThrowOnNull(nameof(graphOrExtension));

            bool isGraph = graphOrExtension.IsPXGraph(pxContext);

            if (!isGraph && !graphOrExtension.IsPXGraphExtension(pxContext))
            {
                return(Enumerable.Empty <GraphOverridableItem <(ISymbol, INamedTypeSymbol)> >());
            }

            return(isGraph
                                ? graphOrExtension.GetActionSymbolsWithTypesFromGraph(pxContext)
                                : graphOrExtension.GetActionsFromGraphExtensionAndBaseGraph(pxContext));
        }