question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AddProfiles() overload that takes an IEnumerable<Profile> ?

See original GitHub issue

Is there a reason why there is no overload of AddProfiles that just takes a collection of Profiles?

I recognize this is a minor quibble, but it seems like a silly omission. I can either add a single Profile at a time, or I can scan any number of assemblies to auto-add multiple profiles. I was surprised to find there’s no built-in way to add multiples without going all the way into assembly scanning.

I feel like this should have come up years ago, so I’m surprised that I’m having to make this request!

To put it specifically, I’d simply like to be able to do this:

IEnumerable<Profile> profiles = GetProfilesFromSomewhere();
foreach (Profile profile in profiles)
{
  cfg.AddProfile(profile);
}

Like this:

IEnumerable<Profile> profiles = GetProfilesFromSomewhere();
cfg.AddProfiles(profiles);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jbogardcommented, Jan 11, 2019

Let’s keep this open if it’s a feature request

0reactions
lock[bot]commented, May 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to build up an IEnumerable?
Concat() returns a new IEnumerable<T> with the concatenated ... CreateInstance; // Have you overloaded this? var profileList = profiles.
Read more >
Autofac and Automapper
Use the overload that takes the existing destination: Mapper.Map<Source, Destination>(source, destination);. Yes, it returns the destination object, but that's ...
Read more >
(PDF) ASP NET MVC 4 in Action | jorge santos
NET MVC takes a different approach when it comes to structuring web applications. ... Our second overload of the Create action is decorated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found