@@ -44,13 +44,14 @@ private sealed class HttpUserAgentSelectorExpression : IHttpUserAgentSelectorExp
4444 {
4545 public ProductInfoHeaderValue UserAgent { get ; private set ; }
4646
47- public void FromAssembly ( Assembly assembly , Func < string , string > productNameFormatter = null ) => this . ResolveUserAgentFromAssembly ( assembly , productNameFormatter ) ;
47+ public void FromAssembly ( Assembly assembly , Func < string , string > productNameFormatter = null ) => ResolveUserAgentFromAssembly ( assembly , productNameFormatter ) ;
4848
49- public void FromAssemblyContainingType < T > ( Func < string , string > productNameFormatter = null ) => this . ResolveUserAgentFromAssembly ( typeof ( T ) . Assembly , productNameFormatter ) ;
49+ public void FromAssemblyContainingType < T > ( Func < string , string > productNameFormatter = null ) => FromAssemblyContainingType ( typeof ( T ) , productNameFormatter ) ;
50+ public void FromAssemblyContainingType ( Type type , Func < string , string > productNameFormatter = null ) => ResolveUserAgentFromAssembly ( type . Assembly , productNameFormatter ) ;
5051
51- public void FromEntryAssembly ( Func < string , string > productNameFormatter = null ) => this . ResolveUserAgentFromAssembly ( ResolveEntryAssembly ( ) , productNameFormatter ) ;
52+ public void FromEntryAssembly ( Func < string , string > productNameFormatter = null ) => ResolveUserAgentFromAssembly ( ResolveEntryAssembly ( ) , productNameFormatter ) ;
5253
53- public void FromCurrentProcess ( Func < string , string > productNameFormatter = null ) => this . FromFile ( ResolveCurrentProcessPath ( ) , productNameFormatter ) ;
54+ public void FromCurrentProcess ( Func < string , string > productNameFormatter = null ) => FromFile ( ResolveCurrentProcessPath ( ) , productNameFormatter ) ;
5455
5556 public void FromFile ( string path , Func < string , string > productNameFormatter )
5657 {
@@ -64,11 +65,11 @@ public void FromFile(string path, Func<string, string> productNameFormatter)
6465 if ( productNameFormatter != null )
6566 userAgentProductName = productNameFormatter ( userAgentProductName ) ;
6667
67- this . UserAgent = new ProductInfoHeaderValue ( userAgentProductName , productVersion ) ;
68+ UserAgent = new ProductInfoHeaderValue ( userAgentProductName , productVersion ) ;
6869 }
6970
7071#pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file
71- private void ResolveUserAgentFromAssembly ( Assembly assembly , Func < string , string > productNameFormatter ) => this . FromFile ( assembly . Location , productNameFormatter ) ;
72+ private void ResolveUserAgentFromAssembly ( Assembly assembly , Func < string , string > productNameFormatter ) => FromFile ( assembly . Location , productNameFormatter ) ;
7273#pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file
7374
7475 private static Assembly ResolveEntryAssembly ( )
0 commit comments