protected override Task <List <MailMergeTemplate> > GetMailMergeTemplateAsync(IOrganizationServiceExtented service) { var imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.MailMergeTemplate); if (!imageComponents.Any()) { return(Task.FromResult(new List <MailMergeTemplate>())); } return(Task.Run(() => GetMailMergeTemplate(service, imageComponents))); }
protected virtual Task <List <SystemForm> > GetSystemFormAsync(IOrganizationServiceExtented service) { return(new SystemFormRepository(service).GetListAsync(null, null)); }
protected virtual Task <List <SavedQueryVisualization> > GetSavedQueryVisualizationAsync(IOrganizationServiceExtented service) { return(new SavedQueryVisualizationRepository(service).GetListAsync(null, null)); }
protected virtual Task <List <WebResource> > GetWebResourceAsync(IOrganizationServiceExtented service) { return(new WebResourceRepository(service).GetListAllWithContentAsync()); }
protected virtual Task <List <Report> > GetReportAsync(IOrganizationServiceExtented service) { return(new ReportRepository(service).GetListAllForCompareAsync()); }
public SavedQueryDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.SavedQuery) { }
protected virtual Task <List <AttributeMap> > GetAttributeMapAsync(IOrganizationServiceExtented service) { return(new AttributeMapRepository(service).GetListAsync()); }
/// <summary> /// Конструктор репозитория /// </summary> /// <param name="service"></param> public ConnectionRoleAssociationRepository(IOrganizationServiceExtented service) { _service = service ?? throw new ArgumentNullException(nameof(service)); }
public ChannelAccessProfileDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.ChannelAccessProfile) { }
protected override async Task <List <SavedQueryVisualization> > GetSavedQueryVisualizationAsync(IOrganizationServiceExtented service) { List <SavedQueryVisualization> result = new List <SavedQueryVisualization>(); var descriptor = new SolutionComponentDescriptor(service); var repository = new SavedQueryVisualizationRepository(service); var imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.SavedQueryVisualization); if (imageComponents.Any()) { var solutionComponents = await descriptor.GetSolutionComponentsListAsync(imageComponents); if (solutionComponents.Any()) { var tempList = await repository.GetListByIdListAsync(solutionComponents.Select(s => s.ObjectId.Value), ColumnSetInstances.AllColumns); result.AddRange(tempList); } } var hashSet = new HashSet <Guid>(result.Select(c => c.Id)); imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.Entity); if (imageComponents.Any()) { var solutionComponents = await descriptor.GetSolutionComponentsListAsync(imageComponents); if (solutionComponents.Any()) { var entities = solutionComponents .Where(c => c.RootComponentBehaviorEnum.GetValueOrDefault(SolutionComponent.Schema.OptionSets.rootcomponentbehavior.Include_Subcomponents_0) == SolutionComponent.Schema.OptionSets.rootcomponentbehavior.Include_Subcomponents_0 && c.ObjectId.HasValue) .Select(e => descriptor.MetadataSource.GetEntityMetadata(e.ObjectId.Value)) .Where(e => e != null) .Select(e => e.LogicalName) .ToArray(); if (entities.Any()) { var tempList = await repository.GetListForEntitiesAsync(entities, ColumnSetInstances.AllColumns); foreach (var item in tempList) { if (hashSet.Add(item.Id)) { result.Add(item); } } } } } return(result); }
protected override Task <List <OptionSetMetadata> > GetOptionSetMetadataAsync(IOrganizationServiceExtented service) { var imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.OptionSet); if (!imageComponents.Any()) { return(Task.FromResult(new List <OptionSetMetadata>())); } return(Task.Run(() => GetOptionSet(service, imageComponents))); }
private static async Task <List <SdkMessageProcessingStep> > GetSdkMessageProcessingStep(IOrganizationServiceExtented service, IEnumerable <SolutionImageComponent> imageComponents) { var descriptor = new SolutionComponentDescriptor(service); var solutionComponents = await descriptor.GetSolutionComponentsListAsync(imageComponents); if (!solutionComponents.Any()) { return(new List <SdkMessageProcessingStep>()); } return(await new SdkMessageProcessingStepRepository(service).GetListByIdListAsync(solutionComponents.Select(s => s.ObjectId.Value), ColumnSetInstances.AllColumns)); }
protected override Task <List <SdkMessageProcessingStep> > GetSdkMessageProcessingStepAsync(IOrganizationServiceExtented service) { var imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.SdkMessageProcessingStep); if (!imageComponents.Any()) { return(Task.FromResult(new List <SdkMessageProcessingStep>())); } return(Task.Run(() => GetSdkMessageProcessingStep(service, imageComponents))); }
protected override Task <List <FieldSecurityProfile> > GetFieldSecurityProfileAsync(IOrganizationServiceExtented service) { var imageComponents = _solutionImage.Components.Where(c => c.ComponentType == (int)ComponentType.FieldSecurityProfile); if (!imageComponents.Any()) { return(Task.FromResult(new List <FieldSecurityProfile>())); } return(Task.Run(() => GetFieldSecurityProfile(service, imageComponents))); }
public DuplicateRuleConditionDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.DuplicateRuleCondition) { }
/// <summary> /// Конструктор репозитория /// </summary> /// <param name="service"></param> public SdkMessageRequestRepository(IOrganizationServiceExtented service) { _service = service ?? throw new ArgumentNullException(nameof(service)); }
public HierarchyRuleDescriptionBuilder(IOrganizationServiceExtented service, SolutionComponentMetadataSource source) : base(service, (int)ComponentType.HierarchyRule) { this._source = source; }
public RibbonDiffDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.RibbonDiff) { }
protected virtual Task <List <EntityMap> > GetEntityMapAsync(IOrganizationServiceExtented service) { return(new EntityMapRepository(service).GetListAsync()); }
public RoleDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.Role) { }
protected virtual Task <List <OptionSetMetadata> > GetOptionSetMetadataAsync(IOrganizationServiceExtented service) { return(new OptionSetRepository(service).GetOptionSetsAsync()); }
public SystemUserRepository(IOrganizationServiceExtented _service) { this._service = _service; }
protected virtual Task <List <SiteMap> > GetSiteMapAsync(IOrganizationServiceExtented service, ColumnSet columnSet = null) { return(new SitemapRepository(service).GetListAsync(columnSet)); }
/// <summary> /// Конструктор репозитория /// </summary> /// <param name="service"></param> public DependencyNodeRepository(IOrganizationServiceExtented service) { _service = service ?? throw new ArgumentNullException(nameof(service)); }
protected virtual Task <IEnumerable <Workflow> > GetWorkflowAsync(IOrganizationServiceExtented service, ColumnSet columnSet) { return(new WorkflowRepository(service).GetListAsync(null, null, null, columnSet)); }
/// <summary> /// Конструктор репозитория /// </summary> /// <param name="service"></param> public TemplateRepository(IOrganizationServiceExtented service) { _service = service ?? throw new ArgumentNullException(nameof(service)); }
public async Task InitializeConnection(IWriteToOutput writeToOutput, StringBuilder content, string messageConnection1 = null, string messageConnection2 = null) { bool service1IsNull = this.Service1 == null; bool service2IsNull = this.Service2 == null; { var mess1 = messageConnection1; if (string.IsNullOrEmpty(mess1)) { mess1 = Properties.OutputStrings.ConnectingToCRM; } var mess2 = Connection1.GetConnectionDescription(); if (service1IsNull) { writeToOutput.WriteToOutput(null, mess1); writeToOutput.WriteToOutput(null, mess2); this.Service1 = await QuickConnection.ConnectAsync(Connection1); } var mess3 = string.Format(Properties.OutputStrings.CurrentServiceEndpointFormat1, this.Service1.CurrentServiceEndpoint); if (service1IsNull) { writeToOutput.WriteToOutput(null, mess3); } if (content != null) { content.AppendLine(mess1); content.AppendLine(mess2); content.AppendLine(mess3); } } if (service1IsNull) { writeToOutput.WriteToOutput(null, string.Empty); } if (content != null) { content.AppendLine(); } { var mess1 = messageConnection2; if (string.IsNullOrEmpty(mess1)) { mess1 = Properties.OutputStrings.ConnectingToCRM; } var mess2 = Connection2.GetConnectionDescription(); if (service2IsNull) { writeToOutput.WriteToOutput(null, mess1); writeToOutput.WriteToOutput(null, mess2); this.Service2 = await QuickConnection.ConnectAsync(Connection2); } var mess3 = string.Format(Properties.OutputStrings.CurrentServiceEndpointFormat1, this.Service2.CurrentServiceEndpoint); if (service2IsNull) { writeToOutput.WriteToOutput(null, mess3); } if (content != null) { content.AppendLine(mess1); content.AppendLine(mess2); content.AppendLine(mess3); } } if (content != null) { content.AppendLine(); } }
public EntityDataProviderDescriptionBuilder(IOrganizationServiceExtented service, SolutionComponentMetadataSource source) : base(service, (int)ComponentType.EntityDataProvider) { this._source = source; }
protected virtual Task <List <PluginAssembly> > GetPluginAssemblyAsync(IOrganizationServiceExtented service) { return(new PluginAssemblyRepository(service).GetPluginAssembliesAsync(null, null)); }
public WebWizardDescriptionBuilder(IOrganizationServiceExtented service) : base(service, (int)ComponentType.WebWizard) { }