public Extensions() { HashSet<string> ext = new HashSet<string>(); Array.ForEach<string>( GL.GetString(StringName.Extensions).Split(' '), (string extension) => { if (extension.Length > 0) ext.AddIfNotExists(extension); } ); PropertyInfo[] properties = typeof(Extensions).GetProperties(); foreach (PropertyInfo property in properties) { property.SetValue(this, ext.Contains("GL_" + property.Name), null); } }
private void ExportReferences(TextWriter tw, IEnumerable<Type> types = null) { WriteWarning(tw); tw.WriteLine(_referenceBuilder.ToString()); if (types != null) { HashSet<string> pathes = new HashSet<string>(); foreach (var type in types) { var inspected = _fileOps.GenerateInspectedReferences(type, _allTypesHash); if (!string.IsNullOrEmpty(inspected) && !string.IsNullOrWhiteSpace(inspected)) { pathes.AddIfNotExists(inspected); } } foreach (var path in pathes) { tw.WriteLine(path); } } }