コード例 #1
0
 public PipelineContext(
     IPipelineLogger logger,
     Process process,
     Entity entity = null,
     Field field = null,
     Transform transform = null
 ) {
     ForLog = new object[5];
     Logger = logger;
     Activity = PipelineActivity.Transform;
     Process = process;
     Entity = entity ?? process.GetValidatedOf<Entity>(e => { e.Name = string.Empty; });
     Field = field ?? process.GetValidatedOf<Field>(f => { f.Name = string.Empty; });
     Transform = transform ?? process.GetDefaultOf<Transform>(t => { t.Method = string.Empty; });
     ForLog[0] = process.Name.PadRight(process.LogLimit, ' ').Left(process.LogLimit);
     ForLog[1] = Entity.Alias.PadRight(process.EntityLogLimit, ' ').Left(process.EntityLogLimit);
     ForLog[2] = ' ';
     ForLog[3] = Field.Alias.PadRight(process.FieldLogLimit, ' ').Left(process.FieldLogLimit);
     ForLog[4] = Transform.Method.PadRight(process.TransformLogLimit, ' ').Left(process.TransformLogLimit);
 }
コード例 #2
0
 public PipelineContext(
     IPipelineLogger logger,
     Process process,
     Entity entity       = null,
     Field field         = null,
     Transform transform = null
     )
 {
     ForLog    = new object[5];
     Logger    = logger;
     Activity  = PipelineActivity.Transform;
     Process   = process;
     Entity    = entity ?? process.GetValidatedOf <Entity>(e => { e.Name = string.Empty; });
     Field     = field ?? process.GetValidatedOf <Field>(f => { f.Name = string.Empty; });
     Transform = transform ?? process.GetDefaultOf <Transform>(t => { t.Method = string.Empty; });
     ForLog[0] = process.Name.PadRight(process.LogLimit, ' ').Left(process.LogLimit);
     ForLog[1] = Entity.Alias.PadRight(process.EntityLogLimit, ' ').Left(process.EntityLogLimit);
     ForLog[2] = ' ';
     ForLog[3] = Field.Alias.PadRight(process.FieldLogLimit, ' ').Left(process.FieldLogLimit);
     ForLog[4] = Transform.Method.PadRight(process.TransformLogLimit, ' ').Left(process.TransformLogLimit);
 }