Permalink
Browse files

Expose SessionId in ISmarketsClient

  • Loading branch information...
1 parent c03d9cb commit 21d8dc00ba62442de8740f06bc9fba021f800ac9 Hunter Morris committed May 22, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 IronSmarkets/Clients/SmarketsClient.cs
@@ -44,6 +44,7 @@ public interface ISmarketsClient :
IPayloadEndpoint<PS.Payload>,
IQuoteSink
{
+ string SessionId { get; }
bool IsDisposed { get; }
ulong Login();
@@ -98,6 +99,8 @@ public sealed class SmarketsClient : ISmarketsClient
ISession<PS.Payload> session,
IAsyncHttpFoundHandler<PS.Events> httpHandler)
{
+ if (session == null)
+ throw new ArgumentNullException("session cannot be null");
_session = session;
_session.PayloadReceived += (sender, args) =>
OnPayloadReceived(args.Payload);
@@ -153,6 +156,14 @@ public static ISmarketsClient Create(IClientSettings settings)
return client;
}
+ public string SessionId
+ {
+ get
+ {
+ return _session.SessionId;
+ }
+ }
+
public bool IsDisposed
{
get

0 comments on commit 21d8dc0

Please sign in to comment.