Skip to content

Commit

Permalink
Merge pull request #6 from TerraVenil/fix_callback_generation
Browse files Browse the repository at this point in the history
Generation of callbacks/operations separately.
  • Loading branch information
RicoSuter authored Dec 3, 2018
2 parents af2d3c1 + 2454b7c commit c9d21c7
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 c9d21c7

Please sign in to comment.