public void RegisterPlugins(CSharpConverter converter) { if (converter == null) { throw new ArgumentNullException(nameof(converter)); } ConvertBegin.Clear(); AfterPreprocessing.Clear(); GetCSharpNameResolvers.Clear(); GetCSharpTypeResolvers.Clear(); GetCSharpContainerResolvers.Clear(); CompilationConverters.Clear(); CommentConverters.Clear(); EnumConverters.Clear(); EnumItemConverters.Clear(); ClassConverters.Clear(); FieldConverters.Clear(); FunctionConverters.Clear(); FunctionTypeConverters.Clear(); ParameterConverters.Clear(); TypedefConverters.Clear(); Converting.Clear(); Converted.Clear(); ConvertEnd.Clear(); RegisteredPlugins.Clear(); for (var index = Options.Plugins.Count - 1; index >= 0; index--) { var plugin = Options.Plugins[index]; if (RegisteredPlugins.Contains(plugin)) { continue; } RegisteredPlugins.Add(plugin); plugin.Register(converter, this); } }