public UIntPtr Set(OutputTarget target) { OutputTarget managedTarget = this.targets.Find(t => t.Handle == target.Handle); UIntPtr newHandle = target.WithRaw(raw => Rust.Call(SafeNativeMethods.set_output_target, this.manifest, raw)); if (newHandle != UIntPtr.Zero) { managedTarget.Handle = newHandle; } ApplyDifference(managedTarget, target); return(newHandle); }
public UIntPtr Add(OutputTarget target) { target.Handle = target.WithRaw(raw => Rust.Call(SafeNativeMethods.add_output_target, this.manifest, raw)); this.targets.Add(target); return(target.Handle.Value); }