mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Add documentation as to why the query is not changing to 1:n for RequireKeyValueTags
This commit is contained in:
parent
8afce3665f
commit
67c6eb310c
@ -191,6 +191,11 @@ public QueryType WithTag( string tag )
|
||||
|
||||
public QueryType AddRequiredKeyValueTag(string key, string value)
|
||||
{
|
||||
// While KeyValueTags are typically a 1:many relationship, calling AddRequiredKeyValueTag more than once in a
|
||||
// query with the same key results in erasing the previous required value for the same key. For this reason,
|
||||
// someone who calls this method twice in a row with the same key is probably not getting the behavior they
|
||||
// expect. Therefore, leaving this a dictionary to cause a key conflict if someone adds multiple required values
|
||||
// for the same key in the same query.
|
||||
if (requiredKv == null) requiredKv = new Dictionary<string, string>();
|
||||
requiredKv.Add(key, value);
|
||||
return this;
|
||||
@ -317,4 +322,4 @@ private void ApplyReturns(UGCQueryHandle_t handle)
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user