Stetic.ObjectWrapper.FindObjectByUndoId C# (CSharp) Method

FindObjectByUndoId() public method

public FindObjectByUndoId ( string id ) : ObjectWrapper
id string
return ObjectWrapper
        public virtual ObjectWrapper FindObjectByUndoId(string id)
        {
            if (undoId == id)
                return this;
            else
                return null;
        }

Usage Example

        ObjectWrapperUndoRedoChange ApplyDiff(string id, object diff)
        {
//			Console.WriteLine ("** APPLYING DIFF: uid:" + id);
//			PrintPatch (diff);

            ObjectWrapper ww = rootObject.FindObjectByUndoId(id);

            if (ww == null)
            {
                Console.WriteLine("Object with undo id '{0}' not found", id);
                return(null);
            }

            object reverseDiff = ww.ApplyUndoRedoDiff(diff);

            if (reverseDiff != null)
            {
//				Console.WriteLine ("** REVERSE DIFF:");
//				PrintPatch (reverseDiff);

                ObjectWrapperUndoRedoChange change = new ObjectWrapperUndoRedoChange(this, id, reverseDiff);
                return(change);
            }
            else
            {
                return(null);
            }
        }
All Usage Examples Of Stetic.ObjectWrapper::FindObjectByUndoId