Ejemplo n.º 1
0
 /// <exception cref="System.IO.IOException"></exception>
 internal override void SelectObjectRepresentation(PackWriter packer, ObjectToPack
                                                   otp, WindowCursor curs)
 {
     ObjectDirectory.PackList pList = packList.Get();
     for (; ;)
     {
         foreach (PackFile p in pList.packs)
         {
             try
             {
                 LocalObjectRepresentation rep = p.Representation(curs, otp);
                 if (rep != null)
                 {
                     packer.Select(otp, rep);
                 }
             }
             catch (PackMismatchException)
             {
                 // Pack was modified; refresh the entire pack list.
                 //
                 pList = ScanPacks(pList);
                 goto SEARCH_continue;
             }
             catch (IOException)
             {
                 // Assume the pack is corrupted.
                 //
                 RemovePack(p);
             }
         }
         goto SEARCH_break;
         SEARCH_continue :;
     }
     SEARCH_break :;
     foreach (FileObjectDatabase.AlternateHandle h in MyAlternates())
     {
         h.db.SelectObjectRepresentation(packer, otp, curs);
     }
 }
Ejemplo n.º 2
0
		/// <exception cref="System.IO.IOException"></exception>
		internal override void SelectObjectRepresentation(PackWriter packer, ObjectToPack
			 otp, WindowCursor curs)
		{
			ObjectDirectory.PackList pList = packList.Get();
			for (; ; )
			{
				foreach (PackFile p in pList.packs)
				{
					try
					{
						LocalObjectRepresentation rep = p.Representation(curs, otp);
						if (rep != null)
						{
							packer.Select(otp, rep);
						}
					}
					catch (PackMismatchException)
					{
						// Pack was modified; refresh the entire pack list.
						//
						pList = ScanPacks(pList);
						goto SEARCH_continue;
					}
					catch (IOException)
					{
						// Assume the pack is corrupted.
						//
						RemovePack(p);
					}
				}
				goto SEARCH_break;
SEARCH_continue: ;
			}
SEARCH_break: ;
			foreach (FileObjectDatabase.AlternateHandle h in MyAlternates())
			{
				h.db.SelectObjectRepresentation(packer, otp, curs);
			}
		}