/// <summary> /// Expand this expando with the public members of another object. /// </summary> /// <param name="other">The other object.</param> /// <returns>This expanded FastExpando.</returns> public FastExpando Expand(object other) { if (other == null) { throw new ArgumentNullException("other"); } return(Expand(FastExpando.FromObject(other))); }
/// <summary> /// Converts an object to a FastExpando. /// </summary> /// <typeparam name="T1">The type of object to merge into.</typeparam> /// <typeparam name="T2">The type of object to merge.</typeparam> /// <param name="obj1">The object to convert.</param> /// <param name="obj2">The other object to merge in.</param> /// <returns>A fast expando containing the public properties of the object.</returns> public static FastExpando Expand <T1, T2>(this T1 obj1, T2 obj2) { return(FastExpando.FromObject(obj1).Expand(obj2)); }
/// <summary> /// Converts an object to a FastExpando. /// </summary> /// <typeparam name="T">The type of object to convert.</typeparam> /// <param name="obj">The object to convert.</param> /// <returns>A fast expando containing the public properties of the object.</returns> public static FastExpando Expand <T>(this T obj) { return(FastExpando.FromObject(obj)); }