public Log4NetScope(object scope, Log4NetScopeRegistry registry)
        {
            if (scope == null)
            {
                throw new ArgumentNullException(nameof(scope));
            }

            var type = scope.GetType();

            var register = registry.GetRegister(type);

            foreach (var disposable in register(scope))
            {
                disposables.Push(disposable);
            }
        }
 public Log4NetScopeFactory(Log4NetScopeRegistry registry)
 {
     this.registry = registry ?? throw new ArgumentNullException(nameof(registry));
     registry.SetRegister(new Log4NetStringScopedRegister())
     .SetRegister(new Log4NetEnumerableScopedRegister());
 }