public SymbolService(PackageService packageService, SymbolPackageService symbolPackageService, ISymbolsPathResolver symbolsPathResolver, ISymbolPackagePathResolver symbolPackagePathResolver, SymbolTools symbolTools) { this.packageService = packageService; this.symbolPackageService = symbolPackageService; this.symbolsPathResolver = symbolsPathResolver; this.symbolPackagePathResolver = symbolPackagePathResolver; this.symbolTools = symbolTools; }
public override void Load() { Bind <ISymbolsPathResolver>().To <SymbolsPathResolver>(); Bind <ISymbolPackagePathResolver>().To <SymbolPackagePathResolver>(); Bind <IToolPathResolver>().To <ToolPathResolver>(); Bind <IPackageAuthenticationService>().To <PackageAuthenticationService>(); var serverPackageRepository = new ServerPackageRepository ( NuPeekConfiguration.NugetPackagePath, new CryptoHashProvider(), new TraceLogger() ); Bind <IServerPackageRepository>().ToConstant(serverPackageRepository); var symbolPackageService = new SymbolPackageService ( new ServerPackageRepository ( NuPeekConfiguration.SymbolPackagePath, new CryptoHashProvider(), new TraceLogger() ), Kernel.Get <IPackageAuthenticationService>() ); Bind <SymbolPackageService>().ToConstant(symbolPackageService); var symbolService = new SymbolService ( Kernel.Get <PackageService>(), symbolPackageService, Kernel.Get <ISymbolsPathResolver>(), Kernel.Get <ISymbolPackagePathResolver>(), Kernel.Get <SymbolTools>() ); Bind <SymbolService>().ToConstant(symbolService); }