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
dictionary
Dictionary<TKey, TValue>key
TKeyvalue
TValue
Type Parameters
TKey
TValue
ApplyValues(object, IDictionary<string, object>)
public static void ApplyValues(object target, IDictionary<string, object> propertyValues)
Parameters
target
objectpropertyValues
IDictionary<string, object>
BuildUserAgentString(string)
public static string BuildUserAgentString(string serviceSdkVersion)
Parameters
serviceSdkVersion
string
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
items
IEnumerable<T>keyGenerator
Func<T, TKey>valueGenerator
Func<T, TValue>targetDictionary
Dictionary<TKey, TValue>
Type Parameters
T
TKey
TValue
GetIsSet<T>(List<T>)
public static bool GetIsSet<T>(List<T> field)
Parameters
field
List<T>
Returns
Type Parameters
T
GetIsSet<T>(T?)
public static bool GetIsSet<T>(T? field) where T : struct
Parameters
field
T?
Returns
Type Parameters
T
GetIsSet<TKey, TVvalue>(Dictionary<TKey, TVvalue>)
public static bool GetIsSet<TKey, TVvalue>(Dictionary<TKey, TVvalue> field)
Parameters
field
Dictionary<TKey, TVvalue>
Returns
Type Parameters
TKey
TVvalue
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
filePath
stringThe filePath to test against the directoryPath.
directoryPath
stringThe 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
isSet
boolfield
T?
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
isSet
boolfield
Dictionary<TKey, TValue>
Type Parameters
TKey
TValue
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
items
IEnumerable<T>keyGenerator
Func<T, TKey>valueGenerator
Func<T, TValue>
Returns
- Dictionary<TKey, TValue>
Type Parameters
T
TKey
TValue
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
items
IEnumerable<T>keyGenerator
Func<T, TKey>valueGenerator
Func<T, TValue>comparer
IEqualityComparer<TKey>
Returns
- Dictionary<TKey, TValue>
Type Parameters
T
TKey
TValue
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
dictionary
IDictionary<TKey, TValue>value
TValuevalueComparer
IEqualityComparer<TValue>key
TKey
Returns
Type Parameters
TKey
TValue