示例#1
0
        /// <summary>
        ///     <para>
        ///         Creates the service dependencies parameter object for a <see cref="TypeMappingSourceBase" />.
        ///     </para>
        ///     <para>
        ///         Do not call this constructor directly from either provider or application code as it may change
        ///         as new dependencies are added. Instead, use this type in your constructor so that an instance
        ///         will be created and injected automatically by the dependency injection container. To create
        ///         an instance with some dependent services replaced, first resolve the object from the dependency
        ///         injection container, then replace selected services using the 'With...' methods. Do not call
        ///         the constructor at any point in this process.
        ///     </para>
        /// </summary>
        /// <param name="valueConverterSelector"> The registry of known <see cref="ValueConverter" />s. </param>
        /// <param name="plugins"> The plugins. </param>
        public TypeMappingSourceDependencies(
            [NotNull] IValueConverterSelector valueConverterSelector,
            [NotNull] IEnumerable <ITypeMappingSourcePlugin> plugins)
        {
            Check.NotNull(valueConverterSelector, nameof(valueConverterSelector));
            Check.NotNull(plugins, nameof(plugins));

            ValueConverterSelector = valueConverterSelector;
            Plugins = plugins;
        }
示例#2
0
 /// <summary>
 ///     Clones this dependency parameter object with one service replaced.
 /// </summary>
 /// <param name="valueConverterSelector"> A replacement for the current dependency of this type. </param>
 /// <returns> A new parameter object with the given service replaced. </returns>
 public TypeMappingSourceDependencies With([NotNull] IValueConverterSelector valueConverterSelector)
 => new TypeMappingSourceDependencies(valueConverterSelector, Plugins);
        /// <summary>
        ///     <para>
        ///         Creates the service dependencies parameter object for a <see cref="CoreTypeMapper" />.
        ///     </para>
        ///     <para>
        ///         Do not call this constructor directly from either provider or application code as it may change
        ///         as new dependencies are added. Instead, use this type in your constructor so that an instance
        ///         will be created and injected automatically by the dependency injection container. To create
        ///         an instance with some dependent services replaced, first resolve the object from the dependency
        ///         injection container, then replace selected services using the 'With...' methods. Do not call
        ///         the constructor at any point in this process.
        ///     </para>
        /// </summary>
        /// <param name="valueConverterSelector"> The registry of known <see cref="ValueConverter" />s. </param>
        public CoreTypeMapperDependencies([NotNull] IValueConverterSelector valueConverterSelector)
        {
            Check.NotNull(valueConverterSelector, nameof(valueConverterSelector));

            ValueConverterSelector = valueConverterSelector;
        }
 /// <summary>
 ///     Clones this dependency parameter object with one service replaced.
 /// </summary>
 /// <param name="valueConverterSelector"> A replacement for the current dependency of this type. </param>
 /// <returns> A new parameter object with the given service replaced. </returns>
 public CoreTypeMapperDependencies With([NotNull] IValueConverterSelector valueConverterSelector)
 => new CoreTypeMapperDependencies(valueConverterSelector);
示例#5
0
        /// <summary>
        ///     <para>
        ///         Creates the service dependencies parameter object for a <see cref="TypeMappingSourceBase" />.
        ///     </para>
        ///     <para>
        ///         Do not call this constructor directly from either provider or application code as it may change
        ///         as new dependencies are added. Instead, use this type in your constructor so that an instance
        ///         will be created and injected automatically by the dependency injection container. To create
        ///         an instance with some dependent services replaced, first resolve the object from the dependency
        ///         injection container, then replace selected services using the 'With...' methods. Do not call
        ///         the constructor at any point in this process.
        ///     </para>
        /// </summary>
        /// <param name="valueConverterSelector"> The registry of known <see cref="ValueConverter" />s. </param>
        public TypeMappingSourceDependencies([NotNull] IValueConverterSelector valueConverterSelector)
        {
            Check.NotNull(valueConverterSelector, nameof(valueConverterSelector));

            ValueConverterSelector = valueConverterSelector;
        }