/// <summary> /// Map the columns in this dataframe to a given type. /// /// If the column names match (in a case insensitive, culture invariant comparison) the mapping can be automatic. /// /// Otherwise, list out the member names in column order to map to. /// /// Objects of TProxyType will be created by calling the provided proxy function. /// /// Return false if the mapping cannot be made, and true otherwise. /// </summary> public bool TryProxy <TProxyType>(Func <TProxyType> factory, out ProxyDataFrame <TProxyType> dataframe, params string[] membersToColumns) { if (factory == null) { dataframe = null; return(false); } Dictionary <long, MemberInfo> columnsToMembers; string _; if (!TryInferMapping <TProxyType>(membersToColumns, out columnsToMembers, out _)) { dataframe = null; return(false); } dataframe = MakeProxy(columnsToMembers, factory); return(true); }
/// <summary> /// Map the columns in this dataframe to a given type. /// /// If the column names match (in a case insensitive, culture invariant comparison) the mapping can be automatic. /// /// Otherwise, list out the member names in column order to map to. /// /// Objects of TProxyType will be created by calling the default constructor. /// /// Return false if the mapping cannot be made, and true otherwise. /// </summary> public bool TryProxy <TProxyType>(out ProxyDataFrame <TProxyType> dataframe, params string[] membersToColumns) where TProxyType : new() => TryProxy(MakeDefaultFactory <TProxyType>(), out dataframe, membersToColumns);
/// <summary> /// <see cref="System.Collections.Generic.IEnumerator{T}"/> /// </summary> public void Dispose() { Parent = null; }
internal ProxyRowEnumerator(ProxyDataFrame <TProxyType> parent) { Current = default(TProxyType); Parent = parent; Index = -1; }
internal ProxyRowEnumerable(ProxyDataFrame <TProxyType> parent) { Parent = parent; }
internal ProxyRowMap(ProxyDataFrame <TProxyType> parent) { Parent = parent; }