Exemple #1
0
        public async Task SendRequestAsync(QueryProcessRequest <IReadOnlyCollection <EntityIdentity> > request)
        {
            Requires.NotNull(request, nameof(request));

            foreach (EntityIdentity requestId in request.RequestData)
            {
                if (requestId.KeysCount == 2 &&
                    requestId.TryGetValue(ProjectModelIdentityKeys.ProjectPath, out string path) &&
                    requestId.TryGetValue(ProjectModelIdentityKeys.PropertyPageName, out string propertyPageName))
                {
                    try
                    {
                        IEntityValue?propertyPageValue = await PropertyPageDataProducer.CreatePropertyPageValueAsync(
                            request.QueryExecutionContext.EntityRuntime,
                            requestId,
                            _projectService,
                            _queryCacheProvider,
                            path,
                            propertyPageName,
                            _properties);

                        if (propertyPageValue is not null)
                        {
                            await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(propertyPageValue, request, ProjectModelZones.Cps));
                        }
                    }
                    catch (Exception ex)
                    {
                        request.QueryExecutionContext.ReportError(ex);
                    }
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is (IPropertyPageQueryCache cache, Rule schema, string propertyName))
            {
                try
                {
                    IEnumerable <IEntityValue> propertyValues = await UIPropertyValueDataProducer.CreateUIPropertyValueValuesAsync(
                        request.RequestData,
                        cache,
                        schema,
                        propertyName,
                        _properties);

                    foreach (IEntityValue propertyValue in propertyValues)
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(propertyValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is T providerState)
            {
                try
                {
                    foreach (IEntityValue categoryValue in await CreateValuesAsync(request.QueryExecutionContext, request.RequestData, providerState))
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(categoryValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is (IPropertyPageQueryCache _, Rule rule))
            {
                try
                {
                    foreach (IEntityValue categoryValue in CategoryDataProducer.CreateCategoryValues(request.RequestData, rule, _properties))
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(categoryValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
Exemple #5
0
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            Requires.NotNull(request, nameof(request));
            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is (IPropertyPageQueryCache _, Rule schema, string propertyName))
            {
                try
                {
                    foreach (IEntityValue propertyEditor in UIPropertyEditorDataProducer.CreateEditorValues(request.RequestData, schema, propertyName, _properties))
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(propertyEditor, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            Requires.NotNull(request, nameof(request));
            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is (ProjectConfiguration configuration, ProjectSystem.Properties.IProperty property))
            {
                try
                {
                    foreach (IEntityValue dimension in ConfigurationDimensionDataProducer.CreateProjectConfigurationDimensions(request.QueryExecutionContext.EntityRuntime, configuration, property, _properties))
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(dimension, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
Exemple #7
0
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            Requires.NotNull(request, nameof(request));

            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is ValueEditor editor)
            {
                try
                {
                    foreach (IEntityValue metadataValue in UIEditorMetadataProducer.CreateMetadataValues(request.RequestData.EntityRuntime, editor, _properties))
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(metadataValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IReadOnlyCollection <EntityIdentity> > request)
        {
            foreach (EntityIdentity requestId in request.RequestData)
            {
                try
                {
                    IEntityValue?entityValue = await TryCreateEntityOrNullAsync(request.QueryExecutionContext, requestId);

                    if (entityValue is not null)
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(entityValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            Requires.NotNull(request, nameof(request));

            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is UnconfiguredProject project)
            {
                try
                {
                    IEnumerable <IEntityValue> propertyPageValues = await PropertyPageDataProducer.CreatePropertyPageValuesAsync(request.RequestData, project, _properties);

                    foreach (IEntityValue propertyPageValue in propertyPageValues)
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(propertyPageValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
        public async Task SendRequestAsync(QueryProcessRequest <IEntityValue> request)
        {
            Requires.NotNull(request, nameof(request));

            if ((request.RequestData as IEntityValueFromProvider)?.ProviderState is (ProjectConfiguration _, ProjectSystem.Properties.IEnumProperty enumProperty))
            {
                try
                {
                    IEnumerable <IEntityValue> supportedValues = await SupportedValueDataProducer.CreateSupportedValuesAsync(request.RequestData.EntityRuntime, enumProperty, _properties);

                    foreach (IEntityValue supportedValue in supportedValues)
                    {
                        await ResultReceiver.ReceiveResultAsync(new QueryProcessResult <IEntityValue>(supportedValue, request, ProjectModelZones.Cps));
                    }
                }
                catch (Exception ex)
                {
                    request.QueryExecutionContext.ReportError(ex);
                }
            }

            await ResultReceiver.OnRequestProcessFinishedAsync(request);
        }
 public Task OnRequestProcessFinishedAsync(IQueryProcessRequest request)
 {
     _coreExecutor.OnAfterExecutingBatch();
     return(ResultReceiver.OnRequestProcessFinishedAsync(request));
 }
Exemple #12
0
 public Task OnRequestProcessFinishedAsync(IQueryProcessRequest request)
 {
     return(ResultReceiver.OnRequestProcessFinishedAsync(request));
 }