public void AddRange(DelegateCollection delegates) { foreach (var d in delegates.Values.SelectMany(v => v)) { Add(d); } }
internal static void Initialize(string glSpec, string glSpecExt) { if (!delegatesLoaded) { using (StreamReader sr = Utilities.OpenSpecFile(Settings.InputPath, glSpec)) { Delegates = Bind.MainClass.Generator.ReadDelegates(sr); } if (!String.IsNullOrEmpty(glSpecExt)) { using (StreamReader sr = Utilities.OpenSpecFile(Settings.InputPath, glSpecExt)) { foreach (Delegate d in Bind.MainClass.Generator.ReadDelegates(sr).Values) { Utilities.Merge(Delegates, d); } } } delegatesLoaded = true; } }
internal static void Initialize(string glSpec, string glSpecExt) { if (!delegatesLoaded) { using (StreamReader sr = Utilities.OpenSpecFile(Settings.InputPath, glSpec)) { Delegates = MainClass.Generator.ReadDelegates(sr); } if (!String.IsNullOrEmpty(glSpecExt)) { using (StreamReader sr = Utilities.OpenSpecFile(Settings.InputPath, glSpecExt)) { foreach (Delegate d in MainClass.Generator.ReadDelegates(sr).Values) { Utilities.Merge(Delegates, d); } } } Console.WriteLine("Enforcing CLS compliance."); MarkCLSCompliance(Function.Wrappers); delegatesLoaded = true; } }