public IConverterRepository AddSearchHandler(OutFunc <ConverterSearchContext, IConverter, bool> searchHandler)
        {
            Ensure.NotNull(searchHandler, "searchHandler");
            lock (storageLock)
                onSearchConverter.Add(searchHandler);

            return(this);
        }
        /// <summary>
        /// Adds <paramref name="searchHandler"/> to be executed when generator was not found.
        /// (Last registered is executed the first).
        /// </summary>
        /// <param name="searchHandler">Generator provider method.</param>
        public ReflectionBehaviorFactoryCollection AddSearchHandler(OutFunc <Type, IReflectionBehaviorFactory, bool> searchHandler)
        {
            Ensure.NotNull(searchHandler, "searchHandler");

            lock (searchFactoryLock)
                onSearchFactory.Add(searchHandler);

            return(this);
        }
Esempio n. 3
0
        /// <summary>
        /// Adds <paramref name="searchHandler"/> to be executed when generator was not found.
        /// (Last registered is executed the first).
        /// </summary>
        /// <param name="searchHandler">Generator provider method.</param>
        public CodeDomBehaviorGeneratorCollection AddSearchHandler(OutFunc <Type, ICodeDomBehaviorGenerator, bool> searchHandler)
        {
            Ensure.NotNull(searchHandler, "searchHandler");

            lock (searchHandlerLock)
                onSearchGenerator.Add(searchHandler);

            return(this);
        }
Esempio n. 4
0
        /// <summary>
        /// Registers search handler when non handler was found for key.
        /// </summary>
        /// <param name="searchHandler">Search handler.</param>
        /// <returns>Self (for fluency).</returns>
        public DefaultDeleteDispatcher AddSearchHandler(OutFunc <string, IDeleteHandler, bool> searchHandler)
        {
            Ensure.NotNull(searchHandler, "searchHandler");

            lock (searchHandlerLock)
                onSearchHandler.Add(searchHandler);

            return(this);
        }
Esempio n. 5
0
        /// <summary>
        /// Adds <paramref name="searchHandler"/> to be executed when model definition was not found.
        /// </summary>
        /// <param name="searchHandler">Model definition provider method.</param>
        public ModelDefinitionCollection AddSearchHandler(OutFunc <string, IModelDefinition, bool> searchHandler)
        {
            Ensure.NotNull(searchHandler, "searchHandler");

            lock (storageLock)
            {
                onSearchDefinition.Add(searchHandler);
            }

            return(this);
        }
Esempio n. 6
0
 /// <summary>
 /// Adds <paramref name="searchHandler"/> to be executed when field metadata validator was not found.
 /// </summary>
 /// <param name="searchHandler">Field metadata validator method.</param>
 public FieldMetadataValidatorCollection AddSearchHandler(OutFunc <FieldMetadataValidatorKey, IFieldMetadataValidator, bool> searchHandler)
 {
     Ensure.NotNull(searchHandler, "searchHandler");
     onSearchValidator.Add(searchHandler);
     return(this);
 }
Esempio n. 7
0
 /// <summary>
 /// Registers generic search handler for unregistered model identifiers.
 /// </summary>
 /// <param name="searchHandler">Search delegate for providing model view activator.</param>
 /// <returns>Self (for fluency).</returns>
 public ModelViewCollection <T> AddSearchHandler(OutFunc <IModelDefinition, IFactory <IModelView <T> >, bool> searchHandler)
 {
     Ensure.NotNull(searchHandler, "searchHandler");
     onSearchView.Add(searchHandler);
     return(this);
 }
Esempio n. 8
0
 /// <summary>
 /// Registers generic handler for providing feature.
 /// <paramref name="handler"/> takes typeof requested feature
 /// and returns <c>true</c> to indicate success; otherwise <c>false</c>.
 /// </summary>
 /// <param name="handler">Handler to register.</param>
 public void AddSearchHandler(OutFunc <Type, object, bool> handler)
 {
     Ensure.NotNull(handler, "handler");
     onSearchFeature.Add(handler);
 }
 public IValidationHandlerCollection AddSearchHandler(OutFunc <Type, object, bool> searchHandler)
 {
     Ensure.NotNull(searchHandler, "searchHandler");
     onSearchHandler.Add(searchHandler);
     return(this);
 }
Esempio n. 10
0
 /// <summary>
 /// Adds handle to be executed when coverting .NET type to XML type name and type mapping is missing.
 /// </summary>
 /// <param name="searchHandler">Handle to find type mapping.</param>
 /// <returns>Self (for fluency).</returns>
 public XmlTypeMappingCollection AddSearchNameHandler(OutFunc <Type, string, bool> searchHandler)
 {
     onSearchName.Add(searchHandler);
     return(this);
 }