Beispiel #1
0
 public override Block this[Int32 cylinder, Int32 head, Int32 sector]
 {
     get
     {
         Track t = this[cylinder, head];
         if ((t.Sector(sector) == null) && (t[sector - mMinSect] == null))
         {
             t[sector - mMinSect] = new Sector(sector, mBlockSize);
         }
         return(t.Sector(sector));
     }
 }
Beispiel #2
0
 public override Block this[Int32 lbn]
 {
     get
     {
         for (Int32 c = 0; c < mCyls; c++)
         {
             for (Int32 h = 0; h < mHeads; h++)
             {
                 Track t = mData[c, h];
                 if (lbn < t.Length)
                 {
                     return(t.Sector(lbn + mMinSect));
                 }
                 lbn -= t.Length;
             }
         }
         return(null);
     }
 }