Ejemplo n.º 1
0
        protected XElement GetOtherFileItemGroup()
        {
            XElement itemGroup = new XElement(xNamespace + "ItemGroup");

            List <KeyValuePair <ProjectFile, string> > embeddedFiles = _tempFileRelativePathDictionary.Where(x => x.Key is EmbeddedResourceProjectFile).ToList();

            foreach (KeyValuePair <ProjectFile, string> embeddedFile in embeddedFiles)
            {
                EmbeddedResourceProjectFile typeCastedFile = embeddedFile.Key as EmbeddedResourceProjectFile;

                XElement embeddedElement =
                    new XElement(xNamespace + "EmbeddedResource",
                                 new XAttribute("Include", embeddedFile.Value),
                                 new XElement(xNamespace + "SubType",
                                              new XText(typeCastedFile.SubType)
                                              ),
                                 new XElement(xNamespace + "Generator",
                                              new XText(typeCastedFile.Generator)
                                              )
                                 );
                itemGroup.Add(embeddedElement);
            }

            return(itemGroup);
        }
Ejemplo n.º 2
0
        public XamlProjectFile(string fileNameWithoutExtension)
        {
            mXamlFile = new EmbeddedResourceProjectFile(String.Concat(fileNameWithoutExtension, ".xaml"), "Designer", "MSBuild:UpdateDesignTimeXaml");

            mXamlCsFile = new ProjectFile(String.Concat(fileNameWithoutExtension, ".xaml.cs"), true)
            {
                DependentUpon = { String.Concat(fileNameWithoutExtension, ".xaml") }
            };
        }
Ejemplo n.º 3
0
        protected XElement GetOtherFileItemGroup()
        {
            XElement itemGroup = new XElement(xNamespace + "ItemGroup");

            List <KeyValuePair <ProjectFile, string> > embeddedFiles = _tempFileRelativePathDictionary.Where(x => x.Key is EmbeddedResourceProjectFile).ToList();

            foreach (KeyValuePair <ProjectFile, string> embeddedFile in embeddedFiles)
            {
                EmbeddedResourceProjectFile typeCastedFile = embeddedFile.Key as EmbeddedResourceProjectFile;

                XElement embeddedElement =
                    new XElement(xNamespace + "EmbeddedResource",
                                 new XAttribute("Include", embeddedFile.Value),
                                 new XElement(xNamespace + "SubType",
                                              new XText(typeCastedFile.SubType)
                                              ),
                                 new XElement(xNamespace + "Generator",
                                              new XText(typeCastedFile.Generator)
                                              )
                                 );
                itemGroup.Add(embeddedElement);
            }

            // TODO WHEN MONO ANDROID PROJECT?
            //List<KeyValuePair<ProjectFile, string>> androidResourceFiles = tempFileRelativePathDictionary.Where(x => x.Key is AndroidResourceProjectFile).ToList();
            //foreach (KeyValuePair<ProjectFile, string> androidResourceFile in androidResourceFiles)
            //{
            //    AndroidResourceProjectFile typeCastedFile = androidResourceFile.Key as AndroidResourceProjectFile;

            //    XElement resourceElement =
            //        new XElement(xNamespace + "AndroidResource",
            //            new XAttribute("Include", androidResourceFile.Value)
            //        );
            //    itemGroup.Add(resourceElement);
            //}

            return(itemGroup);
        }