public static SoodaObject SelectSingleObjectWC(Sooda.SoodaWhereClause expr, ISoodaObjectList list) { if (list.Count == 0) { return(null); } if (list.Count > 1) { throw new SoodaObjectNotFoundException("Not a unique match: '" + expr + "'"); } return(list.GetItem(0)); }
public static ISoodaObjectList ToSoodaObjectList <T>(this IEnumerable <T> source) where T : SoodaObject { ISoodaObjectList list = source as ISoodaObjectList; if (list != null) { return(list); } SoodaQueryable <T> query = source as SoodaQueryable <T>; if (query != null) { return(query.Execute <ISoodaObjectList>()); } SoodaObjectListSnapshot snapshot = new SoodaObjectListSnapshot(); foreach (SoodaObject o in source) { snapshot.Add(o); } return(snapshot); }
public static SoodaObject SelectSingleObjectBE(Sooda.QL.SoqlBooleanExpression expr, ISoodaObjectList list) { if (list.Count == 0) return null; if (list.Count > 1) throw new SoodaObjectNotFoundException("Not a unique match: '" + expr + "'"); return list.GetItem(0); }
public static SoodaObject SelectSingleObjectWC(Sooda.SoodaWhereClause expr, ISoodaObjectList list) { if (list.Count == 0) return null; if (list.Count > 1) throw new SoodaObjectNotFoundException("Not a unique match: '" + expr + "'"); return list.GetItem(0); }
public SoodaObjectCollectionWrapperGeneric(ISoodaObjectList list) { _theList = list; }
public SoodaObjectCollectionWrapperGeneric() { _theList = new SoodaObjectListSnapshot(); }
public static SoodaObject SelectSingleObjectBE(Sooda.QL.SoqlBooleanExpression expr, ISoodaObjectList list) { if (list.Count == 0) { return(null); } if (list.Count > 1) { throw new SoodaObjectNotFoundException("Not a unique match: '" + expr + "'"); } return(list.GetItem(0)); }