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 information about lifestyles to VisualizeObjectGraph #648

Open
dotnetjunkie opened this Issue Jan 2, 2019 · 6 comments

Comments

2 participants
@dotnetjunkie
Copy link
Collaborator

dotnetjunkie commented Jan 2, 2019

When InstanceProducer.VisualizeObjectGraph is called, a string representation of the object graph is returned. For instance:

UserListController(
    SqlRepository<User>(
        SqlConnectionFactory()),
    FileLogger())

It would be useful to add lifestyle information to this graph:

UserListController( // Transient
    SqlRepository<User>( // Async Scoped
        SqlConnectionFactory()), // Singleton
    FileLogger()) // Singleton

Perhaps this can be presented as an option:

public string VisualizeObjectGraph(bool includeLifestyleInformation)

or:

public string VisualizeObjectGraph(VisualizationOptions options)

public class VisualizationOptions
{
    public bool IncludeLifestyleInformation { get; set; } = true;
}

@dotnetjunkie dotnetjunkie added this to the Backlog milestone Jan 2, 2019

@kwlin

This comment has been minimized.

Copy link

kwlin commented Jan 3, 2019

@dotnetjunkie : Can I pick this issue up & make a pull request to learn more about this nice project?

@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator

dotnetjunkie commented Jan 3, 2019

@kwlin: Sure. You should follow the How to Contribute guide. This means that you should sign and send an CLA, as described in the documentation.

After you've done that, you can fork the project and add your code, xml docs and unit tests to the feature-648 branch. When you're done, you can send a pull request. After you sent the PR, we can start discuss your PR.

Have fun!

feature-648

@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator

dotnetjunkie commented Jan 3, 2019

Few other tips:

  • Go with the VisualizationOptions approach
  • Set IncludeLifestyleInformation to true by default.
@kwlin

This comment has been minimized.

Copy link

kwlin commented Jan 3, 2019

Thnx for the input. I was also thinking of the VisualizationOptions approach ;) I hope I can make a pull request next week!

@kwlin

This comment has been minimized.

Copy link

kwlin commented Jan 15, 2019

I've got a first implementation for this issue.

Shall I make Work In Progress pull request so the first code reviews/comments could be provided?

PS: The CLA is still work in progress!

@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator

dotnetjunkie commented Jan 15, 2019

The CLA is only required for us to accept the pull request. Feel free to create the PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment