Skip to content

Commit

Permalink
Removed additional constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
alelom authored and al-fisher committed May 22, 2020
1 parent a8a9c61 commit 8af5986
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Speckle_Adapter/SpeckleAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,15 @@ public SpeckleAdapter(SpeckleCore.Account speckleAccount, string speckleStreamId

AdapterIdName = BH.Adapter.Speckle.Convert.AdapterIdName;

SpeckleAccount = speckleAccount;
SpeckleStream SpeckleStream = new SpeckleStream() { StreamId = speckleStreamId, Name = speckleStreamName };

SpeckleClient = new SpeckleApiClient() { BaseUrl = SpeckleAccount.RestApi, AuthToken = SpeckleAccount.Token, Stream = SpeckleStream, StreamId = SpeckleStream.StreamId}; // hacky, but i don't want to rebuild stuff and fiddle dll loading etc.
SpeckleClient = new SpeckleApiClient() { BaseUrl = speckleAccount.RestApi, AuthToken = speckleAccount.Token, Stream = SpeckleStream, StreamId = SpeckleStream.StreamId};
SpeckleClient.SetupWebsocket();
}

// Keep for retrocompatibility
public SpeckleAdapter(SpeckleCore.Account speckleAccount, string speckleStreamId) : this(speckleAccount, speckleStreamId, "Anonymous stream")
{ }



/***************************************************/
/**** Public Properties ****/
/***************************************************/
public SpeckleApiClient SpeckleClient { get; private set; }
public Account SpeckleAccount { get; private set; }
}
}

0 comments on commit 8af5986

Please sign in to comment.