public void TransferTo(IScalabilityCache scaleCache) { if (Array == null || Array.Length == 0) { return; } IReference reference = Array[0] as IReference; if (reference != null) { Array[0] = reference.TransferTo(scaleCache); for (int i = 1; i < Array.Length; i++) { reference = (Array[i] as IReference); if (reference != null) { Array[i] = reference.TransferTo(scaleCache); } } return; } ITransferable transferable = Array[0] as ITransferable; if (transferable != null) { transferable.TransferTo(scaleCache); for (int j = 1; j < Array.Length; j++) { (Array[j] as ITransferable)?.TransferTo(scaleCache); } } }
public void TransferTo(IScalabilityCache scaleCache) { if (this.Array != null && this.Array.Length > 0) { IReference reference = this.Array[0] as IReference; if (reference != null) { this.Array[0] = reference.TransferTo(scaleCache); for (int i = 1; i < this.Array.Length; i++) { reference = (this.Array[i] as IReference); if (reference != null) { this.Array[i] = reference.TransferTo(scaleCache); } } } else { ITransferable transferable = this.Array[0] as ITransferable; if (transferable != null) { transferable.TransferTo(scaleCache); for (int j = 1; j < this.Array.Length; j++) { transferable = (this.Array[j] as ITransferable); if (transferable != null) { transferable.TransferTo(scaleCache); } } } } } }
public void TransferTo(IScalabilityCache scaleCache) { if (m_array != null) { m_array = (IReference <StorableArray>)m_array.TransferTo(scaleCache); } else { m_buckets.TransferTo(scaleCache); } m_cache = scaleCache; }