Skip to content

Commit

Permalink
GhostDoc add comments to all classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsheely committed Jan 23, 2014
1 parent ed0e1d8 commit c809262
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 20 deletions.
79 changes: 62 additions & 17 deletions IdentityUser.cs
@@ -1,56 +1,101 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.AspNet.Identity;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;


namespace MongoDB.AspNet.Identity
{
/// <summary>
/// Class IdentityUser.
/// </summary>
public class IdentityUser : IUser
{
/// <summary>
/// Unique key for the user
/// </summary>
/// <value>The identifier.</value>
/// <returns>The unique key for the user</returns>
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public virtual string Id { get; set; }
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
public virtual string UserName { get; set; }
/// <summary>
/// Gets or sets the password hash.
/// </summary>
/// <value>The password hash.</value>
public virtual string PasswordHash { get; set; }
/// <summary>
/// Gets or sets the security stamp.
/// </summary>
/// <value>The security stamp.</value>
public virtual string SecurityStamp { get; set; }
/// <summary>
/// Gets the roles.
/// </summary>
/// <value>The roles.</value>
public virtual List<string> Roles { get; private set; }
/// <summary>
/// Gets the claims.
/// </summary>
/// <value>The claims.</value>
public virtual List<IdentityUserClaim> Claims { get; private set; }
/// <summary>
/// Gets the logins.
/// </summary>
/// <value>The logins.</value>
public virtual List<UserLoginInfo> Logins { get; private set; }

/// <summary>
/// Initializes a new instance of the <see cref="IdentityUser"/> class.
/// </summary>
public IdentityUser()
{
this.Claims = new List<IdentityUserClaim>();
this.Roles = new List<string>();
this.Logins = new List<UserLoginInfo>();
}

public IdentityUser(string userName)
: this()
/// <summary>
/// Initializes a new instance of the <see cref="IdentityUser"/> class.
/// </summary>
/// <param name="userName">Name of the user.</param>
public IdentityUser(string userName) : this()
{
this.UserName = userName;
}
}

//public sealed class IdentityUserLogin
//{
// [BsonId]
// [BsonRepresentation(BsonType.ObjectId)]
// public string UserId { get; set; }
// public string LoginProvider { get; set; }
// public string ProviderKey { get; set; }
//}

/// <summary>
/// Class IdentityUserClaim.
/// </summary>
public class IdentityUserClaim
{
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public virtual string Id { get; set; }
public virtual string Id { get; set; }
/// <summary>
/// Gets or sets the user identifier.
/// </summary>
/// <value>The user identifier.</value>
public virtual string UserId { get; set; }
/// <summary>
/// Gets or sets the type of the claim.
/// </summary>
/// <value>The type of the claim.</value>
public virtual string ClaimType { get; set; }
/// <summary>
/// Gets or sets the claim value.
/// </summary>
/// <value>The claim value.</value>
public virtual string ClaimValue { get; set; }

}
Expand Down
10 changes: 7 additions & 3 deletions Utils.cs
@@ -1,12 +1,16 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MongoDB.AspNet.Identity
{
internal static class Utils
{
/// <summary>
/// Converts an IEnumberable of T to a IList of T
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="enumerable">The enumerable.</param>
/// <returns>IList{``0}.</returns>
internal static IList<T> ToIList<T>(this IEnumerable<T> enumerable)
{
return enumerable.ToList();
Expand Down

0 comments on commit c809262

Please sign in to comment.