Esempio n. 1
0
        public BailModel MapToBailModel(Bail bail)
        {
            BailModel retBail = null;

            try
            {
                retBail = _mapper.Map <BailModel>(bail);
            }
            catch
            {
                retBail = null;
            }
            return(retBail);
        }
Esempio n. 2
0
        static void FindNeedles(Bail bail)
        {
            var offset = bail.FileStream.Position;
            var reader = new StreamReader(bail.FileStream, Encoding.UTF8);

            if (bail.ID > 1)
            {
                offset += reader.ReadLine().Length + 1;
            }

            String straw;

            while (offset < bail.LastIndex && (straw = reader.ReadLine()) != null)
            {
                offset += straw.Length + 1;

                if (needles.Contains(straw))
                {
                    Console.WriteLine(straw);
                }
            }
        }
Esempio n. 3
0
 private void SetUpTestClasses()
 {
     Bail.GoIntoRecordMode();
     BailRecorder.ClearRecordings();
 }