Skip to content

Commit d03d4b4

Browse files
authored
make client factory public
1 parent c24ee1c commit d03d4b4

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

wrapper/VRChat.API.Extensions.Hosting/DefaultVRChatClientFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal class DefaultVRChatClientFactory : IVRChatClientFactory
1515
public DefaultVRChatClientFactory() =>
1616
_builders = new Dictionary<string, VRChatClientBuilder>();
1717

18-
internal bool IsDefaultRegistered => _builders.ContainsKey("vrc_default"); // Not sure where I was going with this, but I'll keep it in here for now
18+
public bool IsDefaultRegistered => _builders.ContainsKey("vrc_default"); // Not sure where I was going with this, but I'll keep it in here for now
1919

2020
public async Task<Dictionary<string, VRChatLoginResult>> LoginAllClientsAsync(bool throwOnFail = false, CancellationToken ct = default)
2121
{
@@ -68,7 +68,7 @@ public IVRChat CreateClient(string name)
6868
throw new NullReferenceException("The specified client does not exist!");
6969
}
7070

71-
internal bool TryAddClient(string clientName, VRChatClientBuilder vcb, bool overrideIfExists = false)
71+
public bool TryAddClient(string clientName, VRChatClientBuilder vcb, bool overrideIfExists = false)
7272
{
7373
if (_builders.ContainsKey(clientName) && !overrideIfExists) // So that the default may be registered in the case of it being nonexistant
7474
return false;

wrapper/VRChat.API.Extensions.Hosting/IVRChatClientFactory.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ public interface IVRChatClientFactory
1616
/// <returns>An instance of <see cref="IVRChat"/> from the default client provider.</returns>
1717
IVRChat CreateClient();
1818

19+
/// <summary>
20+
/// A flag to check and see if the default client, vrc_default, was registered.
21+
/// </summary>
22+
/// <returns>A boolean indicating if the default client is registered.</returns>
23+
bool IsDefaultRegistered { get; }
24+
1925
/// <summary>
2026
/// Creates a named client from the client provider and named configuration.
2127
/// </summary>
@@ -43,5 +49,7 @@ public interface IVRChatClientFactory
4349
/// A <see cref="Task"/> of <see cref="VRChatLoginResult"/> representing this asynchronous operation. The result contains a <see cref="VRChatLoginResult"/> specifying if the current client is logged in successfully and any exceptions returned.
4450
/// </returns>
4551
Task<VRChatLoginResult> LoginClientAsync(string name = "vrc_default", bool throwOnFail = false, CancellationToken ct = default);
52+
53+
bool TryAddClient(string clientName, VRChatClientBuilder vcb, bool overrideIfExists = false);
4654
}
4755
}

0 commit comments

Comments
 (0)