Class InternalSDKUtils
public static class InternalSDKUtils
- Inheritance
-
InternalSDKUtils
- Inherited Members
Methods
AddToDictionary<TKey, TValue>(Dictionary<TKey, TValue>, TKey, TValue)
public static void AddToDictionary<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
Parameters
dictionaryDictionary<TKey, TValue>keyTKeyvalueTValue
Type Parameters
TKeyTValue
ApplyValues(object, IDictionary<string, object>)
public static void ApplyValues(object target, IDictionary<string, object> propertyValues)
Parameters
targetobjectpropertyValuesIDictionary<string, object>
BuildUserAgentString(string)
public static string BuildUserAgentString(string serviceSdkVersion)
Parameters
serviceSdkVersionstring
Returns
DetermineFramework()
Returns the type of platform and version.!-- If on a special platform, a static "0" is used as the version since we have nothing more specific that actually means anything. Otherwise, asks InteropServices RuntimeInformation for the OSDescription and trims off the OS name.
public static string DetermineFramework()
Returns
DetermineOS()
Returns the special platform information (e.g. Unity_OSXEditor, Xamarin_AndroidTablet) if on those platforms, otherwise asks InteropServices RuntimeInformation for the OSDescription and trims off the version.
public static string DetermineOS()
Returns
FillDictionary<T, TKey, TValue>(IEnumerable<T>, Func<T, TKey>, Func<T, TValue>, Dictionary<TKey, TValue>)
public static void FillDictionary<T, TKey, TValue>(IEnumerable<T> items, Func<T, TKey> keyGenerator, Func<T, TValue> valueGenerator, Dictionary<TKey, TValue> targetDictionary)
Parameters
itemsIEnumerable<T>keyGeneratorFunc<T, TKey>valueGeneratorFunc<T, TValue>targetDictionaryDictionary<TKey, TValue>
Type Parameters
TTKeyTValue
GetIsSet<T>(List<T>)
public static bool GetIsSet<T>(List<T> field)
Parameters
fieldList<T>
Returns
Type Parameters
T
GetIsSet<T>(T?)
public static bool GetIsSet<T>(T? field) where T : struct
Parameters
fieldT?
Returns
Type Parameters
T
GetIsSet<TKey, TVvalue>(Dictionary<TKey, TVvalue>)
public static bool GetIsSet<TKey, TVvalue>(Dictionary<TKey, TVvalue> field)
Parameters
fieldDictionary<TKey, TVvalue>
Returns
Type Parameters
TKeyTVvalue
IsFilePathRootedWithDirectoryPath(string, string)
Tests if the filePath is rooted with the directoryPath when resolved. The filePath and directoryPath do not need to exist to call this method.
public static bool IsFilePathRootedWithDirectoryPath(string filePath, string directoryPath)
Parameters
filePathstringThe filePath to test against the directoryPath.
directoryPathstringThe directoryPath to use as root in the test.
Returns
- bool
true if directoryPath is root of filePath else false
PlatformUserAgent()
Returns the special platform information (e.g. Unity_OSXEditor, Xamarin_AndroidTablet) if on those platforms, otherwise asks InteropServices RuntimeInformation for the OSDescription, keeping the version tail.
public static string PlatformUserAgent()
Returns
SetIsSet<T>(bool, ref List<T>)
public static void SetIsSet<T>(bool isSet, ref List<T> field)
Parameters
Type Parameters
T
SetIsSet<T>(bool, ref T?)
public static void SetIsSet<T>(bool isSet, ref T? field) where T : struct
Parameters
isSetboolfieldT?
Type Parameters
T
SetIsSet<TKey, TValue>(bool, ref Dictionary<TKey, TValue>)
public static void SetIsSet<TKey, TValue>(bool isSet, ref Dictionary<TKey, TValue> field)
Parameters
isSetboolfieldDictionary<TKey, TValue>
Type Parameters
TKeyTValue
SetUserAgent(string, string)
public static void SetUserAgent(string productName, string versionNumber)
Parameters
SetUserAgent(string, string, string)
public static void SetUserAgent(string productName, string versionNumber, string customData)
Parameters
ToDictionary<T, TKey, TValue>(IEnumerable<T>, Func<T, TKey>, Func<T, TValue>)
public static Dictionary<TKey, TValue> ToDictionary<T, TKey, TValue>(IEnumerable<T> items, Func<T, TKey> keyGenerator, Func<T, TValue> valueGenerator)
Parameters
itemsIEnumerable<T>keyGeneratorFunc<T, TKey>valueGeneratorFunc<T, TValue>
Returns
- Dictionary<TKey, TValue>
Type Parameters
TTKeyTValue
ToDictionary<T, TKey, TValue>(IEnumerable<T>, Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>)
public static Dictionary<TKey, TValue> ToDictionary<T, TKey, TValue>(IEnumerable<T> items, Func<T, TKey> keyGenerator, Func<T, TValue> valueGenerator, IEqualityComparer<TKey> comparer)
Parameters
itemsIEnumerable<T>keyGeneratorFunc<T, TKey>valueGeneratorFunc<T, TValue>comparerIEqualityComparer<TKey>
Returns
- Dictionary<TKey, TValue>
Type Parameters
TTKeyTValue
TryFindByValue<TKey, TValue>(IDictionary<TKey, TValue>, TValue, IEqualityComparer<TValue>, out TKey)
public static bool TryFindByValue<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TValue value, IEqualityComparer<TValue> valueComparer, out TKey key)
Parameters
dictionaryIDictionary<TKey, TValue>valueTValuevalueComparerIEqualityComparer<TValue>keyTKey
Returns
Type Parameters
TKeyTValue