-
Notifications
You must be signed in to change notification settings - Fork 51
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
2525 creating individual from MoBi (PK-Sim code changes) #2526
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
862323d
initial implementation
georgeDaskalakis eb7d0f5
adding unit tests
georgeDaskalakis a508a2b
Remove registrations for IUserSettings (and dependencies) as well as …
rwmcintosh b7fa8e2
missed a using
rwmcintosh 5b65a16
Fix tests
rwmcintosh 1bfce2f
first null presenter implementation
georgeDaskalakis ae70fca
cleaning up the registration
georgeDaskalakis 3f557f2
Merge branch 'OSMOSES' into 2525-create-individual
georgeDaskalakis 0040641
unit test corrected
georgeDaskalakis 39d464e
refactoring the registry
georgeDaskalakis 090ddce
fixing expression profile registration
georgeDaskalakis ade5466
resolve commands dynamically
rwmcintosh f876c7c
Merge branch 'OSMOSES' into 2525-create-individual
rwmcintosh d17b344
merge conflict
rwmcintosh 17b4b73
update tests
rwmcintosh 0c70df2
correct a refactoring
rwmcintosh ee30d64
add some comments about registration and remove a not-needed class
rwmcintosh 1a2dced
remove convention in favour of selecting classes in the register
rwmcintosh 58247e5
Limit registration of UI components by namespace
rwmcintosh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using OSPSuite.Utility.Container; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using OSPSuite.Core; | ||
using OSPSuite.Core.Commands.Core; | ||
using OSPSuite.Utility; | ||
using OSPSuite.Utility.Extensions; | ||
|
||
namespace PKSim.Core | ||
{ | ||
/// <summary> | ||
/// Register components in the container that are relevant for the PKSimStarter | ||
/// </summary> | ||
public class PKSimStarterRegistrationConvention : PKSimRegistrationConvention | ||
{ | ||
public override void Process(Type concreteType, IContainer container, LifeStyle lifeStyle) | ||
{ | ||
if (!shouldRegisterType(concreteType)) | ||
return; | ||
|
||
base.Process(concreteType, container, lifeStyle); | ||
} | ||
|
||
private bool shouldRegisterType(Type concreteType) | ||
{ | ||
if (concreteType.FullName == null) | ||
return false; | ||
|
||
if (concreteType.FullName.Contains("ExpressionProfile")) | ||
return true; | ||
|
||
if (concreteType.FullName.Contains("Individual")) | ||
return true; | ||
|
||
if (concreteType.FullName.Contains("Parameter")) | ||
return true; | ||
|
||
if (concreteType.FullName.Contains("Mapper")) | ||
return true; | ||
|
||
if (concreteType.FullName.Contains("Factory")) | ||
return true; | ||
|
||
if (concreteType.FullName.Contains("Tooltip")) | ||
return true; | ||
|
||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this done here and not in the register with the Include exclude. ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this =>
scan.Include(shouldRegisterType);
?