Table of Contents

Class InternalSDKUtils

Namespace
Amazon.Util.Internal
Assembly
AWSSDK.Core.dll
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 TKey
value TValue

Type Parameters

TKey
TValue

ApplyValues(object, IDictionary<string, object>)

public static void ApplyValues(object target, IDictionary<string, object> propertyValues)

Parameters

target object
propertyValues IDictionary<string, object>

BuildUserAgentString(string)

public static string BuildUserAgentString(string serviceSdkVersion)

Parameters

serviceSdkVersion string

Returns

string

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

string

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

string

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

bool

Type Parameters

T

GetIsSet<T>(T?)

public static bool GetIsSet<T>(T? field) where T : struct

Parameters

field T?

Returns

bool

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

bool

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 string

The filePath to test against the directoryPath.

directoryPath string

The 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

string

SetIsSet<T>(bool, ref List<T>)

public static void SetIsSet<T>(bool isSet, ref List<T> field)

Parameters

isSet bool
field List<T>

Type Parameters

T

SetIsSet<T>(bool, ref T?)

public static void SetIsSet<T>(bool isSet, ref T? field) where T : struct

Parameters

isSet bool
field 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 bool
field Dictionary<TKey, TValue>

Type Parameters

TKey
TValue

SetUserAgent(string, string)

public static void SetUserAgent(string productName, string versionNumber)

Parameters

productName string
versionNumber string

SetUserAgent(string, string, string)

public static void SetUserAgent(string productName, string versionNumber, string customData)

Parameters

productName string
versionNumber string
customData string

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 TValue
valueComparer IEqualityComparer<TValue>
key TKey

Returns

bool

Type Parameters

TKey
TValue