public static T ResultFirst <T>(this IAncestorResult result, Func <T> objectFactory, ResultListMode?mode = null, Encoding hardwordEncoding = null) { var m = mode ?? (objectFactory != null ? ResultListMode.Value : ResultListMode.All); return((T)AncestorResultHelper.ResultFirst(result, typeof(T), objectFactory, m, hardwordEncoding)); }
public static Tuple <T1, T2> ResultFirst <T1, T2>(this IAncestorResult result, Func <Tuple <T1, T2> > objectFactory = null, ResultListMode?mode = null, Encoding hardwordEncoding = null) { var m = mode ?? (objectFactory != null ? ResultListMode.Value : ResultListMode.All); return((Tuple <T1, T2>)AncestorResultHelper.ResultFirst(result, new Type[] { typeof(T1), typeof(T2) }, objectFactory, m, hardwordEncoding)); }
public T ResultFirst <T>(Encoding encoding = null) where T : class, new() { return((T)AncestorResultHelper.ResultFirst(this, typeof(T), null, ResultListMode.All, encoding)); }