Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
add exception to ensure userid lookup is used
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Feb 2, 2023
1 parent ce26c59 commit d6341a1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Dragon6 API Copyright DragonFruit Network <inbox@dragonfruit.network>
// Licensed under Apache-2. Refer to the LICENSE file for more info

using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
Expand Down Expand Up @@ -29,6 +30,11 @@ public UbisoftAccountRequest(string query, Platform platform, IdentifierType ide
/// </summary>
public UbisoftAccountRequest(IEnumerable<string> queries, Platform platform, IdentifierType identifierType)
{
if (Platform == Platform.CrossPlatform && IdentifierType != IdentifierType.UserId)
{
throw new ArgumentException($"Cannot perform a cross-platform search with {IdentifierType} lookup mode");
}

Platform = platform;
IdentifierType = identifierType;

Expand Down

0 comments on commit d6341a1

Please sign in to comment.