Skip to content

Commit 78f95b8

Browse files
author
Pang Wu
committed
Add some comments
1 parent 00c4632 commit 78f95b8

File tree

5 files changed

+57
-6
lines changed

5 files changed

+57
-6
lines changed

Example/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
/obj/
2-
/bin/
1+
/obj/
2+
/bin/
3+
/*.resources

Example/Properties/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*.resources

MSNPSharp/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
/bin/
2-
/obj/
1+
/bin/
2+
/obj/
3+
/MSNPSharp.pidb

MSNPSharp/Properties/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*.resources

MSNPSharp/SingleSignOn.cs

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,60 @@ public void AddAuths(SSOTicketType ssott)
622622
}
623623
}
624624
}
625-
625+
626+
/// <summary>
627+
/// Authenticate the specified user. By asynchronous or synchronous ways.
628+
/// </summary>
629+
/// <param name='msnticket'>
630+
/// Msnticket.
631+
/// </param>
632+
/// <param name='onSuccess'>
633+
/// Callback when the authentication was passed.
634+
/// </param>
635+
/// <param name='onError'>
636+
/// Callback when the authentication encounts errors.
637+
/// </param>
638+
/// <exception cref='AuthenticationException'>
639+
/// Is thrown when the authentication failed and the request is a synchronous request.
640+
/// Or the <paramref name="onError"/> callback will be called.
641+
/// If the username contains a wrong format, this exception will always thrown even the request is asynchronous.
642+
/// Which will lead to applcation crash.
643+
/// </exception>
644+
/// <remarks>
645+
/// The method is asynchronous only when both <paramref name="onSuccess"/> and <paramref name="onError"/> are not null.
646+
/// Otherwise it will perform a synchronous request.
647+
/// </remarks>
626648
public void Authenticate(MSNTicket msnticket, EventHandler onSuccess, EventHandler<ExceptionEventArgs> onError)
627649
{
628650
SecurityTokenService securService = CreateSecurityTokenService(@"http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue", @"HTTPS://login.live.com:443//RST2.srf");
629651
Authenticate(securService, msnticket, onSuccess, onError);
630652
}
631-
653+
654+
/// <summary>
655+
/// Authenticate the specified user. By asynchronous or synchronous ways.
656+
/// </summary>
657+
/// <param name='securService'>
658+
/// The authentication webservice to invoke.
659+
/// </param>
660+
/// <param name='msnticket'>
661+
/// Msnticket.
662+
/// </param>
663+
/// <param name='onSuccess'>
664+
/// Callback when the authentication was passed.
665+
/// </param>
666+
/// <param name='onError'>
667+
/// Callback when the authentication encounts errors.
668+
/// </param>
669+
/// <exception cref='AuthenticationException'>
670+
/// Is thrown when the authentication failed and the request is a synchronous request.
671+
/// Or the <paramref name="onError"/> callback will be called.
672+
/// If the username contains a wrong format, this exception will always thrown even the request is asynchronous.
673+
/// Which will lead to applcation crash.
674+
/// </exception>
675+
/// <remarks>
676+
/// The method is asynchronous only when both <paramref name="onSuccess"/> and <paramref name="onError"/> are not null.
677+
/// Otherwise it will perform a synchronous request.
678+
/// </remarks>
632679
public void Authenticate(SecurityTokenService securService, MSNTicket msnticket, EventHandler onSuccess, EventHandler<ExceptionEventArgs> onError)
633680
{
634681
if (user.Split('@').Length > 1)

0 commit comments

Comments
 (0)