Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            List <Trigger> triggers = new List <Trigger>();

            triggers.Add(TriggerDataBuilder.Create()
                         .SetTableName("Subjects")
                         .AddOrderAttribute("id")
                         .AddAttribute("Name")
                         .Build());


            PatternReader  reader         = new PatternReader(triggerPatternFolderPath);
            PatternFactory patternFactory = new PatternFactory(reader);
            TriggerCreator triggerCreator = new TriggerCreator();

            using (StreamWriter streamWriter = new StreamWriter(triggerOutput, append: false, Encoding.Default))
            {
                TriggerWriter writer = new TriggerWriter(patternFactory, triggerCreator);
                writer.Write(streamWriter, triggers);
            }
            //to do сделать получение пути из результирующего файла из консоли
            //to do сделать получени информации о таблицах и их атрибутов из файла
        }
 public TriggerWriter(PatternFactory patternFactory, TriggerCreator triggerCreator)
 {
     _patternFactory = patternFactory;
     _triggerCreator = triggerCreator;
 }