Example #1
0
 ///	<summary>
 /// Register a merge strategy so it can later be obtained by name.
 ///	</summary>
 ///	<param name="imp">the strategy to register.</param>
 ///	<exception cref="ArgumentException">
 /// a strategy by the same name has already been registered.
 /// </exception>
 public static void Register(MergeStrategy imp)
 {
     Register(imp.Name, imp);
 }
Example #2
0
        public static void Register(string name, MergeStrategy imp)
        {
            if (Strategies.ContainsKey(name))
            {
                throw new ArgumentException("Merge strategy \"" + name + "\" already exists as a default strategy");
            }

            Strategies.Add(name, imp);
        }
Example #3
0
	    /**
	     * Register a merge strategy so it can later be obtained by name.
	     *
	     * @param imp
	     *            the strategy to register.
	     * @throws IllegalArgumentException
	     *             a strategy by the same name has already been registered.
	     */
	    public static void Register(MergeStrategy imp) 
        {
		    Register(imp.GetName(), imp);
	    }