/// <summary> /// Create support scripts for the specified type. /// </summary> /// <param name="type">Type.</param> /// <param name="path">Path to save scripts.</param> public static void Run(Type type, string path) { var options = DataBindOption.GetOptions(type); foreach (var option in options) { var gen = new DataBindGenerator(option, path); gen.Generate(); } }
/// <summary> /// Check is Data Bind support can be added to the specified type. /// </summary> /// <param name="type">Type.</param> /// <returns>true if support can be added; otherwise false.</returns> public static bool IsValidType(Type type) { var options = DataBindOption.GetOptions(type); return(options.Count > 0); }