コード例 #1
0
 /// <summary>
 /// Registers a resolver set with the manager. The prefix is intended for module names when registering resolvers read from module configuration.
 /// Prefixes can be used by some built-in or global packages which is a matter of resolver naming standardization
 /// In fullNames mode the resolvers will have long names - up to 3 parts - prefix.setname.resolver, when this mode is off the setname is not used in resolver naming.
 /// </summary>
 /// <param name="resolverSet">Loaded ParameterResolverSet</param>
 /// <param name="prefix">Optional prefix to add to the resolver names for all the resolvers in the set.</param>
 /// <param name="config">Usually the configuration should be already loaded in the ParameterResolverSet, but we allow it to be set late (but only once) in order to support some variations for the loading process. Can be removed later.</param>
 /// <returns></returns>
 public void AddSet(ParameterResolverSet resolverSet, string prefix = null, ResolverSet config = null)
 {
     if (resolverSet == null)
     {
         throw new ArgumentNullException("resolverSet cannot be null");
     }
     if (config != null)
     {
         resolverSet.Configuration = config;                 // TODO: We can change that in future to depend on the configuration passed on creation.
     }
     _Sets.Add(new SetRegistration(resolverSet, prefix, resolverSet.Name));
 }
コード例 #2
0
 public SetRegistration(ParameterResolverSet lib, string prefix, string name)
 {
     Library = lib;
     Prefix  = prefix;
     Name    = name;
 }