// MonoGame - Copyright (C) The MonoGame Team // This file is subject to the terms and conditions defined in // file 'LICENSE.txt', which is part of this source code package. using System.Collections.Generic; using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Graphics; namespace MonoGame.Tools.Pipeline { /// /// Snapshot of a PipelineProject's state, used for undo/redo. /// internal class ProjectState { public string OutputDir; public string IntermediateDir; public List References; public TargetPlatform Platform; public GraphicsProfile Profile; public string Config; public string OriginalPath; /// /// Create a ProjectState storing member values of the passed PipelineProject. /// public static ProjectState Get(PipelineProject proj) { var state = new ProjectState() { OriginalPath = proj.OriginalPath, OutputDir = proj.OutputDir, IntermediateDir = proj.IntermediateDir, References = new List(proj.References), Platform = proj.Platform, Profile = proj.Profile, Config = proj.Config, }; return state; } /// /// Set a PipelineProject's member values from this state object. /// public void Apply(PipelineProject proj) { proj.OutputDir = OutputDir; proj.IntermediateDir = IntermediateDir; proj.References = new List(References); proj.Platform = Platform; proj.Profile = Profile; proj.Config = Config; } } }