private static void EnsureLoaded() { if (s_providersByName != null) { return; } // Initialize lookup Dictionaries s_providersByName = new Dictionary <string, ITypeProvider>(StringComparer.OrdinalIgnoreCase); s_providersByType = new Dictionary <Type, ITypeProvider>(); // Add providers for primitive types Add(new PrimitiveTypeProvider <bool>()); Add(new PrimitiveTypeProvider <sbyte>()); Add(new PrimitiveTypeProvider <short>()); Add(new PrimitiveTypeProvider <ushort>()); Add(new PrimitiveTypeProvider <int>()); Add(new PrimitiveTypeProvider <uint>()); Add(new PrimitiveTypeProvider <long>()); Add(new PrimitiveTypeProvider <ulong>()); Add(new PrimitiveTypeProvider <float>()); Add(new PrimitiveTypeProvider <double>()); // Add configured type providers foreach (ITypeProvider provider in InterfaceLoader.BuildAll <ITypeProvider>()) { Add(provider); } }
private static void EnsureLoaded() { if (s_pipelineStageBuildersByName != null) { return; } s_pipelineStageBuildersByName = new Dictionary <string, IVerbBuilder>(StringComparer.OrdinalIgnoreCase); foreach (IVerbBuilder builder in InterfaceLoader.BuildAll <IVerbBuilder>()) { Add(builder); } }