Esempio n. 1
0
 public VirtualDriveMemoryOutStream(VirtualDriveImpl virtualDrive, byte[] buffer)
     : base()
 {
     Write(buffer, 0, buffer.Length);
     Seek(0, SeekOrigin.Begin);
     Drive = virtualDrive;
 }
Esempio n. 2
0
        private static void TestVirtualDriveWildcardToRegex()
        {
            string[] texts = new string[]
            {
                @"\\VirtualDrive\Test1.mp3",
                @"\\VirtualDrive\Test2.mp3",
                @"\\VirtualDrive\Test3.bin"
            };

            string wildCards = @"\\VirtualDrive\*.mp3";
            string pattern   = VirtualDriveImpl.WildcardToRegex(wildCards);

            string[] result =
                (from t
                 in texts
                 where System.Text.RegularExpressions.Regex.IsMatch(
                     t, pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
                 select t).ToArray();

            UnitTest.Test(result.Length == 2);
            UnitTest.Test(result[0] == texts[0]);
            UnitTest.Test(result[1] == texts[1]);
        }
Esempio n. 3
0
 public VirtualDriveMemoryOutStream(VirtualDriveImpl virtualDrive)
 {
     Drive = virtualDrive;
 }