Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ModelNode.ToPrettyPrint() function #826

Closed
SubPointSupport opened this issue Apr 12, 2016 · 1 comment
Closed

Add ModelNode.ToPrettyPrint() function #826

SubPointSupport opened this issue Apr 12, 2016 · 1 comment
Assignees
Milestone

Comments

@SubPointSupport
Copy link
Contributor

ModelNode has a good override of .ToString() method to provide a first look on the actual model node and definition.

It is desired to have .ToPrettyPrint() function which would print out the actual model tree in indent-based string. Extremely useful for the debugging, tracing purposes especially for the M2 Reverse library.

@SubPointSupport
Copy link
Contributor Author

Implemented as DefaultPrettyPrintService with the following API:

Console.Write(model.ToPrettyPrint());
Console.Write(SPMeta2Model.ToPrettyPrint(model));

The output looks as following:

[WebDefinition] - Title:[] Description:[] Convert(p.LCID):[1033] Convert(p.UseUniquePermission):[False] Url:[/] WebTemplate:[] CustomWebTemplate:[]
    [WebDefinition] - Title:[7f4bf855bbb047459316a4463787b44c] Description:[9535d3d356874538a9186ab4eef18cfb] Convert(p.LCID):[1033] Convert(p.UseUniquePermission):[False] Url:[0720bb4b62714193] WebTemplate:[STS#0] CustomWebTemplate:[]
        [DeleteQuickLaunchNavigationNodesDefinition] - SPMeta2.Definitions.DeleteQuickLaunchNavigationNodesDefinition 
        [FeatureDefinition] - Title:[SharePoint Server Publishing] Convert(p.Id):[94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb] Convert(p.Scope):[Web] Convert(p.Enable):[True] Convert(p.ForceActivate):[False]
        [ListDefinition] - Title: [ee67643598e540568d4c4a124da30a5e] Url: [b48ba77a11114703] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [a18e63b4634e4a67a78fcabda1608932] Url: [542b5eb5394849d1] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [7c2c8cd1372d4be288b41a2691e3c9c1] Url: [37236ac1793e4cea] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [e04f8463f9a84b218d5ee29d0ddfa8ce] Url: [62160a7eff3f49e5] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [1e077b79050443b18deefeba6eb48d69] Url: [1013bbc2c410413f] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [1c28254112b04efda2fa39264ef2298b] Url: [604030ce70a1405f] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [2e550c96a0544f219bbd2795bb5ee479] Url: [571cdafd778b4a63] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [d7fec91d1e4249169e01f286d690db37] Url: [89cd379d577e4485] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [8ae1d0b91c6242b1bac3648e80798fb8] Url: [f6966904368e4735] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]
        [ListDefinition] - Title: [411d2b8bd5e04d5e91729d13378ef00f] Url: [d461066713214309] ContentTypesEnabled:[True] TemplateType:[101] TemplateName:[]

SubPointSupport added a commit that referenced this issue Aug 6, 2016
+ added ServiceContainer_Should_Have_DefaultServices tests for service container concistency
@SubPointSupport SubPointSupport self-assigned this Aug 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant