Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Aug 15, 2018
1 parent 86b2f17 commit 91f55d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IEnumerable<IAut
StreamReturnType = channelItemType;
}

// Take out synthetic arguments that will be provided by the server, this list will be given to the protocol parsers
ParameterTypes = methodExecutor.MethodParameters.Where(p =>
{
// Only streams can take CancellationTokens currently
if (IsStreamable && p.ParameterType == typeof(CancellationToken))
{
HasSyntheticArguments = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public bool TryGetSyntheticArgument(Type type, out object argument)
return false;
}

// May be used for canceling hub invocations, so we need to expose the cts
public bool TryGetCancellationTokenSource(out CancellationTokenSource cts)
{
cts = _cts;
Expand Down

0 comments on commit 91f55d1

Please sign in to comment.