|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DbfDotNet.Linq
{
using System.Linq;
using System.Linq.Expressions;
class DbfQuery<TRecord> : IQueryable<TRecord>
where TRecord : DbfRecord, new()
{
Expression mExpression;
DbfTable<TRecord> mTable;
public DbfQuery(DbfTable<TRecord> table, Expression expression)
{
mTable = table;
mExpression = expression;
}
#region IEnumerable<TRecord> Members
IEnumerator<TRecord> IEnumerable<TRecord>.GetEnumerator()
{
return null;
// this is where the fun starts
//var mIndices = mTable.o.OpenIndexes;
//if (mIndices.Length == 0)
//{
// return mTable.GetEnumerator();
//}
//else
//{
// DbfIndex<TRecord> index = mTable.OpenIndexes[0];
// return index.GetEnumerator();
//}
}
#endregion
#region IEnumerable Members
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
#endregion
#region IQueryable Members
Type IQueryable.ElementType
{
get { throw new NotImplementedException(); }
}
System.Linq.Expressions.Expression IQueryable.Expression
{
get { return mExpression; }
}
IQueryProvider IQueryable.Provider
{
get { return mTable; }
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a French programmer.
These days I spend most of my time with the .NET framework, JavaScript and html.