示例#1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Default path: " + defaultPath);
            Console.Write("Enter path to site: ");
            var sitePath = Console.ReadLine();

            var stopwatch = Stopwatch.StartNew();
            var output    = Output.Console(() => timePrefix(stopwatch.Elapsed));

            if (string.IsNullOrWhiteSpace(sitePath))
            {
                sitePath = defaultPath;
            }

            var webConfig = Path.Combine(sitePath, "web.config");

            if (!File.Exists(webConfig))
            {
                output.Error("File not found: " + webConfig);
                Console.Write("Press any key to continue: ");
                Console.ReadKey();
                return;
            }

            var schemaDriver = new SqlServerSchemaDriver();

            var lookup           = new LoadFromDllFolderLookupAssemblies(sitePath, output);
            var codeBase         = NrdoReflection.GetCodeBase(lookup);
            var codeBaseProvider = new CodeBaseSchemaProvider(codeBase);

            var connectionString = getConnectionStringFromWebConfig(sitePath);

            SchemaTool.UpdateSchema(schemaDriver, connectionString, output, codeBaseProvider);
            stopwatch.Stop();

            Console.Write("Press any key to continue: ");
            Console.ReadKey();
        }
示例#2
0
 public RecipeContext(Assembly assembly)
     : this(NrdoReflection.GetLookupStrategy(assembly))
 {
 }
示例#3
0
 public static RecipeContext FromXml(Assembly assembly, XmlDocument doc)
 {
     return(FromXml(NrdoReflection.GetLookupStrategy(assembly), doc));
 }
示例#4
0
 public RecipeLoader(Assembly assembly)
     : this(NrdoReflection.GetLookupStrategy(assembly))
 {
 }