コード例 #1
0
ファイル: Index.cs プロジェクト: TheRealDuckboy/mono-soc-2008
		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;
		}
コード例 #2
0
ファイル: Index.cs プロジェクト: TheRealDuckboy/mono-soc-2008
		public void AddEntry (IndexEntry indexEntry)
		{
			ArrayList array = new ArrayList (entries);
			
			array.Add (indexEntry);
			
			entries = (IndexEntry[]) array.ToArray ();
		}
コード例 #3
0
ファイル: Index.cs プロジェクト: TheRealDuckboy/mono-soc-2008
		public void RemoveEntry (IndexEntry indexEntry)
		{
			ArrayList array = new ArrayList (entries);
			
			array.Remove (indexEntry);
			
			entries = (IndexEntry[]) array.ToArray ();
		}
コード例 #4
0
		public IndexHeader (IndexEntry[] indexEntries)
		{
			signature = 0x44495243;
			version = 2;
			entries = indexEntries.Length;
		}