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 easier support for 3rd party service locators #32

Merged
merged 3 commits into from
Jan 25, 2016

Conversation

chaowlert
Copy link
Collaborator

Other applications might depend on MEF or other libraries to create catalog of plugins. This PR will make Mapster more friendly to register IRegister.

[Export(typeof(IRegister))]
class MyRegister: IRegister
{

}

var catalog = new ApplicationCatalog();
var container = new CompositionContainer(catalog);

var registers = container.GetExports<IRegister>();
TypeAdaptConfig.GlobalSettings.Apply(registers);

@eswann
Copy link
Collaborator

eswann commented Jan 25, 2016

Good idea thanks!

eswann added a commit that referenced this pull request Jan 25, 2016
Add easier support for 3rd party service locators
@eswann eswann merged commit 8a856cd into MapsterMapper:master Jan 25, 2016
@eswann
Copy link
Collaborator

eswann commented Jan 25, 2016

@chaowlert can you push a new version out to Nuget? I would like to pull in these changes but not sure how you are building/publishing. If you can give me some info on that, would be appreciated....

@chaowlert
Copy link
Collaborator Author

@eswann I build using Mapster.xproj (.Net Core proj). Would you like to try?

I just bump version in project.json and compile in Release mode in Visual Studio. Output nuget will be in artifacts folder.

If you build using CI, you may find command line here http:https://docs.asp.net/en/latest/dnx/projects.html

Feel free to ask. I can publish if you cannot find the time.

@eswann
Copy link
Collaborator

eswann commented Jan 25, 2016

@chaowlert Ah ok, previously I was using the psake scripts in the deploy folder which builds and publishes to Nuget...but noticed this wasn't properly setting up the nuget package.

@eswann
Copy link
Collaborator

eswann commented Jan 25, 2016

I'm going to bump to 2.1.0 per semver b/c we've added some new functionality that's backwards compatible.

@eswann
Copy link
Collaborator

eswann commented Jan 25, 2016

@chaowlert I'll try to update the package/publish bat files to use dnu...but might wait until RC2 since the CLI is going to be reorganized/finalized at that point.

It's pretty easy to manually build/publish now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants