private async Task PerformExportEntityDescriptionToFileAsync(Guid pluginAssemblyId, string assemblyName, Func <Task <IOrganizationServiceExtented> > getService) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.WindowStatusStrings.CreatingEntityDescription); var service = await getService(); if (service != null) { var repository = new PluginAssemblyRepository(service); var assembly = await repository.GetAssemblyByIdRetrieveRequestAsync(pluginAssemblyId, new ColumnSet(true)); var description = await EntityDescriptionHandler.GetEntityDescriptionAsync(assembly, EntityFileNameFormatter.PluginAssemblyIgnoreFields, service.ConnectionData); string filePath = await CreateDescriptionFileAsync(service.ConnectionData, assembly.Name, EntityFileNameFormatter.Headers.EntityDescription, description); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); } ToggleControls(true, Properties.WindowStatusStrings.CreatingEntityDescriptionCompleted); }
private async Task PerformExportEntityDescription(string folder, Guid idReport, string name, string filename) { var service = await GetService(); ToggleControls(service.ConnectionData, false, Properties.WindowStatusStrings.CreatingEntityDescription); try { string fileName = EntityFileNameFormatter.GetReportFileName(service.ConnectionData.Name, name, idReport, EntityFileNameFormatter.Headers.EntityDescription, "txt"); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); var repository = new ReportRepository(service); var report = await repository.GetByIdAsync(idReport); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, report, EntityFileNameFormatter.ReportIgnoreFields, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.ExportedEntityDescriptionForConnectionFormat3 , service.ConnectionData.Name , report.LogicalName , filePath); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.WindowStatusStrings.CreatingEntityDescriptionCompleted); } catch (Exception ex) { _iWriteToOutput.WriteErrorToOutput(service.ConnectionData, ex); ToggleControls(service.ConnectionData, true, Properties.WindowStatusStrings.CreatingEntityDescriptionFailed); } }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <RolePrivileges>(); List <string> values = new List <string>(); var businessUnit = EntityDescriptionHandler.GetAttributeString(entity, "role.businessunitid"); if (!entity.Attributes.Contains("businessunit.parentbusinessunitid")) { businessUnit = "Root Organization"; } values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, "role.name") , businessUnit , EntityDescriptionHandler.GetAttributeString(entity, "privilege.name") , RolePrivilegesRepository.GetPrivilegeDepthMaskName(entity.PrivilegeDepthMask.Value) , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <SdkMessageProcessingStepImage>(); List <string> values = new List <string>(); int stage = entity.Contains("sdkmessageprocessingstep.stage") ? (entity.GetAttributeValue <AliasedValue>("sdkmessageprocessingstep.stage").Value as OptionSetValue).Value : 0; int mode = entity.Contains("sdkmessageprocessingstep.mode") ? (entity.GetAttributeValue <AliasedValue>("sdkmessageprocessingstep.mode").Value as OptionSetValue).Value : 0; values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, "sdkmessageprocessingstep.eventhandler") , entity.PrimaryObjectTypeCodeName , entity.SecondaryObjectTypeCodeName , EntityDescriptionHandler.GetAttributeString(entity, "sdkmessageprocessingstep.sdkmessageid") , SdkMessageProcessingStepRepository.GetStageName(stage, mode) , EntityDescriptionHandler.GetAttributeString(entity, "sdkmessageprocessingstep.rank") , EntityDescriptionHandler.GetAttributeString(entity, "sdkmessageprocessingstep.statuscode") , entity.FormattedValues[SdkMessageProcessingStepImage.Schema.Attributes.imagetype] , entity.Name , entity.EntityAlias , entity.IsManaged.ToString() , entity.IsCustomizable?.Value.ToString() , behavior }); AppendIntoValues(values, entity, false, withManaged, withSolutionInfo); values.Add(entity.Attributes1StringsSorted); return(values); }
private async Task PerformExportEntityDescription(string folder, Guid idSdkMessage, string name) { var service = await GetService(); if (service == null) { return; } ToggleControls(service.ConnectionData, false, Properties.OutputStrings.CreatingEntityDescription); var repository = new SdkMessageRepository(service); var message = await repository.GetByIdAsync(idSdkMessage, ColumnSetInstances.AllColumns); string fileName = EntityFileNameFormatter.GetMessageFileName(service.ConnectionData.Name, name, EntityFileNameFormatter.Headers.EntityDescription); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, message, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionExportedEntityDescriptionFormat3 , service.ConnectionData.Name , message.LogicalName , filePath ); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); }
private async Task PerformExportDescriptionToFile(Guid idReport, Func <Task <IOrganizationServiceExtented> > getService) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.WindowStatusStrings.CreatingEntityDescription); var service = await getService(); if (service != null) { var repository = new ReportRepository(service); var report = await repository.GetByIdAsync(idReport, new ColumnSet(true)); var description = await EntityDescriptionHandler.GetEntityDescriptionAsync(report, EntityFileNameFormatter.ReportIgnoreFields, service.ConnectionData); string filePath = await CreateDescriptionFileAsync(service.ConnectionData, report.Name, report.Id, "Description", description); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); } ToggleControls(true, Properties.WindowStatusStrings.CreatingEntityDescriptionCompleted); }
private async Task PerformExportDescriptionToFile(Guid idWebResource, string name, Func <Task <IOrganizationServiceExtented> > getService) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.CreatingEntityDescription); var service = await getService(); if (service != null) { WebResourceRepository webResourceRepository = new WebResourceRepository(service); var webresource = await webResourceRepository.GetByIdAsync(idWebResource, ColumnSetInstances.AllColumns); var description = await EntityDescriptionHandler.GetEntityDescriptionAsync(webresource, service.ConnectionData); string filePath = await CreateDescriptionFileAsync(service.ConnectionData, webresource.Name, EntityFileNameFormatter.Headers.EntityDescription, description); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); } ToggleControls(true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); }
private async Task PerformExportDescriptionToFile(Guid idChart, Func <Task <IOrganizationServiceExtented> > getService) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.CreatingEntityDescription); var service = await getService(); if (service != null) { var repository = new SavedQueryVisualizationRepository(service); var chart = await repository.GetByIdAsync(idChart, ColumnSetInstances.AllColumns); var description = await EntityDescriptionHandler.GetEntityDescriptionAsync(chart, service.ConnectionData); string filePath = await CreateDescriptionFileAsync(service.ConnectionData, chart.PrimaryEntityTypeCode, chart.Name, EntityFileNameFormatter.Headers.EntityDescription, description); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); } ToggleControls(true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); }
protected void AppendIntoValues(List <string> values, Entity entity, bool withUrls, bool withManaged, bool withSolutionInfo) { if (withManaged) { values.Add(EntityDescriptionHandler.GetAttributeString(entity, "ismanaged")); } if (withSolutionInfo) { values.Add(EntityDescriptionHandler.GetAttributeString(entity, "solution.uniquename")); if (withManaged) { values.Add(EntityDescriptionHandler.GetAttributeString(entity, "solution.ismanaged")); } values.Add(EntityDescriptionHandler.GetAttributeString(entity, "suppsolution.uniquename")); if (withManaged) { values.Add(EntityDescriptionHandler.GetAttributeString(entity, "suppsolution.ismanaged")); } } if (withUrls && this.ComponentTypeEnum.HasValue) { values.Add(_service.UrlGenerator?.GetSolutionComponentUrl(this.ComponentTypeEnum.Value, entity.Id)); } }
private async Task PerformExportEntityDescription(string folder, Organization organization) { var service = await GetService(); if (service == null) { return; } ToggleControls(service.ConnectionData, false, Properties.OutputStrings.CreatingEntityDescription); try { string fileName = EntityFileNameFormatter.GetOrganizationFileName(service.ConnectionData.Name, organization.Name, EntityFileNameFormatter.Headers.EntityDescription, FileExtension.txt); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, organization, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionExportedEntityDescriptionFormat3 , service.ConnectionData.Name , organization.LogicalName , filePath); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); } catch (Exception ex) { _iWriteToOutput.WriteErrorToOutput(service.ConnectionData, ex); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionFailed); } }
private async Task GetCurrentEntityDescription(IOrganizationServiceExtented service, CommonConfiguration commonConfig, SystemForm systemForm) { commonConfig.CheckFolderForExportExists(this._iWriteToOutput); string fileName = EntityFileNameFormatter.GetSystemFormFileName(service.ConnectionData.Name, systemForm.ObjectTypeCode, systemForm.Name, EntityFileNameFormatter.Headers.EntityDescription, FileExtension.txt); string filePath = Path.Combine(commonConfig.FolderForExport, FileOperations.RemoveWrongSymbols(fileName)); try { await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, systemForm, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionExportedEntityDescriptionFormat3 , service.ConnectionData.Name , systemForm.LogicalName , filePath ); } catch (Exception ex) { this._iWriteToOutput.WriteErrorToOutput(service.ConnectionData, ex); } this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); service.TryDispose(); }
private async Task PerformExportEntityDescription(string folder, Guid idPluginAssembly, string name) { var service = await GetService(); if (service == null) { return; } ToggleControls(service.ConnectionData, false, Properties.OutputStrings.CreatingEntityDescription); var repository = new PluginAssemblyRepository(service); var assembly = await repository.GetAssemblyByIdRetrieveRequestAsync(idPluginAssembly); string fileName = EntityFileNameFormatter.GetPluginAssemblyFileName(service.ConnectionData.Name, name, EntityFileNameFormatter.Headers.EntityDescription, FileExtension.txt); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, assembly, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionExportedEntityDescriptionFormat3 , service.ConnectionData.Name , assembly.LogicalName , filePath); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); }
private async Task PerformShowingDifferenceEntityDescriptionAsync(LinkedEntities <PluginAssembly> linked, bool showAllways) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.WindowStatusStrings.ShowingDifferenceEntityDescription); try { var service1 = await GetService1(); var service2 = await GetService2(); if (service1 != null && service2 != null) { var repository1 = new PluginAssemblyRepository(service1); var repository2 = new PluginAssemblyRepository(service2); var assembly1 = await repository1.GetAssemblyByIdRetrieveRequestAsync(linked.Entity1.Id, new ColumnSet(true)); var assembly2 = await repository2.GetAssemblyByIdRetrieveRequestAsync(linked.Entity2.Id, new ColumnSet(true)); var desc1 = await EntityDescriptionHandler.GetEntityDescriptionAsync(assembly1, EntityFileNameFormatter.PluginAssemblyIgnoreFields); var desc2 = await EntityDescriptionHandler.GetEntityDescriptionAsync(assembly2, EntityFileNameFormatter.PluginAssemblyIgnoreFields); if (showAllways || desc1 != desc2) { string filePath1 = await CreateDescriptionFileAsync(service1.ConnectionData, assembly1.Name, EntityFileNameFormatter.Headers.EntityDescription, desc1); string filePath2 = await CreateDescriptionFileAsync(service2.ConnectionData, assembly2.Name, EntityFileNameFormatter.Headers.EntityDescription, desc2); if (File.Exists(filePath1) && File.Exists(filePath2)) { this._iWriteToOutput.ProcessStartProgramComparer(filePath1, filePath2, Path.GetFileName(filePath1), Path.GetFileName(filePath2)); } else { this._iWriteToOutput.PerformAction(service1.ConnectionData, filePath1); this._iWriteToOutput.PerformAction(service2.ConnectionData, filePath2); } } } ToggleControls(true, Properties.WindowStatusStrings.ShowingDifferenceEntityDescriptionCompleted); } catch (Exception ex) { _iWriteToOutput.WriteErrorToOutput(null, ex); ToggleControls(true, Properties.WindowStatusStrings.ShowingDifferenceEntityDescriptionFailed); } }
private async Task PerformShowingDifferenceDescriptionAsync(LinkedEntities <SavedQueryVisualization> linked, bool showAllways) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.ShowingDifferenceEntityDescription); try { var service1 = await GetService1(); var service2 = await GetService2(); if (service1 != null && service2 != null) { var repository1 = new SavedQueryVisualizationRepository(service1); var repository2 = new SavedQueryVisualizationRepository(service2); var chart1 = await repository1.GetByIdAsync(linked.Entity1.Id, ColumnSetInstances.AllColumns); var chart2 = await repository2.GetByIdAsync(linked.Entity2.Id, ColumnSetInstances.AllColumns); var desc1 = await EntityDescriptionHandler.GetEntityDescriptionAsync(chart1); var desc2 = await EntityDescriptionHandler.GetEntityDescriptionAsync(chart2); if (showAllways || desc1 != desc2) { string filePath1 = await CreateDescriptionFileAsync(service1.ConnectionData, chart1.PrimaryEntityTypeCode, chart1.Name, EntityFileNameFormatter.Headers.EntityDescription, desc1); string filePath2 = await CreateDescriptionFileAsync(service2.ConnectionData, chart2.PrimaryEntityTypeCode, chart2.Name, EntityFileNameFormatter.Headers.EntityDescription, desc2); if (File.Exists(filePath1) && File.Exists(filePath2)) { await this._iWriteToOutput.ProcessStartProgramComparerAsync(service1.ConnectionData, filePath1, filePath2, Path.GetFileName(filePath1), Path.GetFileName(filePath2), service2.ConnectionData); } else { this._iWriteToOutput.PerformAction(service1.ConnectionData, filePath1); this._iWriteToOutput.PerformAction(service2.ConnectionData, filePath2); } } } ToggleControls(true, Properties.OutputStrings.ShowingDifferenceEntityDescriptionCompleted); } catch (Exception ex) { _iWriteToOutput.WriteErrorToOutput(null, ex); ToggleControls(true, Properties.OutputStrings.ShowingDifferenceEntityDescriptionFailed); } }
public override string GetName(SolutionComponent component) { var entity = GetEntity <PrivilegeObjectTypeCodes>(component.ObjectId.Value); if (entity != null) { return(string.Format("{0} - {1}" , entity.ObjectTypeCode , EntityDescriptionHandler.GetAttributeString(entity, PrivilegeObjectTypeCodes.Schema.Attributes.privilegeid + "." + Privilege.Schema.Attributes.name) )); } return(base.GetName(component)); }
public override string GetName(SolutionComponent component) { var entity = GetEntity <AppModuleRoles>(component.ObjectId.Value); if (entity != null) { return(string.Format("{0} - {1}" , EntityDescriptionHandler.GetAttributeString(entity, AppModuleRoles.Schema.Attributes.appmoduleid + "." + AppModule.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, AppModuleRoles.Schema.Attributes.roleid + "." + Role.Schema.Attributes.name) )); } return(base.GetName(component)); }
public override string GetName(SolutionComponent solutionComponent) { var entity = GetEntity <DisplayStringMap>(solutionComponent.ObjectId.Value); if (entity != null) { return(string.Format("{0} - {1}" , EntityDescriptionHandler.GetAttributeString(entity, "displaystring.displaystringkey") , entity.ObjectTypeCode )); } return(base.GetName(solutionComponent)); }
public override string GetName(SolutionComponent component) { var entity = GetEntity <ChannelAccessProfileEntityAccessLevel>(component.ObjectId.Value); if (entity != null) { return(string.Format("{0} - {1} - {2}" , EntityDescriptionHandler.GetAttributeString(entity, ChannelAccessProfileEntityAccessLevel.Schema.Attributes.channelaccessprofileid + "." + ChannelAccessProfile.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, ChannelAccessProfileEntityAccessLevel.Schema.Attributes.entityaccesslevelid + "." + Privilege.Schema.Attributes.name) , entity.EntityAccessLevelDepthMask )); } return(base.GetName(component)); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <PrivilegeObjectTypeCodes>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, PrivilegeObjectTypeCodes.Schema.Attributes.privilegeid + "." + Privilege.Schema.Attributes.name) , entity.ObjectTypeCode , behavior }); return(values); }
public override string GetName(SolutionComponent component) { var entity = GetEntity <CustomControlResource>(component.ObjectId.Value); if (entity != null) { return(string.Format("{0} - {1} - {2} - {3}" , EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.customcontrolid + "." + CustomControl.Schema.Attributes.name) , entity.Name , EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.webresourceid + "." + WebResource.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.webresourceid + "." + WebResource.Schema.Attributes.webresourcetype) )); } return(base.GetName(component)); }
private async Task PerformShowingDifferenceDescriptionAsync(LinkedEntities <WebResource> linked, bool showAllways) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.ShowingDifferenceEntityDescription); var service1 = await GetService1(); var service2 = await GetService2(); if (service1 != null && service2 != null) { var repository1 = new WebResourceRepository(service1); var repository2 = new WebResourceRepository(service2); var webResource1 = await repository1.GetByIdAsync(linked.Entity1.Id, ColumnSetInstances.AllColumns); var webResource2 = await repository2.GetByIdAsync(linked.Entity2.Id, ColumnSetInstances.AllColumns); var desc1 = await EntityDescriptionHandler.GetEntityDescriptionAsync(webResource1); var desc2 = await EntityDescriptionHandler.GetEntityDescriptionAsync(webResource2); if (showAllways || desc1 != desc2) { string filePath1 = await CreateDescriptionFileAsync(service1.ConnectionData, webResource1.Name, EntityFileNameFormatter.Headers.EntityDescription, desc1); string filePath2 = await CreateDescriptionFileAsync(service2.ConnectionData, webResource2.Name, EntityFileNameFormatter.Headers.EntityDescription, desc2); if (File.Exists(filePath1) && File.Exists(filePath2)) { await this._iWriteToOutput.ProcessStartProgramComparerAsync(service1.ConnectionData, filePath1, filePath2, Path.GetFileName(filePath1), Path.GetFileName(filePath2), service2.ConnectionData); } else { this._iWriteToOutput.PerformAction(service1.ConnectionData, filePath1); this._iWriteToOutput.PerformAction(service2.ConnectionData, filePath2); } } } ToggleControls(true, Properties.OutputStrings.ShowingDifferenceEntityDescriptionCompleted); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <DisplayStringMap>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, "displaystring.displaystringkey") , entity.ObjectTypeCode , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <ChannelAccessProfileEntityAccessLevel>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, ChannelAccessProfileEntityAccessLevel.Schema.Attributes.channelaccessprofileid + "." + ChannelAccessProfile.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, ChannelAccessProfileEntityAccessLevel.Schema.Attributes.entityaccesslevelid + "." + Privilege.Schema.Attributes.name) , entity.EntityAccessLevelDepthMask.ToString() , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <AppModuleRoles>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, AppModuleRoles.Schema.Attributes.appmoduleid + "." + AppModule.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, AppModuleRoles.Schema.Attributes.roleid + "." + Role.Schema.Attributes.name) , entity.Id.ToString() , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <FieldPermission>(); List <string> values = new List <string>(); string attr = string.Format("{0}.{1}", entity.EntityName, entity.AttributeLogicalName); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, "fieldsecurityprofile.name") , attr , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <SdkMessageResponse>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.sdkmessagepairid + "." + SdkMessagePair.Schema.Attributes.sdkmessageid + "." + SdkMessage.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.sdkmessagepairid + "." + SdkMessagePair.Schema.Attributes.sdkmessageid + "." + SdkMessage.Schema.Attributes.categoryname) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.sdkmessagepairid + "." + SdkMessagePair.Schema.Attributes.@namespace) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.sdkmessagepairid + "." + SdkMessagePair.Schema.Attributes.endpoint) , entity.CustomizationLevel.ToString() , behavior }); return(values); }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <CustomControlResource>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.customcontrolid + "." + AppModule.Schema.Attributes.name) , entity.Name , EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.webresourceid + "." + WebResource.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, CustomControlResource.Schema.Attributes.webresourceid + "." + WebResource.Schema.Attributes.webresourcetype) , entity.Id.ToString() , behavior }); action(values, entity, withUrls, withManaged, withSolutionInfo); return(values); }
private async Task PerformExportEntityDescriptionAsync(string folder, Guid idCustomControl, string name) { var service = await GetService(); if (service == null) { return; } ToggleControls(service.ConnectionData, false, Properties.OutputStrings.CreatingEntityDescription); try { string fileName = EntityFileNameFormatter.GetCustomControlFileName(service.ConnectionData.Name, name, EntityFileNameFormatter.Headers.EntityDescription, FileExtension.txt); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); var repository = new CustomControlRepository(service); var customControl = await repository.GetByIdAsync(idCustomControl, ColumnSetInstances.AllColumns); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, customControl, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionExportedEntityDescriptionFormat3 , service.ConnectionData.Name , customControl.LogicalName , filePath); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionCompleted); } catch (Exception ex) { _iWriteToOutput.WriteErrorToOutput(service.ConnectionData, ex); ToggleControls(service.ConnectionData, true, Properties.OutputStrings.CreatingEntityDescriptionFailed); } }
protected override List <string> GetDescriptionValues(Entity entityInput, string behavior, bool withManaged, bool withSolutionInfo, bool withUrls, Action <List <string>, Entity, bool, bool, bool> action) { var entity = entityInput.ToEntity <SdkMessageResponseField>(); List <string> values = new List <string>(); values.AddRange(new[] { EntityDescriptionHandler.GetAttributeString(entity, SdkMessagePair.Schema.Attributes.sdkmessageid + "." + SdkMessage.Schema.Attributes.name) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessagePair.Schema.Attributes.sdkmessageid + "." + SdkMessage.Schema.Attributes.categoryname) , EntityDescriptionHandler.GetAttributeString(entity, SdkMessageResponse.Schema.Attributes.sdkmessagerequestid + "." + SdkMessageRequest.Schema.Attributes.name) , entity.Position.ToString() , entity.Name , entity.PublicName , entity.Value , entity.ClrFormatter , entity.Formatter , entity.ParameterBindingInformation , entity.CustomizationLevel.ToString() , behavior }); return(values); }
private async Task PerformExportEntityDescription(string folder, Guid idPluginType, string name) { var service = await GetService(); ToggleControls(service.ConnectionData, false, Properties.WindowStatusStrings.CreatingEntityDescription); string fileName = EntityFileNameFormatter.GetPluginTypeFileName(service.ConnectionData.Name, name, EntityFileNameFormatter.Headers.EntityDescription); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); var repository = new PluginTypeRepository(service); var pluginType = await repository.GetPluginTypeByIdAsync(idPluginType); await EntityDescriptionHandler.ExportEntityDescriptionAsync(filePath, pluginType, null, service.ConnectionData); this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.ExportedEntityDescriptionForConnectionFormat3 , service.ConnectionData.Name , pluginType.LogicalName , filePath); this._iWriteToOutput.PerformAction(service.ConnectionData, filePath); ToggleControls(service.ConnectionData, true, Properties.WindowStatusStrings.CreatingEntityDescriptionCompleted); }