void AddSupportsGLTextures(XElement application) { var assemblyAttrs = Assemblies.SelectMany(path => SupportsGLTextureAttribute.FromCustomAttributeProvider(Resolver.GetAssembly(path))); // Add unique items by Name to the manifest foreach (var feature in assemblyAttrs) { if (!application.Parent.Descendants("supports-gl-texture").Any(x => (string)x.Attribute(attName) == feature.Name)) { application.AddBeforeSelf(feature.ToElement(PackageName)); } } }
void AddSupportsGLTextures(XElement application, List <string> selectedWhitelistAssemblies) { // Look in user assemblies + whitelist (like Maps) var check_assemblies = Assemblies.Union(selectedWhitelistAssemblies); var assemblyAttrs = check_assemblies.SelectMany(path => SupportsGLTextureAttribute.FromCustomAttributeProvider(Resolver.GetAssembly(path))); // Add unique items by Name to the manifest foreach (var feature in assemblyAttrs) { if (!application.Parent.Descendants("supports-gl-texture").Any(x => (string)x.Attribute(attName) == feature.Name)) { application.AddBeforeSelf(feature.ToElement(PackageName)); } } }