Guest User

Untitled

a guest
Jun 24th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.41 KB | None | 0 0
  1. #region Assembly Parse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  2. // C:\Users\marti\.nuget\packages\parse\2.0.0\lib\netstandard2.0\Parse.dll
  3. #endregion
  4.  
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7.  
  8. namespace Parse
  9. {
  10. //
  11. // Summary:
  12. // Represents a user for a Parse application.
  13. [ParseClassName("_User")]
  14. public class ParseUser : ParseObject
  15. {
  16. public ParseUser();
  17.  
  18. //
  19. // Summary:
  20. // Constructs a Parse.ParseQuery`1 for ParseUsers.
  21. public static ParseQuery<ParseUser> Query { get; }
  22. //
  23. // Summary:
  24. // Gets the currently logged in ParseUser with a valid session, either from memory
  25. // or disk if necessary.
  26. public static ParseUser CurrentUser { get; }
  27. //
  28. // Summary:
  29. // Sets the email address.
  30. [ParseFieldName("email")]
  31. public string Email { get; set; }
  32. //
  33. // Summary:
  34. // Sets the password.
  35. [ParseFieldName("password")]
  36. public string Password { set; }
  37. //
  38. // Summary:
  39. // Gets or sets the username.
  40. [ParseFieldName("username")]
  41. public string Username { get; set; }
  42. public string SessionToken { get; }
  43. //
  44. // Summary:
  45. // Whether the ParseUser has been authenticated on this device. Only an authenticated
  46. // ParseUser can be saved and deleted.
  47. public bool IsAuthenticated { get; }
  48.  
  49. //
  50. // Summary:
  51. // Logs in a user with a username and password. On success, this saves the session
  52. // to disk so you can retrieve the currently logged in user using Parse.ParseUser.CurrentUser.
  53. //
  54. // Parameters:
  55. // sessionToken:
  56. // The session token to authorize with
  57. //
  58. // Returns:
  59. // The user if authorization was successful
  60. public static Task<ParseUser> BecomeAsync(string sessionToken);
  61. //
  62. // Summary:
  63. // Logs in a user with a username and password. On success, this saves the session
  64. // to disk so you can retrieve the currently logged in user using Parse.ParseUser.CurrentUser.
  65. //
  66. // Parameters:
  67. // sessionToken:
  68. // The session token to authorize with
  69. //
  70. // cancellationToken:
  71. // The cancellation token.
  72. //
  73. // Returns:
  74. // The user if authorization was successful
  75. public static Task<ParseUser> BecomeAsync(string sessionToken, CancellationToken cancellationToken);
  76. //
  77. // Summary:
  78. // Tells server to use revocable session on LogIn and SignUp, even when App's Settings
  79. // has "Require Revocable Session" turned off. Issues network request in background
  80. // to migrate the sessionToken on disk to revocable session.
  81. //
  82. // Returns:
  83. // The Task that upgrades the session.
  84. public static Task EnableRevocableSessionAsync();
  85. //
  86. // Summary:
  87. // Tells server to use revocable session on LogIn and SignUp, even when App's Settings
  88. // has "Require Revocable Session" turned off. Issues network request in background
  89. // to migrate the sessionToken on disk to revocable session.
  90. //
  91. // Returns:
  92. // The Task that upgrades the session.
  93. public static Task EnableRevocableSessionAsync(CancellationToken cancellationToken);
  94. //
  95. // Summary:
  96. // Logs in a user with a username and password. On success, this saves the session
  97. // to disk so you can retrieve the currently logged in user using Parse.ParseUser.CurrentUser.
  98. //
  99. // Parameters:
  100. // username:
  101. // The username to log in with.
  102. //
  103. // password:
  104. // The password to log in with.
  105. //
  106. // Returns:
  107. // The newly logged-in user.
  108. public static Task<ParseUser> LogInAsync(string username, string password);
  109. //
  110. // Summary:
  111. // Logs in a user with a username and password. On success, this saves the session
  112. // to disk so you can retrieve the currently logged in user using Parse.ParseUser.CurrentUser.
  113. //
  114. // Parameters:
  115. // username:
  116. // The username to log in with.
  117. //
  118. // password:
  119. // The password to log in with.
  120. //
  121. // cancellationToken:
  122. // The cancellation token.
  123. //
  124. // Returns:
  125. // The newly logged-in user.
  126. public static Task<ParseUser> LogInAsync(string username, string password, CancellationToken cancellationToken);
  127. //
  128. // Summary:
  129. // Logs out the currently logged in user session. This will remove the session from
  130. // disk, log out of linked services, and future calls to Parse.ParseUser.CurrentUser
  131. // will return null.
  132. //
  133. // Remarks:
  134. // Typically, you should use Parse.ParseUser.LogOutAsync, unless you are managing
  135. // your own threading.
  136. public static void LogOut();
  137. //
  138. // Summary:
  139. // Logs out the currently logged in user session. This will remove the session from
  140. // disk, log out of linked services, and future calls to Parse.ParseUser.CurrentUser
  141. // will return null. This is preferable to using Parse.ParseUser.LogOut, unless
  142. // your code is already running from a background thread.
  143. public static Task LogOutAsync(CancellationToken cancellationToken);
  144. //
  145. // Summary:
  146. // Logs out the currently logged in user session. This will remove the session from
  147. // disk, log out of linked services, and future calls to Parse.ParseUser.CurrentUser
  148. // will return null.
  149. //
  150. // Remarks:
  151. // This is preferable to using Parse.ParseUser.LogOut, unless your code is already
  152. // running from a background thread.
  153. public static Task LogOutAsync();
  154. //
  155. // Summary:
  156. // Requests a password reset email to be sent to the specified email address associated
  157. // with the user account. This email allows the user to securely reset their password
  158. // on the Parse site.
  159. //
  160. // Parameters:
  161. // email:
  162. // The email address associated with the user that forgot their password.
  163. public static Task RequestPasswordResetAsync(string email);
  164. //
  165. // Summary:
  166. // Requests a password reset email to be sent to the specified email address associated
  167. // with the user account. This email allows the user to securely reset their password
  168. // on the Parse site.
  169. //
  170. // Parameters:
  171. // email:
  172. // The email address associated with the user that forgot their password.
  173. //
  174. // cancellationToken:
  175. // The cancellation token.
  176. public static Task RequestPasswordResetAsync(string email, CancellationToken cancellationToken);
  177. //
  178. // Summary:
  179. // Removes a key from the object's data if it exists.
  180. //
  181. // Parameters:
  182. // key:
  183. // The key to remove.
  184. //
  185. // Exceptions:
  186. // T:System.ArgumentException:
  187. // Cannot remove the username key.
  188. public override void Remove(string key);
  189. //
  190. // Summary:
  191. // Signs up a new user. This will create a new ParseUser on the server and will
  192. // also persist the session on disk so that you can access the user using Parse.ParseUser.CurrentUser.
  193. // A username and password must be set before calling SignUpAsync.
  194. //
  195. // Parameters:
  196. // cancellationToken:
  197. // The cancellation token.
  198. public Task SignUpAsync(CancellationToken cancellationToken);
  199. //
  200. // Summary:
  201. // Signs up a new user. This will create a new ParseUser on the server and will
  202. // also persist the session on disk so that you can access the user using Parse.ParseUser.CurrentUser.
  203. // A username and password must be set before calling SignUpAsync.
  204. public Task SignUpAsync();
  205. protected override bool IsKeyMutable(string key);
  206. protected override Task SaveAsync(Task toAwait, CancellationToken cancellationToken);
  207. }
  208. }
Add Comment
Please, Sign In to add comment