ISSUE-74 : Fix when parsing an XCApi containing different components with the same stateMachine name#75
Merged
Julien-Molina merged 4 commits intomasterfrom Feb 1, 2018
Merged
Conversation
…with the same stateMachine name
| private Dictionary<TopicIdentifier, string> _publisherTopicByIdentifier; | ||
| private Dictionary<TopicIdentifier, string> _subscriberTopicByIdentifier; | ||
| private Dictionary<long, string> _snapshotTopicByComponent; | ||
| private Dictionary<string, List<StateMachineInfo>> _stateMachineInfoByComponentRepository; |
Contributor
There was a problem hiding this comment.
Choose something "Repo" "Repository" or "Nothing" and use it everywhere. I would suggest to remove Repository & Repo.
Julien-Molina
suggested changes
Jan 31, 2018
|
|
||
| _componentCodeByComponent = CreateComponentCodeByNameRepository(_xcApiDescription.GetComponentsNode()); | ||
| _stateMachineCodeByStateMachine = CreateStateMachineCodeByNameRepository(_xcApiDescription.GetStateMachinesNode()); | ||
| ParseComponentNodes(_xcApiDescription.GetComponentsNode(), out _componentCodeByComponentNameRepo, out _stateMachineInfoByComponentRepository); |
Contributor
There was a problem hiding this comment.
Remove out _componentCodeByComponentNameRepo, out _stateMachineInfoByComponentRepository and use them directly in the private method
| } | ||
| } | ||
|
|
||
| private Dictionary<long, string> CreateSnapshotTopicByComponentRepository(IEnumerable<XElement> snapshotNodes) |
Contributor
There was a problem hiding this comment.
Same problem with namings here : "Repo" and "Repository"
| if (!repository.ContainsKey(componentCode)) | ||
| { | ||
| repository.Add(componentCode, node?.Descendants(_xc + XCApiTags.Topic).FirstOrDefault().Value); | ||
| repository.Add(componentCode, node?.Descendants(_xc + XCApiTags.Topic).FirstOrDefault()?.Value); |
Contributor
There was a problem hiding this comment.
Do we really want to add null values in the dictionnary ?
| namespace ReactiveXComponent.Parser | ||
| { | ||
| public class StateMachineInfo | ||
| { |
Contributor
There was a problem hiding this comment.
Create a constructor with 2 parameters and remove the public setters
anouarhassine
requested changes
Feb 1, 2018
Contributor
anouarhassine
left a comment
There was a problem hiding this comment.
Remove the old Tools folder (with capital T). It is still there in your branch
anouarhassine
approved these changes
Feb 1, 2018
Julien-Molina
approved these changes
Feb 1, 2018
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #74