public BamlDocument GenerateThemesGenericXaml()

in ILRepack/Steps/ResourceProcessing/BamlGenerator.cs [48:85]


        public BamlDocument GenerateThemesGenericXaml(IEnumerable<string> importedFiles)
        {
            BamlDocument document = new BamlDocument
            {
                Signature = "MSBAML",
                ReaderVersion = BamlVersion,
                WriterVersion = BamlVersion,
                UpdaterVersion = BamlVersion
            };

            document.Add(new DocumentStartRecord());

            AddAssemblyInfos(document);
            document.AddRange(GetMergedDictionariesAttributes());

            document.Add(new ElementStartRecord
            {
                TypeId = ResourceDictionaryTypeId
            });
            document.Add(new XmlnsPropertyRecord
            {
                Prefix = string.Empty,
                XmlNamespace = "http://schemas.microsoft.com/winfx/2006/xaml/presentation",
                AssemblyIds = document.OfType<AssemblyInfoRecord>().Select(asm => asm.AssemblyId).ToArray()
            });

            document.AddRange(GetDictionariesList(importedFiles));

            ElementEndRecord lastEndRecord = new ElementEndRecord();
            document.Add(new DeferableContentStartRecord
            {
                Record = lastEndRecord
            });
            document.Add(lastEndRecord);
            document.Add(new DocumentEndRecord());

            return document;
        }