Exemplo n.º 1
0
        static void Synchronize(string vs2008project, string vs2010project, string prepend)
        {
            var parser = new ProjectParser(vs2008project, prepend);
            var writer = new ProjectWriter(vs2010project);

            var filterWriter = new ProjectWriter(vs2010project + ".filters");
            filterWriter.GetFilterIdentifiers(parser.Filters);

            writer.UpdateItems(ItemType.Includes, parser.IncludeFiles, false);
            writer.UpdateItems(ItemType.Sources, parser.SourceFiles, false);
            writer.UpdateItems(ItemType.Resources, parser.ResourceFiles, false);
            writer.UpdateItems(ItemType.Other, parser.OtherFiles, false);

            filterWriter.UpdateItems(ItemType.Filters, parser.Filters, true);
            filterWriter.UpdateItems(ItemType.Includes, parser.IncludeFiles, true);
            filterWriter.UpdateItems(ItemType.Sources, parser.SourceFiles, true);
            filterWriter.UpdateItems(ItemType.Resources, parser.ResourceFiles, true);
            filterWriter.UpdateItems(ItemType.Other, parser.OtherFiles, true);

            writer.Save();
            filterWriter.Save();
        }
Exemplo n.º 2
0
        static void Synchronize(string vs2008project, string vs2010project, string prepend)
        {
            var parser = new ProjectParser(vs2008project, prepend);
            var writer = new ProjectWriter(vs2010project);

            var filterWriter = new ProjectWriter(vs2010project + ".filters");

            filterWriter.GetFilterIdentifiers(parser.Filters);

            writer.UpdateItems(ItemType.Includes, parser.IncludeFiles, false);
            writer.UpdateItems(ItemType.Sources, parser.SourceFiles, false);
            writer.UpdateItems(ItemType.Resources, parser.ResourceFiles, false);
            writer.UpdateItems(ItemType.Other, parser.OtherFiles, false);

            filterWriter.UpdateItems(ItemType.Filters, parser.Filters, true);
            filterWriter.UpdateItems(ItemType.Includes, parser.IncludeFiles, true);
            filterWriter.UpdateItems(ItemType.Sources, parser.SourceFiles, true);
            filterWriter.UpdateItems(ItemType.Resources, parser.ResourceFiles, true);
            filterWriter.UpdateItems(ItemType.Other, parser.OtherFiles, true);

            writer.Save();
            filterWriter.Save();
        }