Skip to content

Commit

Permalink
Make EventStreamPath overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jan 21, 2018
1 parent 8cc9043 commit ada5815
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ServiceStack.Client/ServerEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public partial class ServerEventsClient : IDisposable

public string ConnectionDisplayName => ConnectionInfo != null ? ConnectionInfo.DisplayName : "(not connected)";

private string eventStreamPath;
public string EventStreamPath { get; set; }
public string EventStreamUri { get; private set; }

public string BaseUri
Expand All @@ -108,7 +108,7 @@ public string BaseUri
}
set
{
this.eventStreamPath = value.CombineWith("event-stream");
this.EventStreamPath = value.CombineWith("event-stream");
BuildEventStreamUri();

if (this.ServiceClient is IServiceClientMeta meta)
Expand All @@ -129,7 +129,7 @@ public string[] Channels

private void BuildEventStreamUri()
{
this.EventStreamUri = this.eventStreamPath
this.EventStreamUri = this.EventStreamPath
.AddQueryParam("channels", string.Join(",", this.channels));
}

Expand All @@ -154,7 +154,7 @@ private void BuildEventStreamUri()

public ServerEventsClient(string baseUri, params string[] channels)
{
this.eventStreamPath = baseUri.CombineWith("event-stream");
this.EventStreamPath = baseUri.CombineWith("event-stream");
this.Channels = channels;

this.ServiceClient = new JsonServiceClient(baseUri);
Expand Down

0 comments on commit ada5815

Please sign in to comment.