private unsafe IndexReucEntry this[int idx] { get { git_index_reuc_entry *entryHandle = Proxy.git_index_reuc_get_byindex(index.Handle, (UIntPtr)idx); return(IndexReucEntry.BuildFromPtr(entryHandle)); } }
/// <summary> /// Gets the <see cref="IndexReucEntry"/> with the specified relative path. /// </summary> public virtual unsafe IndexReucEntry this[string path] { get { Ensure.ArgumentNotNullOrEmptyString(path, "path"); git_index_reuc_entry *entryHandle = Proxy.git_index_reuc_get_bypath(index.Handle, path); return(IndexReucEntry.BuildFromPtr(entryHandle)); } }
internal static unsafe IndexReucEntry BuildFromPtr(git_index_reuc_entry *entry) { if (entry == null) { return(null); } FilePath path = LaxUtf8Marshaler.FromNative(entry->Path); return(new IndexReucEntry { Path = path.Native, AncestorId = ObjectId.BuildFromPtr(&entry->AncestorId), AncestorMode = (Mode)entry->AncestorMode, OurId = ObjectId.BuildFromPtr(&entry->OurId), OurMode = (Mode)entry->OurMode, TheirId = ObjectId.BuildFromPtr(&entry->TheirId), TheirMode = (Mode)entry->TheirMode, }); }