protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("PrimaryEntityTypeCode", "ProcessName", "Event", "PipelineStage", "FormName", "Scope", "MethodId", "ControlName", "ControlType", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #2
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("ChannelAccessProfileName", "EntityAccessLevelName", "EntityAccessLevelDepthMask", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Source", "Attribute", "", "Target", "Attribute", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("ReportName", "FileName", "ReportType", "SignatureLcid", "SignatureId", "IsCustomizable", "ViewableBy", "Owner", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #5
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Entity", "TabId", "ControlId", "Command", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("ReportName", "Visibility", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Name", "UniqueName", "URL", "AppModuleVersion", "Id", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Name", "Workflow", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #9
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("DuplicateRuleType", "BaseEntityName", "MatchingEntityName", "StatusCode", "Behavior");

            action(handler, withUrls, false, withSolutionInfo);

            return(handler);
        }
예제 #10
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("DisplayStringKey", "ObjectTypeCode", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("SiteMapName", "SiteMapNameUnique", "Id", "IsAppAware", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("PrimaryEntityLogicalName", "Name", "Description", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #13
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Name", "SelectedEntityTypeCode", "EntityObjectTypeCode", "Id", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #14
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Name", "RoleTemplate", "BusinessUnit", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("WebResourceType", "Name", "DisplayName", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Key", "LanguageCode", "Published", "Custom", "CustomComment", "FormatParameters", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        public string GenerateDescriptionSingle(SolutionComponent solutionComponent, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            AttributeMetadata metaData = _source.GetAttributeMetadata(solutionComponent.ObjectId.Value);

            if (metaData != null)
            {
                string behavior = SolutionComponent.GetRootComponentBehaviorName(solutionComponent.RootComponentBehavior?.Value);

                FormatTextTableHandler handler = new FormatTextTableHandler();
                handler.SetHeader("AttributeName", "DisplayName", "IsCustomizable", "Behavior");

                if (withManaged)
                {
                    handler.AppendHeader("IsManaged");
                }

                if (withUrls)
                {
                    handler.AppendHeader("Url");
                }

                List <string> values = new List <string>();

                values.AddRange(new[]
                {
                    string.Format("{0}.{1}", metaData.EntityLogicalName, metaData.LogicalName)
                    , metaData.DisplayName?.UserLocalizedLabel?.Label
                    , metaData.IsCustomizable?.Value.ToString()
                    , behavior
                });

                if (withManaged)
                {
                    values.Add(metaData.IsManaged.ToString());
                }

                if (withUrls)
                {
                    var entityMetadata = _source.GetEntityMetadata(metaData.EntityLogicalName);

                    if (entityMetadata != null)
                    {
                        values.Add(_source.Service.ConnectionData?.GetAttributeMetadataUrl(entityMetadata.MetadataId.Value, metaData.MetadataId.Value));
                    }
                }

                handler.AddLine(values);

                var str = handler.GetFormatedLinesWithHeadersInLine(false).FirstOrDefault();

                return(string.Format("{0} {1}", this.ComponentTypeEnum.ToString(), str));
            }

            return(solutionComponent.ToString());
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("PluginType", "Primary Entity", "Secondary Entity", "Message", "Stage", "Rank", "Status", "ImageType", "Name", "EntityAlias", "IsCustomizable", "Behavior");

            action(handler, false, withManaged, withSolutionInfo);

            handler.AppendHeader("Attributes");

            return(handler);
        }
        public string GenerateDescriptionSingle(SolutionComponent solutionComponent, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            if (this._source.AllOptionSetMetadata.Any())
            {
                if (this._source.AllOptionSetMetadata.ContainsKey(solutionComponent.ObjectId.Value))
                {
                    var optionSet = this._source.AllOptionSetMetadata[solutionComponent.ObjectId.Value];

                    string behavior = SolutionComponent.GetRootComponentBehaviorName(solutionComponent.RootComponentBehavior?.Value);

                    FormatTextTableHandler handler = new FormatTextTableHandler();
                    handler.SetHeader("OptionSetName", "IsCustomizable", "Behavior");

                    if (withManaged)
                    {
                        handler.AppendHeader("IsManaged");
                    }

                    if (withUrls)
                    {
                        handler.AppendHeader("Url");
                    }

                    List <string> values = new List <string>();

                    values.AddRange(new[]
                    {
                        optionSet.Name
                        , optionSet.IsCustomizable?.Value.ToString()
                        , behavior
                    });

                    if (withManaged)
                    {
                        values.Add(optionSet.IsManaged.ToString());
                    }

                    if (withUrls)
                    {
                        values.Add(_source.Service.ConnectionData?.GetGlobalOptionSetUrl(optionSet.MetadataId.Value));
                    }

                    handler.AddLine(values);

                    var str = handler.GetFormatedLinesWithHeadersInLine(false).FirstOrDefault();

                    return(string.Format("{0} {1}", this.ComponentTypeEnum.ToString(), str));
                }
            }

            return(solutionComponent.ToString());
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                EntityDataProvider.Schema.Headers.name
                , EntityDataProvider.Schema.Headers.datasourcelogicalname
                , EntityDataProvider.Schema.Headers.iscustomizable
                , "Behavior"
                );

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                ComplexControl.Schema.Headers.name
                , ComplexControl.Schema.Headers.description
                , ComplexControl.Schema.Headers.type
                , "Behavior"
                );

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                WebWizard.Schema.Headers.name
                , WebWizard.Schema.Headers.titleresourcestring
                , WebWizard.Schema.Headers.isstaticpagesequence
                , WebWizard.Schema.Headers.accessprivileges
                , "Behavior"
                );

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #23
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                MobileOfflineProfileItemAssociation.Schema.Headers.mobileofflineprofileitemid
                , MobileOfflineProfileItemAssociation.Schema.Headers.name
                , MobileOfflineProfileItemAssociation.Schema.Headers.relationshipname
                , MobileOfflineProfileItemAssociation.Schema.Headers.relationshipdisplayname
                , MobileOfflineProfileItemAssociation.Schema.Headers.isvalidated
                , "Behavior"
                );

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #24
0
        public void GenerateDescription(StringBuilder builder, IEnumerable <SolutionComponent> components, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("DependencyFeatureId", "Behavior");

            foreach (var comp in components)
            {
                string behavior = SolutionComponent.GetRootComponentBehaviorName(comp.RootComponentBehavior?.Value);

                handler.AddLine(comp.ObjectId.ToString(), string.Empty, behavior);
            }

            List <string> lines = handler.GetFormatedLines(true);

            lines.ForEach(item => builder.AppendFormat(formatSpacer, item).AppendLine());
        }
예제 #25
0
        public string GenerateDescriptionSingle(SolutionComponent component, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            if (this.AllManagedProperties.Any())
            {
                if (this.AllManagedProperties.ContainsKey(component.ObjectId.Value))
                {
                    var managedProperty = this.AllManagedProperties[component.ObjectId.Value];

                    FormatTextTableHandler handler = new FormatTextTableHandler();
                    handler.SetHeader(
                        "LogicalName"
                        , "DisplayName"
                        , "Description"
                        , "EnablesEntityName"
                        , "EnablesAttributeName"
                        , "ErrorCode"
                        , "EvaluationPriority"
                        , "IsPrivate"
                        , "IsGlobalForOperation"
                        , "ManagedPropertyType"
                        , "Operation"
                        );

                    handler.AddLine(
                        managedProperty.LogicalName
                        , CreateFileHandler.GetLocalizedLabel(managedProperty.DisplayName)
                        , CreateFileHandler.GetLocalizedLabel(managedProperty.Description)
                        , managedProperty.EnablesEntityName
                        , managedProperty.EnablesAttributeName
                        , managedProperty.ErrorCode.ToString()
                        , managedProperty.EvaluationPriority.ToString()
                        , managedProperty.IsPrivate.ToString()
                        , managedProperty.IsGlobalForOperation.ToString()
                        , managedProperty.ManagedPropertyType.ToString()
                        , managedProperty.Operation.ToString()
                        );

                    var str = handler.GetFormatedLinesWithHeadersInLine(false).FirstOrDefault();

                    return(string.Format("{0} {1}", this.ComponentTypeEnum.ToString(), str));
                }
            }

            return(component.ToString());
        }
        private string GenerateDescriptionSingleInternal(EntityMetadata metaData, int?behaviorCode, bool withUrls, bool withManaged, bool withSolutionInfo)
        {
            string behavior = SolutionComponent.GetRootComponentBehaviorName(behaviorCode);

            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("EntityName", "DisplayName", "IsCustomizable", "Behavior");

            if (withManaged)
            {
                handler.AppendHeader("IsManaged");
            }

            if (withUrls)
            {
                handler.AppendHeader("Url");
            }

            List <string> values = new List <string>();

            values.AddRange(new[]
            {
                metaData.LogicalName
                , metaData.DisplayName?.UserLocalizedLabel?.Label
                , metaData.IsCustomizable?.Value.ToString()
                , behavior
            });

            if (withManaged)
            {
                values.Add(metaData.IsManaged.ToString());
            }

            if (withUrls)
            {
                values.Add(_source.Service.ConnectionData?.GetEntityMetadataUrl(metaData.MetadataId.Value));
            }

            handler.AddLine(values);

            var str = handler.GetFormatedLinesWithHeadersInLine(false).FirstOrDefault();

            return(string.Format("{0} {1}", this.ComponentTypeEnum.ToString(), str));
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                ImportMap.Schema.Headers.name
                , ImportMap.Schema.Headers.description
                , ImportMap.Schema.Headers.importmaptype
                , ImportMap.Schema.Headers.source
                , ImportMap.Schema.Headers.sourcetype
                , ImportMap.Schema.Headers.entitiesperfile
                , ImportMap.Schema.Headers.isvalidforimport
                , ImportMap.Schema.Headers.iswizardcreated
                , "Behavior"
                );

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(
                Workflow.Schema.Headers.primaryentity
                , Workflow.Schema.Headers.category
                , Workflow.Schema.Headers.name
                , Workflow.Schema.Headers.uniquename
                , Workflow.Schema.Headers.businessprocesstype
                , Workflow.Schema.Headers.scope
                , Workflow.Schema.Headers.mode
                , Workflow.Schema.Headers.statuscode
                , Workflow.Schema.Headers.iscustomizable
                , "Behavior"
                );

            AppendIntoTableHeader(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
예제 #29
0
        private async Task CheckingUnknownFormControlType(ConnectionData connectionData, CommonConfiguration commonConfig)
        {
            var service = await ConnectAndWriteToOutputAsync(connectionData);

            if (service == null)
            {
                return;
            }

            StringBuilder content = new StringBuilder();

            content.AppendLine(Properties.OutputStrings.ConnectingToCRM);
            content.AppendLine(connectionData.GetConnectionDescription());
            content.AppendFormat(Properties.OutputStrings.CurrentServiceEndpointFormat1, service.CurrentServiceEndpoint).AppendLine();

            Dictionary <string, FormatTextTableHandler> dictUnknownControls = new Dictionary <string, FormatTextTableHandler>(StringComparer.InvariantCultureIgnoreCase);

            var descriptor = new SolutionComponentDescriptor(service);
            var handler    = new FormDescriptionHandler(descriptor, new DependencyRepository(service));

            var repositorySystemForm = new SystemFormRepository(service);

            var formList = await repositorySystemForm.GetListAsync(null, null, new ColumnSet(true));

            foreach (var systemForm in formList
                     .OrderBy(f => f.ObjectTypeCode)
                     .ThenBy(f => f.Type?.Value)
                     .ThenBy(f => f.Name)
                     )
            {
                string formXml = systemForm.FormXml;

                if (!string.IsNullOrEmpty(formXml))
                {
                    XElement doc = XElement.Parse(formXml);

                    var tabs = handler.GetFormTabs(doc);

                    var unknownControls = tabs.SelectMany(t => t.Sections).SelectMany(s => s.Controls).Where(c => c.GetControlType() == FormControl.FormControlType.UnknownControl);

                    foreach (var control in unknownControls)
                    {
                        if (!dictUnknownControls.ContainsKey(control.ClassId))
                        {
                            FormatTextTableHandler tableUnknownControls = new FormatTextTableHandler();
                            tableUnknownControls.SetHeader("Entity", "FormType", "Form", "State", "Attribute", "Form Url");

                            dictUnknownControls[control.ClassId] = tableUnknownControls;
                        }

                        dictUnknownControls[control.ClassId].AddLine(
                            systemForm.ObjectTypeCode
                            , systemForm.FormattedValues[SystemForm.Schema.Attributes.type]
                            , systemForm.Name
                            , systemForm.FormattedValues[SystemForm.Schema.Attributes.formactivationstate]
                            , control.Attribute
                            , service.UrlGenerator.GetSolutionComponentUrl(ComponentType.SystemForm, systemForm.Id)
                            );
                    }
                }
            }

            if (dictUnknownControls.Count > 0)
            {
                content.AppendLine().AppendLine();

                content.AppendFormat("Unknown Form Control Types: {0}", dictUnknownControls.Count);

                foreach (var classId in dictUnknownControls.Keys.OrderBy(s => s))
                {
                    content.AppendLine().AppendLine();

                    content.AppendLine(classId);

                    var tableUnknownControls = dictUnknownControls[classId];

                    foreach (var str in tableUnknownControls.GetFormatedLines(false))
                    {
                        content.AppendLine(_tabSpacer + str);
                    }
                }

                commonConfig.CheckFolderForExportExists(this._iWriteToOutput);

                string fileName = string.Format("{0}.Checking Unknown Form Control Types at {1}.txt"
                                                , connectionData.Name
                                                , DateTime.Now.ToString("yyyy.MM.dd HH-mm-ss")
                                                );

                string filePath = Path.Combine(commonConfig.FolderForExport, FileOperations.RemoveWrongSymbols(fileName));

                File.WriteAllText(filePath, content.ToString(), new UTF8Encoding(false));

                this._iWriteToOutput.WriteToOutput(connectionData, "Unknown Form Control Types were exported to {0}", filePath);

                this._iWriteToOutput.PerformAction(service.ConnectionData, filePath);
            }
            else
            {
                this._iWriteToOutput.WriteToOutput(connectionData, "No Unknown Form Control Types in CRM were founded.");
                this._iWriteToOutput.ActivateOutputWindow(connectionData);
            }
        }
예제 #30
0
        private async Task ShowingWebResourcesDependentComponents(ConnectionData connectionData, CommonConfiguration commonConfig, List <SelectedFile> selectedFiles)
        {
            var service = await ConnectAndWriteToOutputAsync(connectionData);

            if (service == null)
            {
                return;
            }

            StringBuilder content = new StringBuilder();

            content.AppendLine(Properties.OutputStrings.ConnectingToCRM);
            content.AppendLine(connectionData.GetConnectionDescription());
            content.AppendFormat(Properties.OutputStrings.CurrentServiceEndpointFormat1, service.CurrentServiceEndpoint).AppendLine();

            var descriptor = new SolutionComponentDescriptor(service);

            descriptor.WithUrls          = true;
            descriptor.WithManagedInfo   = true;
            descriptor.WithSolutionsInfo = true;

            var descriptorHandler = new DependencyDescriptionHandler(descriptor);

            var dependencyRepository = new DependencyRepository(service);

            bool isconnectionDataDirty = false;

            List <string> listNotExistsOnDisk        = new List <string>();
            List <string> listNotFoundedInCRMNoLink  = new List <string>();
            List <string> listLastLinkEqualByContent = new List <string>();

            List <SolutionComponent> webResourceNames = new List <SolutionComponent>();

            Dictionary <SolutionComponent, string> webResourceDescriptions = new Dictionary <SolutionComponent, string>();

            WebResourceRepository repositoryWebResource = new WebResourceRepository(service);

            FormatTextTableHandler tableWithoutDependenComponents = new FormatTextTableHandler();

            tableWithoutDependenComponents.SetHeader("FilePath", "Web Resource Name", "Web Resource Type");

            var groups = selectedFiles.GroupBy(sel => sel.Extension);

            foreach (var gr in groups)
            {
                var names = gr.Select(sel => sel.FriendlyFilePath).ToArray();

                var dict = repositoryWebResource.FindMultiple(gr.Key, names);

                foreach (var selectedFile in gr)
                {
                    if (File.Exists(selectedFile.FilePath))
                    {
                        string name = selectedFile.FriendlyFilePath.ToLower();

                        var webresource = WebResourceRepository.FindWebResourceInDictionary(dict, name, gr.Key);

                        if (webresource == null)
                        {
                            Guid?webId = connectionData.GetLastLinkForFile(selectedFile.FriendlyFilePath);

                            if (webId.HasValue)
                            {
                                webresource = await repositoryWebResource.GetByIdAsync(webId.Value);

                                if (webresource != null)
                                {
                                    listLastLinkEqualByContent.Add(selectedFile.FriendlyFilePath);
                                }
                            }
                        }

                        if (webresource != null)
                        {
                            // Запоминается файл
                            isconnectionDataDirty = true;
                            connectionData.AddMapping(webresource.Id, selectedFile.FriendlyFilePath);

                            var coll = await dependencyRepository.GetDependentComponentsAsync((int)ComponentType.WebResource, webresource.Id);

                            var desc = await descriptorHandler.GetDescriptionDependentAsync(coll);

                            if (!string.IsNullOrEmpty(desc))
                            {
                                var component = new SolutionComponent()
                                {
                                    ComponentType = new OptionSetValue((int)ComponentType.WebResource),
                                    ObjectId      = webresource.Id,
                                };

                                webResourceNames.Add(component);

                                webResourceDescriptions.Add(component, desc);
                            }
                            else
                            {
                                tableWithoutDependenComponents.AddLine(selectedFile.FriendlyFilePath, webresource.Name, "'" + webresource.FormattedValues[WebResource.Schema.Attributes.webresourcetype] + "'");
                            }
                        }
                        else
                        {
                            connectionData.RemoveMapping(selectedFile.FriendlyFilePath);

                            listNotFoundedInCRMNoLink.Add(selectedFile.FriendlyFilePath);
                        }
                    }
                    else
                    {
                        listNotExistsOnDisk.Add(selectedFile.FilePath);
                    }
                }
            }

            if (isconnectionDataDirty)
            {
                //Сохранение настроек после публикации
                connectionData.Save();
            }

            FindsController.WriteToContentList(listNotFoundedInCRMNoLink, content, "File NOT FOUNDED in CRM: {0}");

            FindsController.WriteToContentList(listLastLinkEqualByContent, content, "Files NOT FOUNDED in CRM, but has Last Link: {0}");

            FindsController.WriteToContentList(listNotExistsOnDisk, content, Properties.OutputStrings.FileNotExistsFormat1);

            FindsController.WriteToContentList(tableWithoutDependenComponents.GetFormatedLines(true), content, "Files without dependent components: {0}");

            FindsController.WriteToContentDictionary(descriptor, content, webResourceNames, webResourceDescriptions, "WebResource dependent components: {0}");

            commonConfig.CheckFolderForExportExists(this._iWriteToOutput);

            string fileName = string.Format("{0}.WebResourceDependent at {1}.txt", connectionData.Name, DateTime.Now.ToString("yyyy.MM.dd HH-mm-ss"));

            string filePath = Path.Combine(commonConfig.FolderForExport, FileOperations.RemoveWrongSymbols(fileName));

            File.WriteAllText(filePath, content.ToString(), new UTF8Encoding(false));

            this._iWriteToOutput.WriteToOutput(connectionData, Properties.OutputStrings.CreatedFileWithWebResourcesDependentComponentsFormat1, filePath);

            this._iWriteToOutput.PerformAction(service.ConnectionData, filePath);
        }