public void Capture(XPObjectSpace objectSpace)
        {
            var objectType  = XafTypesInfo.Instance.FindBussinessObjectType <ISequenceReleasedObject>();
            var objectByKey = objectSpace.GetObjectByKey(objectType, _sequenceReleasedObjectKey);

            if (objectByKey != null)
            {
                objectSpace.Delete(objectByKey);
            }
        }
        public void Assign(PopupWindowShowActionExecuteEventArgs popupWindowShowActionExecuteEventArgs, object sequenceObject)
        {
            var sequenceReleasedObject = ((ISequenceReleasedObject)popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);

            _sequenceReleasedObjectKey = popupWindowShowActionExecuteEventArgs.PopupWindow.View.ObjectSpace.GetKeyValue(popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);
            var sequence = sequenceReleasedObject.Sequence;
            var supportSequenceObject = sequenceObject as ISupportSequenceObject;

            if (supportSequenceObject != null)
            {
                supportSequenceObject.Sequence = sequence;
            }
            else
            {
                Model.ModelMember.MemberInfo.SetValue(_supportSequenceObject, sequence);
            }
            _objectSpace.Delete(sequenceObject);
        }
 public void Capture(XPObjectSpace objectSpace) {
     var objectType = XafTypesInfo.Instance.FindBussinessObjectType<ISequenceReleasedObject>();
     var objectByKey = objectSpace.GetObjectByKey(objectType, _sequenceReleasedObjectKey);
     if (objectByKey != null)
         objectSpace.Delete(objectByKey);
 }