public CMTimebaseError SetMasterTimebase(CMTimebase newMasterTimebase) { if (newMasterTimebase == null) { throw new ArgumentNullException(nameof(newMasterTimebase)); } return(CMTimebaseSetMasterTimebase(Handle, newMasterTimebase.Handle)); }
public CMTimebaseError SetMasterTimebase(CMTimebase newMasterTimebase) { if (newMasterTimebase is null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(newMasterTimebase)); } return(CMTimebaseSetMasterTimebase(Handle, newMasterTimebase.Handle)); }
public CMTimebase(CFAllocator?allocator, CMTimebase sourceTimebase) { if (sourceTimebase is null) { throw new ArgumentNullException(nameof(sourceTimebase)); } var error = CMTimebaseCreateWithSourceTimebase(allocator.GetHandle(), sourceTimebase.Handle, out handle); if (error != CMTimebaseError.None) { throw new ArgumentException(error.ToString()); } }
static IntPtr Create(CFAllocator?allocator, CMTimebase sourceTimebase) { if (sourceTimebase is null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(sourceTimebase)); } var error = CMTimebaseCreateWithSourceTimebase(allocator.GetHandle(), sourceTimebase.Handle, out var handle); if (error != CMTimebaseError.None) { ObjCRuntime.ThrowHelper.ThrowArgumentException(error.ToString()); } return(handle); }
static IntPtr Create(CMTimebase masterTimebase) { if (masterTimebase is null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(masterTimebase)); } var error = CMTimebaseCreateWithMasterTimebase(IntPtr.Zero, masterTimebase.Handle, out var handle); if (error != CMTimebaseError.None) { ObjCRuntime.ThrowHelper.ThrowArgumentException(error.ToString()); } return(handle); }
public CMTimebase(CMTimebase masterTimebase) { if (masterTimebase == null) { throw new ArgumentNullException("masterTimebase"); } var error = CMTimebaseCreateWithMasterTimebase(IntPtr.Zero, masterTimebase.Handle, out handle); if (error != CMTimebaseError.None) { throw new ArgumentException(error.ToString()); } CFObject.CFRetain(Handle); }
public CMTimebase(CFAllocator?allocator, CMTimebase sourceTimebase) : base(Create(allocator, sourceTimebase), true) { }
public CMTimebase(CMTimebase masterTimebase) : base(Create(masterTimebase), true) { }