我需要一些关于Rhino ETL框架管道的帮助。
必需是一种操作链,
A - B / | \ A - A - C - A \ | / A - D[]
1。注册/部分注册
要求b。)由通常的Register(...)和Partial.Register(...)初始化覆盖,但是通过设计将返回的行返回到管道
Register(new ExampleProduce<ClassA>());
Register(Partial
.Register(new ExampleConvertTo<ClassB>())
.Register(new ExampleOperateWith<ClassB>()));
// wrong row: B
Register(Partial
.Register(new ExampleConvertTo<ClassC>())
.Register(new ExampleOperateWith<ClassC>()));
// wrong row: C
Register(Partial
.Register(new ExampleConvertTo<IList<ClassD>>())
.Register(new ExampleOperateWith<IList<ClassD>>()));
// completely other row context, multiple rows of type D
Register(new ExampleOperateWith<ClassA>());
2。分支机构
要求a。)由BranchingOperation使用,但每个分支在管道切换到另一个之前处理所有行,并且永远不会返回到原始管道。
Register(new ExampleProduce<ClassA>());
// runs every branch for all rows before switching to the next one
Register(new BranchingOperation()
.Add(Partial.Register(new ExampleConvertTo<ClassB>())
.Register(new ExampleOperateWith<ClassB>()))
.Add(Partial.Register(new ExampleConvertTo<ClassC>())
.Register(new ExampleOperateWith<ClassC>()))
.Add(Partial.Register(new ExampleConvertTo<IList<ClassD>>())
.Register(new ExampleOperateWith<IList<ClassD>>())));
// never reaches
Register(new Deploy<ClassA>());
3。缓存行
Dirty (并且在我的方案中无法正常工作)解决该问题的可能性: 将当前行保存在&#34;分支&#34;之前的列中。然后恢复它。这将取决于分支中的每个操作都不会更改存储原始行的列,至少在示例的最后一个分支中这是不可能的。
Register(new ExampleProduce<ClassA>());
Register(new StoreToRow<ClassA>());
Register(Partial
.Register(new ExampleConvertTo<ClassB>())
.Register(new ExampleOperateWith<ClassB>()));
Register(new RestoreFromRow<ClassA>());
Register(new StoreToRow<ClassA>());
Register(Partial
.Register(new ExampleConvertTo<ClassC>())
.Register(new ExampleOperateWith<ClassC>()));
Register(new RestoreFromRow<ClassA>());
Register(new StoreToRow<ClassA>());
Register(Partial
.Register(new ExampleConvertTo<IList<ClassD>>())
.Register(new ExampleOperateWith<IList<ClassD>>()));
Register(new RestoreFromRow<ClassA>());
// completely other "row context", multiple rows of type D
Register(new ExampleOperateWith<ClassA>());
是否有任何符合这些要求的BranchingOperation(如SequentialBranchingOperation ......?)的实现?或者其他任何想法如何解决这个问题?