public bool?GetNullableBoolean(IntPtr propertyIndex) { var hasValue = MarshalHelpers.IntPtrToBool(NativeMethods.get_nullable_bool(this, propertyIndex, out var value, out var nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? MarshalHelpers.IntPtrToBool(value) : (bool?)null); }
public bool IsSameInstance(SharedRealmHandle other) { var result = NativeMethods.is_same_instance(this, other, out var nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public bool IsInTransaction() { var result = NativeMethods.is_in_transaction(this, out var nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public bool Refresh() { var result = NativeMethods.refresh(this, out var nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public bool GetBoolean(IntPtr propertyIndex) { var result = NativeMethods.get_bool(this, propertyIndex, out var nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public static bool GetBoolean(TableHandle tableHandle, IntPtr columnIndex, IntPtr rowIndex) { NativeException nativeException; var result = get_bool(tableHandle, columnIndex, rowIndex, out nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public bool LinklistIsEmpty(IntPtr propertyIndex) { NativeException nativeException; var result = NativeMethods.list_is_empty(this, propertyIndex, out nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
protected bool GetBooleanValue(string propertyName) { Debug.Assert(_realm != null, "Object is not managed, but managed access was attempted"); var rowIndex = _rowHandle.RowIndex; return(MarshalHelpers.IntPtrToBool(NativeTable.get_bool(_metadata.Table, _metadata.ColumnIndices[propertyName], (IntPtr)rowIndex))); }
public static bool LinklistIsEmpty(TableHandle tableHandle, IntPtr columnIndex, IntPtr rowIndex) { NativeException nativeException; var result = linklist_is_empty(tableHandle, columnIndex, rowIndex, out nativeException); nativeException.ThrowIfNecessary(); return(MarshalHelpers.IntPtrToBool(result)); }
public DateTimeOffset?GetNullableDateTimeOffset(IntPtr propertyIndex) { NativeException nativeException; long ticks; var hasValue = MarshalHelpers.IntPtrToBool(NativeMethods.get_nullable_timestamp_ticks(this, propertyIndex, out ticks, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? new DateTimeOffset(ticks, TimeSpan.Zero) : (DateTimeOffset?)null); }
public static bool?GetNullableBoolean(TableHandle tableHandle, IntPtr columnIndex, IntPtr rowIndex) { NativeException nativeException; IntPtr value; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_bool(tableHandle, columnIndex, rowIndex, out value, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? MarshalHelpers.IntPtrToBool(value) : (bool?)null); }
public double?GetNullableDouble(IntPtr propertyIndex) { NativeException nativeException; double value; var hasValue = MarshalHelpers.IntPtrToBool(NativeMethods.get_nullable_double(this, propertyIndex, out value, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? value : (double?)null); }
public long?GetNullableInt64(IntPtr propertyIndex) { NativeException nativeException; long value; var hasValue = MarshalHelpers.IntPtrToBool(NativeMethods.get_nullable_int64(this, propertyIndex, out value, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? value : (long?)null); }
public static double?GetNullableDouble(TableHandle tableHandle, IntPtr columnIndex, IntPtr rowIndex) { NativeException nativeException; double value; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_double(tableHandle, columnIndex, rowIndex, out value, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? value : (double?)null); }
public static DateTimeOffset?GetNullableDateTimeOffset(TableHandle tableHandle, IntPtr columnIndex, IntPtr rowIndex) { NativeException nativeException; long ticks; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_timestamp_ticks(tableHandle, columnIndex, rowIndex, out ticks, out nativeException)); nativeException.ThrowIfNecessary(); return(hasValue ? new DateTimeOffset(ticks, TimeSpan.Zero) : (DateTimeOffset?)null); }
protected double?GetNullableDoubleValue(string propertyName) { Debug.Assert(_realm != null, "Object is not managed, but managed access was attempted"); var rowIndex = _rowHandle.RowIndex; var retVal = 0.0d; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_double(_metadata.Table, _metadata.ColumnIndices[propertyName], (IntPtr)rowIndex, ref retVal)); return(hasValue ? retVal : (double?)null); }
protected bool?GetNullableBooleanValue(string propertyName) { Debug.Assert(_realm != null, "Object is not managed, but managed access was attempted"); var rowIndex = _rowHandle.RowIndex; var retVal = IntPtr.Zero; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_bool(_metadata.Table, _metadata.ColumnIndices[propertyName], (IntPtr)rowIndex, ref retVal)); return(hasValue ? MarshalHelpers.IntPtrToBool(retVal) : (bool?)null); }
protected DateTimeOffset?GetNullableDateTimeOffsetValue(string propertyName) { Debug.Assert(_realm != null, "Object is not managed, but managed access was attempted"); var rowIndex = _rowHandle.RowIndex; long unixTimeSeconds = 0; var hasValue = MarshalHelpers.IntPtrToBool(NativeTable.get_nullable_datetime_seconds(_metadata.Table, _metadata.ColumnIndices[propertyName], (IntPtr)rowIndex, ref unixTimeSeconds)); return(hasValue ? DateTimeOffsetExtensions.FromUnixTimeSeconds(unixTimeSeconds) : (DateTimeOffset?)null); }
/// <summary> /// Update a Realm and outstanding objects to point to the most recent data for this Realm. /// This is only necessary when you have a Realm on a non-runloop thread that needs manual refreshing. /// </summary> /// <returns> /// Whether the realm had any updates. Note that this may return true even if no data has actually changed. /// </returns> public bool Refresh() { return(MarshalHelpers.IntPtrToBool(NativeSharedRealm.refresh(SharedRealmHandle))); }
/// <summary> /// Determines whether this instance is the same core instance as the specified rhs. /// </summary> /// <remarks> /// You can, and should, have multiple instances open on different threads which have the same path and open the same Realm. /// </remarks> /// <returns><c>true</c> if this instance is the same core instance the specified rhs; otherwise, <c>false</c>.</returns> /// <param name="rhs">The Realm to compare with the current Realm.</param> public bool IsSameInstance(Realm rhs) { return(MarshalHelpers.IntPtrToBool(NativeSharedRealm.is_same_instance(SharedRealmHandle, rhs.SharedRealmHandle))); }