Beispiel #1
0
        public void Build(IVerificationContext context, IScriptDocumentGeneratorFactory docGenFactory)
        {
            var dataSchema = CompileSchema(context);
            if (dataSchema == null)
            {
                return;
            }

            dataSchema.Verify(context);
            if (context.Entries.Count != 0)
            {
                return;
            }

            context.Add(new VerificationMessage(Severity.Info, Properties.Resources.DataSchemaValidated));

            foreach (var transformation in Transformations)
            {
                var targetSystem = dataSchema.TargetSystems[transformation.TargetSystemName];
                if (targetSystem == null)
                {
                    context.Add(new VerificationMessage(Severity.Error, string.Format(CultureInfo.CurrentCulture, Properties.Resources.TargetSystemNameInTransformationNotFound, transformation.TargetSystemName, transformation.Name)));
                    continue;
                }
                context.Add(new VerificationMessage(Severity.Info, string.Format(CultureInfo.CurrentCulture, Properties.Resources.RunningTransformation, transformation.Name)));
                var transformationContext = new TransformationContext
                {
                    DataSchema = dataSchema,
                    Name = transformation.Name,
                    TargetSystem = targetSystem,
                    TransformationElement = transformation.Element,
                    DocGenFactory = docGenFactory,
                    VerificationContext = context
                };
                transformation.Method.Transform(transformationContext);
            }
        }
Beispiel #2
0
 public void Transform(DataSchema dataSchema, string name, TargetSystem targetSystem, System.Xml.Linq.XElement transformationElement, IScriptDocumentGeneratorFactory docGenFactory)
 {
     throw new NotImplementedException();
 }