public static NamespaceProvider ToNamespaceProvider(this IEnumerable<KeyValuePair<NamespaceKey, string>> items,
     GenerateNamespaceDelegate generate = null)
 {
     var result = new NamespaceProvider()
     {
         GenerateNamespace = generate,
     };
     foreach (var item in items)
         result.Add(item.Key, item.Value);
     return result;
 }