File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/Workspaces/Remote/Core Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 66
77using System ;
88using System . IO . Pipelines ;
9+ using System . Reflection ;
910using MessagePack ;
1011using MessagePack . Resolvers ;
1112using Microsoft . ServiceHub . Framework ;
@@ -78,6 +79,26 @@ protected override JsonRpcConnection CreateConnection(JsonRpc jsonRpc)
7879 return connection ;
7980 }
8081
82+ public override ServiceRpcDescriptor WithMultiplexingStream ( MultiplexingStream ? multiplexingStream )
83+ {
84+ var baseResult = base . WithMultiplexingStream ( multiplexingStream ) ;
85+ if ( baseResult is ServiceDescriptor )
86+ return baseResult ;
87+
88+ // work around incorrect implementation in 16.8 Preview 2
89+ if ( MultiplexingStream == multiplexingStream )
90+ return this ;
91+
92+ var result = ( ServiceDescriptor ) Clone ( ) ;
93+ typeof ( ServiceRpcDescriptor ) . GetProperty ( nameof ( MultiplexingStream ) ) ! . SetValue ( result , multiplexingStream ) ;
94+ if ( result . MultiplexingStreamOptions is null )
95+ return result ;
96+
97+ result = ( ServiceDescriptor ) result . Clone ( ) ;
98+ typeof ( ServiceJsonRpcDescriptor ) . GetProperty ( nameof ( MultiplexingStreamOptions ) ) ! . SetValue ( result , value : null ) ;
99+ return result ;
100+ }
101+
81102 internal static class TestAccessor
82103 {
83104 public static MessagePackSerializerOptions Options => s_options ;
You can’t perform that action at this time.
0 commit comments