Command.Registry.RegisterNamespace C# (CSharp) Méthode

RegisterNamespace() public méthode

Registers commands from the supplied assembly. Commands methods must be tagged with the attribute Command to be locatable.
public RegisterNamespace ( Assembly asm, string ns ) : void
asm System.Reflection.Assembly
ns string
Résultat void
        public void RegisterNamespace(Assembly asm, string ns)
        {
            _log.TraceFormat("Searching for commands under namespace '{0}'...", ns);
            var cmdCount = _commands.Count;
            var factCount = _factories.Count;
            foreach(var t in asm.GetExportedTypes()) {
                if(t.Namespace == ns && t.IsClass) {
                    RegisterClass(t);
                }
            }
            _log.TraceFormat("Found {0} commands and {1} factories under namespace {2}",
                    _commands.Count - cmdCount, _factories.Count - factCount, ns);
        }

Same methods

Registry::RegisterNamespace ( string ns ) : void