public static IndexEntry GetNextEntry (BinaryReader br) { IndexEntry entry = new IndexEntry (); // Content Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); // SHA1 5x32 = 160 //??? Console.WriteLine (Mono.Git.Core.Object.BytesToHexString (br.ReadBytes (20))); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); Console.WriteLine (br.ReadInt32 ()); //entry = br.ReadInt16 (); // flag Console.Write ("Characters: "); for (;;) { char c = br.ReadChar (); if (c == '\0') break; Console.Write (c); } Console.Write ('\n'); return entry; }
public void AddEntry (IndexEntry indexEntry) { ArrayList array = new ArrayList (entries); array.Add (indexEntry); entries = (IndexEntry[]) array.ToArray (); }
public void RemoveEntry (IndexEntry indexEntry) { ArrayList array = new ArrayList (entries); array.Remove (indexEntry); entries = (IndexEntry[]) array.ToArray (); }
public IndexHeader (IndexEntry[] indexEntries) { signature = 0x44495243; version = 2; entries = indexEntries.Length; }