public Stage Unlink(StageLoc location) { EnsureNotDisposed(); IntPtr ptr = IntPtr.Zero; Interop.PipelineUnlinkStage(_handle, Convert.ToInt32(location), ref ptr); return((ptr != IntPtr.Zero) ? new Stage(ptr) : null); }
public bool Insert(Stage stage, StageLoc location) { EnsureNotDisposed(); bool inserted = Interop.PipelineInsertStage(_handle, stage.Handle, Convert.ToInt32(location)) != 0; if (inserted) { stage.Release(); } return(inserted); }
/// <summary> /// Removes a <see cref="Stage"/> from the start or end of the pipeline. /// </summary> /// <param name="location">The location from where the stage is to be removed.</param> /// <returns>The <see cref="Stage"/> that has been removed. Can be null.</returns> /// <exception cref="ObjectDisposedException"> /// The pipeline has already been disposed. /// </exception> /// <remarks> /// The caller is responsible for disposing any <see cref="Stage"/> removed using this method. /// </remarks> public Stage Unlink(StageLoc location) { EnsureNotClosed(); IntPtr ptr = IntPtr.Zero; Interop.PipelineUnlinkStage(handle, Convert.ToInt32(location), ref ptr); if (ptr != IntPtr.Zero) { IntPtr handle = Interop.GetStageContextID(ptr); Context context = handle != IntPtr.Zero ? Context.CopyRef(handle) : null; return(new Stage(ptr, context)); } return(null); }
public void UnlinkAndDispose(StageLoc location) { EnsureNotDisposed(); Interop.PipelineUnlinkStage(_handle, Convert.ToInt32(location)); }