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

Allow multiple REstate host instances #18

Merged
merged 2 commits into from
Dec 23, 2017
Merged

Conversation

aidapsibr
Copy link
Contributor

@aidapsibr aidapsibr commented Dec 22, 2017

Description of the Change

Allows for multiple instance of REstate Host in addition to the static API (which is now a singleton).

Alternate Designs

Why Should This Be In Core?

Needed for test cases.

Benefits

Will be beneficial in the future where a developer needs multiple hosts as would be the case with multiple, but different, Remote hosts and repositories.

Possible Drawbacks

  • A bit more confusing to work on the Host and Agent.
  • Instance Agent access has to be an extension method to make C# happy.

Applicable Issues

- Make REstateHost a singleton, but hide that from users
- Add Agent() extension method since you cant have a static and instance member with the same name
- Shift around properties to make this work
- 🔥 Remove ResetAgent grossness
@aidapsibr aidapsibr force-pushed the AllowMultipeHostInstances branch from 15de7e0 to 22f4bfe Compare December 22, 2017 21:46
- Add test for REstateHost to ensure the static API still works.
@@ -225,7 +225,7 @@ public void CanBuildServerServiceDefinition()
}

[Fact]
public async Task CreateMachineFromStoreAsync()
public async Task MachineFromStoreAsync()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh Woops.

@aidapsibr aidapsibr force-pushed the AllowMultipeHostInstances branch from 22f4bfe to 6b5e421 Compare December 23, 2017 01:27
@aidapsibr aidapsibr merged commit a805057 into master Dec 23, 2017
@aidapsibr aidapsibr deleted the AllowMultipeHostInstances branch December 23, 2017 01:28
@aidapsibr aidapsibr added this to the v3.2 milestone Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant