File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ static void Main (string[] args)
42
42
} ;
43
43
44
44
var creds = new ClientSecretCredential ( config . TenantId . ToString ( ) , config . ClientId . ToString ( ) , config . ClientSecret ) ;
45
- var versionInfo = FileVersionInfo . GetVersionInfo ( Assembly . GetExecutingAssembly ( ) . Location ) ;
45
+ var versionInfo = new AppVersionService ( Assembly . GetExecutingAssembly ( ) ? . GetName ( ) ? . Version ) ;
46
46
47
47
var services = new ServiceCollection ( )
48
48
. AddDbContext < SaasKitContext > ( options => options . UseSqlServer ( configuration . GetConnectionString ( "DefaultConnection" ) ) , ServiceLifetime . Transient )
@@ -56,7 +56,7 @@ static void Main (string[] args)
56
56
. AddScoped < IApplicationConfigRepository , ApplicationConfigRepository > ( )
57
57
. AddSingleton < IMeteredBillingApiService > ( new MeteredBillingApiService ( new MarketplaceMeteringClient ( creds ) , config , new SaaSClientLogger < MeteredBillingApiService > ( ) ) )
58
58
. AddSingleton < Executor , Executor > ( )
59
- . AddSingleton < IAppVersionService > ( new AppVersionService ( versionInfo ) )
59
+ . AddSingleton < IAppVersionService > ( versionInfo )
60
60
. BuildServiceProvider ( ) ;
61
61
62
62
services
You can’t perform that action at this time.
0 commit comments