CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_collection_extensions.h
1
5#pragma once
6
7namespace System {
8namespace Text {
9namespace Json {
10
12namespace JsonCollectionExtensions
13{
22 template <typename TCollection, typename TKey, typename TValue>
23 bool TryAdd(const TCollection& dictionary, const TKey& key, const TValue& value)
24 {
25 if (dictionary->ContainsKey(key))
26 {
27 return false;
28 }
29
30 dictionary->Add(key, value);
31 return true;
32 }
33}
34
35} // namespace Json
36} // namespace Text
37} // namespace System
@ Text
Defines color adjustment information for text.
bool TryAdd(const TCollection &dictionary, const TKey &key, const TValue &value)
Attempts to add the specified key and value to the dictionary, returning true on success.
Definition: json_collection_extensions.h:23
Definition: db_command.h:9