Exemplo n.º 1
0
 public static ProjectProcessor Export(string projectFileName, Configuration config, SampleDirectory sample, string destination)
 {
     var project = new ProjectProcessor(projectFileName, config, sample);
     project.Process();
     project.Save(destination);
     return project;
 }
Exemplo n.º 2
0
        ProjectProcessor(string projectFileName, Configuration config, SampleDirectory sample)
        {
            this.fileName = projectFileName;
            this.SourceDirectory = Path.GetDirectoryName(fileName);
            this.DestinationDirectory = config.GetDestination(SourceDirectory);
            this.config = config;
            this.sample = sample;

            var relativeSolutionDirectory = GetRelativePath(sample.Destination + "\\", DestinationDirectory);
            this.relativePackagesDirectory = Path.Combine(relativeSolutionDirectory, "packages\\");

            doc = XDocument.Load(projectFileName);

            this.IsNative = fileName.EndsWith("vcxproj");
            this.ReferencesWin2DNuGetPackage = FindAndRemoveWin2DProjectReferences();

            bool isUap = (GetTargetPlatformIdentifier() == TargetPlatformIdentifier.UAP);

            if (isUap && !this.IsNative)
                this.NuGetType = NuGetProjectType.ProjectJson;
            else
                this.NuGetType = NuGetProjectType.PackagesConfig;

            if (isUap)
                Win2DPackage = "Win2D.uwp";
            else
                Win2DPackage = "Win2D.win81";
        }
Exemplo n.º 3
0
        ProjectProcessor(string projectFileName, Configuration config, SampleDirectory sample)
        {
            this.fileName = projectFileName;
            this.SourceDirectory = Path.GetDirectoryName(fileName);
            this.DestinationDirectory = config.GetDestination(SourceDirectory);
            this.config = config;
            this.sample = sample;

            var relativeSolutionDirectory = GetRelativePath(sample.Destination + "\\", DestinationDirectory);
            this.relativePackagesDirectory = Path.Combine(relativeSolutionDirectory, "packages\\");

            doc = XDocument.Load(projectFileName);
        }
Exemplo n.º 4
0
        ProjectProcessor(string projectFileName, Configuration config, SampleDirectory sample)
        {
            this.fileName             = projectFileName;
            this.SourceDirectory      = Path.GetDirectoryName(fileName);
            this.DestinationDirectory = config.GetDestination(SourceDirectory);
            this.config = config;
            this.sample = sample;

            var relativeSolutionDirectory = GetRelativePath(sample.Destination + "\\", DestinationDirectory);

            this.relativePackagesDirectory = Path.Combine(relativeSolutionDirectory, "packages\\");

            doc = XDocument.Load(projectFileName);
        }
Exemplo n.º 5
0
        ProjectProcessor(string projectFileName, bool isSingletonProject, Configuration config, SampleDirectory sample)
        {
            this.fileName             = projectFileName;
            this.SourceDirectory      = Path.GetDirectoryName(fileName);
            this.DestinationDirectory = config.GetDestination(SourceDirectory);
            this.isSingletonProject   = isSingletonProject;
            this.config = config;
            this.sample = sample;

            var relativeSolutionDirectory = GetRelativePath(sample.Destination + "\\", DestinationDirectory);

            this.relativePackagesDirectory = Path.Combine(relativeSolutionDirectory, "packages\\");

            doc = XDocument.Load(projectFileName);

            this.IsNative = fileName.EndsWith("vcxproj");
            this.ReferencesWin2DNuGetPackage = FindAndRemoveWin2DProjectReferences();

            bool isUap = (GetTargetPlatformIdentifier() == TargetPlatformIdentifier.UAP);

            if (isUap && !this.IsNative)
            {
                this.NuGetType = NuGetProjectType.ProjectJson;
            }
            else
            {
                this.NuGetType = NuGetProjectType.PackagesConfig;
            }

            if (isUap)
            {
                Win2DPackage = "Win2D.uwp";
            }
            else
            {
                Win2DPackage = "Win2D.win81";
            }
        }
Exemplo n.º 6
0
        public static ProjectProcessor Export(string projectFileName, Configuration config, SampleDirectory sample, string destination)
        {
            var project = new ProjectProcessor(projectFileName, config, sample);

            project.Process();
            project.Save(destination);
            return(project);
        }
Exemplo n.º 7
0
 SampleExporter(Configuration config, SampleDirectory sample)
 {
     this.config = config;
     this.sample = sample;
 }
Exemplo n.º 8
0
 public static void Export(Configuration config, SampleDirectory sample)
 {
     new SampleExporter(config, sample).Go();
 }
Exemplo n.º 9
0
 public static void Export(Configuration config, SampleDirectory sample)
 {
     new SampleExporter(config, sample).Go();
 }
Exemplo n.º 10
0
 SampleExporter(Configuration config, SampleDirectory sample)
 {
     this.config = config;
     this.sample = sample;
 }