public override IObjectsDataSet CloneDirtyObjects(IObjectsDataSet rootDataSet)
        {
            var  clone = new GOLoginHistoryObjectsDataSet(rootDataSet as ObjectsDataSet);
            bool completed;

            foreach (var keyValue in this.GOLoginHistoryObjects.Where(o => o.Value.IsDirty || o.Value.IsMarkedForDeletion))
            {
                var cloneObject = (GOLoginHistoryDataObject)keyValue.Value.Clone(false);
                cloneObject.InternalObjectId = keyValue.Value.InternalObjectId;

                completed = false;
                while (!completed)
                {
                    completed = clone.GOLoginHistoryObjects.TryAdd(keyValue.Key, cloneObject);
                }
            }

            foreach (var keyValue in this.GOLoginHistoryObjectInternalIds
                     .Where(o => this.GOLoginHistoryObjects[o.Value].IsDirty || this.GOLoginHistoryObjects[o.Value].IsMarkedForDeletion))
            {
                completed = false;

                var count = 0;
                while (!completed && count++ < 15)
                {
                    completed = clone.GOLoginHistoryObjectInternalIds.TryAdd(keyValue.Key, keyValue.Value);
                }
            }

            // CloneDirtyObjects is used to pass only dirty objects to server to save changes. Since indexes are not serialized, no need to clone them
            return(clone);
        }
        public override IObjectsDataSet Clone(IObjectsDataSet rootDataSet)
        {
            var  clone = new GOLoginHistoryObjectsDataSet(rootDataSet as ObjectsDataSet);
            bool completed;

            foreach (var keyValue in this.GOLoginHistoryObjects)
            {
                var cloneObject = (GOLoginHistoryDataObject)keyValue.Value.Clone(false);
                cloneObject.InternalObjectId = keyValue.Value.InternalObjectId;

                completed = false;
                var count = 0;
                while (!completed && count++ < 15)
                {
                    completed = clone.GOLoginHistoryObjects.TryAdd(keyValue.Key, cloneObject);
                }
            }

            foreach (var keyValue in this.GOLoginHistoryObjectInternalIds)
            {
                completed = false;
                var count = 0;
                while (!completed && count++ < 15)
                {
                    completed = clone.GOLoginHistoryObjectInternalIds.TryAdd(keyValue.Key, keyValue.Value);
                }
            }


            return(clone);
        }