public static void Add([NotNull] string typeName, [NotNull] RuleEditorMacro macro) { Assert.ArgumentNotNull(typeName, nameof(typeName)); Assert.ArgumentNotNull(macro, nameof(macro)); Macros[typeName] = macro; }
public static void LoadType([NotNull] Type type, [NotNull] RuleEditorMacroAttribute attribute) { Assert.ArgumentNotNull(type, nameof(type)); Assert.ArgumentNotNull(attribute, nameof(attribute)); var i = type.GetInterface(ruleEditorMacroInterface); if (i == null) { return; } var macro = new RuleEditorMacro { Type = type, MacroName = attribute.MacroName }; Add(attribute.MacroName.ToUpperInvariant(), macro); }