IWinGetFactory.cs (2376B)
1 // ----------------------------------------------------------------------------- 2 // <copyright file="IWinGetFactory.cs" company="Microsoft Corporation"> 3 // Copyright (c) Microsoft Corporation. Licensed under the MIT License. 4 // </copyright> 5 // ----------------------------------------------------------------------------- 6 7 namespace Microsoft.WinGetUtil.Interfaces 8 { 9 using Microsoft.WinGetUtil.Common; 10 11 /// <summary> 12 /// Factory methods. 13 /// </summary> 14 public interface IWinGetFactory 15 { 16 /// <summary> 17 /// Creates a new index file in the specified path. 18 /// </summary> 19 /// <param name="indexFile">Index file to create.</param> 20 /// <param name="majorVersion">Major version.</param> 21 /// <param name="minorVersion">Minor version.</param> 22 /// <returns>Instance of IWinGetSQLiteIndex.</returns> 23 IWinGetSQLiteIndex SQLiteIndexCreate(string indexFile, uint majorVersion, uint minorVersion); 24 25 /// <summary> 26 /// Creates a new index file in the specified path. 27 /// </summary> 28 /// <param name="indexFile">Index file to create.</param> 29 /// <returns>Instance of IWinGetSQLiteIndex.</returns> 30 IWinGetSQLiteIndex SQLiteIndexCreateLatestVersion(string indexFile); 31 32 /// <summary> 33 /// Open the index file. 34 /// </summary> 35 /// <param name="indexFile">Index file to open.</param> 36 /// <returns>Instance of IWinGetSQLiteIndex.</returns> 37 IWinGetSQLiteIndex SQLiteIndexOpen(string indexFile); 38 39 /// <summary> 40 /// Initializes logging. 41 /// </summary> 42 /// <param name="logFile">Log index file.</param> 43 /// <returns>Instance of IWinGetLogging.</returns> 44 IWinGetLogging LoggingInit(string logFile); 45 46 /// <summary> 47 /// Validates the manifest is compliant and creates a manifest handle if succeeded. 48 /// </summary> 49 /// <param name="manifestPath">Manifest path.</param> 50 /// <param name="mergedManifestPath">Merged manifest output path.</param> 51 /// <param name="option">Desired validate manifest option.</param> 52 /// <returns>The <see cref="CreateManifestResult"/> class.</returns> 53 CreateManifestResult CreateManifest(string manifestPath, string mergedManifestPath, WinGetCreateManifestOption option); 54 } 55 }