AccessProviderSample.AccessDBProvider.GetContentReader C# (CSharp) Method

GetContentReader() public method

Get a reader at the path specified.
public GetContentReader ( string path ) : IContentReader
path string The path from which to read.
return IContentReader
        public IContentReader GetContentReader(string path)
        {
            string tableName;
            int rowNumber;

            PathType type = GetNamesFromPath(path, out tableName, out rowNumber);

            if (type == PathType.Invalid)
            {
                ThrowTerminatingInvalidPathException(path);
            }
            else if (type == PathType.Row)
            {
                throw new InvalidOperationException("contents can be obtained only for tables");
            }

            return new AccessDBContentReader(path, this);
        }