Пример #1
0
        /// <summary>
        /// Store Dataset Info
        /// </summary>
        /// <param name="result"></param>
        /// <param name="datasetName"></param>
        /// <param name="dataFilePath"></param>
        protected void StoreDatasetInfo(Evidence result, string datasetName, string dataFilePath)
        {
            // Lookup this dataset in the dataset info cache

            TargetDataSet dataset;

            if (!DatasetCache.TryGetValue(dataFilePath, out dataset))
            {
                dataset = new TargetDataSet
                {
                    Path = dataFilePath,
                    Name = datasetName
                };

                if (string.IsNullOrEmpty(dataset.Name))
                {
                    dataset.Name = DatasetPathUtility.CleanPath(dataFilePath);
                }
                DatasetCache.Add(dataFilePath, dataset);
            }

            result.DataSet = dataset;
        }
Пример #2
0
        /// <summary>
        /// Store Dataset Info
        /// </summary>
        /// <param name="result"></param>
        /// <param name="dataFilePath"></param>
        protected void StoreDatasetInfo(Evidence result, string dataFilePath)
        {
            string datasetName = DatasetPathUtility.CleanPath(dataFilePath);

            StoreDatasetInfo(result, datasetName, dataFilePath);
        }