internal RecordItemEditOperation(SynchronizedType sType, IItemDataTyped data, RecordItemLock rLock)
 {
     m_sType = sType;
     m_rLock = rLock;
     m_data = data.Item.DeepClone().TypedData;
 }
        async Task<SynchronizedType> Ensure(string typeID, CancellationToken cancelToken)
        {
            using(await CrossThreadLockScope.Enter(m_lock))
            {
                WeakReference<SynchronizedType> viewRef = null;
                SynchronizedType view = null;
                if (m_views.TryGetValue(typeID, out viewRef))
                {
                    viewRef.TryGetTarget(out view);
                }
                if (view != null)
                {
                    return view;
                }

                view = new SynchronizedType(this, typeID);
                await view.Load();
                if (viewRef == null)
                {
                    viewRef = new WeakReference<SynchronizedType>(view);
                }
                else
                {
                    viewRef.SetTarget(view);
                }
                m_views[typeID] = viewRef;
                return view;
            }    
        }