Realms.ListHandle.Find C# (CSharp) Method

Find() public method

public Find ( ObjectHandle objectHandle ) : IntPtr
objectHandle ObjectHandle
return System.IntPtr
        public IntPtr Find(ObjectHandle objectHandle)
        {
            NativeException nativeException;
            var result = NativeMethods.find(this, objectHandle, out nativeException);
            nativeException.ThrowIfNecessary();
            return result;
        }

Usage Example

コード例 #1
0
ファイル: RealmList.cs プロジェクト: syrjgc11006/realm-dotnet
        public override int IndexOf(T value)
        {
            switch (_argumentType)
            {
            case PropertyType.Object | PropertyType.Nullable:
                Argument.NotNull(value, nameof(value));

                var obj = Operator.Convert <T, RealmObject>(value);
                if (!obj.IsManaged)
                {
                    throw new ArgumentException("Value does not belong to a realm", nameof(value));
                }

                return(_listHandle.Find(obj.ObjectHandle));

            case PropertyType.String:
            case PropertyType.String | PropertyType.Nullable:
                return(_listHandle.Find(Operator.Convert <T, string>(value)));

            case PropertyType.Data:
            case PropertyType.Data | PropertyType.Nullable:
                return(_listHandle.Find(Operator.Convert <T, byte[]>(value)));

            default:
                return(_listHandle.Find(PrimitiveValue.Create(value, _argumentType)));
            }
        }
All Usage Examples Of Realms.ListHandle::Find