/// <summary>
 /// Convert a type into an Object Visitor <br />
 /// 将一个类型转换为对象访问器
 /// </summary>
 /// <param name="type"></param>
 /// <param name="kind"></param>
 /// <param name="repeatable"></param>
 /// <param name="strictMode"></param>
 /// <returns></returns>
 public static IObjectVisitor ToVisitor(this Type type,
                                        AlgorithmKind kind = AlgorithmKind.Precision,
                                        bool repeatable    = RpMode.REPEATABLE,
                                        bool strictMode    = StMode.NORMALE)
 {
     return(ObjectVisitor.Create(type, kind, repeatable, strictMode));
 }
 /// <summary>
 /// Convert a dictionary into an Object Visitor according to the given type <br />
 /// 将一个字典根据给定的类型转换为一个对象访问器
 /// </summary>
 /// <param name="type"></param>
 /// <param name="initialValues"></param>
 /// <param name="kind"></param>
 /// <param name="repeatable"></param>
 /// <param name="strictMode"></param>
 /// <returns></returns>
 public static IObjectVisitor ToVisitor(this Type type, IDictionary <string, object> initialValues,
                                        AlgorithmKind kind = AlgorithmKind.Precision,
                                        bool repeatable    = RpMode.REPEATABLE,
                                        bool strictMode    = StMode.NORMALE)
 {
     return(ObjectVisitor.Create(type, initialValues, kind, repeatable, strictMode));
 }
 /// <summary>
 /// Convert an object into an Object Visitor <br />
 /// 将一个对象实例转换为对象访问器
 /// </summary>
 /// <param name="instanceObj"></param>
 /// <param name="kind"></param>
 /// <param name="repeatable"></param>
 /// <param name="strictMode"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 public static IObjectVisitor <T> ToVisitor <T>(this T instanceObj,
                                                AlgorithmKind kind = AlgorithmKind.Precision,
                                                bool repeatable    = RpMode.REPEATABLE,
                                                bool strictMode    = StMode.NORMALE)
     where T : class
 {
     return(ObjectVisitor.Create(instanceObj, kind, repeatable, strictMode));
 }
 /// <summary>
 /// According to the given type, create an object of the corresponding type,
 /// and fill the object with the data provided in the dictionary <br />
 /// 根据给定的类型,创建对应类型的对象,并使用字典中提供的数据填充该对象
 /// </summary>
 /// <param name="keyValueCollections"></param>
 /// <param name="visitor"></param>
 /// <param name="kind"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 public static T Create <T>(IDictionary <string, object> keyValueCollections, out IObjectVisitor <T> visitor, AlgorithmKind kind = AlgorithmKind.Precision)
 {
     visitor = ObjectVisitor.Create <T>(keyValueCollections, kind);
     return(visitor.Instance);
 }
 /// <summary>
 /// According to the given type, create an object of the corresponding type,
 /// and fill the object with the data provided in the dictionary <br />
 /// 根据给定的类型,创建对应类型的对象,并使用字典中提供的数据填充该对象
 /// </summary>
 /// <param name="type"></param>
 /// <param name="keyValueCollections"></param>
 /// <param name="visitor"></param>
 /// <param name="kind"></param>
 /// <returns></returns>
 public static object Create(Type type, IDictionary <string, object> keyValueCollections, out IObjectVisitor visitor, AlgorithmKind kind = AlgorithmKind.Precision)
 {
     visitor = ObjectVisitor.Create(type, keyValueCollections, kind);
     return(visitor.Instance);
 }