1- using System . ComponentModel . Composition ;
1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . ComponentModel . Composition ;
4+ using System . Net ;
5+ using System . Security . Authentication . ExtendedProtection ;
6+ using System . Threading . Tasks ;
27using GitHub . Models ;
38using Octokit ;
49using Octokit . Internal ;
10+ using Rothko ;
511
612namespace GitHub . Infrastructure
713{
@@ -17,6 +23,31 @@ public ExportedHttpClient() :
1723 { }
1824 }
1925
26+ [ Export ( typeof ( IHttpListener ) ) ]
27+ public class ExportedHttpListener : IHttpListener
28+ {
29+ readonly IHttpListener inner = new HttpListenerWrapper ( new HttpListener ( ) ) ;
30+ public AuthenticationSchemes AuthenticationSchemes { get => inner . AuthenticationSchemes ; set => inner . AuthenticationSchemes = value ; }
31+ public AuthenticationSchemeSelector AuthenticationSchemeSelectorDelegate { get => inner . AuthenticationSchemeSelectorDelegate ; set => inner . AuthenticationSchemeSelectorDelegate = value ; }
32+ public ServiceNameCollection DefaultServiceNames => inner . DefaultServiceNames ;
33+ public ExtendedProtectionPolicy ExtendedProtectionPolicy { get => inner . ExtendedProtectionPolicy ; set => inner . ExtendedProtectionPolicy = value ; }
34+ public HttpListener . ExtendedProtectionSelector ExtendedProtectionSelectorDelegate { get => inner . ExtendedProtectionSelectorDelegate ; set => inner . ExtendedProtectionSelectorDelegate = value ; }
35+ public bool IgnoreWriteExceptions { get => inner . IgnoreWriteExceptions ; set => inner . IgnoreWriteExceptions = value ; }
36+ public bool IsListening => inner . IsListening ;
37+ public ICollection < string > Prefixes => inner . Prefixes ;
38+ public string Realm { get => inner . Realm ; set => inner . Realm = value ; }
39+ public HttpListenerTimeoutManager TimeoutManager => inner . TimeoutManager ;
40+ public bool UnsafeConnectionNtlmAuthentication { get => inner . UnsafeConnectionNtlmAuthentication ; set => inner . UnsafeConnectionNtlmAuthentication = value ; }
41+ public void Abort ( ) => inner . Abort ( ) ;
42+ public IAsyncResult BeginGetContext ( AsyncCallback callback , object state ) => inner . BeginGetContext ( callback , state ) ;
43+ public void Close ( ) => inner . Close ( ) ;
44+ public IHttpListenerContext EndGetContext ( IAsyncResult asyncResult ) => inner . EndGetContext ( asyncResult ) ;
45+ public IHttpListenerContext GetContext ( ) => inner . GetContext ( ) ;
46+ public Task < IHttpListenerContext > GetContextAsync ( ) => inner . GetContextAsync ( ) ;
47+ public void Start ( ) => inner . Start ( ) ;
48+ public void Stop ( ) => inner . Stop ( ) ;
49+ }
50+
2051 [ Export ( typeof ( IEnterpriseProbe ) ) ]
2152 public class ExportedEnterpriseProbe : EnterpriseProbe
2253 {
0 commit comments