Example #1
0
        private void SaveProject(Stream stream)
        {
            var project = new Nine.Studio.Serialization.Project()
            {
                Version = Editor.VersionString
            };

            project.References.AddRange(References.Select(x => new Nine.Studio.Serialization.ProjectReference()
            {
                Source = x.FileName
            }));
            project.ProjectItems.AddRange(ProjectItems.Select(x => new Nine.Studio.Serialization.ProjectItem()
            {
                Source = x.RelativeFilename, Importer = x.Importer != null ? x.Importer.Value : null
            }));
            System.Xaml.XamlServices.Save(stream, project);
        }