(IDictionary dictionary, object key, object value)
| 226 | } |
| 227 | |
| 228 | internal static void AddDictionaryItem(IDictionary dictionary, object key, object value) |
| 229 | { |
| 230 | // TODO: more generic approach to properly add value that is of custom boxed type? (eg. via NativeInterop.MarshalToManaged) |
| 231 | if (value is ManagedArray managedArray) |
| 232 | { |
| 233 | var managedArrayHandle = ManagedHandle.Alloc(managedArray, GCHandleType.Normal); |
| 234 | value = NativeInterop.MarshalToManaged((IntPtr)managedArrayHandle, managedArray.ArrayType); |
| 235 | managedArrayHandle.Free(); |
| 236 | } |
| 237 | dictionary.Add(key, value); |
| 238 | } |
| 239 | |
| 240 | internal static object[] GetDictionaryKeys(IDictionary dictionary) |
| 241 | { |
nothing calls this directly
no test coverage detected