Skip to content

Commit 8aa0198

Browse files
committed
support partial interface
1 parent 7438f0e commit 8aa0198

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/TypedSignalR.Client.TypeScript/RoslynExtensions.TypeCollector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static IReadOnlyList<INamedTypeSymbol> GetAttributeAnnotatedTypes(this Co
6868

6969
return attributes.Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, attributeSymbol));
7070
})
71+
.Distinct<INamedTypeSymbol>(SymbolEqualityComparer.Default)
7172
.ToArray();
7273

7374
return types;
@@ -100,6 +101,7 @@ public static IReadOnlyList<INamedTypeSymbol> GetAttributeAnnotatedTypes(
100101

101102
return false;
102103
})
104+
.Distinct<INamedTypeSymbol>(SymbolEqualityComparer.Default)
103105
.ToArray();
104106

105107
return types;

tests/TypedSignalR.Client.TypeScript.Tests.Shared/IUnaryHub.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ public class MyResponseItem2
4343
}
4444

4545
[Hub]
46-
public interface IUnaryHub
46+
public partial interface IUnaryHub
4747
{
4848
Task<string> Get();
4949
Task<int> Add(int x, int y);
5050
Task<string> Cat(string x, string y);
51+
}
52+
53+
public partial interface IUnaryHub
54+
{
5155
Task<UserDefinedType> Echo(UserDefinedType instance);
5256
Task<MyEnum> EchoMyEnum(MyEnum myEnum);
5357
Task<MyResponseItem[]> RequestArray(MyRequestItem[] array);

0 commit comments

Comments
 (0)