private void DumpClassAlternateDataStreamInfo(bool isLocal)
      {
         #region Setup

         Console.WriteLine("\n=== TEST {0} ===", isLocal ? Local : Network);

         const int defaultStreamsFile = 1; // The default number of data streams for a file.

         string tempPath;
         int currentNumberofStreams;
         int newNumberofStreams;
         string reporter;
         long fileSize;

         string random = Path.GetRandomFileName();
         string myStream = "ӍƔŞtrëƛɱ-" + random;
         string myStream2 = "myStreamTWO-" + random;

         var arrayContent = new[]
         {
            "(1) The quick brown fox jumps over the lazy dog.",
            "(2) Albert Einstein: \"Science is a wonderful thing if one does not have to earn one's living at it.",
            "(3) " + TextHelloWorld + " " + TextUnicode
         };

         string stringContent = "(1) Computer: [" + LocalHost + "]" + "\tHello there, " + Environment.UserName;

         #endregion // Setup

         #region Create Stream

         tempPath = Path.GetTempPath("Class.AlternateDataStreamInfo()-file-" + Path.GetRandomFileName());
         if (!isLocal) tempPath = Path.LocalToUnc(tempPath);

         Console.WriteLine("\nInput File Path: [{0}]", tempPath);
         Console.WriteLine("\nA file is created and three streams are added.");

         
         // Create file and add 10 characters to it, file is created in ANSI format.
         File.WriteAllText(tempPath, TenNumbers);


         var fi = new FileInfo(tempPath);  // Class FileInfo() instance.

         currentNumberofStreams = File.EnumerateAlternateDataStreams(tempPath).Count();            

         Assert.AreEqual(defaultStreamsFile, currentNumberofStreams, "Total amount of default streams do not match.");
         Assert.AreEqual(currentNumberofStreams, File.EnumerateAlternateDataStreams(tempPath).Count(), "Total amount of File.EnumerateAlternateDataStreams() streams do not match.");
         Assert.AreEqual(currentNumberofStreams, fi.EnumerateAlternateDataStreams().Count(), "Total amount of FileInfo() streams do not match.");


         fileSize = File.GetSize(tempPath);
         Assert.AreEqual(TenNumbers.Length, fileSize);
         
         
         // Create alternate data streams.
         // Because of the colon, you must supply a full path and use PathFormat.FullPath or a NotSupportedException is thrown: path is in an invalid format.

         File.WriteAllLines(tempPath + ":" + myStream, arrayContent, PathFormat.FullPath);
         File.WriteAllText(tempPath + ":" + myStream2, stringContent, PathFormat.FullPath);

         StopWatcher(true);
         newNumberofStreams = File.EnumerateAlternateDataStreams(tempPath).Count();
         reporter = Reporter(true);

         // Enumerate all streams from the file.
         foreach (AlternateDataStreamInfo stream in fi.EnumerateAlternateDataStreams())
         {
            Assert.IsTrue(Dump(stream, -10));

            // The default stream, a file as you know it.
            if (stream.StreamName == "")
               Assert.AreEqual(fileSize, stream.Size);
         }

         Console.WriteLine("\n\n\tCurrent stream Count(): [{0}]    {1}", newNumberofStreams, reporter);

         Assert.AreEqual(newNumberofStreams, File.EnumerateAlternateDataStreams(tempPath).Count(), "Total amount of streams do not match.");

         
         // Show the contents of our streams.
         foreach (string streamName in (new[] {myStream, myStream2 }))
         {
            Console.WriteLine("\n\tStream name: [{0}]", streamName);

            // Because of the colon, you must supply a full path and use PathFormat.FullPath or a NotSupportedException is thrown: path is in an invalid format.
            foreach (var line in File.ReadAllLines(tempPath + ":" + streamName, PathFormat.FullPath))
               Console.WriteLine("\t\t{0}", line);
         }

         
         StopWatcher(true);

         #endregion // Create Stream

         File.Delete(tempPath);
         Assert.IsFalse(File.Exists(tempPath), "Cleanup failed: File should have been removed.");
         Console.WriteLine();
      }
        private void File_EnumerateAlternateDataStreams(bool isNetwork)
        {
            UnitTestConstants.PrintUnitTestHeader(isNetwork);

            var tempPath = Path.GetTempPath("File-EnumerateAlternateDataStreams-" + Path.GetRandomFileName());

            if (isNetwork)
            {
                tempPath = Path.LocalToUnc(tempPath);
            }

            const int defaultStreamsFile = 1; // The default number of data streams for a file.

            Console.WriteLine("\nInput File Path: [{0}]", tempPath);
            Console.WriteLine("\nA file is created and {0} streams are added.", UnitTestConstants.AllStreams.Count());


            try
            {
                // Create file and add 10 characters to it, file is created in ANSI format.
                File.WriteAllText(tempPath, UnitTestConstants.TenNumbers);


                var fi = new FileInfo(tempPath);

                var currentNumberofStreams = fi.EnumerateAlternateDataStreams().Count();

                Assert.AreEqual(defaultStreamsFile, currentNumberofStreams, "Total amount of default streams do not match.");
                Assert.AreEqual(currentNumberofStreams, File.EnumerateAlternateDataStreams(tempPath).Count(), "Total amount of File.EnumerateAlternateDataStreams() streams do not match.");
                Assert.AreEqual(currentNumberofStreams, fi.EnumerateAlternateDataStreams().Count(), "Total amount of FileInfo() streams do not match.");


                var fileSize = File.GetSize(tempPath);
                Assert.AreEqual(UnitTestConstants.TenNumbers.Length, fileSize);


                // Create alternate data streams.
                // Because of the colon, you must supply a full path and use PathFormat.FullPath or PathFormat.LongFullPath,
                // to prevent a: "NotSupportedException: path is in an invalid format." exception.

                File.WriteAllLines(tempPath + Path.StreamSeparator + UnitTestConstants.MyStream, UnitTestConstants.StreamArrayContent, PathFormat.FullPath);
                File.WriteAllText(tempPath + Path.StreamSeparator + UnitTestConstants.MyStream2, UnitTestConstants.StreamStringContent, PathFormat.FullPath);


                var newNumberofStreams = File.EnumerateAlternateDataStreams(tempPath).Count();
                Console.WriteLine("\n\nCurrent stream Count(): [{0}]", newNumberofStreams);


                // Enumerate all streams from the file.
                foreach (var stream in fi.EnumerateAlternateDataStreams())
                {
                    Assert.IsTrue(UnitTestConstants.Dump(stream, -10));

                    // The default stream, a file as we know it.
                    if (Alphaleonis.Utils.IsNullOrWhiteSpace(stream.StreamName))
                    {
                        Assert.AreEqual(fileSize, stream.Size);
                    }
                }


                // Show the contents of our streams.
                Console.WriteLine();
                foreach (var streamName in UnitTestConstants.AllStreams)
                {
                    Console.WriteLine("\n\tStream name: [{0}]", streamName);

                    // Because of the colon, you must supply a full path and use PathFormat.FullPath or PathFormat.LongFullPath,
                    // to prevent a: "NotSupportedException: path is in an invalid format." exception.

                    foreach (var line in File.ReadAllLines(tempPath + Path.StreamSeparator + streamName, PathFormat.FullPath))
                    {
                        Console.WriteLine("\t\t{0}", line);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("\n\tCaught (unexpected) {0}: [{1}]", ex.GetType().FullName, ex.Message.Replace(Environment.NewLine, "  "));
                Assert.IsTrue(false);
            }
            finally
            {
                File.Delete(tempPath);
                Assert.IsFalse(File.Exists(tempPath), "Cleanup failed: File should have been removed.");
            }

            Console.WriteLine();
        }