Exemplo n.º 1
0
        public override string GetDefaultBuildAction(string fileName)
        {
            var ext = System.IO.Path.GetExtension(fileName);

            foreach (var type in manager.GetImporterTypes())
            {
                foreach (var attr in type.GetCustomAttributes(typeof(ContentImporterAttribute), false))
                {
                    if (attr is ContentImporterAttribute)
                    {
                        var c = attr as ContentImporterAttribute;
                        foreach (var f in c.FileExtensions)
                        {
                            if (f.Equals(ext, StringComparison.OrdinalIgnoreCase))
                            {
                                return("Compile");
                            }
                        }
                    }
                }
            }
            return(base.GetDefaultBuildAction(fileName));
        }