Пример #1
0
        public string GenerateDescriptionSingle(SolutionComponent solutionComponent, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            if (solutionComponent == null)
            {
                return(null);
            }

            var entityInput = GetEntity <Entity>(solutionComponent.ObjectId.Value);

            if (entityInput != null)
            {
                FormatTextTableHandler handler = GetDescriptionHeader(withManaged, withSolutionInfo, withUrls, AppendIntoTableHeaderSingle);

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

                List <string> values = GetDescriptionValues(entityInput, behavior, withManaged, withSolutionInfo, withUrls, AppendIntoValuesSingle);

                handler.AddLine(values);

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

                return(string.Format("{0} {1}", entityInput.LogicalName, str));
            }

            return(solutionComponent.ToString());
        }
Пример #2
0
        protected void AppendIntoTableHeader(FormatTextTableHandler handler, bool withUrls, bool withManaged, bool withSolutionInfo)
        {
            if (withManaged)
            {
                handler.AppendHeader("IsManaged");
            }

            if (withSolutionInfo)
            {
                handler.AppendHeader("SolutionName");

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

                handler.AppendHeader("SupportingName");

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

            if (withUrls)
            {
                handler.AppendHeader("Url");
            }
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(PrivilegeObjectTypeCodes.Schema.Headers.privilegeid, PrivilegeObjectTypeCodes.Schema.Headers.objecttypecode, "Behavior");

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

            handler.SetHeader("Message", "Category", "Template", "WorkflowSdkStepEnabled", "CustomizationLevel", "AutoTransact", "Expand", "IsActive", "IsPrivate", "IsReadOnly", "IsValidForExecuteAsync", "Behavior");

            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("Message", "MessageCategory", "RequestName", "Position", "Name", "PublicName", "Value", "ClrFormatter", "Formatter", "ParameterBindingInformation", "CustomizationLevel", "Behavior");

            return(handler);
        }
Пример #6
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Message", "PrimaryObjectTypeCode", "SecondaryObjectTypeCode", "WorkflowSdkStepEnabled", "IsCustomProcessingStepAllowed", "IsVisible", "CustomizationLevel", "Behavior");

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

            handler.SetHeader(Privilege.Schema.Headers.name, Privilege.Schema.Headers.accessright, "Behavior");

            return(handler);
        }
Пример #8
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Message", "MessageCategory", "Namespace", "Endpoint", "Name", "PrimaryObjectTypeCode", "CustomizationLevel", "Behavior");

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

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

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

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

                handler.AppendHeader("KeyAttributes");

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

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

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

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

                values.Add(string.Join(",", metaData.KeyAttributes.OrderBy(s => s)));

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

                    if (entityMetadata != null)
                    {
                        values.Add(_source.Service.ConnectionData?.GetEntityKeyMetadataUrl(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());
        }
Пример #10
0
        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;
        }
        public void GenerateDescription(StringBuilder builder, IEnumerable <SolutionComponent> components, bool withManaged, bool withSolutionInfo, bool withUrls)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

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

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

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

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

                EntityMetadata metaData = _source.GetEntityMetadata(comp.ObjectId.Value);

                if (metaData != null)
                {
                    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);
                }
                else
                {
                    handler.AddLine(comp.ObjectId.ToString(), behavior);
                }
            }

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

            lines.ForEach(item => builder.AppendFormat(formatSpacer, item).AppendLine());
        }
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("ControlName", "Name", "WebResourceName", "WebResourceType", "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("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("PrimaryEntityLogicalName", "Name", "Description", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
Пример #15
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);
        }
Пример #16
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Entity", "DiffId", "DiffType", "TabId", "ContextGroupId", "Sequence", "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("FieldSecurityProfileName", "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("Key", "LanguageCode", "Published", "Custom", "CustomComment", "FormatParameters", "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);
        }
Пример #20
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader(CustomControl.Schema.Headers.name, CustomControl.Schema.Headers.compatibledatatypes, "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
Пример #21
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);
        }
        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);
        }
Пример #23
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

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

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
Пример #24
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("TemplateTypeCode", "Name", "MailMergeType", "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("Name", "ConnectionMode", "Contract", "MessageFormat", "IsCustomizable", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
Пример #28
0
        protected override FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            FormatTextTableHandler handler = new FormatTextTableHandler();

            handler.SetHeader("Entity", "Name", "MatchingEntityName", "Id", "Behavior");

            action(handler, withUrls, withManaged, withSolutionInfo);

            return(handler);
        }
Пример #29
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);
        }
Пример #30
0
        protected virtual FormatTextTableHandler GetDescriptionHeader(bool withManaged, bool withSolutionInfo, bool withUrls, Action <FormatTextTableHandler, bool, bool, bool> action)
        {
            var result = new FormatTextTableHandler();

            result.SetHeader("Id");
            result.SetHeader("Behavior");

            action(result, withUrls, withManaged, withSolutionInfo);

            return(result);
        }