Update DataCookerPath and DataOutputPath API to not expose internal string rep of paths (#88)
* Testing changes to cooker paths * Fix broken tests * Restore old API and mark as Obsolete * Fix unintended public -> internal changes * Update migraiton doc
This commit is contained in:
Родитель
473f9c5952
Коммит
30094c3c36
|
@ -152,8 +152,47 @@ The method `SetApplicationEnvironmentCore` is now virtual, so you no longer have
|
|||
to override it if you do not want to. An `ApplicationEnvironment` property is
|
||||
now available on the base class that you may reference in your `CustomDataSource.`
|
||||
|
||||
## DataCookerPath
|
||||
|
||||
The following have been marked as obsolete and will be removed by SDK v1.0.0 release candidate 1:
|
||||
- `DataCookerPath.Format`
|
||||
- `DataCookerPath.EmptySourceParserId`
|
||||
- `DataCookerPath.CookerPath`
|
||||
- `DataCookerPath.Parse`
|
||||
- `DataCookerPath.GetSourceParserId`
|
||||
- `DataCookerPath.GetDataCookerId`
|
||||
- `DataCookerPath.IsWellFormed`
|
||||
To prevent future build breaks, remove references to these methods and properties.
|
||||
|
||||
Both the constructors for `DataCookerPath` that accept string arguments and `DataCookerPath.Create`
|
||||
have been marked obsolete and will be removed by SDK v1.0.0 release candidate 1.
|
||||
To prevent future build breaks, replace calls to this class' constructor with either
|
||||
- `DataCookerPath.ForComposite`
|
||||
- `DataCookerPath.ForSource`
|
||||
depending on the type of data cooker the path is for.
|
||||
|
||||
## DataOutputPath
|
||||
|
||||
The following have been marked as obsolete and will be removed by SDK v1.0.0 release candidate 1:
|
||||
- `DataOutputPath.Format`
|
||||
- `DataOutputPath.Path`
|
||||
- `DataOutputPath.Combine`
|
||||
- `DataOutputPath.GetSourceId`
|
||||
- `DataOutputPath.GetDataCookerId`
|
||||
- `DataOutputPath.GetDataCookerPath`
|
||||
- `DataOutputPath.TryGetConstituents`
|
||||
- `DataOutputPath.IsWellFormed`
|
||||
To prevent future build breaks, remove references to these methods and properties.
|
||||
|
||||
Both the constructors for `DataOutputPath` that accept string arguments and `DataOutputPath.Create`
|
||||
have been marked obsolete and will be removed by SDK v1.0.0 release candidate 1.
|
||||
To prevent future build breaks, replace calls to this class' constructor with either
|
||||
- `DataOutputPath.ForComposite`
|
||||
- `DataOutputPath.ForSource`
|
||||
depending on the type of data cooker the data output path is for.
|
||||
|
||||
## TableConfiguration
|
||||
|
||||
The property `Layout` has been marked obsolete and will be removed prior to SDK v1.0.0
|
||||
release candidate 1. If you are setting this property on a `TableConfiguration`, you
|
||||
can move to setting the property on the table's `TableDescriptor`.
|
||||
can move to setting the property on the table's `TableDescriptor`.
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Performance.SDK.Extensibility;
|
||||
using Microsoft.Performance.SDK.Processing;
|
||||
using Microsoft.Performance.SDK.Runtime.Extensibility.DataExtensions;
|
||||
using Microsoft.Performance.SDK.Runtime.Tests.Extensibility.TestClasses;
|
||||
using Microsoft.Performance.Testing;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
"This table has required data extensions",
|
||||
"Other",
|
||||
true,
|
||||
requiredDataCookers: new List<DataCookerPath> { new DataCookerPath(SourceParserId, "CookerId1") })
|
||||
requiredDataCookers: new List<DataCookerPath> { DataCookerPath.ForSource(SourceParserId, "CookerId1") })
|
||||
{ Type = typeof(TestTable1) };
|
||||
|
||||
public static void BuildTable(ITableBuilder tableBuilder, IDataExtensionRetrieval dataRetrieval)
|
||||
|
@ -46,7 +46,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
"This table has required data extensions",
|
||||
"Other",
|
||||
true,
|
||||
requiredDataCookers: new List<DataCookerPath> { new DataCookerPath(SourceParserId, "CookerId1") })
|
||||
requiredDataCookers: new List<DataCookerPath> { DataCookerPath.ForSource(SourceParserId, "CookerId1") })
|
||||
{ Type = typeof(TestTable2) };
|
||||
|
||||
public static void BuildTable(ITableBuilder tableBuilder, IDataExtensionRetrieval dataRetrieval)
|
||||
|
@ -108,7 +108,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(TestTable1.SourceParserId);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = new DataCookerPath(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = DataCookerPath.ForSource(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCookerReference = new TestSourceDataCookerReference(false)
|
||||
{ availability = DataExtensionAvailability.Available, Path = sourceCooker.Path };
|
||||
|
||||
|
@ -134,7 +134,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(TestTable1.SourceParserId);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = new DataCookerPath(TestTable2.SourceParserId, "CookerId1") };
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = DataCookerPath.ForSource(TestTable2.SourceParserId, "CookerId1") };
|
||||
var sourceCookerReference = new TestSourceDataCookerReference(false)
|
||||
{ availability = DataExtensionAvailability.Available, Path = sourceCooker.Path };
|
||||
|
||||
|
@ -159,7 +159,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(TestTable1.SourceParserId);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = new DataCookerPath(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = DataCookerPath.ForSource(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCookerReference = new TestSourceDataCookerReference(false)
|
||||
{ availability = DataExtensionAvailability.Available, Path = sourceCooker.Path };
|
||||
|
||||
|
@ -179,7 +179,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(TestTable1.SourceParserId);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = new DataCookerPath(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = DataCookerPath.ForSource(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCookerReference = new TestSourceDataCookerReference(false)
|
||||
{ availability = DataExtensionAvailability.Available, Path = sourceCooker.Path };
|
||||
|
||||
|
@ -198,7 +198,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(TestTable1.SourceParserId);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = new DataCookerPath(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = DataCookerPath.ForSource(TestTable1.SourceParserId, "CookerId1") };
|
||||
var sourceCookerReference = new TestSourceDataCookerReference(false)
|
||||
{ availability = DataExtensionAvailability.Available, Path = sourceCooker.Path };
|
||||
|
||||
|
@ -215,7 +215,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor();
|
||||
Assert.ThrowsException<ArgumentException>(
|
||||
() => cdp.QueryOutput(new DataCookerPath("InvalidParserId", "RandomeCookerName"), "DataId"));
|
||||
() => cdp.QueryOutput(DataCookerPath.ForSource("InvalidParserId", "RandomeCookerName"), "DataId"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
@ -224,7 +224,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor();
|
||||
var success = cdp.TryQueryOutput(
|
||||
new DataCookerPath("InvalidParserId", "RandomeCookerName"),
|
||||
DataCookerPath.ForSource("InvalidParserId", "RandomeCookerName"),
|
||||
"DataId",
|
||||
out var result);
|
||||
|
||||
|
@ -238,7 +238,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor();
|
||||
Assert.ThrowsException<ArgumentException>(
|
||||
() => cdp.QueryOutput<int>(new DataCookerPath("InvalidParserId", "RandomeCookerName"), "DataId"));
|
||||
() => cdp.QueryOutput<int>(DataCookerPath.ForSource("InvalidParserId", "RandomeCookerName"), "DataId"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
@ -247,7 +247,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor();
|
||||
var success = cdp.TryQueryOutput(
|
||||
new DataCookerPath("InvalidParserId", "RandomCookerName"),
|
||||
DataCookerPath.ForSource("InvalidParserId", "RandomCookerName"),
|
||||
"DataId",
|
||||
out bool result);
|
||||
|
||||
|
@ -262,7 +262,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
string sourceParserId = "TestSourceParser";
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(sourceParserId);
|
||||
|
||||
var dataCookerPath = new DataCookerPath(sourceParserId, "CookerId1");
|
||||
var dataCookerPath = DataCookerPath.ForSource(sourceParserId, "CookerId1");
|
||||
var cookedDataReflector = new TestCookedDataReflector(dataCookerPath);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = dataCookerPath };
|
||||
|
@ -291,7 +291,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
string sourceParserId = "TestSourceParser";
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(sourceParserId);
|
||||
|
||||
var dataCookerPath = new DataCookerPath(sourceParserId, "CookerId1");
|
||||
var dataCookerPath = DataCookerPath.ForSource(sourceParserId, "CookerId1");
|
||||
var cookedDataReflector = new TestCookedDataReflector(dataCookerPath);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = dataCookerPath };
|
||||
|
@ -322,7 +322,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
string sourceParserId = "TestSourceParser";
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(sourceParserId);
|
||||
|
||||
var dataCookerPath = new DataCookerPath(sourceParserId, "CookerId1");
|
||||
var dataCookerPath = DataCookerPath.ForSource(sourceParserId, "CookerId1");
|
||||
var cookedDataReflector = new TestCookedDataReflector(dataCookerPath);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = dataCookerPath };
|
||||
|
@ -354,7 +354,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
string sourceParserId = "TestSourceParser";
|
||||
var cdp = TestCustomDataProcessor.CreateTestCustomDataProcessor(sourceParserId);
|
||||
|
||||
var dataCookerPath = new DataCookerPath(sourceParserId, "CookerId1");
|
||||
var dataCookerPath = DataCookerPath.ForSource(sourceParserId, "CookerId1");
|
||||
var cookedDataReflector = new TestCookedDataReflector(dataCookerPath);
|
||||
|
||||
var sourceCooker = new TestSourceDataCooker() { Path = dataCookerPath };
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
this.cookerWithNoDependencies = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerWithNoDependencies"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerWithNoDependencies"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = this.emptyDependencyTypes,
|
||||
|
@ -122,13 +122,13 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
this.cookerWithOneDependency = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerWithOneDependency"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerWithOneDependency"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = this.emptyDependencyTypes,
|
||||
RequiredDataCookers = new[]
|
||||
{
|
||||
new DataCookerPath(SourceParserId, this.cookerWithNoDependencies.Path.DataCookerId),
|
||||
DataCookerPath.ForSource(SourceParserId, this.cookerWithNoDependencies.Path.DataCookerId),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -201,17 +201,17 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
public void ScheduleDataCookers_CircularDependenciesThrows()
|
||||
{
|
||||
string cookerWithCircularDependency1Id = "CookerWithCircularDependency1";
|
||||
var cookerWithCircularDependency1Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency1Id);
|
||||
var cookerWithCircularDependency1Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency1Id);
|
||||
|
||||
string cookerWithCircularDependency2Id = "CookerWithCircularDependency2";
|
||||
var cookerWithCircularDependency2Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency2Id);
|
||||
var cookerWithCircularDependency2Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency2Id);
|
||||
|
||||
string cookerWithCircularDependency3Id = "CookerWithCircularDependency3";
|
||||
var cookerWithCircularDependency3Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency3Id);
|
||||
var cookerWithCircularDependency3Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency3Id);
|
||||
|
||||
IDataCookerDescriptor cookerWithCircularDependency1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency1Id),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency1Id),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = this.emptyDependencyTypes,
|
||||
|
@ -220,7 +220,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
IDataCookerDescriptor cookerWithCircularDependency2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency2Id),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency2Id),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = this.emptyDependencyTypes,
|
||||
|
@ -229,7 +229,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
IDataCookerDescriptor cookerWithCircularDependency3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, cookerWithCircularDependency3Id),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, cookerWithCircularDependency3Id),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = this.emptyDependencyTypes,
|
||||
|
@ -257,7 +257,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
IDataCookerDescriptor cookerWithSameIterationDependencyType = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, cookerWithSameIterationDependencyTypeId),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, cookerWithSameIterationDependencyTypeId),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -294,7 +294,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
IDataCookerDescriptor cookerWithAsConsumedDependencyType = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, cookerWithAsConsumedDependencyTypeId),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, cookerWithAsConsumedDependencyTypeId),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -332,7 +332,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cookerWithAsConsumedDependencyType = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerWithNullDependencyTypes"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerWithNullDependencyTypes"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -364,7 +364,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -377,7 +377,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker3"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker3"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -422,7 +422,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = null,
|
||||
|
@ -431,7 +431,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -463,7 +463,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -476,7 +476,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker3"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker3"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -492,7 +492,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker4 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker4"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker4"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -552,7 +552,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -569,7 +569,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -592,7 +592,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -601,7 +601,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -633,7 +633,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -642,7 +642,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -679,7 +679,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -688,7 +688,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -697,7 +697,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -738,7 +738,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -747,7 +747,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -756,7 +756,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -765,7 +765,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -812,7 +812,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -821,7 +821,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -830,7 +830,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -864,7 +864,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -873,7 +873,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -882,7 +882,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -917,7 +917,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -926,7 +926,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -935,7 +935,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker3"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker3"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -944,7 +944,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -983,7 +983,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -992,7 +992,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1001,7 +1001,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker3"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker3"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1010,7 +1010,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1049,7 +1049,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1058,7 +1058,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1067,7 +1067,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1111,7 +1111,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1120,7 +1120,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1129,7 +1129,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1138,7 +1138,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1185,7 +1185,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1194,7 +1194,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var asRequiredCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1203,7 +1203,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1212,7 +1212,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
@ -1260,7 +1260,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1269,7 +1269,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -1296,7 +1296,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var asRequiredCooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "AsRequiredCooker"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "AsRequiredCooker"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsRequired,
|
||||
DependencyTypes = null,
|
||||
|
@ -1305,7 +1305,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = null,
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
cooker0.ProcessDependencies(testRepo);
|
||||
|
@ -121,12 +121,12 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker1"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker1"),
|
||||
};
|
||||
|
||||
var testRepo = new TestDataExtensionRepository();
|
||||
|
@ -153,12 +153,12 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestSourceDataCookerReference(false)
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker1"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker1"),
|
||||
availability = DataExtensionAvailability.Error,
|
||||
};
|
||||
|
||||
|
@ -185,17 +185,17 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker1"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker1"),
|
||||
};
|
||||
|
||||
var cooker2 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker2"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker2"),
|
||||
};
|
||||
|
||||
// the repository has all source cookers
|
||||
|
@ -232,7 +232,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
// the repository has all source cookers
|
||||
|
@ -240,7 +240,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
testRepo.sourceCookersByPath.Add(cooker0.Path, cooker0);
|
||||
|
||||
// setup the requirements for the cookers
|
||||
cooker0.requiredDataCookers.Add(new DataCookerPath("TestSourceParser", "Cooker1"));
|
||||
cooker0.requiredDataCookers.Add(DataCookerPath.ForSource("TestSourceParser", "Cooker1"));
|
||||
|
||||
cooker0.ProcessDependencies(testRepo);
|
||||
|
||||
|
@ -263,17 +263,17 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker1"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker1"),
|
||||
};
|
||||
|
||||
var cooker2 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker2"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker2"),
|
||||
};
|
||||
|
||||
// the repository has all source cookers
|
||||
|
@ -304,12 +304,12 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser0", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser0", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser1", "Cooker1"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser1", "Cooker1"),
|
||||
};
|
||||
|
||||
var testRepo = new TestDataExtensionRepository();
|
||||
|
@ -333,12 +333,12 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSourceParser", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSourceParser", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(DataCookerPath.EmptySourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForComposite("Cooker1"),
|
||||
};
|
||||
|
||||
var testRepo = new TestDataExtensionRepository();
|
||||
|
@ -366,14 +366,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var cooker0 = new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(DataCookerPath.EmptySourceParserId, "Cooker0"),
|
||||
Path = DataCookerPath.ForComposite("Cooker0"),
|
||||
};
|
||||
|
||||
var testRepo = new TestDataExtensionRepository();
|
||||
testRepo.compositeCookersByPath.Add(cooker0.Path, cooker0);
|
||||
|
||||
// this doesn't exist
|
||||
cooker0.requiredDataCookers.Add(new DataCookerPath("Cooker1"));
|
||||
cooker0.requiredDataCookers.Add(DataCookerPath.ForComposite("Cooker1"));
|
||||
|
||||
cooker0.ProcessDependencies(testRepo);
|
||||
|
||||
|
@ -399,12 +399,12 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var cooker0 = new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("TestSource0", "Cooker0"),
|
||||
Path = DataCookerPath.ForSource("TestSource0", "Cooker0"),
|
||||
};
|
||||
|
||||
var cooker1 = new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(DataCookerPath.EmptySourceParserId, "Cooker0"),
|
||||
Path = DataCookerPath.ForComposite("Cooker0"),
|
||||
};
|
||||
|
||||
var testRepo = new TestDataExtensionRepository();
|
||||
|
|
|
@ -38,13 +38,13 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
var sourceDataCookerReference1 = new TestSourceDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Available,
|
||||
Path = new DataCookerPath("Source1", "SourceCooker1"),
|
||||
Path = DataCookerPath.ForSource("Source1", "SourceCooker1"),
|
||||
};
|
||||
|
||||
var dataCookerReference = new TestCompositeDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Available,
|
||||
Path = new DataCookerPath("CompositeCooker1"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker1"),
|
||||
};
|
||||
dataCookerReference.requiredDataCookers.Add(sourceDataCookerReference1.Path);
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
var cookedDataRetrieval = new TestCookedDataRetrieval();
|
||||
var dataExtensionRepository = new TestDataExtensionRepository();
|
||||
|
||||
var cookerPath = new DataCookerPath("CompositeCooker1");
|
||||
var cookerPath = DataCookerPath.ForComposite("CompositeCooker1");
|
||||
|
||||
var dataExtensionRetrievalFactory =
|
||||
new DataExtensionRetrievalFactory(cookedDataRetrieval, dataExtensionRepository);
|
||||
|
@ -92,7 +92,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
var dataCookerReference = new TestCompositeDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Error,
|
||||
Path = new DataCookerPath("CompositeCooker1"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker1"),
|
||||
};
|
||||
|
||||
dataExtensionRepository.compositeCookersByPath.Add(dataCookerReference.Path, dataCookerReference);
|
||||
|
@ -114,13 +114,13 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
var sourceDataCookerReference1 = new TestSourceDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Available,
|
||||
Path = new DataCookerPath("Source1", "SourceCooker1"),
|
||||
Path = DataCookerPath.ForSource("Source1", "SourceCooker1"),
|
||||
};
|
||||
|
||||
var dataCookerReference = new TestCompositeDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Available,
|
||||
Path = new DataCookerPath("CompositeCooker1"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker1"),
|
||||
};
|
||||
dataCookerReference.requiredDataCookers.Add(sourceDataCookerReference1.Path);
|
||||
|
||||
|
@ -176,7 +176,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
var dataCookerReference = new TestCompositeDataCookerReference(false)
|
||||
{
|
||||
availability = DataExtensionAvailability.Error,
|
||||
Path = new DataCookerPath("CompositeCooker1"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker1"),
|
||||
};
|
||||
|
||||
var tableReference = new TestTableExtensionReference(false)
|
||||
|
|
|
@ -49,14 +49,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// 2: n5 n4
|
||||
// 3: n6
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var n1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n1"), };
|
||||
var n2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n2"), };
|
||||
var n3 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n3"), };
|
||||
var n4 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n4"), };
|
||||
var n5 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n5"), };
|
||||
var n6 = new TestCompositeDataCookerReference { Path = new DataCookerPath("n6"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var n1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n1"), };
|
||||
var n2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n2"), };
|
||||
var n3 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n3"), };
|
||||
var n4 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n4"), };
|
||||
var n5 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n5"), };
|
||||
var n6 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("n6"), };
|
||||
|
||||
r0.requiredDataCookers.Add(n1.Path);
|
||||
r0.requiredDataCookers.Add(n2.Path);
|
||||
|
|
|
@ -96,13 +96,13 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// d1 d2 d1
|
||||
//
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r0d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r2d1 = r1d1;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
@ -199,14 +199,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// |
|
||||
// d3
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r2d1 = r1d1;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
@ -312,14 +312,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// |/
|
||||
// d2
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r1d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r1d1d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1d2"), };
|
||||
var r0d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r1d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r1d1d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1d2"), };
|
||||
var r2d2 = r1d1d2;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
@ -423,11 +423,11 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// d3 -+--/ d3
|
||||
//
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d3 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d3"), };
|
||||
var r0d4 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d4"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d3"), };
|
||||
var r0d4 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d4"), };
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
r0.requiredDataCookers.Add(r0d2.Path);
|
||||
|
@ -516,10 +516,10 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// d2 d3 ->
|
||||
//
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d3 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d3"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d3 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d3"), };
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
r0d1.requiredDataCookers.Add(r0d2.Path);
|
||||
|
@ -559,10 +559,10 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// d2 d3 ->
|
||||
//
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d3 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d3"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d3 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d3"), };
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
r0d1.requiredDataCookers.Add(r0d2.Path);
|
||||
|
@ -627,11 +627,11 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
Any.ProcessorEnvironment(),
|
||||
ProcessorOptions.Default);
|
||||
|
||||
var sc1 = new TestSourceDataCookerReference { Path = new DataCookerPath(p.SourceParserId, "sc1"), };
|
||||
var sc2 = new TestSourceDataCookerReference { Path = new DataCookerPath(p.SourceParserId, "sc2"), };
|
||||
var sc3 = new TestSourceDataCookerReference { Path = new DataCookerPath(p.SourceParserId, "sc3"), };
|
||||
var sc4 = new TestSourceDataCookerReference { Path = new DataCookerPath("not-there", "sc4"), };
|
||||
var cc1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("cc1"), };
|
||||
var sc1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForSource(p.SourceParserId, "sc1"), };
|
||||
var sc2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForSource(p.SourceParserId, "sc2"), };
|
||||
var sc3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForSource(p.SourceParserId, "sc3"), };
|
||||
var sc4 = new TestSourceDataCookerReference { Path = DataCookerPath.ForSource("not-there", "sc4"), };
|
||||
var cc1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("cc1"), };
|
||||
|
||||
cc1.requiredDataCookers.Add(sc1.Path);
|
||||
cc1.requiredDataCookers.Add(sc2.Path);
|
||||
|
@ -719,14 +719,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// |
|
||||
// d3
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r2d1 = r1d1;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
@ -823,14 +823,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// |
|
||||
// d3 (X)
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r2d1 = r1d1;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
@ -929,14 +929,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// d3
|
||||
//
|
||||
|
||||
var r0 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r2"), };
|
||||
var r0 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0"), };
|
||||
var r1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r1"), };
|
||||
var r2 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r2"), };
|
||||
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = new DataCookerPath("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = new DataCookerPath("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = new DataCookerPath("r1d1"), };
|
||||
var r0d1 = new TestCompositeDataCookerReference { Path = DataCookerPath.ForComposite("r0d1"), };
|
||||
var r0d2 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d2"), };
|
||||
var r0d1d3 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r0d1d3"), };
|
||||
var r1d1 = new TestSourceDataCookerReference { Path = DataCookerPath.ForComposite("r1d1"), };
|
||||
var r2d1 = r1d1;
|
||||
|
||||
r0.requiredDataCookers.Add(r0d1.Path);
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
: BaseSourceDataCooker<TestDataElement, TestDataContext, int>
|
||||
{
|
||||
public InternalSourceDataCooker()
|
||||
: base(new DataCookerPath("SourceId", "CookerId"))
|
||||
: base(DataCookerPath.ForSource("SourceId", "CookerId"))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 0, Block: 0
|
||||
this.dataCooker1 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker1"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker1"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -48,7 +48,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 0, Block: 0
|
||||
this.dataCooker4 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker4"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker4"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -62,7 +62,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 0, Block: 1
|
||||
this.dataCooker3 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker3"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker3"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -76,7 +76,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 1, Block: 0
|
||||
this.dataCooker2 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker2"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker2"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 1, Block: 1
|
||||
this.dataCooker5 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker5"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker5"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -96,7 +96,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 1, Block: 2
|
||||
this.dataCooker6 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker6"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker6"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -110,7 +110,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
// Pass: 1, Block: 2
|
||||
this.dataCooker7 = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "Cooker7"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "Cooker7"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = new ReadOnlyDictionary<DataCookerPath, DataCookerDependencyType>(
|
||||
|
@ -202,7 +202,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
var dataCookerA = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerA"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerA"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -211,7 +211,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var dataCookerB = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerB"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerB"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -220,7 +220,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var dataCookerC = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerC"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerC"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -229,7 +229,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var dataCookerD = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerD"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerD"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.AsConsumed,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
@ -243,7 +243,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var dataCookerE = new ValidSourceDataCookerWithoutDependencies
|
||||
{
|
||||
Path = new DataCookerPath(SourceParserId, "CookerE"),
|
||||
Path = DataCookerPath.ForSource(SourceParserId, "CookerE"),
|
||||
Description = "Test data cooker",
|
||||
DataProductionStrategy = DataProductionStrategy.PostSourceParsing,
|
||||
DependencyTypes = EmptyDependencyTypes,
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var sourceDataCooker = new TestSourceDataCooker()
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker")
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker")
|
||||
};
|
||||
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker);
|
||||
|
@ -90,28 +90,28 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var sourceDataCooker1 = new TestSourceDataCooker(dataCookerContext)
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 13, 45, 67 }),
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker1);
|
||||
|
||||
var sourceDataCooker2 = new TestSourceDataCooker(dataCookerContext)
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 113, 145, 167, 1000 }),
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker2);
|
||||
|
||||
var sourceDataCooker3 = new TestSourceDataCooker(dataCookerContext)
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker3"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker3"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 200, 250, 286, 1000 }),
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker3);
|
||||
|
||||
var sourceDataCooker4 = new TestSourceDataCooker(dataCookerContext)
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker4"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker4"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 145, 316, 315, 301 }),
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker4);
|
||||
|
@ -231,14 +231,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var sourceDataCooker1 = new TestSourceDataCooker()
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 13, 45, 67 })
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker1);
|
||||
|
||||
var sourceDataCooker2 = new TestSourceDataCooker()
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 113, 145, 167, 1000 }),
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker2);
|
||||
|
@ -269,14 +269,14 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
|
||||
var sourceDataCooker1 = new TestSourceDataCooker()
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker1"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() { 13, 45, 67 })
|
||||
};
|
||||
sourceSession.RegisterSourceDataCooker(sourceDataCooker1);
|
||||
|
||||
var sourceDataCooker2 = new TestSourceDataCooker()
|
||||
{
|
||||
Path = new DataCookerPath(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
Path = DataCookerPath.ForSource(sourceParser.Id, "TestSourceDataCooker2"),
|
||||
DataKeys = new ReadOnlyHashSet<int>(new HashSet<int>() {}),
|
||||
Options = SDK.Extensibility.DataCooking.SourceDataCooking.SourceDataCookerOptions.ReceiveAllDataElements,
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
private static readonly IDictionary<DataCookerPath, TestCompositeDataCookerReference> CompositeCookersByPath
|
||||
= new Dictionary<DataCookerPath, TestCompositeDataCookerReference>();
|
||||
|
||||
private static readonly DataCookerPath Source1Cooker1Path = new DataCookerPath("Source1", "SourceCooker1");
|
||||
private static readonly DataCookerPath Source1Cooker1Path = DataCookerPath.ForSource("Source1", "SourceCooker1");
|
||||
|
||||
static TableExtensionSelectorTests()
|
||||
{
|
||||
|
@ -44,31 +44,31 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source1", "SourceCooker1"),
|
||||
Path = DataCookerPath.ForSource("Source1", "SourceCooker1"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source2", "SourceCooker0"),
|
||||
Path = DataCookerPath.ForSource("Source2", "SourceCooker0"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source2", "SourceCooker10"),
|
||||
Path = DataCookerPath.ForSource("Source2", "SourceCooker10"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source2", "SourceCooker13"),
|
||||
Path = DataCookerPath.ForSource("Source2", "SourceCooker13"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source1", "SourceCooker41"),
|
||||
Path = DataCookerPath.ForSource("Source1", "SourceCooker41"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source1", "SourceCooker356"),
|
||||
Path = DataCookerPath.ForSource("Source1", "SourceCooker356"),
|
||||
},
|
||||
new TestSourceDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath("Source4", "SourceCooker_Woah!"),
|
||||
Path = DataCookerPath.ForSource("Source4", "SourceCooker_Woah!"),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -84,19 +84,19 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
|
|||
{
|
||||
new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(string.Empty, "CompositeCooker1"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker1"),
|
||||
},
|
||||
new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(string.Empty, "CompositeCooker2"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker2"),
|
||||
},
|
||||
new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(string.Empty, "CompositeCooker3"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker3"),
|
||||
},
|
||||
new TestCompositeDataCookerReference
|
||||
{
|
||||
Path = new DataCookerPath(string.Empty, "CompositeCooker33"),
|
||||
Path = DataCookerPath.ForComposite("CompositeCooker33"),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility.TestClasses
|
|||
{
|
||||
public DisposableCompositeDataCooker()
|
||||
{
|
||||
this.Path = new DataCookerPath(nameof(DisposableCompositeDataCooker));
|
||||
this.Path = DataCookerPath.ForComposite(nameof(DisposableCompositeDataCooker));
|
||||
this.RequiredDataCookers = new List<DataCookerPath>();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility.TestClasses
|
|||
{
|
||||
public DisposableSourceDataCooker()
|
||||
{
|
||||
this.Path = new DataCookerPath(nameof(DisposableSourceDataCooker));
|
||||
this.Path = DataCookerPath.ForComposite(nameof(DisposableSourceDataCooker));
|
||||
this.RequiredDataCookers = new List<DataCookerPath>();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility.TestClasses
|
|||
{
|
||||
public TestCompositeDataCooker()
|
||||
{
|
||||
this.Path = new DataCookerPath(nameof(TestCompositeDataCooker));
|
||||
this.Path = DataCookerPath.ForComposite(nameof(TestCompositeDataCooker));
|
||||
this.RequiredDataCookers = new List<DataCookerPath>();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility.TestClasses
|
|||
protected TestDataCookerReference(bool useDataExtensionDependencyState)
|
||||
: base(useDataExtensionDependencyState)
|
||||
{
|
||||
this.Path = new DataCookerPath(
|
||||
this.Path = DataCookerPath.ForComposite(
|
||||
string.Concat(
|
||||
this.GetType().Name,
|
||||
" ",
|
||||
|
|
|
@ -272,7 +272,7 @@ namespace Microsoft.Performance.SDK.Runtime.Extensibility.DataExtensions.Depende
|
|||
|
||||
foreach (var requiredDataCookerPath in this.target.RequiredDataCookers)
|
||||
{
|
||||
IDataCookerReference dataCookerReference = null;
|
||||
IDataCookerReference dataCookerReference;
|
||||
|
||||
var sourceId = requiredDataCookerPath.SourceParserId;
|
||||
if (string.IsNullOrWhiteSpace(sourceId))
|
||||
|
@ -308,7 +308,7 @@ namespace Microsoft.Performance.SDK.Runtime.Extensibility.DataExtensions.Depende
|
|||
this.dependencyReferences.AddRequiredSourceDataCookerPath(requiredCookerReference.Path);
|
||||
}
|
||||
|
||||
this.ProcessRequiredExtension(dataCookerReference, requiredDataCookerPath.CookerPath, availableDataExtensions);
|
||||
this.ProcessRequiredExtension(dataCookerReference, requiredDataCookerPath.ToString(), availableDataExtensions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,11 +15,13 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <summary>
|
||||
/// Describes the format of a data cooker path.
|
||||
/// </summary>
|
||||
[Obsolete("Fully qualified data cooker paths will no longer be supported in SDK v1.0.0 release candidate 1")]
|
||||
public static string Format => "SourceId/CookerId";
|
||||
|
||||
/// <summary>
|
||||
/// If the data cooker is not a source data cooker, this is the source parser Id.
|
||||
/// </summary>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public const string EmptySourceParserId = "";
|
||||
|
||||
/// <summary>
|
||||
|
@ -29,6 +31,13 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <param name="dataCookerId">
|
||||
/// The ID of the data cooker.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <paramref name="dataCookerId"/> is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="dataCookerId"/> is null.
|
||||
/// </exception>
|
||||
[Obsolete("This constructor will be removed by SDK v1.0.0 release candidate 1. Please use DataCookerPath.ForComposite or DataCookerPath.ForSource instead.")]
|
||||
public DataCookerPath(string dataCookerId)
|
||||
: this(EmptySourceParserId, dataCookerId)
|
||||
{
|
||||
|
@ -44,6 +53,13 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <param name="dataCookerId">
|
||||
/// Data cooker Id.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// One or more of the parameters is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// One or more of the parameters is null.
|
||||
/// </exception>
|
||||
[Obsolete("This constructor will be removed by SDK v1.0.0 release candidate 1. Please use DataCookerPath.ForComposite or DataCookerPath.ForSource instead.")]
|
||||
public DataCookerPath(string sourceParserId, string dataCookerId)
|
||||
{
|
||||
Guard.NotNull(sourceParserId, nameof(sourceParserId));
|
||||
|
@ -62,6 +78,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
this.SourceParserId = string.Intern(sourceParserId);
|
||||
this.DataCookerId = string.Intern(dataCookerId);
|
||||
this.CookerPath = Create(sourceParserId, dataCookerId);
|
||||
this.DataCookerType = string.IsNullOrWhiteSpace(sourceParserId) ? DataCookerType.CompositeDataCooker : DataCookerType.SourceDataCooker;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -77,6 +94,54 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
this.SourceParserId = other.SourceParserId;
|
||||
this.DataCookerId = other.DataCookerId;
|
||||
this.CookerPath = other.CookerPath;
|
||||
this.DataCookerType = other.DataCookerType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="DataCookerType.CompositeDataCooker"/> path.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerId">
|
||||
/// The ID of the data cooker.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <paramref name="dataCookerId"/> is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="dataCookerId"/> is null.
|
||||
/// </exception>
|
||||
public static DataCookerPath ForComposite(string dataCookerId)
|
||||
{
|
||||
return new DataCookerPath(dataCookerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="DataCookerType.SourceDataCooker"/> path.
|
||||
/// </summary>
|
||||
/// <param name="sourceParserId">
|
||||
/// The ID of the source parser.
|
||||
/// </param>
|
||||
/// <param name="dataCookerId">
|
||||
/// The ID of the data cooker.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// One or more of the parameters is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// One or more of the parameters is null.
|
||||
/// </exception>
|
||||
public static DataCookerPath ForSource(string sourceParserId, string dataCookerId)
|
||||
{
|
||||
return new DataCookerPath(sourceParserId, dataCookerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the data cooker that this path targets.
|
||||
/// <seealso cref="DataCookerType"/> for more information about what
|
||||
/// different types of data cookers mean.
|
||||
/// </summary>
|
||||
public DataCookerType DataCookerType
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -92,7 +157,11 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <summary>
|
||||
/// Gets the combination of the source parser Id and the data cooker Id.
|
||||
/// </summary>
|
||||
public string CookerPath { get; }
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public string CookerPath
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares two instance of <see cref="DataCookerPath"/> for equality.
|
||||
|
@ -168,6 +237,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// The parsed <see cref="DataCookerPath"/>.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static DataCookerPath Parse(string cookerPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(cookerPath, nameof(cookerPath));
|
||||
|
@ -175,12 +245,12 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
var split = cookerPath.Split('/');
|
||||
if (split.Length == 1)
|
||||
{
|
||||
return new DataCookerPath(split[0]);
|
||||
return DataCookerPath.ForComposite(split[0]);
|
||||
}
|
||||
|
||||
if (split.Length == 2)
|
||||
{
|
||||
return new DataCookerPath(split[0], split[1]);
|
||||
return DataCookerPath.ForSource(split[0], split[1]);
|
||||
}
|
||||
|
||||
throw new FormatException();
|
||||
|
@ -198,6 +268,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// The created data cooker path.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use ForSource or ForComposite.")]
|
||||
public static string Create(string sourceParserId, string dataCookerId)
|
||||
{
|
||||
Guard.NotNull(sourceParserId, nameof(sourceParserId));
|
||||
|
@ -215,6 +286,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Source parser Id.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string GetSourceParserId(string cookerPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(cookerPath, nameof(cookerPath));
|
||||
|
@ -237,6 +309,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Data cooker Id.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string GetDataCookerId(string cookerPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(cookerPath, nameof(cookerPath));
|
||||
|
@ -259,6 +332,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// True for a well formed path, false otherwise.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static bool IsWellFormed(string cookerPath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(cookerPath))
|
||||
|
@ -269,6 +343,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
return SplitPath(cookerPath) != null;
|
||||
}
|
||||
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
private static string[] SplitPath(string cookerPath)
|
||||
{
|
||||
var tokens = cookerPath.Split('/');
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Performance.SDK.Extensibility.DataCooking;
|
||||
using Microsoft.Performance.SDK.Extensibility.SourceParsing;
|
||||
|
||||
namespace Microsoft.Performance.SDK.Extensibility
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of a <see cref="IDataCooker"/>.
|
||||
/// </summary>
|
||||
public enum DataCookerType
|
||||
{
|
||||
/// <summary>
|
||||
/// An <see cref="IDataCooker"/> that directly receives input from an
|
||||
/// <see cref="ISourceParser{T, TContext, TKey}"/> and/or one or more
|
||||
/// <see cref="SourceDataCooker"/>s targeting the same <see cref="ISourceParser{T, TContext, TKey}"/>.
|
||||
/// </summary>
|
||||
SourceDataCooker,
|
||||
|
||||
/// <summary>
|
||||
/// An <see cref="IDataCooker"/> that consumes events from one or more
|
||||
/// other <see cref="IDataCooker"/>.
|
||||
/// </summary>
|
||||
CompositeDataCooker,
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ namespace Microsoft.Performance.SDK.Extensibility.DataCooking.SourceDataCooking
|
|||
/// This cooker's ID.
|
||||
/// </param>
|
||||
protected BaseSourceDataCooker(string sourceId, string cookerId)
|
||||
: this(new DataCookerPath(sourceId, cookerId))
|
||||
: this(DataCookerPath.ForSource(sourceId, cookerId))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <summary>
|
||||
/// Describes the format of a data output path.
|
||||
/// </summary>
|
||||
[Obsolete("Fully qualified data output paths will no longer be supported in SDK v1.0.0")]
|
||||
public static string Format => "[DataCookerPath]/OutputId";
|
||||
|
||||
/// <summary>
|
||||
|
@ -26,6 +27,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// DataOutputPath object which represents the provided string path.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use ForSource or ForComposite.")]
|
||||
public static DataOutputPath Create(
|
||||
string path)
|
||||
{
|
||||
|
@ -57,9 +59,10 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// DataOutputPath object combined from the given parameters.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use ForSource or ForComposite.")]
|
||||
public static DataOutputPath Create(
|
||||
string sourceParserId,
|
||||
string dataCookerId,
|
||||
string sourceParserId,
|
||||
string dataCookerId,
|
||||
string dataOutputId)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputId, nameof(dataOutputId));
|
||||
|
@ -69,6 +72,74 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
return new DataOutputPath(dataCookerPath, dataOutputId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataOutputPath"/>
|
||||
/// struct with the given source parser ID, data cooker ID, and
|
||||
/// output ID.
|
||||
/// </summary>
|
||||
/// <param name="sourceParserId">
|
||||
/// Source parser Id.
|
||||
/// </param>
|
||||
/// <param name="dataCookerId">
|
||||
/// Data cooker Id.
|
||||
/// </param>
|
||||
/// <param name="dataOutputId">
|
||||
/// Data output Id.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// DataOutputPath object combined from the given parameters.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// One or more of the parameters is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// One or more of the parameters is null.
|
||||
/// </exception>
|
||||
public static DataOutputPath ForSource(
|
||||
string sourceParserId,
|
||||
string dataCookerId,
|
||||
string dataOutputId)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(sourceParserId, nameof(sourceParserId));
|
||||
Guard.NotNullOrWhiteSpace(dataCookerId, nameof(dataCookerId));
|
||||
Guard.NotNullOrWhiteSpace(dataOutputId, nameof(dataOutputId));
|
||||
|
||||
var dataCookerPath = DataCookerPath.ForSource(sourceParserId, dataCookerId);
|
||||
|
||||
return new DataOutputPath(dataCookerPath, dataOutputId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataOutputPath"/>
|
||||
/// struct with the given data cooker ID and output ID.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerId">
|
||||
/// Data cooker Id.
|
||||
/// </param>
|
||||
/// <param name="dataOutputId">
|
||||
/// Data output Id.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// DataOutputPath object combined from the given parameters.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// One or more of the parameters is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// One or more of the parameters is null.
|
||||
/// </exception>
|
||||
public static DataOutputPath ForComposite(
|
||||
string dataCookerId,
|
||||
string dataOutputId)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataCookerId, nameof(dataCookerId));
|
||||
Guard.NotNullOrWhiteSpace(dataOutputId, nameof(dataOutputId));
|
||||
|
||||
var dataCookerPath = DataCookerPath.ForComposite(dataCookerId);
|
||||
|
||||
return new DataOutputPath(dataCookerPath, dataOutputId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataOutputPath"/>
|
||||
/// struct with the given cooker path and output ID.
|
||||
|
@ -79,6 +150,12 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <param name="outputId">
|
||||
/// Data output Id.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <paramref name="outputId"/> is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="outputId"/> is null.
|
||||
/// </exception>
|
||||
public DataOutputPath(DataCookerPath cookerPath, string outputId)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(outputId, nameof(outputId));
|
||||
|
@ -105,6 +182,10 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <summary>
|
||||
/// Gets the identifier of the source parser associated with this data.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This may be null or <see cref="string.Empty"/> if this <see cref="DataOutputPath"/>
|
||||
/// is for a composite cooker.
|
||||
/// </remarks>
|
||||
public string SourceParserId => CookerPath.SourceParserId;
|
||||
|
||||
/// <summary>
|
||||
|
@ -115,6 +196,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <summary>
|
||||
/// The complete path to the data output.
|
||||
/// </summary>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public string Path => this.CookerPath.CookerPath + "/" + this.OutputId;
|
||||
|
||||
/// <summary>
|
||||
|
@ -132,6 +214,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// The path.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string Combine(string sourceParserId, string dataCookerId, string dataOutputId)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputId, nameof(dataOutputId));
|
||||
|
@ -148,6 +231,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Source parser Id.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string GetSourceId(string dataOutputPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputPath, nameof(dataOutputPath));
|
||||
|
@ -170,6 +254,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Data cooker Id.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string GetDataCookerId(string dataOutputPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputPath, nameof(dataOutputPath));
|
||||
|
@ -192,6 +277,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Data output Id.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static string GetDataOutputId(string dataOutputPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputPath, nameof(dataOutputPath));
|
||||
|
@ -214,6 +300,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// Data cooker path.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static DataCookerPath GetDataCookerPath(string dataOutputPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataOutputPath, nameof(dataOutputPath));
|
||||
|
@ -221,7 +308,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
var tokens = SplitPath(dataOutputPath);
|
||||
if (tokens != null)
|
||||
{
|
||||
return new DataCookerPath(tokens[0], tokens[1]);
|
||||
return DataCookerPath.ForSource(tokens[0], tokens[1]);
|
||||
}
|
||||
|
||||
throw new ArgumentException("Not a valid data output path.", nameof(dataOutputPath));
|
||||
|
@ -245,10 +332,11 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// true if the path was parsed; false otherwise.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static bool TryGetConstituents(
|
||||
string dataOutputPath,
|
||||
out string sourceParserId,
|
||||
out string dataCookerId,
|
||||
string dataOutputPath,
|
||||
out string sourceParserId,
|
||||
out string dataCookerId,
|
||||
out string dataOutputId)
|
||||
{
|
||||
sourceParserId = string.Empty;
|
||||
|
@ -277,6 +365,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
/// <returns>
|
||||
/// True for a well formed path, false otherwise.
|
||||
/// </returns>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
public static bool IsWellFormed(string dataOutputPath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(dataOutputPath))
|
||||
|
@ -293,6 +382,7 @@ namespace Microsoft.Performance.SDK.Extensibility
|
|||
return this.Path;
|
||||
}
|
||||
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1")]
|
||||
private static string[] SplitPath(string outputPath)
|
||||
{
|
||||
var tokens = outputPath.Split('/');
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Performance.SDK.Extensibility;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Performance.SDK.Processing
|
||||
{
|
||||
/// <summary>
|
||||
/// This attribute is used on a class with static properties that return <see cref="TableDescriptor"/>
|
||||
/// or on individual <see cref="TableDescriptor"/> static properties to indicate that a
|
||||
/// table described by the <see cref="TableDescriptor"/> requires the identified composite data cooker.
|
||||
/// </summary>
|
||||
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public sealed class RequiresCompositeCookerAttribute
|
||||
: RequiresCookerAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RequiresCompositeCookerAttribute"/>
|
||||
/// class.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerId">
|
||||
/// The ID of the composite data cooker.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <paramref name="dataCookerId"/> is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="dataCookerId"/> is null.
|
||||
/// </exception>
|
||||
public RequiresCompositeCookerAttribute(string dataCookerId)
|
||||
{
|
||||
this.RequiredDataCookerPath = DataCookerPath.ForComposite(dataCookerId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,14 +12,20 @@ namespace Microsoft.Performance.SDK.Processing
|
|||
/// or on individual <see cref="TableDescriptor"/> static properties to indicate that a
|
||||
/// table described by the <see cref="TableDescriptor"/> requires a data cooker.
|
||||
/// </summary>
|
||||
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use RequiresSourceCooker or RequiresCompositeCooker attributes instead.")]
|
||||
public class RequiresCookerAttribute
|
||||
: Attribute
|
||||
{
|
||||
// Placeholder so deriving classes can call a constructor. When this class is made abstract this can be removed.
|
||||
protected RequiresCookerAttribute()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that takes a data cooker path.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerPath">Identifies the required data cooker</param>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use RequiresSourceCooker or RequiresCompositeCooker attributes instead.")]
|
||||
public RequiresCookerAttribute(string dataCookerPath)
|
||||
{
|
||||
Guard.NotNullOrWhiteSpace(dataCookerPath, nameof(dataCookerPath));
|
||||
|
@ -30,7 +36,7 @@ namespace Microsoft.Performance.SDK.Processing
|
|||
}
|
||||
|
||||
this.RequiredDataCookerPath = new DataCookerPath(
|
||||
DataCookerPath.GetSourceParserId(dataCookerPath),
|
||||
DataCookerPath.GetSourceParserId(dataCookerPath),
|
||||
DataCookerPath.GetDataCookerId(dataCookerPath));
|
||||
}
|
||||
|
||||
|
@ -38,6 +44,7 @@ namespace Microsoft.Performance.SDK.Processing
|
|||
/// Constructor that takes a data cooker path.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerPath">Identifies the required data cooker</param>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use RequiresSourceCooker or RequiresCompositeCooker attributes instead.")]
|
||||
public RequiresCookerAttribute(DataCookerPath dataCookerPath)
|
||||
{
|
||||
this.RequiredDataCookerPath = dataCookerPath;
|
||||
|
@ -47,6 +54,7 @@ namespace Microsoft.Performance.SDK.Processing
|
|||
/// Constructor that takes a type which implements <see cref="IDataCookerDescriptor"/>.
|
||||
/// </summary>
|
||||
/// <param name="dataCookerType">Identifies the required data cooker</param>
|
||||
[Obsolete("This will be removed by SDK v1.0.0 release candidate 1. Please use RequiresSourceCooker or RequiresCompositeCooker attributes instead.")]
|
||||
public RequiresCookerAttribute(Type dataCookerType)
|
||||
{
|
||||
Guard.NotNull(dataCookerType, nameof(dataCookerType));
|
||||
|
@ -84,6 +92,6 @@ namespace Microsoft.Performance.SDK.Processing
|
|||
/// <summary>
|
||||
/// Path to a required data cooker for the given table.
|
||||
/// </summary>
|
||||
public DataCookerPath RequiredDataCookerPath { get; }
|
||||
public DataCookerPath RequiredDataCookerPath { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Performance.SDK.Extensibility;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Performance.SDK.Processing
|
||||
{
|
||||
/// <summary>
|
||||
/// This attribute is used on a class with static properties that return <see cref="TableDescriptor"/>
|
||||
/// or on individual <see cref="TableDescriptor"/> static properties to indicate that a
|
||||
/// table described by the <see cref="TableDescriptor"/> requires the identified source data cooker.
|
||||
/// </summary>
|
||||
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public sealed class RequiresSourceCookerAttribute
|
||||
: RequiresCookerAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RequiresSourceCookerAttribute"/>
|
||||
/// class.
|
||||
/// </summary>
|
||||
/// <param name="sourceParserId">
|
||||
/// The ID of the source parser.
|
||||
/// </param>
|
||||
/// <param name="dataCookerId">
|
||||
/// The ID of the data cooker.
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// One or more of the parameters is empty or composed only of whitespace.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// One or more of the parameters is null.
|
||||
/// </exception>
|
||||
public RequiresSourceCookerAttribute(string sourceParserId, string dataCookerId)
|
||||
{
|
||||
this.RequiredDataCookerPath = DataCookerPath.ForSource(sourceParserId, dataCookerId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Composites
|
|||
: CookedDataReflector,
|
||||
ICompositeDataCookerDescriptor
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(nameof(Composite1Cooker));
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForComposite(nameof(Composite1Cooker));
|
||||
|
||||
public Composite1Cooker()
|
||||
: base(DataCookerPath)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Composites
|
|||
: CookedDataReflector,
|
||||
ICompositeDataCookerDescriptor
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(nameof(Composite2Cooker));
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForComposite(nameof(Composite2Cooker));
|
||||
|
||||
public Composite2Cooker()
|
||||
: base(DataCookerPath)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Composites
|
|||
: CookedDataReflector,
|
||||
ICompositeDataCookerDescriptor
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(nameof(Composite3Cooker));
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForComposite(nameof(Composite3Cooker));
|
||||
|
||||
public Composite3Cooker()
|
||||
: base(DataCookerPath)
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Composites
|
|||
: CookedDataReflector,
|
||||
ICompositeDataCookerDescriptor
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(nameof(Composite4Cooker));
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForComposite(nameof(Composite4Cooker));
|
||||
|
||||
public Composite4Cooker()
|
||||
: base(DataCookerPath)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Source123
|
|||
public sealed class Source1DataCooker
|
||||
: BaseSourceDataCooker<Source123DataObject, EngineTestContext, int>
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForSource(
|
||||
nameof(Source123Parser),
|
||||
nameof(Source1DataCooker));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Source123
|
|||
public sealed class Source2DataCooker
|
||||
: BaseSourceDataCooker<Source123DataObject, EngineTestContext, int>
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForSource(
|
||||
nameof(Source123Parser),
|
||||
nameof(Source2DataCooker));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Source123
|
|||
public sealed class Source3DataCooker
|
||||
: BaseSourceDataCooker<Source123DataObject, EngineTestContext, int>
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForSource(
|
||||
nameof(Source123Parser),
|
||||
nameof(Source3DataCooker));
|
||||
private ICookedDataRetrieval dependencyRetrieval;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Source4
|
|||
public sealed class Source4DataCooker
|
||||
: BaseSourceDataCooker<Source4DataObject, EngineTestContext, int>
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForSource(
|
||||
nameof(Source4Parser),
|
||||
nameof(Source4DataCooker));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestCookers.Source5
|
|||
public sealed class Source5DataCooker
|
||||
: BaseSourceDataCooker<Source5DataObject, EngineTestContext, int>
|
||||
{
|
||||
public static readonly DataCookerPath DataCookerPath = new DataCookerPath(
|
||||
public static readonly DataCookerPath DataCookerPath = DataCookerPath.ForSource(
|
||||
nameof(Source5Parser),
|
||||
nameof(Source5DataCooker));
|
||||
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
{
|
||||
"description": "test cases for ToolkitEngine.BuildTable",
|
||||
"testCases": [
|
||||
{
|
||||
"id": "0001",
|
||||
"description": "Test table with 1 Source Cooker builds correctly",
|
||||
"tablesToEnable": [
|
||||
"8BE4C87A-CC9A-441A-8173-67414D4C4F68"
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
"TestData/source4_test_data.s4d",
|
||||
"TestData/source5_test_data.s5d"
|
||||
],
|
||||
"expectedOutputs": {
|
||||
"8BE4C87A-CC9A-441A-8173-67414D4C4F68": [
|
||||
{
|
||||
"key": 1,
|
||||
"id": 1,
|
||||
"data": "Source4Row1"
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"id": 2,
|
||||
"data": "Source4Row2"
|
||||
},
|
||||
{
|
||||
"key": 3,
|
||||
"id": 3,
|
||||
"data": "Source4Row3"
|
||||
},
|
||||
{
|
||||
"key": 4,
|
||||
"id": 4,
|
||||
"data": "Source4Row4"
|
||||
}
|
||||
]
|
||||
},
|
||||
"throwingTables": [
|
||||
"BA8B08F5-58F6-4F5D-9C01-BD4801918500"
|
||||
"description": "test cases for ToolkitEngine.BuildTable",
|
||||
"testCases": [
|
||||
{
|
||||
"id": "0001",
|
||||
"description": "Test table with 1 Source Cooker builds correctly",
|
||||
"tablesToEnable": [
|
||||
"8BE4C87A-CC9A-441A-8173-67414D4C4F68"
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
"TestData/source4_test_data.s4d",
|
||||
"TestData/source5_test_data.s5d"
|
||||
],
|
||||
"expectedOutputs": {
|
||||
"8BE4C87A-CC9A-441A-8173-67414D4C4F68": [
|
||||
{
|
||||
"key": 1,
|
||||
"id": 1,
|
||||
"data": "Source4Row1"
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"id": 2,
|
||||
"data": "Source4Row2"
|
||||
},
|
||||
{
|
||||
"key": 3,
|
||||
"id": 3,
|
||||
"data": "Source4Row3"
|
||||
},
|
||||
{
|
||||
"key": 4,
|
||||
"id": 4,
|
||||
"data": "Source4Row4"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"throwingTables": [
|
||||
"BA8B08F5-58F6-4F5D-9C01-BD4801918500"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -34,8 +34,11 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestData
|
|||
[DataMember(Name = "filePaths")]
|
||||
public string[] FilePaths { get; set; }
|
||||
|
||||
[DataMember(Name = "cookersToEnable")]
|
||||
public string[] CookersToEnable { get; set; }
|
||||
[DataMember(Name = "sourceCookersToEnable")]
|
||||
public EngineProcessDataCookerPathDto[] SourceCookersToEnable { get; set; }
|
||||
|
||||
[DataMember(Name = "compositeCookersToEnable")]
|
||||
public EngineProcessDataCookerPathDto[] CompositeCookersToEnable { get; set; }
|
||||
|
||||
[DataMember(Name = "expectedOutputs")]
|
||||
public Dictionary<string, Dictionary<string, string>[]> ExpectedOutputs { get; set; }
|
||||
|
@ -48,4 +51,14 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests.TestData
|
|||
return this.Id + ": " + this.Description;
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
public class EngineProcessDataCookerPathDto
|
||||
{
|
||||
[DataMember(Name = "sourceParserId")]
|
||||
public string SourceParserId { get; set; }
|
||||
|
||||
[DataMember(Name = "dataCookerId")]
|
||||
public string DataCookerId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
{
|
||||
"id": "0001",
|
||||
"description": "Test One Source Cooker processes correctly",
|
||||
"cookersToEnable": [
|
||||
"Source4Parser/Source4DataCooker"
|
||||
"sourceCookersToEnable": [
|
||||
{
|
||||
"sourceParserId": "Source4Parser",
|
||||
"dataCookerId": "Source4DataCooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -52,8 +55,11 @@
|
|||
{
|
||||
"id": "0002",
|
||||
"description": "Test A source cooker that depends on other source cookers",
|
||||
"cookersToEnable": [
|
||||
"Source123Parser/Source3DataCooker"
|
||||
"sourceCookersToEnable": [
|
||||
{
|
||||
"sourceParserId": "Source123Parser",
|
||||
"dataCookerId": "Source3DataCooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -109,8 +115,10 @@
|
|||
{
|
||||
"id": "0003",
|
||||
"description": "Test one composite cooker that depends on one source cooker.",
|
||||
"cookersToEnable": [
|
||||
"/Composite2Cooker"
|
||||
"compositeCookersToEnable": [
|
||||
{
|
||||
"dataCookerId": "Composite2Cooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -167,15 +175,17 @@
|
|||
{
|
||||
"id": "0004",
|
||||
"description": "Test one composite cooker that depends on one source cooker and one composite cooker",
|
||||
"comments":[
|
||||
"comments": [
|
||||
"Note that a composite cooker does not have to be enabled.",
|
||||
"A composite cooker will always be available as long as all",
|
||||
"of its dependencies are available. Thus, we get the side effect",
|
||||
"of potentially more than just the cooker that you are interested",
|
||||
"in being available."
|
||||
],
|
||||
"cookersToEnable": [
|
||||
"/Composite3Cooker"
|
||||
"compositeCookersToEnable": [
|
||||
{
|
||||
"dataCookerId": "Composite3Cooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -260,8 +270,10 @@
|
|||
"id": "0005",
|
||||
"description": "Test one composite cooker that depends on two composite cookers",
|
||||
"debugBreak": true,
|
||||
"cookersToEnable": [
|
||||
"/Composite4Cooker"
|
||||
"compositeCookersToEnable": [
|
||||
{
|
||||
"dataCookerId": "Composite4Cooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -349,14 +361,18 @@
|
|||
},
|
||||
"throwingOutputs": []
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"id": "0006",
|
||||
"description": "Test Many Source Cookers process correctly",
|
||||
"cookersToEnable": [
|
||||
"Source123Parser/Source1DataCooker",
|
||||
"Source123Parser/Source2DataCooker"
|
||||
"sourceCookersToEnable": [
|
||||
{
|
||||
"sourceParserId": "Source123Parser",
|
||||
"dataCookerId": "Source1DataCooker"
|
||||
},
|
||||
{
|
||||
"sourceParserId": "Source123Parser",
|
||||
"dataCookerId": "Source2DataCooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -394,11 +410,19 @@
|
|||
{
|
||||
"id": "0007",
|
||||
"description": "Test Enabling Everything",
|
||||
"cookersToEnable": [
|
||||
"/Composite1Cooker",
|
||||
"/Composite2Cooker",
|
||||
"/Composite3Cooker",
|
||||
"/Composite4Cooker",
|
||||
"compositeCookersToEnable": [
|
||||
{
|
||||
"dataCookerId": "Composite1Cooker"
|
||||
},
|
||||
{
|
||||
"dataCookerId": "Composite2Cooker"
|
||||
},
|
||||
{
|
||||
"dataCookerId": "Composite3Cooker"
|
||||
},
|
||||
{
|
||||
"dataCookerId": "Composite4Cooker"
|
||||
}
|
||||
],
|
||||
"filePaths": [
|
||||
"TestData/source123_test_data.s123d",
|
||||
|
@ -507,4 +531,4 @@
|
|||
"throwingOutputs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -120,7 +121,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
{
|
||||
protected override void RunCore()
|
||||
{
|
||||
var expectedSourceCookerPath = new DataCookerPath("SourceId", "CookerId");
|
||||
var expectedSourceCookerPath = DataCookerPath.ForSource("SourceId", "CookerId");
|
||||
|
||||
var engine = Engine.Create();
|
||||
|
||||
|
@ -774,7 +775,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
[IntegrationTest]
|
||||
public void EnableCooker_NotKnown_Throws()
|
||||
{
|
||||
var cooker = new DataCookerPath("not-there-id");
|
||||
var cooker = DataCookerPath.ForComposite("not-there-id");
|
||||
|
||||
var e = Assert.ThrowsException<CookerNotFoundException>(() => this.Sut.EnableCooker(cooker));
|
||||
Assert.AreEqual(cooker, e.DataCookerPath);
|
||||
|
@ -821,7 +822,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
[IntegrationTest]
|
||||
public void TryEnableCooker_NotKnown_False()
|
||||
{
|
||||
var cooker = new DataCookerPath("not-there-id");
|
||||
var cooker = DataCookerPath.ForComposite("not-there-id");
|
||||
|
||||
Assert.IsFalse(this.Sut.TryEnableCooker(cooker));
|
||||
}
|
||||
|
@ -1187,9 +1188,15 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
|
||||
foreach (var cooker in testCase.CookersToEnable)
|
||||
foreach (var cooker in testCase.SourceCookersToEnable ?? Array.Empty<EngineProcessDataCookerPathDto>())
|
||||
{
|
||||
var cookerPath = DataCookerPath.Parse(cooker);
|
||||
var cookerPath = DataCookerPath.ForSource(cooker.SourceParserId, cooker.DataCookerId);
|
||||
Assert.IsTrue(this.Sut.TryEnableCooker(cookerPath), "Unable to enable cooker '{0}'", cookerPath);
|
||||
}
|
||||
|
||||
foreach (var cooker in testCase.CompositeCookersToEnable ?? Array.Empty<EngineProcessDataCookerPathDto>())
|
||||
{
|
||||
var cookerPath = DataCookerPath.ForComposite(cooker.DataCookerId);
|
||||
Assert.IsTrue(this.Sut.TryEnableCooker(cookerPath), "Unable to enable cooker '{0}'", cookerPath);
|
||||
}
|
||||
|
||||
|
@ -1202,9 +1209,10 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
|
||||
foreach (var expectedData in testCase.ExpectedOutputs)
|
||||
{
|
||||
var dataOutputPathRaw = expectedData.Key;
|
||||
string dataOutputPathRaw = expectedData.Key;
|
||||
var expectedDataPoints = expectedData.Value;
|
||||
var dataOutputPath = DataOutputPath.Create(dataOutputPathRaw);
|
||||
|
||||
DataOutputPath dataOutputPath = Parse(dataOutputPathRaw);
|
||||
|
||||
Assert.IsTrue(
|
||||
results.TryQueryOutput(dataOutputPath, out object data), "Output for {0} not found.", dataOutputPathRaw);
|
||||
|
@ -1257,7 +1265,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
|
||||
foreach (var dataOutputPathRaw in testCase.ThrowingOutputs)
|
||||
{
|
||||
var dataOutputPath = DataOutputPath.Create(dataOutputPathRaw);
|
||||
DataOutputPath dataOutputPath = Parse(dataOutputPathRaw);
|
||||
Assert.IsFalse(
|
||||
results.TryQueryOutput(dataOutputPath, out var _),
|
||||
"Output should not have been available: {0}",
|
||||
|
@ -1300,9 +1308,15 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
Versioning = new FakeVersionChecker(),
|
||||
});
|
||||
|
||||
foreach (var cooker in testCase.CookersToEnable)
|
||||
foreach (var cooker in testCase.SourceCookersToEnable ?? Array.Empty<EngineProcessDataCookerPathDto>())
|
||||
{
|
||||
var cookerPath = DataCookerPath.Parse(cooker);
|
||||
var cookerPath = DataCookerPath.ForSource(cooker.SourceParserId, cooker.DataCookerId);
|
||||
Assert.IsTrue(runtime.TryEnableCooker(cookerPath), "Unable to enable cooker '{0}'", cookerPath);
|
||||
}
|
||||
|
||||
foreach (var cooker in testCase.CompositeCookersToEnable ?? Array.Empty<EngineProcessDataCookerPathDto>())
|
||||
{
|
||||
var cookerPath = DataCookerPath.ForComposite(cooker.DataCookerId);
|
||||
Assert.IsTrue(runtime.TryEnableCooker(cookerPath), "Unable to enable cooker '{0}'", cookerPath);
|
||||
}
|
||||
|
||||
|
@ -1317,7 +1331,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
{
|
||||
var dataOutputPathRaw = expectedData.Key;
|
||||
var expectedDataPoints = expectedData.Value;
|
||||
var dataOutputPath = DataOutputPath.Create(dataOutputPathRaw);
|
||||
DataOutputPath dataOutputPath = Parse(dataOutputPathRaw);
|
||||
|
||||
Assert.IsTrue(
|
||||
results.TryQueryOutput(dataOutputPath, out object data), "Output for {0} not found.", dataOutputPathRaw);
|
||||
|
@ -1370,7 +1384,7 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
|
||||
foreach (var dataOutputPathRaw in testCase.ThrowingOutputs)
|
||||
{
|
||||
var dataOutputPath = DataOutputPath.Create(dataOutputPathRaw);
|
||||
DataOutputPath dataOutputPath = Parse(dataOutputPathRaw);
|
||||
Assert.IsFalse(
|
||||
results.TryQueryOutput(dataOutputPath, out var _),
|
||||
"Output should not have been available: {0}",
|
||||
|
@ -1503,5 +1517,27 @@ namespace Microsoft.Performance.Toolkit.Engine.Tests
|
|||
Path.GetExtension(dataSource.Uri.LocalPath));
|
||||
}
|
||||
}
|
||||
|
||||
public static DataOutputPath Parse(string dataCookerOutputPath)
|
||||
{
|
||||
var split = dataCookerOutputPath.Split('/');
|
||||
Debug.Assert(split.Length == 3);
|
||||
|
||||
string parserId = split[0];
|
||||
string cookerId = split[1];
|
||||
string outputId = split[2];
|
||||
|
||||
DataCookerPath dataCookerPath;
|
||||
if (string.IsNullOrWhiteSpace(parserId))
|
||||
{
|
||||
dataCookerPath = DataCookerPath.ForComposite(cookerId);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataCookerPath = DataCookerPath.ForSource(parserId, cookerId);
|
||||
}
|
||||
|
||||
return new DataOutputPath(dataCookerPath, outputId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,12 +83,6 @@ namespace Microsoft.Performance.Toolkit.Engine
|
|||
this.DataCookerPath = dataCookerPath;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected CookerNotFoundException(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.DataCookerPath = new DataCookerPath(info.GetString(nameof(DataCookerPath)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the requested cooker path that is the cause of this error.
|
||||
/// </summary>
|
||||
|
@ -98,7 +92,7 @@ namespace Microsoft.Performance.Toolkit.Engine
|
|||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue(nameof(DataCookerPath), this.DataCookerPath.CookerPath);
|
||||
info.AddValue(nameof(DataCookerPath), this.DataCookerPath.ToString());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -155,14 +149,6 @@ namespace Microsoft.Performance.Toolkit.Engine
|
|||
this.DataOutputPath = dataOutputPath;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected DataOutputNotFoundException(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.DataOutputPath = new DataOutputPath(
|
||||
new DataCookerPath(info.GetString(nameof(CookerPath))),
|
||||
info.GetString(nameof(OutputId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the requested data output path that is the cause of this error.
|
||||
/// </summary>
|
||||
|
|
Загрузка…
Ссылка в новой задаче