/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class ItemIdContainer : Disposable, global::System.Collections.IEnumerable,
global::System.Collections.Generic.IList<uint>
{
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
- /// <summary>swigCMemOwn.</summary>
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- protected bool swigCMemOwn;
-
- internal ItemIdContainer(global::System.IntPtr cPtr, bool cMemoryOwn)
+ internal ItemIdContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemIdContainer obj)
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// This will be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override void Dispose(DisposeTypes type)
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
- if (disposed)
- {
- return;
- }
-
- //Release your own unmanaged resources here.
- //You should not access any managed member here except static instance.
- //because the execution order of Finalizes is non-deterministic.
-
- if (swigCPtr.Handle != global::System.IntPtr.Zero)
- {
- if (swigCMemOwn)
- {
- swigCMemOwn = false;
- Interop.ItemIdContainer.delete_ItemIdContainer(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
-
- base.Dispose(type);
+ Interop.ItemIdContainer.delete_ItemIdContainer(swigCPtr);
}
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
public ItemIdContainer(global::System.Collections.ICollection c) : this()
{
if (c == null)
- throw new global::System.ArgumentNullException("c");
+ throw new global::System.ArgumentNullException(nameof(c));
foreach (uint element in c)
{
this.Add(element);
public void CopyTo(int index, uint[] array, int arrayIndex, int count)
{
if (array == null)
- throw new global::System.ArgumentNullException("array");
+ throw new global::System.ArgumentNullException(nameof(array));
if (index < 0)
- throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
+ throw new global::System.ArgumentOutOfRangeException(nameof(index), "Value is less than zero");
if (arrayIndex < 0)
- throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
+ throw new global::System.ArgumentOutOfRangeException(nameof(arrayIndex), "Value is less than zero");
if (count < 0)
- throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
+ throw new global::System.ArgumentOutOfRangeException(nameof(count), "Value is less than zero");
if (array.Rank > 1)
- throw new global::System.ArgumentException("Multi dimensional array.", "array");
+ throw new global::System.ArgumentException("Multi dimensional array.", nameof(array));
if (index + count > this.Count || arrayIndex + count > array.Length)
throw new global::System.ArgumentException("Number of elements to copy is too large.");
for (int i = 0; i < count; i++)
collectionRef = collection;
currentIndex = -1;
currentObject = null;
- currentSize = collectionRef.Count;
+ currentSize = collectionRef?.Count ?? 0;
}
// Type-safe iterator Current