internal static unsafe IndexNameEntry BuildFromPtr(git_index_name_entry *entry) { if (entry == null) { return(null); } string ancestor = entry->ancestor != null ? LaxFilePathMarshaler.FromNative(entry->ancestor).Native : null; string ours = entry->ours != null ? LaxFilePathMarshaler.FromNative(entry->ours).Native : null; string theirs = entry->theirs != null ? LaxFilePathMarshaler.FromNative(entry->theirs).Native : null; return(new IndexNameEntry { Ancestor = ancestor, Ours = ours, Theirs = theirs, }); }
private unsafe IndexNameEntry this[int idx] { get { git_index_name_entry *entryHandle = Proxy.git_index_name_get_byindex(index.Handle, (UIntPtr)idx); return(IndexNameEntry.BuildFromPtr(entryHandle)); } }