PackageTrackingCatalogSourceFactory.h (831B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "SourceFactory.h" 5 6 using namespace std::string_view_literals; 7 8 9 namespace AppInstaller::Repository 10 { 11 // Enable test to inject a custom tracking source by integrating the internal source creation into the standard flows. 12 // If overriding, the opened ISource must be a SQLiteIndexSource or the code will fail. 13 struct PackageTrackingCatalogSourceFactory 14 { 15 // Get the type string for this source. 16 static constexpr std::string_view Type() 17 { 18 using namespace std::string_view_literals; 19 return "Microsoft.PackageTracking"sv; 20 } 21 22 // Creates a source factory for this type. 23 static std::unique_ptr<ISourceFactory> Create(); 24 }; 25 }