/// <summary> /// Makes a request on the remote media server to delete this /// object from its parent. /// </summary> /// <param name="Tag"> /// Miscellaneous, user-provided object for tracking this /// asynchronous call. Can be used as a means to pass a /// user-defined "state object" at invoke-time so that /// the executed callback during results-processing can be /// aware of the component's state at the time of the call. /// </param> /// <param name="callback"> /// Delegate executes when the results for the method are available. /// </param> /// <exception cref="Error_CannotGetParent"> /// Thrown if the parent of this object is null. /// </exception> /// <exception cref="InvalidCastException"> /// Thrown if this object's parent is not a /// <see cref="CpMediaContainer"/> object. /// </exception> public void RequestDestroyObject(object Tag, CpMediaDelegates.Delegate_ResultDestroyObject callback) { CpMediaContainer p = (CpMediaContainer)this.Parent; if (p != null) { p.RequestDestroyObject(this, Tag, callback); } else { throw new Error_CannotGetParent(this); } }