AddInitializers() public method

Adds the dictionary initializers.
public AddInitializers ( IEnumerable inits ) : DictionaryDescriptor
inits IEnumerable The initializers.
return DictionaryDescriptor
Beispiel #1
0
 /// <summary>
 /// Copies the initializers to the other <see cref="PropertyDescriptor"/>
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other)
 {
     if (initializers != null)
     {
         other.AddInitializers(initializers);
     }
     return(this);
 }
Beispiel #2
0
 /// <summary>
 /// Copies the initializers to the other <see cref="PropertyDescriptor"/>
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other)
 {
     if (initializers != null)
     {
         other.AddInitializers(initializers.Select(init => init.Copy()).OfType <IDictionaryInitializer>());
     }
     return(this);
 }
Beispiel #3
0
 /// <summary>
 /// Copies the filtered initializers to the other <see cref="PropertyDescriptor"/>
 /// </summary>
 /// <param name="other"></param>
 /// <param name="selector"></param>
 /// <returns></returns>
 public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other, Func <IDictionaryInitializer, bool> selector)
 {
     if (selector == null)
     {
         throw new ArgumentNullException("selector");
     }
     if (initializers != null)
     {
         other.AddInitializers(initializers.Where(selector));
     }
     return(this);
 }
		/// <summary>
		/// Copies the initializers to the other <see cref="PropertyDescriptor"/>
		/// </summary>
		/// <param name="other"></param>
		/// <returns></returns>
		public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other)
		{
			if (initializers != null)
			{
				other.AddInitializers(initializers);
			}
			return this;
		}
		/// <summary>
		/// Copies the filtered initializers to the other <see cref="PropertyDescriptor"/>
		/// </summary>
		/// <param name="other"></param>
		/// <param name="selector"></param>
		/// <returns></returns>
		public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other, Func<IDictionaryInitializer, bool> selector)
		{
			if (selector == null)
			{
				throw new ArgumentNullException("selector");
			}
			if (initializers != null)
			{
				other.AddInitializers(initializers.Where(selector));
			}
			return this;
		}
		/// <summary>
		/// Copies the initializers to the other <see cref="PropertyDescriptor"/>
		/// </summary>
		/// <param name="other"></param>
		/// <returns></returns>
		public DictionaryDescriptor CopyInitializers(DictionaryDescriptor other)
		{
			if (initializers != null)
			{
				other.AddInitializers(initializers.Select(init => init.Copy()).OfType<IDictionaryInitializer>());
			}
			return this;
		}