Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
Fix some minor compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 5, 2010
1 parent ef2de6a commit 506af8b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
37 changes: 32 additions & 5 deletions source/MongoDB/Linq/Grouping.cs
@@ -1,32 +1,59 @@
using System;
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MongoDB.Linq
{
/// <summary>
///
/// </summary>
/// <typeparam name="TKey">The type of the key.</typeparam>
/// <typeparam name="TElement">The type of the element.</typeparam>
public class Grouping<TKey, TElement> : IGrouping<TKey, TElement>
{
private TKey _key;
private IEnumerable<TElement> _group;
private readonly TKey _key;
private readonly IEnumerable<TElement> _group;

/// <summary>
/// Initializes a new instance of the <see cref="Grouping&lt;TKey, TElement&gt;"/> class.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="group">The group.</param>
public Grouping(TKey key, IEnumerable<TElement> group)
{
_key = key;
_group = group;
}

/// <summary>
/// Gets the key of the <see cref="T:System.Linq.IGrouping`2"/>.
/// </summary>
/// <value></value>
/// <returns>
/// The key of the <see cref="T:System.Linq.IGrouping`2"/>.
/// </returns>
public TKey Key
{
get { return _key; }
}

/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>
/// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
/// </returns>
public IEnumerator<TElement> GetEnumerator()
{
return _group.GetEnumerator();
}

/// <summary>
/// Returns an enumerator that iterates through a collection.
/// </summary>
/// <returns>
/// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
/// </returns>
IEnumerator IEnumerable.GetEnumerator()
{
return _group.GetEnumerator();
Expand Down
4 changes: 0 additions & 4 deletions source/MongoDB/Linq/MongoQueryObject.cs
@@ -1,14 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace MongoDB.Linq
{
internal class MongoQueryObject
{
private bool _hasOrder;
private Document _query;
private Document _sort;

Expand Down

0 comments on commit 506af8b

Please sign in to comment.