// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. using System; using System.Data; namespace WixToolset.Dtf.Tools.Inventory { /// /// Reports the total number of items loaded so far by . /// public delegate void InventoryDataLoadStatusCallback(int itemsLoaded, string currentNode); /// /// Inventory data providers implement this interface to provide a particular type of data. /// Implementors must provide a parameterless constructor. /// public interface IInventoryDataProvider { /// /// Gets a description of the data provided. This description allows /// the user to choose what type of data to gather. /// string Description { get; } /// /// Gets the paths of all nodes for which this object provides data. /// /// Callback for reporting status. /// The callback should not necessarily be invoked for every individual /// node loaded, rather only every significant chunk. /// An array of node paths. The parts of the node paths /// are delimited by backslashes (\). string[] GetNodes(InventoryDataLoadStatusCallback statusCallback); /// /// When related nodes of a tree consist of duplicate data, it's /// inefficient to search them all. This method indicates which /// nodes should be search and which should be ignored. /// /// Root node of the subtree-search. /// Node which may or may not be searched. /// True if the node should be searched, false otherwise. bool IsNodeSearchable(string searchRoot, string searchNode); /// /// Gets the data for a particular node. /// /// Path of the node for which data is requested. /// This is one of the paths returned by . /// DataView of a table filled with data, or null if data is /// not available. DataView GetData(string nodePath); /// /// Gets the path of another node which provides more details about /// a particular data row. /// /// Path of the node containing the data /// row being queried. /// Data row being queried. /// Path to another node. This is not necessarily /// one of the nodes returned by . If the /// node path is unknown, it will be ignored. This method may /// return null if there is no detail node for the row. string GetLink(string nodePath, DataRow row); } }