You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: VRChat.API.Extensions.Hosting/IVRChatClientFactory.cs
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,37 @@
3
3
4
4
namespaceVRChat.API.Extensions.Hosting
5
5
{
6
+
/// <summary>
7
+
/// An interface used for implementing a factory to build <see cref="IVRChat"/> clients from DI.
8
+
/// </summary>
6
9
publicinterfaceIVRChatClientFactory
7
10
{
11
+
/// <summary>
12
+
/// Creates a client using the default client provider and configuration.
13
+
/// </summary>
14
+
/// <returns>An instance of <see cref="IVRChat"/> from the default client provider.</returns>
8
15
IVRChatCreateClient();
16
+
17
+
/// <summary>
18
+
/// Creates a named client from the client provider and named configuration.
19
+
/// </summary>
20
+
/// <param name="name">The name of the client to create</param>
21
+
/// <returns>An instance of <see cref="IVRChat"/> from the named client provider.</returns>
9
22
IVRChatCreateClient(stringname);
10
23
11
-
TaskAttemptLoginForAllClients();
24
+
/// <summary>
25
+
/// Calls <see cref="IVRChat.TryLoginAsync(System.Threading.CancellationToken)"/> on ALL of the registered clients, thus forcing them to have a populated authcookie.
26
+
/// <br /> This also ensures that all clients are logged in. <b>This method does not throw an exception.</b>
27
+
/// </summary>
28
+
/// <returns>A <see cref="Task"/> representing this asyncronous operation.</returns>
29
+
TaskLoginAllClientsAsync();
30
+
31
+
/// <summary>
32
+
/// Calls <see cref="IVRChat.TryLoginAsync(System.Threading.CancellationToken)"/> on the named client, thus forcing the client to have a populated authcookie.
33
+
/// <br /> This also ensures that the specified client is logged in. <b>This method does not throw an exception.</b>
34
+
/// </summary>
35
+
/// <param name="name">The name of the client to login</param>
36
+
/// <returns>A <see cref="Task"/> representing this asyncronous operation.</returns>
// We don't specify the <returns> or <param> for IServiceCollection because it is inferred that the user knows what they're doing
12
14
13
15
/// <summary>
14
16
/// Registers an <see cref="IVRChat"/> to the service collection as the default <see cref="IVRChat"/>, using an <see cref="IConfigurationSection"/> to configure.
15
17
/// </summary>
18
+
/// <param name="services">The <see cref="IServiceCollection"/> to add this <see cref="IVRChat"/> to.</param>
16
19
/// <param name="section">A configuration section used to configure the <see cref="IVRChat"/> with.</param>
0 commit comments