Skip to content

Instantly share code, notes, and snippets.

@msarchet
Created February 1, 2013 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msarchet/4692221 to your computer and use it in GitHub Desktop.
Save msarchet/4692221 to your computer and use it in GitHub Desktop.
Ghost Doc Example
/// <summary>
/// Joins the chat.
/// </summary>
/// <param name="UserName">Name of the user.</param>
/// <param name="authguid">The authguid.</param>
/// <exception cref="System.Exception">
/// Unable to find user
/// or
/// Unable to authorize user
/// </exception>
public void JoinChat(String UserName, String authguid)
{
//Probably need to add the user if the user doesn't exist in the user repo at this point
UserModel user = userRepo.GetUserByUserName(UserName);
if (user == null)
{
throw new Exception("Unable to find user");
}
else
{
if (user.AuthGuid != authguid || String.IsNullOrEmpty(authguid))
{
throw new Exception("Unable to authorize user");
}
userConnectionRepo.AddConnectionID(UserName, Context.ConnectionId);
if (user.UserType == UserType.Administrator)
{
Groups.Add(Context.ConnectionId, "Admin");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment