You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>
/// The map reduce result.
/// </summary>
/// <typeparam retval="T">Type to map and reduce</typeparam>
public class MapReduceResult<T>
{
/// <summary>
/// Gets or sets Id.
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets or sets Value.
/// </summary>
public T Value { get; set; }
}
If instead it was like this it could handle all MapReduce results:
/// <summary>
/// This is a useful type for dealing with MapReduce results.
/// It takes two type parameters, one for the key and one for the value.
/// The simplest possible result would use type parameters ObjectId and int
/// </summary>
public class MapReduceResult2<Tid, Tvalue>
{
public Tid _id { get; set; }
public Tvalue value { get; set; }
public override string ToString()
{
return string.Format("{0} {1}", _id, value);
}
}
Suggest either replacing it with the more flexible version or making it internal so it's not exposing a class that has no use outside NORM.
The text was updated successfully, but these errors were encountered:
Currently the class reads thus:-
If instead it was like this it could handle all MapReduce results:
Suggest either replacing it with the more flexible version or making it internal so it's not exposing a class that has no use outside NORM.
The text was updated successfully, but these errors were encountered: