Source/MongoDB/a_mongo_db_instance.cs
/// <summary>
/// Reads and parses a bson file to the specified type.
/// </summary>
/// <param name="fileName">File to read.</param>
/// <typeparam name="T">Document type.</typeparam>
/// <returns>An enumerable of documents.</returns>
Reads and parses a bson file to the specified type.
Reads and parses a bson file to the specified type .
protected static IEnumerable<T> ParseFile<T>(string fileName)
        {
            var content = File.ReadAllLines(fileName);
            return content.Select(s => BsonSerializer.Deserialize<T>(s)).ToList();
        }
protected static IEnumerable < T > ParseFile < T > ( string fileName ) { var content = File . ReadAllLines ( fileName ) ; return content . Select ( s => BsonSerializer . Deserialize < T > ( s ) ) . ToList ( ) ; }
Reads and parses a bson file to the specified type.
Reads and parses a bson file to the specified type .
An enumerable of documents.
An enumerable of documents .
fileName
string
File to read.
File to read .
typeparam
None