コード例 #1
0
        private static object CreateInstance(Type type, IReadOnlyDictionary <string, object> row)
        {
            var entity     = CreateDefault(type);
            var properties = PortableType.Create(type).Properties;

            foreach (var i in properties)
            {
                i.SetValue(entity, Base(i, row));
            }
            return(entity);
        }
コード例 #2
0
 private static string Properties(PortableType type, string ns, SerializeOption option, Func <PortableProperty, string, SerializeOption, string> serialize) => type.Properties.Select(i => serialize(i, ns, option)).Aggregate(string.Empty, (current, i) => current + i);
コード例 #3
0
 public static string LeftJoinsUnion(Type type, string ns) => Properties(PortableType.Create(type), ns, SerializeOption.LeftJoinsUnion, Serializer.Serialize);
コード例 #4
0
 public static string ColumnsUnion(Type type, string ns) => Properties(PortableType.Create(type), ns, SerializeOption.ColumnsUnion, Serializer.Serialize)[0..^ 1];