private GenerationContext(GenerationContext original)
 {
     Parameters = original.Parameters;
     Variables = new Dictionary<string, string>(original.Variables);
     SchemaLoader = original.SchemaLoader;
     ExtendedTypes = new Dictionary<Column, ExtendedTypeAndName>(original.ExtendedTypes);
     AllImplementations = new List<IImplementation>(original.AllImplementations);
 }
 public GenerationContext(Parameters parameters, ISchemaLoader schemaLoader)
 {
     Parameters = parameters;
     Variables = new Dictionary<string, string>();
     SchemaLoader = schemaLoader;
     ExtendedTypes = new Dictionary<Column, ExtendedTypeAndName>();
     AllImplementations.Add(new IModifiedImplementation());
     AllImplementations.Add(new INotifyPropertyChangingImplementation());
     AllImplementations.Add(new INotifyPropertyChangedImplementation());
 }
Exemple #3
0
 public static IDictionary<string, string> Load(Parameters parameters)
 {
     if (parameters.Aliases == null)
         return new Dictionary<string, string>();
     return Load(parameters.Aliases, parameters);
 }
Exemple #4
0
        public static IDictionary<string, string> Load(string fileName, Parameters parameters)
        {
            if (!System.IO.File.Exists(fileName))
                throw new ArgumentException("Renames file missing:" + parameters.Aliases);

            Console.WriteLine("Loading renames file: " + fileName);

            Renamings renamings = Load(parameters.Aliases);

            Dictionary<string, string> aliases = new Dictionary<string, string>();
            foreach (Renaming renaming in renamings.Arr)
            {
                aliases[renaming.old] = renaming.@new;
            }
            return aliases;
        }