Skip to content

Commit

Permalink
Generation of callbacks/operations separately.
Browse files Browse the repository at this point in the history
  • Loading branch information
TerraVenil committed Dec 3, 2018
1 parent af2d3c1 commit 2454b7c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/SigSpec.Core/SigSpecGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ public async Task<SigSpecDocument> GenerateForHubsAsync(IReadOnlyDictionary<stri
{
var operation = await GenerateOperationAsync(type, method, generator, resolver);
hub.Operations[method.Name] = operation;
}

var baseTypeGenericArguments = type.BaseType.GetGenericArguments();
if (baseTypeGenericArguments.Length == 1)
var baseTypeGenericArguments = type.BaseType.GetGenericArguments();
if (baseTypeGenericArguments.Length == 1)
{
var callbackType = baseTypeGenericArguments[0];
foreach (var callbackMethod in GetOperationMethods(callbackType))
{
var callbackType = baseTypeGenericArguments[0];
foreach (var callbackMethod in GetOperationMethods(callbackType))
{
var callback = await GenerateOperationAsync(type, callbackMethod, generator, resolver);
hub.Callbacks[callbackMethod.Name] = callback;
}
var callback = await GenerateOperationAsync(type, callbackMethod, generator, resolver);
hub.Callbacks[callbackMethod.Name] = callback;
}
}

Expand Down

0 comments on commit 2454b7c

Please sign in to comment.