/// <summary>
 /// Get the index of the slice.
 /// </summary>
 /// <param name="key">slice</param>
 /// <returns>index or -1 (not found)</returns>
 public static unsafe int IndexOf <T, Tslice>(this NativeJaggedArray <T> jarr, Tslice key)
     where Tslice : IJaggedArraySliceBase <T>
     where T : unmanaged, IEquatable <T>
 {
     return(jarr.IndexOf((T *)key.GetUnsafePtr(), key.Length));
 }
Пример #2
0
 /// <summary>
 /// Get the index of the entity.
 /// </summary>
 /// <param name="key">entity</param>
 /// <returns>index or -1 (not found)</returns>
 public unsafe int IndexOf <T>(T key)
     where T : IJaggedArraySliceBase <Char16>
 {
     return(_jarr.IndexOf(key));
 }
 /// <summary>
 /// Get the index of slice.
 /// </summary>
 /// <param name="key">list</param>
 /// <returns>index or -1 (not found)</returns>
 public static unsafe int IndexOf <T>(this NativeJaggedArray <T> jarr, NativeArray <T> key)
     where T : unmanaged, IEquatable <T>
 {
     return(jarr.IndexOf((T *)key.GetUnsafePtr(), key.Length));
 }