Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Create a new proccess
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            //Path to the executable to run
            proc.StartInfo.FileName = "PstPassword.exe";
            //Command line arguments, paths to output file and .pst
            proc.StartInfo.Arguments = "/stext \"passwords.txt\" /pstfiles \"putyourfilenamehere.pst\"";
            proc.Start();
            proc.WaitForExit();

            System.IO.StreamReader reader = new System.IO.StreamReader("passwords.txt");
            string pw1, pw2, pw3;
            //buffer to dump unwanted character in for reading purposes.
            char[] c = new char[20];

            //Read past the first 6 lines
            reader.ReadLine();reader.ReadLine();reader.ReadLine();reader.ReadLine();reader.ReadLine();

            //read past Password 1      :
            reader.Read(c, 0, 20);
            //read in password
            pw1 = reader.ReadLine();
            //read past Password 2      :
            reader.Read(c, 0, 20);
            //read in password
            pw2 = reader.ReadLine();
            //read past Password 3      :
            reader.Read(c, 0, 20);
            //read in password
            pw3 = reader.ReadLine();

            Console.WriteLine(pw1 + ", " + pw2 + ", " + pw3);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Builds network.
 /// </summary>
 /// <param name="path">
 /// Path to file.
 /// </param>
 public RobotsNetwork(string path)
 {
     System.IO.StreamReader file = new System.IO.StreamReader(path);
     this.g = new Graph(file.Read() - 48);
     if (this.g.NumberOfVertex < 1)
         throw new IncorrectInputException();
     this.hereRobot = new bool[this.g.NumberOfVertex];
     file.ReadLine();
     file.ReadLine();
     while (true)
     {
         string[] temp = file.ReadLine().Split(' ');
         if (temp[0][0] == 'R')
             break;
         if (((temp[0][0] - 48) < 0) || ((temp[1][0] - 48) < 0) || ((temp[1][0] - 48) > (this.g.NumberOfVertex - 1)) || ((temp[0][0] - 48) > (this.g.NumberOfVertex - 1)))
             throw new IncorrectInputException();
         g.AddEdge(temp[0][0] - 48, temp[1][0] - 48);
     }
     string[] listRob = file.ReadLine().Split(' ');
     for (int i = 0; i < listRob.Length; ++i)
     {
         if (((listRob[i][0] - 48) < 0 ) || ((listRob[i][0] - 48) > this.g.NumberOfVertex - 1))
             throw new IncorrectInputException();
         this.hereRobot[listRob[i][0] - 48] = true;
     }
     this.classA = new bool[this.g.NumberOfVertex];
     this.classB = new bool[this.g.NumberOfVertex];
     this.visited = new bool[this.g.NumberOfVertex];
     this.Traverse(0, true);
 }
Exemplo n.º 3
0
        public void UploadFileTest()
        {
            var req = (HttpWebRequest)HttpWebRequest.Create("http://alex/asc/products/files/Services/WCFService/Service.svc/folders/files?id=1");

            req.Method = "POST";
            req.ContentType = "application/octet-stream";
            var reqStream = req.GetRequestStream();

            var fileToSend = System.IO.File.ReadAllBytes(@"c:\1.odt");

            reqStream.Write(fileToSend, 0, fileToSend.Length);
            reqStream.Close();

            var resp = (HttpWebResponse)req.GetResponse();

            var sr = new System.IO.StreamReader(resp.GetResponseStream(), Encoding.Default);
            var count = 0;
            var ReadBuf = new char[1024];
            do
            {
                count = sr.Read(ReadBuf, 0, 1024);
                if (0 != count)
                {
                    Console.WriteLine(new string(ReadBuf));
                }

            } while (count > 0);
            Console.WriteLine("Client: Receive Response HTTP/{0} {1} {2}", resp.ProtocolVersion, (int)resp.StatusCode, resp.StatusDescription);
        }
Exemplo n.º 4
0
 /// <summary>
 /// 将一个由Base64编码产生的文件解码并存储到一个文件
 /// </summary>
 /// <param name="strBase64FileName">以Base64编码格式存储的文件</param>
 /// <param name="strSaveFileName">要输出的文件路径,如果文件存在,将被重写</param>
 /// <returns>如果操作成功,则返回True</returns>
 public static bool DecodingFileFromFile(string strBase64FileName, string strSaveFileName)
 {
     System.IO.StreamReader fs = new System.IO.StreamReader(strBase64FileName, System.Text.Encoding.ASCII);
     char[] base64CharArray = new char[fs.BaseStream.Length];
     fs.Read(base64CharArray, 0, (int)fs.BaseStream.Length);
     string Base64String = new string(base64CharArray);
     fs.Close();
     return DecodingFileFromString(Base64String, strSaveFileName);
 }
Exemplo n.º 5
0
        public static string HTTP_POST(string Url, string Data)
        {
            string Out = String.Empty;
            System.Net.WebRequest req = System.Net.WebRequest.Create(Url);
            try
            {
                req.Method = "POST";
                req.Timeout = 100000;
                req.ContentType = "application/x-www-form-urlencoded";
                byte[] sentData = Encoding.UTF8.GetBytes(Data);
                req.ContentLength = sentData.Length;
                using (System.IO.Stream sendStream = req.GetRequestStream())
                {
                    sendStream.Write(sentData, 0, sentData.Length);
                    sendStream.Close();
                }
                System.Net.WebResponse res = req.GetResponse();
                System.IO.Stream ReceiveStream = res.GetResponseStream();
                using (System.IO.StreamReader sr = new System.IO.StreamReader(ReceiveStream, Encoding.UTF8))
                {
                    Char[] read = new Char[256];
                    int count = sr.Read(read, 0, 256);

                    while (count > 0)
                    {
                        String str = new String(read, 0, count);
                        Out += str;
                        count = sr.Read(read, 0, 256);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return Out;
        }
Exemplo n.º 6
0
        /// <summary> Constructor.</summary>
        /// <param name="filePath">- the file path of the plug-in configuration file
        /// </param>
        /// <throws>  JSONException </throws>
        /// <throws>  IOException </throws>
        public JSONReader(System.String filePath)
        {
            System.IO.StreamReader reader = new System.IO.StreamReader(filePath, System.Text.Encoding.UTF8);
            System.Text.StringBuilder buf = new System.Text.StringBuilder();
            char[] cbuf = new char[4096];
            int idx = 0;

            while ((idx = reader.Read((System.Char[]) cbuf, 0, cbuf.Length)) > 1)
            {
                buf.Append(cbuf, 0, idx);
            }
            json = new JSONObject(buf.ToString());

            reader.Close();
        }
Exemplo n.º 7
0
        public static new void Main(System.String[] args)
        {
            if (args.Length != 1)
            {
                System.Console.Out.WriteLine("Usage: DefaultXMLParser pipe_encoded_file");
                System.Environment.Exit(1);
            }

            //read and parse message from file
            try
            {
                System.IO.FileInfo messageFile = new System.IO.FileInfo(args[0]);
                long fileLength = SupportClass.FileLength(messageFile);
                //UPGRADE_TODO: Constructor 'java.io.FileReader.FileReader' was converted to 'System.IO.StreamReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
                System.IO.StreamReader r = new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default);
                char[] cbuf = new char[(int) fileLength];
                //UPGRADE_TODO: Method 'java.io.Reader.read' was converted to 'System.IO.StreamReader.Read' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioReaderread_char[]'"
                System.Console.Out.WriteLine("Reading message file ... " + r.Read((System.Char[]) cbuf, 0, cbuf.Length) + " of " + fileLength + " chars");
                r.Close();
                System.String messString = System.Convert.ToString(cbuf);

                Parser inParser = null;
                Parser outParser = null;
                PipeParser pp = new PipeParser();
                ca.uhn.hl7v2.parser.XMLParser xp = new DefaultXMLParser();
                System.Console.Out.WriteLine("Encoding: " + pp.getEncoding(messString));
                if (pp.getEncoding(messString) != null)
                {
                    inParser = pp;
                    outParser = xp;
                }
                else if (xp.getEncoding(messString) != null)
                {
                    inParser = xp;
                    outParser = pp;
                }

                Message mess = inParser.parse(messString);
                System.Console.Out.WriteLine("Got message of type " + mess.GetType().FullName);

                System.String otherEncoding = outParser.encode(mess);
                System.Console.Out.WriteLine(otherEncoding);
            }
            catch (System.Exception e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
Exemplo n.º 8
0
 //[InlineData(100)]
 public static void myPerfTest(int iterations)
 {
     foreach (var iteration in Benchmark.Iterations)
     {
         using (iteration.StartMeasurement())
         {
             for (int i = 0; i < iterations; i++)
             {
                 using (System.IO.StreamReader a = new System.IO.StreamReader(@"D:\PerfUnitTest\log2.txt"))
                 {
                     a.Read();
                 }
             }
         }
     }
 }
Exemplo n.º 9
0
        public static new void Main(System.String[] args)
        {
            if (args.Length != 1)
            {
                System.Console.Out.WriteLine("Usage: DefaultXMLParser pipe_encoded_file");
                System.Environment.Exit(1);
            }

            //read and parse message from file
            try
            {
                System.IO.FileInfo messageFile = new System.IO.FileInfo(args[0]);
                long fileLength = SupportClass.FileLength(messageFile);
                System.IO.StreamReader r = new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default);
                char[] cbuf = new char[(int)fileLength];
                System.Console.Out.WriteLine("Reading message file ... " + r.Read((System.Char[])cbuf, 0, cbuf.Length) + " of " + fileLength + " chars");
                r.Close();
                System.String messString = System.Convert.ToString(cbuf);

                ParserBase inParser = null;
                ParserBase outParser = null;
                PipeParser pp = new PipeParser();
                NHapi.Base.Parser.XMLParser xp = new DefaultXMLParser();
                System.Console.Out.WriteLine("Encoding: " + pp.GetEncoding(messString));
                if (pp.GetEncoding(messString) != null)
                {
                    inParser = pp;
                    outParser = xp;
                }
                else if (xp.GetEncoding(messString) != null)
                {
                    inParser = xp;
                    outParser = pp;
                }

                IMessage mess = inParser.Parse(messString);
                System.Console.Out.WriteLine("Got message of type " + mess.GetType().FullName);

                System.String otherEncoding = outParser.Encode(mess);
                System.Console.Out.WriteLine(otherEncoding);
            }
            catch (System.Exception e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
Exemplo n.º 10
0
		/// <summary> Retrieves profile from persistent storage (by ID).  Returns null
		/// if the profile isn't found.
		/// </summary>
		public virtual System.String getProfile(System.String ID)
		{
			System.String profile = null;
			
			System.IO.FileInfo source = new System.IO.FileInfo(getFileName(ID));
			if (System.IO.File.Exists(source.FullName))
			{
				System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(source.FullName, System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(source.FullName, System.Text.Encoding.Default).CurrentEncoding);
				char[] buf = new char[(int) SupportClass.FileLength(source)];
				int check = in_Renamed.Read(buf, 0, buf.Length);
				in_Renamed.Close();
				if (check != buf.Length)
					throw new System.IO.IOException("Only read " + check + " of " + buf.Length + " bytes of file " + source.FullName);
				profile = new System.String(buf);
			}
			return profile;
		}
		/// <summary> Reads HL7 messages from an InputStream and outputs an array of HL7 message strings
		/// 
		/// </summary>
		/// <version>  $Revision: 1.1 $ updated on $Date: 2006/02/01 18:17:57 $ by $Author: nacharya $
		/// </version>
		public static System.String[] read(System.IO.Stream theMsgInputStream)
		{
			Parser hapiParser = new PipeParser();
			
			System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new CommentFilterReader(new System.IO.StreamReader(theMsgInputStream, System.Text.Encoding.Default)).BaseStream, new CommentFilterReader(new System.IO.StreamReader(theMsgInputStream, System.Text.Encoding.Default)).CurrentEncoding);
			
			System.Text.StringBuilder rawMsgBuffer = new System.Text.StringBuilder();
			
			int c = 0;
			while ((c = in_Renamed.Read()) >= 0)
			{
				rawMsgBuffer.Append((char) c);
			}
			
			System.String[] messages = getHL7Messages(rawMsgBuffer.ToString());
			
			return messages;
		}
Exemplo n.º 12
0
		public static System.String readFile(System.String filename)
		{
			System.String readString = "";
			System.String tmp;
			
			System.IO.FileInfo f = new System.IO.FileInfo(filename);
			char[] readIn = new char[(int) (SupportClass.FileLength(f))];
			
			//UPGRADE_TODO: Expected value of parameters of constructor 'java.io.BufferedReader.BufferedReader' are different in the equivalent in .NET. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1092"'
			System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(f.FullName).BaseStream, System.Text.Encoding.UTF7);
			
			//UPGRADE_TODO: Method 'java.io.Reader.read' was converted to 'System.IO.StreamReader.Read' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaioReaderread_char[]"'
			in_Renamed.Read((System.Char[]) readIn, 0, readIn.Length);
			readString = new System.String(readIn);
			
			in_Renamed.Close();
			
			return readString;
		}
Exemplo n.º 13
0
 public static string getRandom(string fileName)
 {
     System.IO.FileStream stream=System.IO.File.OpenRead(fileName);
     System.IO.StreamReader reader=new System.IO.StreamReader(stream);
     Random rand = new Random(Environment.TickCount);
     long pos=(long)(rand.NextDouble()*(stream.Length - bufSize));
     stream.Seek(pos, System.IO.SeekOrigin.Begin);
     char[] buf=new char[3];
     reader.Read(buf, 0, 3);
     long i = 0;
     while ((buf[i] >> 14)==10 &&  ++i < buf.Length) ;
     stream.Seek(pos + i, System.IO.SeekOrigin.Begin);
     string str = "";
     for (int k = 0; k < 5; k++)
     {
         str += reader.ReadLine()+"\n";
     }
     return str;
 }
Exemplo n.º 14
0
		/// <summary>Retrieves profile from persistent storage (by ID).</summary>
		public virtual System.String getProfile(System.String ID)
		{
			System.String profile = null;
			try
			{
				System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(System.Net.WebRequest.Create(getURL(ID)).GetResponse().GetResponseStream(), System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(System.Net.WebRequest.Create(getURL(ID)).GetResponse().GetResponseStream(), System.Text.Encoding.Default).CurrentEncoding);
				System.Text.StringBuilder buf = new System.Text.StringBuilder();
				int c = - 1;
				while ((c = in_Renamed.Read()) != - 1)
				{
					buf.Append((char) c);
				}
				in_Renamed.Close();
				profile = buf.ToString();
			}
			catch (System.UriFormatException e)
			{
				throw new System.IO.IOException("MalformedURLException: " + e.Message);
			}
			return profile;
		}
Exemplo n.º 15
0
        public static System.String readFile(System.String filename)
        {
            System.String readString = "";
            //System.String tmp;

            System.IO.FileInfo f = new System.IO.FileInfo(filename);
            char[] readIn = new char[(int) ((long) SupportClass.FileLength(f))];

            //UPGRADE_TODO: The differences in the expected value  of parameters for constructor 'java.io.BufferedReader.BufferedReader'  may cause compilation errors.  "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
            //UPGRADE_WARNING: At least one expression was used more than once in the target code. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1181'"
            //UPGRADE_TODO: Constructor 'java.io.FileReader.FileReader' was converted to 'System.IO.StreamReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
            System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).CurrentEncoding);

            //UPGRADE_TODO: Method 'java.io.Reader.read' was converted to 'System.IO.StreamReader.Read' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioReaderread_char[]'"
            in_Renamed.Read((System.Char[]) readIn, 0, readIn.Length);
            readString = new System.String(readIn);

            in_Renamed.Close();

            return readString;
        }
		public virtual int process(System.IO.Stream theMsgInputStream)
		{
			Parser hapiParser = new PipeParser();
			
			System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new CommentFilterReader(new System.IO.StreamReader(theMsgInputStream, System.Text.Encoding.Default)).BaseStream, new CommentFilterReader(new System.IO.StreamReader(theMsgInputStream, System.Text.Encoding.Default)).CurrentEncoding);
			
			System.Text.StringBuilder rawMsgBuffer = new System.Text.StringBuilder();
			
			//String line = in.readLine();
			int c = 0;
			while ((c = in_Renamed.Read()) >= 0)
			{
				rawMsgBuffer.Append((char) c);
			}
			
			System.String[] messages = getHL7Messages(rawMsgBuffer.ToString());
			int retVal = 0;
			
			//start time			
            long startTime = DateTime.UtcNow.Ticks;
			
			
			for (int i = 0; i < messages.Length; i++)
			{
				sendMessage(messages[i]);
				readAck();
				retVal++;
			}
			
			//end time
            long endTime = DateTime.UtcNow.Ticks;
			
			//elapsed time
			long elapsedTime = (endTime - startTime) / 1000;

			return retVal;
		}
Exemplo n.º 17
0
        /// <param name="resourceName">A path to a resource file provided in the current environment
        ///
        /// </param>
        /// <returns> a dictionary of key/value locale pairs from a file in the resource directory
        /// </returns>
        private OrderedMap loadLocaleResource(System.String resourceName)
        {
            //UPGRADE_ISSUE: Method 'java.lang.Class.getResourceAsStream' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassgetResourceAsStream_javalangString'"
            //UPGRADE_ISSUE: Class 'java.lang.System' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangSystem'"
            System.IO.Stream is_Renamed = typeof(System_Renamed).getResourceAsStream(resourceName);
            // TODO: This might very well fail. Best way to handle?
            OrderedMap locale = new OrderedMap();
            int        chunk  = 100;

            System.IO.StreamReader isr;
            try
            {
                //UPGRADE_TODO: Constructor 'java.io.InputStreamReader.InputStreamReader' was converted to 'System.IO.StreamReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioInputStreamReaderInputStreamReader_javaioInputStream_javalangString'"
                isr = new System.IO.StreamReader(is_Renamed, System.Text.Encoding.GetEncoding("UTF-8"));
            }
            catch (System.Exception e)
            {
                throw new System.SystemException("Failed to load locale resource " + resourceName + ". Is it in the jar?");
            }
            bool done = false;

            char[] cbuf    = new char[chunk];
            int    offset  = 0;
            int    curline = 0;

            try
            {
                System.String line = "";
                while (!done)
                {
                    //UPGRADE_TODO: Method 'java.io.InputStreamReader.read' was converted to 'System.IO.StreamReader.Read' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioInputStreamReaderread_char[]_int_int'"
                    int read = isr.Read(cbuf, offset, chunk - offset);
                    if (read == -1)
                    {
                        done = true;
                        if ((System.Object)line != (System.Object) "")
                        {
                            parseAndAdd(locale, line, curline);
                        }
                        break;
                    }
                    System.String stringchunk = new System.String(cbuf, offset, read);

                    int index = 0;

                    while (index != -1)
                    {
                        //UPGRADE_WARNING: Method 'java.lang.String.indexOf' was converted to 'System.String.IndexOf' which may throw an exception. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1101'"
                        int nindex = stringchunk.IndexOf('\n', index);
                        //UTF-8 often doesn't encode with newline, but with CR, so if we
                        //didn't find one, we'll try that
                        if (nindex == -1)
                        {
                            //UPGRADE_WARNING: Method 'java.lang.String.indexOf' was converted to 'System.String.IndexOf' which may throw an exception. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1101'"
                            nindex = stringchunk.IndexOf('\r', index);
                        }
                        if (nindex == -1)
                        {
                            line += stringchunk.Substring(index);
                            break;
                        }
                        else
                        {
                            line += stringchunk.Substring(index, (nindex) - (index));
                            //Newline. process our string and start the next one.
                            curline++;
                            parseAndAdd(locale, line, curline);
                            line = "";
                        }
                        index = nindex + 1;
                    }
                }
            }
            catch (System.IO.IOException e)
            {
                // TODO Auto-generated catch block
                if (e is org.javarosa.core.io.StreamsUtil.DirectionalIOException)
                {
                    ((org.javarosa.core.io.StreamsUtil.DirectionalIOException)e).printStackTrace();
                }
                else
                {
                    SupportClass.WriteStackTrace(e, Console.Error);
                }
            }
            finally
            {
                try
                {
                    is_Renamed.Close();
                }
                catch (System.IO.IOException e)
                {
                    //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
                    System.Console.Out.WriteLine("Input Stream for resource file " + resourceURI + " failed to close. This will eat up your memory! Fix Problem! [" + e.Message + "]");
                    if (e is org.javarosa.core.io.StreamsUtil.DirectionalIOException)
                    {
                        ((org.javarosa.core.io.StreamsUtil.DirectionalIOException)e).printStackTrace();
                    }
                    else
                    {
                        SupportClass.WriteStackTrace(e, Console.Error);
                    }
                }
            }
            return(locale);
        }
Exemplo n.º 18
0
        public void LoadObjList(string filePath)
        {
            Objects.Clear();
            System.IO.StreamReader reader = new System.IO.StreamReader(filePath);
            string Name          = "";
            string Type          = "";
            string SubType       = "";
            string ImagePath     = "";
            string SpriteImgXpos = "";
            string SpriteImgYpos = "";
            string SpriteWidth   = "";
            string SpriteHeight  = "";
            string pivotX        = "";
            string pivotY        = "";
            string flip          = "";
            char   buf           = '>';
            int    T             = 0;
            int    ST            = 0;
            int    Xpos          = 0;
            int    Ypos          = 0;
            int    Width         = 0;
            int    Height        = 0;
            int    PivotX        = 0;
            int    PivotY        = 0;
            int    Flip          = 0;


            while (!reader.EndOfStream)
            {
                Name          = "";
                Type          = "";
                SubType       = "";
                ImagePath     = "";
                SpriteImgXpos = "";
                SpriteImgYpos = "";
                SpriteWidth   = "";
                SpriteHeight  = "";
                pivotX        = "";
                pivotY        = "";
                flip          = "";
                buf           = '>';
                T             = 0;
                ST            = 0;
                Xpos          = 0;
                Ypos          = 0;
                Width         = 0;
                Height        = 0;

                while (buf != ',') //Load The name
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    Name = Name + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Type
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    Type = Type + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object SubType
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SubType = SubType + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's SpriteSheet
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    ImagePath = ImagePath + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's Spritesheet Xpos
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteImgXpos = SpriteImgXpos + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's Spritesheet Ypos
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteImgYpos = SpriteImgYpos + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Sprite's Width
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteWidth = SpriteWidth + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Sprite's Height
                {
                    buf = (char)reader.Read();
                    if (buf == ';' || buf == ',')
                    {
                        break;
                    }                                        //detect if the line is over
                    SpriteHeight = SpriteHeight + buf;
                }
                bool Legacy = true;
                if (buf != ';')
                {
                    buf = '>'; Legacy = false;
                }                                           //That char shouldn't show up so change the buffer to that!

                while (buf != ',' && buf != ';' && !Legacy) //Load The Object Sprite's Height
                {
                    buf = (char)reader.Read();
                    if (buf == ';' || buf == ',')
                    {
                        break;
                    }                                        //detect if the line is over
                    pivotX = pivotX + buf;
                }
                if (buf != ';')
                {
                    buf = '>';
                }                                           //That char shouldn't show up so change the buffer to that!

                while (buf != ',' && buf != ';' && !Legacy) //Load The Object Sprite's Height
                {
                    buf = (char)reader.Read();
                    if (buf == ';' || buf == ',')
                    {
                        break;
                    }                                        //detect if the line is over
                    pivotY = pivotY + buf;
                }
                if (buf != ';')
                {
                    buf = '>';
                }                                           //That char shouldn't show up so change the buffer to that!

                while (buf != ',' && buf != ';' && !Legacy) //Load The Object Sprite's Height
                {
                    buf = (char)reader.Read();
                    if (buf == ';')
                    {
                        break;
                    }                          //detect if the line is over
                    flip = flip + buf;
                }
                buf = '>'; //That char shouldn't show up so change the buffer to that!

                T      = Int32.Parse(Type);
                ST     = Int32.Parse(SubType);
                Xpos   = Int32.Parse(SpriteImgXpos);
                Ypos   = Int32.Parse(SpriteImgYpos);
                Width  = Int32.Parse(SpriteWidth);
                Height = Int32.Parse(SpriteHeight);
                if (!Legacy)
                {
                    PivotX = Int32.Parse(pivotX);
                    PivotY = Int32.Parse(pivotY);
                    Flip   = Int32.Parse(flip);
                }
                MapObject MapObj;
                if (Legacy)
                {
                    MapObj = new MapObject(Name, T, ST, ImagePath, Xpos, Ypos, Width, Height);
                    Objects.Add(new Point(MapObj.ID, MapObj.SubType), MapObj);
                }
                else if (!Legacy)
                {
                    MapObj = new MapObject(Name, T, ST, ImagePath, Xpos, Ypos, Width, Height, PivotX, PivotY, Flip);
                    Objects.Add(new Point(MapObj.ID, MapObj.SubType), MapObj);
                }

                reader.ReadLine();
            }
            reader.Close();
        }
Exemplo n.º 19
0
        public int GetNumOfCharsInFile(string filePath)
        {
            int count = 0;

               using (System.IO.StreamReader sr = new System.IO.StreamReader(filePath))
               {
               while (sr.Read() != -1)
                   count++;
               }

               return count;
        }
Exemplo n.º 20
0
        public static string convertEncoding(string src, System.Text.Encoding encode)
        {
            if (src == null)
            {
                return null;
            }
            if (encode == null)
            {
                return src;
            }
            System.IO.MemoryStream ms = null;
            System.IO.StreamReader rdr = null;
            System.Text.StringBuilder sb = null;
            System.IO.StringWriter write = null;

            try
            {
                //
                byte[] array = encode.GetBytes(src);
                ms = new System.IO.MemoryStream(array);

                rdr = new System.IO.StreamReader(ms);
                sb = new System.Text.StringBuilder();
                write = new System.IO.StringWriter(sb);
                Char[] readBuff = new Char[1024];//
                int count = 0;
                while ((count = rdr.Read(readBuff, 0, readBuff.Length)) > 0)
                {
                    write.Write(readBuff, 0, count);
                }
                return sb.ToString();
            }
            catch (Exception ex)
            {
                log.Error("convertEncoding error.", ex);
                return null;
            }
            finally
            {
                if (ms != null)
                {
                    try
                    {
                        ms.Close();
                    }
                    catch (Exception e)
                    {
                        log.Warn("ignore ex:" + e.Message);
                    }
                }
                if (rdr != null)
                {
                    try
                    {
                        rdr.Close();
                    }
                    catch (Exception e)
                    {
                        log.Warn("ignore ex::" + e.Message);
                    }
                }
                if (write != null)
                {
                    try
                    {
                        write.Close();
                    }
                    catch (Exception e)
                    {
                        log.Warn("ignore ex::" + e.Message);
                    }
                }
            }
        }
Exemplo n.º 21
0
		/// <summary>this method generates conformance</summary>
		/// <param name="dm">the DeploymentManager
		/// </param>
		/// <param name="cp">the CommandParser which parses the command line argument of ConfGen 
		/// </param>
		public virtual void  generateConf(DeploymentManager dm, CommandParser cp)
		{
			try
			{
				System.IO.FileInfo f = new System.IO.FileInfo(cp.Source);
				System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).CurrentEncoding);
				char[] cbuf = new char[(int) SupportClass.FileLength(f)];
				in_Renamed.Read(cbuf, 0, (int) SupportClass.FileLength(f));
				dm.generate(System.Convert.ToString(cbuf));
			}
			catch (System.IO.FileNotFoundException e)
			{
				System.Console.Out.WriteLine("Filenotfoundexception: " + e.ToString());
			}
			catch (System.IO.IOException e)
			{
				System.Console.Out.WriteLine("IOexception:\n" + e.ToString() + "\n");
			}
			catch (ConformanceError e)
			{
				System.Console.Out.WriteLine("ConformanceError:\n" + e.ToString() + "\n");
			}
			catch (ConformanceException e)
			{
				System.Console.Out.WriteLine("ConformanceException:\n" + e.ToString() + "\n");
			}
		}
Exemplo n.º 22
0
        public string PostHtmlPage(string url, string rparams)
        {
            m_URL = url;
            string result = "";

            System.IO.StreamWriter Writer     = null;
            System.IO.StreamReader readStream = null;

            m_State = HttpStates.sending;
            FireStateChanged(m_State);

            System.Net.HttpWebRequest Request;

            try
            {
                Request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
            }
            catch (Exception ex)
            {
                throw ex;
                //modGlobal.ErrMsgBox(ex.Message);
                //return "";
            }

            System.Text.Encoding Enc = System.Text.Encoding.GetEncoding(1252);

            SetProxy(ref Request);
            Request.KeepAlive       = false;
            Request.ProtocolVersion = System.Net.HttpVersion.Version10;
            Request.Method          = "POST";
            Request.ContentType     = "application/x-www-form-urlencoded";
            Request.ContentLength   = rparams.Length;

            Request.AllowAutoRedirect            = m_AllowRedirect;
            Request.MaximumAutomaticRedirections = 10;
            Request.Timeout   = this.m_TimeOut * 1000;
            Request.UserAgent = this.m_UserAgent;

            try
            {
                Writer = new System.IO.StreamWriter(Request.GetRequestStream(), Enc);
                Writer.Write(rparams);
                Writer.Flush();
            }
            catch (Exception ex)
            {
                throw ex;
                //modGlobal.ErrMsgBox(ex.Message);
                //return "";
            }
            finally
            {
                try
                {
                    if (Writer != null)
                    {
                        Writer.Close();
                        Writer = null;
                    }
                }
                catch (Exception)
                {
                }
            }

            try
            {
                System.Net.HttpWebResponse Response = (System.Net.HttpWebResponse)Request.GetResponse();
                m_nBytesSent += Request.ContentLength;

                m_ReplyCode     = (int)Response.StatusCode;
                m_LastModified  = Response.LastModified;
                m_ContentLength = Response.ContentLength;
                m_ContentType   = Response.ContentType;

                System.IO.Stream responseStream = Response.GetResponseStream();
                readStream = new System.IO.StreamReader(responseStream, Enc);

                // ----- Read Results ...
                m_State = HttpStates.fetching;
                FireStateChanged(m_State);

                System.Text.StringBuilder SB = new System.Text.StringBuilder();

                char[] read = new char[257];
                // Reads 256 characters at a time.
                int count = readStream.Read(read, 0, 256);
                m_nBytesReceived += count;

                //Console.WriteLine("HTML..." + ControlChars.Lf + ControlChars.Cr)
                while (count > 0 && !bCancel)
                {
                    // Dumps the 256 characters to a string and displays the string to the console.
                    string str = new string(read, 0, count);

                    SB.Append(str);
                    //Console.Write(str)
                    count             = readStream.Read(read, 0, 256);
                    m_nBytesReceived += count;
                }

                result = SB.ToString();
                // ----- /Read Results ...
            }
            catch (Exception ex)
            {
                throw ex;
                //modGlobal.ErrMsgBox(ex.Message);
                //result = "";
            }
            finally
            {
                try
                {
                    if (readStream != null)
                    {
                        readStream.Close();
                        readStream = null;
                    }
                }
                catch (Exception)
                {
                }

                m_State = HttpStates.idle;
                FireStateChanged(m_State);
            }

            return(result);
        }
Exemplo n.º 23
0
        private static string ParseStringFromEncoded(System.IO.StreamReader sr)
        {
            StringBuilder sb = new StringBuilder();
            int           i;

            if (sr.Peek() != '"')
            {
                throw new Exception("Parsing Object failed: Expected '\"', got '" + (char)sr.Peek() + '\'');
            }
            sr.Read();
            bool escape   = false;
            char lastChar = '\0';

            while ((i = sr.Peek()) >= 0)
            {
                char c = (char)i;
                if (escape)
                {
                    switch (c)
                    {
                    default:
                        throw new Exception("Parsing Object failed: Invalid escape: '" + c + '\'');

                    case '"':
                        sb.Append('"');
                        break;

                    case '\'':
                        sb.Append('\'');
                        break;

                    case '\\':
                        sb.Append('\\');
                        break;

                    case '/':
                        sb.Append('/');
                        break;

                    case 'b':
                        sb.Append("\b");
                        break;

                    case 'f':
                        sb.Append("\f");
                        break;

                    case 'n':
                        sb.Append("\n");
                        break;

                    case 'r':
                        sb.Append("\r");
                        break;

                    case 't':
                        sb.Append("\t");
                        break;

                    case 'u':
                        string encoded = "";
                        sr.Read();
                        encoded += (char)sr.Read();
                        encoded += (char)sr.Read();
                        encoded += (char)sr.Read();
                        encoded += (char)sr.Peek();
                        sb.Append((char)int.Parse(encoded, System.Globalization.NumberStyles.HexNumber));
                        break;
                    }
                    escape = false;
                }
                else
                {
                    if (c == '\\')
                    {
                        escape = true;
                    }
                    else if (c == '"')
                    {
                        c        = (char)sr.Read();
                        lastChar = c;
                        break;
                    }
                    else
                    {
                        sb.Append(c);
                    }
                }
                c        = (char)sr.Read();
                lastChar = c;
            }
            if (lastChar != '"')
            {
                throw new Exception("Parsing Object failed: Expected '\"', got '" + lastChar + '\'');
            }
            return(sb.ToString());
        }
Exemplo n.º 24
0
 public int Read()
 {
     return(_sr.Read());
 }
Exemplo n.º 25
0
        public static void  Main(System.String[] args)
        {
            if (args.Length < 2)
            {
                ExitWithUsage();
            }

            System.Type     stemClass = System.Type.GetType("SF.Snowball.Ext." + args[0] + "Stemmer");
            SnowballProgram stemmer   = (SnowballProgram)System.Activator.CreateInstance(stemClass);

            System.Reflection.MethodInfo stemMethod = stemClass.GetMethod("Stem", new Type[0]);

            System.IO.StreamReader reader;
            reader = new System.IO.StreamReader(new System.IO.FileStream(args[1], System.IO.FileMode.Open, System.IO.FileAccess.Read), System.Text.Encoding.Default);
            reader = new System.IO.StreamReader(reader.BaseStream, reader.CurrentEncoding);

            System.Text.StringBuilder input = new System.Text.StringBuilder();

            System.IO.Stream outstream = System.Console.OpenStandardOutput();

            if (args.Length > 2 && args[2].Equals("-o"))
            {
                outstream = new System.IO.FileStream(args[3], System.IO.FileMode.Create);
            }
            else if (args.Length > 2)
            {
                ExitWithUsage();
            }

            System.IO.StreamWriter output = new System.IO.StreamWriter(outstream, System.Text.Encoding.Default);
            output = new System.IO.StreamWriter(output.BaseStream, output.Encoding);

            int repeat = 1;

            if (args.Length > 4)
            {
                repeat = System.Int32.Parse(args[4]);
            }

            System.Object[] emptyArgs = new System.Object[0];
            int             character;

            while ((character = reader.Read()) != -1)
            {
                char ch = (char)character;
                if (System.Char.IsWhiteSpace(ch))
                {
                    if (input.Length > 0)
                    {
                        stemmer.SetCurrent(input.ToString());
                        for (int i = repeat; i != 0; i--)
                        {
                            stemMethod.Invoke(stemmer, (System.Object[])emptyArgs);
                        }
                        output.Write(stemmer.GetCurrent());
                        output.Write('\n');
                        input.Remove(0, input.Length - 0);
                    }
                }
                else
                {
                    input.Append(System.Char.ToLower(ch));
                }
            }
            output.Flush();
        }
Exemplo n.º 26
0
 public int Read()
 {
     return _sr.Read();
 }
Exemplo n.º 27
0
        protected internal virtual void  FillBuff()
        {
            if (maxNextCharInd == available)
            {
                if (available == bufsize)
                {
                    if (tokenBegin > 2048)
                    {
                        bufpos    = maxNextCharInd = 0;
                        available = tokenBegin;
                    }
                    else if (tokenBegin < 0)
                    {
                        bufpos = maxNextCharInd = 0;
                    }
                    else
                    {
                        ExpandBuff(false);
                    }
                }
                else if (available > tokenBegin)
                {
                    available = bufsize;
                }
                else if ((tokenBegin - available) < 2048)
                {
                    ExpandBuff(true);
                }
                else
                {
                    available = tokenBegin;
                }
            }

            int i;

            try
            {
                try
                {
                    if ((i = inputStream.Read(buffer, maxNextCharInd, available - maxNextCharInd)) == 0)
                    {
                        inputStream.Close();
                        throw new System.IO.IOException();
                    }
                    else
                    {
                        maxNextCharInd += i;
                    }
                    return;
                }
                catch (ObjectDisposedException ode)
                {
                    throw new System.IO.IOException("cannot read from a closed Reader", ode);
                }
            }
            catch (System.IO.IOException e)
            {
                --bufpos;
                Backup(0);
                if (tokenBegin == -1)
                {
                    tokenBegin = bufpos;
                }
                throw e;
            }
        }
Exemplo n.º 28
0
        public string Send(string url, string data)
        {
            string         strOut = "";
            WebResponse    result = null;
            HttpWebRequest req    = null;

            System.IO.Stream       newStream     = null;
            System.IO.Stream       ReceiveStream = null;
            System.IO.StreamReader sr            = null;
            try
            {
                // Url запрашиваемого методом POST скрипта
                req           = (HttpWebRequest)WebRequest.Create(url);
                req.Method    = "POST";
                req.Timeout   = _timeout;
                req.UserAgent = "Zeus ver. " + Ipaybox.CoreVersion + "; " + Ipaybox.Terminal.terminal_id;
                // эта строка необходима только при защите скрипта на сервере Basic авторизацией
                //req.Credentials = new NetworkCredential("login", "password");
                //req.ContentType = "application/x-www-form-urlencoded";
                byte[] SomeBytes = null;
                // передаем список пар параметров / значений для запрашиваемого скрипта методом POST
                // в случае нескольких параметров необходимо использовать символ & для разделения параметров
                // в данном случае используется кодировка windows-1251 для Url кодирования спец. символов значения параметров
                SomeBytes         = Encoding.GetEncoding(1251).GetBytes(HttpUtility.UrlEncode(data, Encoding.GetEncoding(1251)));
                req.ContentLength = SomeBytes.Length;
                newStream         = req.GetRequestStream();
                newStream.Write(SomeBytes, 0, SomeBytes.Length);
                newStream.Close();
                // считываем результат работы
                result        = req.GetResponse();
                ReceiveStream = result.GetResponseStream();
                Encoding encode = Encoding.GetEncoding(1251);
                sr = new System.IO.StreamReader(ReceiveStream, encode);
                Char[] read  = new Char[256];
                int    count = sr.Read(read, 0, 256);

                while (count > 0)
                {
                    String str = new String(read, 0, count);
                    strOut += str;
                    count   = sr.Read(read, 0, 256);
                }

                Ipaybox.Incassation.Bytesrecieved = Ipaybox.Incassation.Bytesrecieved + (uint)strOut.Length;
                Ipaybox.Incassation.Bytessend     = Ipaybox.Incassation.Bytessend + (uint)data.Length;

                return(strOut);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (newStream != null)
                {
                    newStream.Close();
                }
                if (ReceiveStream != null)
                {
                    ReceiveStream.Close();
                }
                if (sr != null)
                {
                    sr.Close();
                }
                if (result != null)
                {
                    result.Close();
                }
            }
        }
Exemplo n.º 29
0
 public override int Read(System.Char[] cbuf, int off, int len)
 {
     return(input.Read(cbuf, off, len));
 }
 public System.String ReadLine( )
 {
     System.String line = null;
     if (this._buf != null)
     {
         line          = this._buf;
         this.initpos  = this._buf_initpos;
         this.finalpos = this._buf_finalpos;
         this._buf     = null;
     }
     else
     {
         System.Text.StringBuilder sb = new System.Text.StringBuilder(80);
         int ending = 0;
         this.initpos = this.Position;
         for (int current = sr.Read(); current != -1; current = sr.Read())
         {
             sb.Append((char)current);
             if (current == '\r')
             {
                 ending++;
             }
             else if (current == '\n')
             {
                 ending++;
                 break;
             }
         }
         // Line ending found
         if (ending > 0)
         {
             // Bytes read
             this.finalpos += this.enc.GetByteCount(sb.ToString());
             // A single dot is treated as message end
             if (sb.Length == (1 + ending) && sb[0] == '.')
             {
                 sb = null;
             }
             // Undo the double dots
             else if (sb.Length > (1 + ending) && sb[0] == '.' && sb[1] == '.')
             {
                 sb.Remove(0, 1);
             }
             if (sb != null)
             {
                 line = sb.ToString(0, sb.Length - ending);
             }
         }
         else
         {
             // Not line ending found, so we are at the end of the stream
             this.finalpos = this.stream.Length;
             // though at the end of the stream there may be some content
             if (sb.Length > 0)
             {
                 line = sb.ToString();
             }
         }
         sb = null;
     }
     return(line);
 }
Exemplo n.º 31
0
        private void ReadObject(System.IO.StreamReader sr)
        {
            int    i;
            bool   isOpen        = false;
            bool   hasLabel      = false;
            bool   getNextValue  = false;
            bool   getNextKeySet = false;
            string label         = "";
            char   lastChar      = '\0';
            Dictionary <string, JsonNode> dict = new Dictionary <string, JsonNode>();

            this.SetValue(dict);
            while ((i = sr.Peek()) >= 0)
            {
                char c = (char)i;
                if (!(c == ' ' || c == '\t' || c == '\n' || c == '\r'))
                {
                    if (isOpen)
                    {         //node is opened ('{' already got read) and ready to be parsed
                        if (hasLabel)
                        {     //Label for current object item was already started and thus can be
                            if (getNextKeySet)
                            { //Next key set needs to be received (value already parsed) or the current object has to be closed
                                if (c == ',')
                                {
                                    hasLabel      = false;
                                    getNextKeySet = false;
                                    getNextValue  = false;
                                    hasLabel      = false;
                                }
                                else if (c == '}')
                                {
                                    c        = (char)sr.Read();
                                    lastChar = c;
                                    break;
                                }
                                else
                                {
                                    throw new Exception("Parsing Object failed: Expected ',' or '}', got '" + c + '\'');
                                }
                            }
                            else if (getNextValue)
                            {//Next value of current label needs to get parsed
                                JsonNode child = new JsonNode();
                                child.Read(sr);
                                dict.Add(label, child);
                                getNextKeySet = true;
                                lastChar      = '\0';
                                continue;
                            }
                            else
                            {//Separator for label and string expected
                                if (c != ':')
                                {
                                    throw new Exception("Parsing Object failed: Expected '\"', got '" + c + '\'');
                                }
                                getNextValue = true;
                            }
                        }
                        else
                        {//No label yet found --> get label of current item
                            if (c != '"')
                            {
                                throw new Exception("Parsing Object failed: Expected '\"', got '" + c + '\'');
                            }
                            label    = ParseStringFromEncoded(sr);
                            hasLabel = true;
                            lastChar = '"';
                            continue;
                        }
                    }
                    else
                    {//node yet has to be opened
                        if (c != '{')
                        {
                            throw new Exception("Parsing Object failed: Expected '{', got '" + c + '\'');
                        }
                        isOpen = true;
                    }
                }
                c        = (i = sr.Read()) > 0 ? (char)c : '\0';
                lastChar = c;
            }
            if (lastChar != '}')
            {
                throw new Exception("Parsing Object failed: Expected '}', got '" + lastChar + '\'');
            }
        }
Exemplo n.º 32
0
 public override int Read()
 {
     return(_actual.Read());
 }
Exemplo n.º 33
0
        private void button_fittext_Click(object sender, EventArgs e)
        {
            Bitmap bmap = new Bitmap(im.Width, im.Height);
            for (int i = 0; i < bmap.Width; i++)
            {
                for (int j = 0; j < bmap.Height; j++)
                {
                    bmap.SetPixel(i, j, Color.White);
                }
            }
            Bitmap bw = new Bitmap(im_bw);
            System.IO.StreamReader file = new System.IO.StreamReader(fileText);
            Font myFont = new Font("Arial", (float)Convert.ToDouble(font_size.Text));
            double textHeight = g.MeasureString("X", myFont).Height;
            SolidBrush myBrush = new SolidBrush(Color.Black);
            string word = "";
            string nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
            while (nextChar == "\n" || nextChar == "\r")
                nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
            Graphics gr = Graphics.FromImage(bmap);
            Boolean stop = false;

            double marginLeft = textHeight;
            double marginRight = marginLeft;
            double marginTop = textHeight;
            double marginBottom = marginTop;

            double verOff = marginTop;
            double horOff = marginLeft;
            double verSqueeze = 1.0;
            double horSqueeze = 1.0;

            Color target = Color.FromArgb(255, 255, 255);
            if (radio_black.Checked) target = Color.FromArgb(0, 0, 0);

            while (!file.EndOfStream && !stop)
            {
                //Find next empty pixel
                while(bw.GetPixel((int)horOff,(int)verOff) != target)
                {
                    horOff += 1;
                    if (horOff >= im.Width - marginLeft - marginRight)
                    {
                        horOff = marginLeft;
                        verOff += textHeight * verSqueeze;
                    }
                    if (verOff >= im.Height - marginTop - marginBottom) // Ran out of area before we ran out text
                    {
                        stop = true;
                        break;
                    }
                }
                if (!stop)
                {
                    while (bw.GetPixel((int)(horOff + gr.MeasureString(word, myFont).Width
                    * horSqueeze), (int)verOff) == target)
                    {
                        word = word + nextChar;
                        nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
                        while (nextChar == "\n" || nextChar == "\r")
                            nextChar = safeChar(Convert.ToChar(file.Read())).ToString();

                        if ((int)(horOff + gr.MeasureString(word + nextChar, myFont).Width * horSqueeze)
                            >= im.Width - marginLeft - marginRight) break;
                        if ((int)verOff > im.Height - marginTop - marginBottom) break;
                        if (file.EndOfStream) break;
                    }
                }

                gr.DrawString(word, myFont, myBrush, (float)horOff, (float)verOff);
                horOff += gr.MeasureString(word, myFont).Width * horSqueeze;
                word = "";

                if ((int)(horOff + gr.MeasureString(word + nextChar, myFont).Width * horSqueeze)
                            >= im.Width - marginLeft - marginRight)
                {
                    horOff = marginLeft;
                    verOff += textHeight * verSqueeze;
                }
                if ((int)verOff > im.Height - marginTop - marginBottom)
                    break;
            }
            pictureBox1.Image = bmap;
        }
Exemplo n.º 34
0
		public static void  Main(System.String[] args)
		{
			if (args.Length != 1)
			{
				System.Console.Error.WriteLine("Usage: DefaultApplication message_file");
				System.Environment.Exit(1);
			}
			
			//read test message file ...
			try
			{
				System.IO.FileInfo messageFile = new System.IO.FileInfo(args[0]);
				System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default).CurrentEncoding);
				int fileLength = (int) SupportClass.FileLength(messageFile);
				char[] cbuf = new char[fileLength];
				in_Renamed.Read(cbuf, 0, fileLength);
				System.String messageString = new System.String(cbuf);
				
				//parse inbound message ...
				Parser parser = new PipeParser();
				Message inMessage = null;
				try
				{
					inMessage = parser.parse(messageString);
				}
				catch (NuGenHL7Exception e)
				{
					SupportClass.WriteStackTrace(e, Console.Error);
				}
			}
			catch (System.Exception e)
			{
				SupportClass.WriteStackTrace(e, Console.Error);
			}
		}
Exemplo n.º 35
0
        private void Test4()
        {
            System.IO.StreamReader str = new System.IO.StreamReader(@"C:\globdata.ini");
            str.Read();

            System.Diagnostics.Process[] prs = System.Diagnostics.Process.GetProcessesByName("w3wp", "svigi-11");
            List<WIN32.FileApi> handles = WIN32.ProcessApi.GetFiles(prs[0]);
            if (handles != null)
            {
                foreach (WIN32.FileApi handle in handles)
                {
                    Console.WriteLine("FILE: " + handle.Name + " (HANDLE: " + handle.Handle.Handle.ToString() +
                        " - PROCESSID: " + handle.Handle.ProcessID + ")"  );
                }
            }

            WIN32.Win32API.SYSTEM_HANDLE_INFORMATION[] hands = WIN32.ProcessApi.FindHandles("negPromociones");

            Console.WriteLine("Buscamos: negPromociones");
            foreach (WIN32.Win32API.SYSTEM_HANDLE_INFORMATION hwnd in hands)
            {
                Console.WriteLine("Encontrado: " + hwnd.Handle.ToString() + " (Proceso: " + hwnd.ProcessID.ToString() + ")");
            }

            str.Close();
        }
Exemplo n.º 36
0
        public static void LoadFile(string filename)
        {
            using (System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Open))
                using (System.IO.StreamReader inFile = new System.IO.StreamReader(fs))
                {
                    RowsNumber       = inFile.Read();
                    CollumnsNumber   = inFile.Read();
                    VehiclesNumber   = inFile.Read();
                    RidesNumber      = inFile.Read();
                    StartBonusNumber = inFile.Read();
                    StepsNumber      = inFile.Read();

                    int idCount = 0;
                    for (int i = 0; i < RidesNumber; i++)
                    {
                        Ride r = new Ride();
                        r.ID      = idCount;
                        r.Start.x = inFile.Read();
                        r.Start.y = inFile.Read();

                        r.End.x = inFile.Read();
                        r.End.y = inFile.Read();

                        r.StartBonus = inFile.Read();
                        r.Latest     = inFile.Read();
                        Rides.Add(r);

                        idCount++;
                    }
                }
        }
Exemplo n.º 37
0
        public virtual void ProcessRequest(System.Web.HttpContext context)
        {
            try
            {
                if (HttpContext.Current.Items["PortalSettings"] != null)
                {
                    _ps  = (DotNetNuke.Entities.Portals.PortalSettings)(HttpContext.Current.Items["PortalSettings"]);
                    _pid = _ps.PortalId;
                }
                else
                {
                    string DomainName = null;
                    DotNetNuke.Entities.Portals.PortalAliasInfo objPortalAliasInfo = null;
                    string sUrl = HttpContext.Current.Request.RawUrl.Replace("http://", string.Empty).Replace("https://", string.Empty);
                    objPortalAliasInfo = DotNetNuke.Entities.Portals.PortalAliasController.Instance.GetPortalAlias(HttpContext.Current.Request.Url.Host);
                    _pid = objPortalAliasInfo.PortalID;
                    _ps  = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings();
                }

                //Dim sc As New Social.SocialSettings
                //_mainSettings = sc.LoadSettings[_ps.PortalId]
                _mainSettings = DataCache.MainSettings(ModuleId);
                //  If context.Request.IsAuthenticated Then
                _isValid = true;
                if (AdminRequired & !context.Request.IsAuthenticated)
                {
                    _isValid = false;
                    return;
                }
                if (AdminRequired && context.Request.IsAuthenticated)
                {
                    //_isValid = DotNetNuke.Security.PortalSecurity.IsInRole(_ps.AdministratorRoleName)
                    DotNetNuke.Entities.Modules.ModuleController objMC = new DotNetNuke.Entities.Modules.ModuleController();
                    DotNetNuke.Entities.Modules.ModuleInfo       objM  = objMC.GetModule(ModuleId, TabId);
                    string roleIds = Permissions.GetRoleIds(objM.ModulePermissions.ToString("EDIT").Split(';'), PortalId);
                    _isValid = Modules.ActiveForums.Permissions.HasAccess(roleIds, ForumUser.UserRoles);
                }
                else if (AdminRequired & !context.Request.IsAuthenticated)
                {
                    _isValid = false;
                    return;
                }
                string p = HttpContext.Current.Request.Params["p"];
                if (!(string.IsNullOrEmpty(p)))
                {
                    _params = Utilities.JSON.ConvertFromJSONAssoicativeArrayToHashTable(p);
                }

                if (context.Request.Files.Count == 0)
                {
                    string jsonPost     = string.Empty;
                    string prop         = string.Empty;
                    bool   propComplete = true;
                    string val          = string.Empty;
                    string tmp          = string.Empty;
                    bool   bObj         = false;
                    //Arrays
                    List <string> slist = null;
                    //Dim pairs As NameValueCollection = Nothing
                    Hashtable pairs    = null;
                    Hashtable subPairs = null;

                    Hashtable ht         = new Hashtable();
                    int       idx        = 0;
                    string    parentProp = string.Empty;
                    string    skip       = "{}[]:," + ((char)(34)).ToString();
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(context.Request.InputStream, System.Text.Encoding.UTF8))
                    {
                        while (!(sr.EndOfStream))
                        {
                            char c = (char)(sr.Read());
                            if (idx > 0 && c == '[')
                            {
                                c    = (char)(sr.Read());
                                bObj = true;
                            }
                            if (idx > 0 && c == '{')
                            {
                                if (pairs == null)
                                {
                                    parentProp = prop;
                                    prop       = string.Empty;
                                    tmp        = string.Empty;
                                    //pairs = New NameValueCollection
                                    pairs = new Hashtable();
                                }
                                else if (subPairs == null)
                                {
                                    string subString = c.ToString();
                                    while (c != '}')
                                    {
                                        c          = (char)(sr.Read());
                                        subString += c;
                                        if (c == '}')
                                        {
                                            break;
                                        }
                                    }
                                    subPairs = Utilities.JSON.ConvertFromJSONAssoicativeArrayToHashTable(subString);
                                    pairs.Add(prop, subPairs);
                                    prop     = string.Empty;
                                    tmp      = string.Empty;
                                    subPairs = null;
                                    c        = (char)(sr.Read());
                                }
                            }

                            if (idx > 0 && bObj == true && !(c == '{'))
                            {
                                string subItem = string.Empty;
                                while (c != ']')
                                {
                                    if (slist == null)
                                    {
                                        slist = new List <string>();
                                    }
                                    if (skip.IndexOf(c) == -1)
                                    {
                                        subItem += c;
                                    }

                                    c = (char)(sr.Read());
                                    if (c == ',' || c == ']')
                                    {
                                        slist.Add(subItem);
                                        subItem = string.Empty;
                                    }
                                    if (c == ']')
                                    {
                                        c    = (char)(sr.Read());
                                        bObj = false;
                                        break;
                                    }
                                }
                            }
                            if (c == ':')
                            {
                                prop = tmp;
                                tmp  = string.Empty;
                            }
                            if (skip.IndexOf(c) == -1)
                            {
                                tmp += c;
                            }
                            if (c == ',' || c == '}')
                            {
                                if (!(string.IsNullOrEmpty(tmp)))
                                {
                                    tmp = HttpUtility.UrlDecode(tmp);
                                }
                                if (slist != null)
                                {
                                    ht.Add(prop, slist);
                                    slist = null;
                                }
                                else if (pairs != null && c == ',' && !(string.IsNullOrEmpty(prop)))
                                {
                                    pairs.Add(prop, tmp);
                                }
                                else if (pairs != null && c == '}')
                                {
                                    if (!(string.IsNullOrEmpty(tmp)))
                                    {
                                        pairs.Add(prop, tmp);
                                    }
                                    ht.Add(parentProp, pairs);
                                    parentProp = string.Empty;
                                    pairs      = null;
                                }
                                else if (!(string.IsNullOrEmpty(prop)))
                                {
                                    ht.Add(prop, tmp);
                                }

                                prop = string.Empty;
                                tmp  = string.Empty;
                            }

                            idx += 1;
                        }
                        if (pairs != null & !(string.IsNullOrEmpty(parentProp)))
                        {
                            ht.Add(parentProp, pairs);
                        }
                        else if (!(string.IsNullOrEmpty(prop)) && !(string.IsNullOrEmpty(tmp)))
                        {
                            ht.Add(prop, HttpUtility.UrlDecode(tmp));
                        }
                        else if (!(string.IsNullOrEmpty(prop)) && slist != null)
                        {
                            ht.Add(prop, slist);
                        }

                        //jsonPost = sr.ReadToEnd()
                        sr.Close();
                    }
                    _params = ht;
                    //End If
                }
                else
                {
                    Hashtable ht = new Hashtable();
                    foreach (string s in context.Request.Params.AllKeys)
                    {
                        if (!(ht.ContainsKey(s)))
                        {
                            ht.Add(s, context.Request.Params[s]);
                        }
                    }
                    _params = ht;
                }

                if (HttpContext.Current.Request.IsAuthenticated)
                {
                    UserId = UserController.GetUserIdByUserName(PortalId, HttpContext.Current.User.Identity.Name);
                }
                else
                {
                    UserId = -1;
                }
            }
            catch (Exception ex)
            {
                _isValid = false;
                Exceptions.LogException(ex);
            }
        }
Exemplo n.º 38
0
        /// <summary> Read the contents of a file and place them in
        /// a string object.
        /// *
        /// </summary>
        /// <param name="String">path to file.
        /// </param>
        /// <returns>String contents of the file.
        ///
        /// </returns>
        public static System.String fileContentsToString(System.String file)
        {
            System.String contents = "";

            System.IO.FileInfo f = new System.IO.FileInfo(file);

            bool tmpBool;
            if (System.IO.File.Exists(f.FullName))
            tmpBool = true;
            else
            tmpBool = System.IO.Directory.Exists(f.FullName);
            if (tmpBool) {
            try {
            System.IO.StreamReader fr = new System.IO.StreamReader(f.FullName);
            char[] template = new char[(int) SupportClass.FileLength(f)]
            ;
            fr.Read((System.Char[]) template, 0, template.Length)
            ;
            contents = new String(template)
            ;
            fr.Close();
            } catch (System.Exception e) {
            System.Console.Out.WriteLine(e);
            SupportClass.WriteStackTrace(e, Console.Error);
            }
            }

            return contents;
        }
Exemplo n.º 39
0
        private void button_fittext_Click(object sender, EventArgs e)
        {
            Bitmap bmap = new Bitmap(im.Width, im.Height);

            for (int i = 0; i < bmap.Width; i++)
            {
                for (int j = 0; j < bmap.Height; j++)
                {
                    bmap.SetPixel(i, j, Color.White);
                }
            }
            Bitmap bw = new Bitmap(im_bw);

            System.IO.StreamReader file = new System.IO.StreamReader(fileText);
            Font       myFont           = new Font("Arial", (float)Convert.ToDouble(font_size.Text));
            double     textHeight       = g.MeasureString("X", myFont).Height;
            SolidBrush myBrush          = new SolidBrush(Color.Black);
            string     word             = "";
            string     nextChar         = safeChar(Convert.ToChar(file.Read())).ToString();

            while (nextChar == "\n" || nextChar == "\r")
            {
                nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
            }
            Graphics gr   = Graphics.FromImage(bmap);
            Boolean  stop = false;

            double marginLeft   = textHeight;
            double marginRight  = marginLeft;
            double marginTop    = textHeight;
            double marginBottom = marginTop;

            double verOff     = marginTop;
            double horOff     = marginLeft;
            double verSqueeze = 1.0;
            double horSqueeze = 1.0;

            Color target = Color.FromArgb(255, 255, 255);

            if (radio_black.Checked)
            {
                target = Color.FromArgb(0, 0, 0);
            }

            while (!file.EndOfStream && !stop)
            {
                //Find next empty pixel
                while (bw.GetPixel((int)horOff, (int)verOff) != target)
                {
                    horOff += 1;
                    if (horOff >= im.Width - marginLeft - marginRight)
                    {
                        horOff  = marginLeft;
                        verOff += textHeight * verSqueeze;
                    }
                    if (verOff >= im.Height - marginTop - marginBottom) // Ran out of area before we ran out text
                    {
                        stop = true;
                        break;
                    }
                }
                if (!stop)
                {
                    while (bw.GetPixel((int)(horOff + gr.MeasureString(word, myFont).Width
                                             *horSqueeze), (int)verOff) == target)
                    {
                        word     = word + nextChar;
                        nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
                        while (nextChar == "\n" || nextChar == "\r")
                        {
                            nextChar = safeChar(Convert.ToChar(file.Read())).ToString();
                        }

                        if ((int)(horOff + gr.MeasureString(word + nextChar, myFont).Width *horSqueeze)
                            >= im.Width - marginLeft - marginRight)
                        {
                            break;
                        }
                        if ((int)verOff > im.Height - marginTop - marginBottom)
                        {
                            break;
                        }
                        if (file.EndOfStream)
                        {
                            break;
                        }
                    }
                }

                gr.DrawString(word, myFont, myBrush, (float)horOff, (float)verOff);
                horOff += gr.MeasureString(word, myFont).Width *horSqueeze;
                word    = "";

                if ((int)(horOff + gr.MeasureString(word + nextChar, myFont).Width *horSqueeze)
                    >= im.Width - marginLeft - marginRight)
                {
                    horOff  = marginLeft;
                    verOff += textHeight * verSqueeze;
                }
                if ((int)verOff > im.Height - marginTop - marginBottom)
                {
                    break;
                }
            }
            pictureBox1.Image = bmap;
        }
Exemplo n.º 40
0
        protected static bool GetNextLine(System.IO.StreamReader rstm, out Int32 uid, out Int32 fid, byte[] linebuf)
        {
#if DEBUG
#else
            unchecked
#endif
            {
                uid = 0;
                fid = 0;
                int offset = 0;
                for (; ;)
                {
                    if (offset >= linebuf.Length)
                    {
                        break;
                    }
                    int iby = rstm.Read();
                    if (-1 == iby)
                    {
                        if (0 == offset)
                        {
                            return(false);
                        }
                        break;
                    }
                    if ('\n' == iby)
                    {
                        break;
                    }
                    linebuf[offset++] = (byte)iby;
                }
                {
                    int i = 0;
                    for (; ; i++)
                    {
                        if (i == offset)
                        {
                            return(true);
                        }
                        byte by = linebuf[i];
                        if (by >= '0' && by <= '9')
                        {
                            uid *= 10;
                            uid += (byte)by - '0';
                        }
                        else
                        {
                            i++;
                            break;
                        }
                    }
                    for (; i < offset; i++)
                    {
                        byte by = linebuf[i];
                        if (by >= '0' && by <= '9')
                        {
                            fid *= 10;
                            fid += (byte)by - '0';
                        }
                        else
                        {
                            return(true);
                        }
                    }
                }
                return(true);
            }
        }
Exemplo n.º 41
0
        /*
         * Note to the curious reader:
         * I tried something new in here in regards of control flow ...
         * it kind of messed up everything due to the fact that i got
         * like 1k of ifElse shit + specific onePurpose flags all over
         * the place in theese functions ...
         * It did not made things more simple ... but well ...
         * was an experiment :)
         */
        public void Read(System.IO.StreamReader sr)
        {
            switch (sr.Peek())
            {
            default:
                throw new Exception("Unexpected character '" + sr.Peek() + '\'');

            case 'n':
            case 'N':
                sr.Read();
                int next = sr.Read();
                if (next != 'u' && next != 'U')
                {
                    throw new Exception("Parsing Object failed: Expected 'u' or 'U', got '" + (char)next + '\'');
                }
                next = sr.Read();
                if (next != 'l' && next != 'L')
                {
                    throw new Exception("Parsing Object failed: Expected 'l' or 'L', got '" + (char)next + '\'');
                }
                next = sr.Read();
                if (next != 'l' && next != 'L')
                {
                    throw new Exception("Parsing Object failed: Expected 'l' or 'L', got '" + (char)next + '\'');
                }
                this.SetValue();
                break;

            case '{':
                this.ReadObject(sr);
                break;

            case '[':
                this.ReadArray(sr);
                break;

            case '"':
                this.ReadString(sr);
                break;

            case '-':
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
                this.ReadNumber(sr);
                break;

            case 't':
            case 'f':
            case 'T':
            case 'F':
                this.ReadBoolean(sr);
                break;
            }
        }
Exemplo n.º 42
0
        void Mnu_openHexdumpClick(object sender, EventArgs e)
        {
            OpenFileDialog opendia = new OpenFileDialog();

            opendia.InitialDirectory = TBL.OperatingSystem.DesktopDirectory;
            opendia.Filter = "hex files (*.hex)|*.hex|All files (*.*)|*.*" ;
            opendia.FilterIndex = 1;
            opendia.RestoreDirectory = false ;

            if(opendia.ShowDialog() == DialogResult.OK)
            {
                int charCount = GetNumOfCharsInFile(opendia.FileName);

                int byteCount = charCount / 2;

                ThreadsafeReceiveBuffer recBuffer = new ThreadsafeReceiveBuffer(byteCount+1);

                int currentCharacter = 0;
                string curFigure = "";
                int ascii;

                // well.. now read
                try
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(opendia.FileName))
                    {
                        while ((ascii = sr.Read()) != -1)
                       {
                            curFigure += ((char)(ascii)).ToString();

                            if((currentCharacter % 2) == 1)
                            {
                                int intval = Convert.ToInt32(curFigure, 16);  //Using ToUInt32 not ToUInt64, as per OP comment
                                recBuffer.AddByte((byte)(intval));
                                curFigure = "";
                            }

                       	  currentCharacter++;

                       }
                    }
                }
                catch
                {
                    stdOut.Error("Parsing error at Character " + currentCharacter.ToString());
                }

                searchForFrames(recBuffer);

                this.Controls.Add(log.Visualisation);
                log.VisualizationFitWindowSize(this);
                stdOut.Info("should now open " + opendia.FileName);
            }
        }
Exemplo n.º 43
0
        public static void Main(System.String[] args)
        {
            if (args.Length != 1)
            {
                System.Console.Out.WriteLine("Usage: XMLParser pipe_encoded_file");
                System.Environment.Exit(1);
            }

            //read and parse message from file
            try
            {
                PipeParser parser = new PipeParser();
                System.IO.FileInfo messageFile = new System.IO.FileInfo(args[0]);
                long fileLength = SupportClass.FileLength(messageFile);
                //UPGRADE_TODO: Constructor 'java.io.FileReader.FileReader' was converted to 'System.IO.StreamReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
                System.IO.StreamReader r = new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default);
                char[] cbuf = new char[(int) fileLength];
                //UPGRADE_TODO: Method 'java.io.Reader.read' was converted to 'System.IO.StreamReader.Read' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioReaderread_char[]'"
                System.Console.Out.WriteLine("Reading message file ... " + r.Read((System.Char[]) cbuf, 0, cbuf.Length) + " of " + fileLength + " chars");
                r.Close();
                System.String messString = System.Convert.ToString(cbuf);
                Message mess = parser.parse(messString);
                System.Console.Out.WriteLine("Got message of type " + mess.GetType().FullName);

                ca.uhn.hl7v2.parser.XMLParser xp = new AnonymousClassXMLParser();

                //loop through segment children of message, encode, print to console
                System.String[] structNames = mess.Names;
                for (int i = 0; i < structNames.Length; i++)
                {
                    Structure[] reps = mess.getAll(structNames[i]);
                    for (int j = 0; j < reps.Length; j++)
                    {
                        if (typeof(Segment).IsAssignableFrom(reps[j].GetType()))
                        {
                            //ignore groups
                            //UPGRADE_TODO: Class 'javax.xml.parsers.DocumentBuilder' was converted to 'System.Xml.XmlDocument' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxxmlparsersDocumentBuilder'"
                            //UPGRADE_ISSUE: Method 'javax.xml.parsers.DocumentBuilderFactory.newInstance' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxxmlparsersDocumentBuilderFactory'"
                            //DocumentBuilderFactory.newInstance();

                            System.Xml.XmlDocument docBuilder = new System.Xml.XmlDocument();
                            //UPGRADE_TODO: Class 'javax.xml.parsers.DocumentBuilder' was converted to 'System.Xml.XmlDocument' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxxmlparsersDocumentBuilder'"
                            System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); //new doc for each segment
                            System.Xml.XmlElement root = doc.CreateElement(reps[j].GetType().FullName);
                            doc.AppendChild(root);
                            xp.encode((Segment) reps[j], root);
                            System.IO.StringWriter out_Renamed = new System.IO.StringWriter();
                            System.Console.Out.WriteLine("Segment " + reps[j].GetType().FullName + ": \r\n" + doc.OuterXml);

                            System.Type[] segmentConstructTypes = new System.Type[]{typeof(Message)};
                            System.Object[] segmentConstructArgs = new System.Object[]{null};
                            Segment s = (Segment) reps[j].GetType().GetConstructor(segmentConstructTypes).Invoke(segmentConstructArgs);
                            xp.parse(s, root);
                            //UPGRADE_TODO: Class 'javax.xml.parsers.DocumentBuilder' was converted to 'System.Xml.XmlDocument' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxxmlparsersDocumentBuilder'"
                            System.Xml.XmlDocument doc2 = new System.Xml.XmlDocument();
                            System.Xml.XmlElement root2 = doc2.CreateElement(s.GetType().FullName);
                            doc2.AppendChild(root2);
                            xp.encode(s, root2);
                            System.IO.StringWriter out2 = new System.IO.StringWriter();
                            System.Xml.XmlTextWriter ser = new System.Xml.XmlTextWriter(out2);

                            //System.Xml.XmlWriter ser = System.Xml.XmlWriter.Create(out2);
                            doc.WriteTo(ser);
                            if (out2.ToString().Equals(out_Renamed.ToString()))
                            {
                                System.Console.Out.WriteLine("Re-encode OK");
                            }
                            else
                            {
                                System.Console.Out.WriteLine("Warning: XML different after parse and re-encode: \r\n" + out2.ToString());
                            }
                        }
                    }
                }
            }
            catch (System.Exception e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
Exemplo n.º 44
0
		public static void  Main(System.String[] args)
		{
			
			if (args.Length < 2)
			{
				ExitWithUsage();
			}
			
			System.Type stemClass = System.Type.GetType("SF.Snowball.Ext." + args[0] + "Stemmer");
			SnowballProgram stemmer = (SnowballProgram) System.Activator.CreateInstance(stemClass);
			System.Reflection.MethodInfo stemMethod = stemClass.GetMethod("stem", (new System.Type[0] == null)?new System.Type[0]:(System.Type[]) new System.Type[0]);
			
			System.IO.StreamReader reader;
			reader = new System.IO.StreamReader(new System.IO.FileStream(args[1], System.IO.FileMode.Open, System.IO.FileAccess.Read), System.Text.Encoding.Default);
			reader = new System.IO.StreamReader(reader.BaseStream, reader.CurrentEncoding);
			
			System.Text.StringBuilder input = new System.Text.StringBuilder();
			
			System.IO.Stream outstream = System.Console.OpenStandardOutput();
			
			if (args.Length > 2 && args[2].Equals("-o"))
			{
				outstream = new System.IO.FileStream(args[3], System.IO.FileMode.Create);
			}
			else if (args.Length > 2)
			{
				ExitWithUsage();
			}
			
			System.IO.StreamWriter output = new System.IO.StreamWriter(outstream, System.Text.Encoding.Default);
			output = new System.IO.StreamWriter(output.BaseStream, output.Encoding);
			
			int repeat = 1;
			if (args.Length > 4)
			{
				repeat = System.Int32.Parse(args[4]);
			}
			
			System.Object[] emptyArgs = new System.Object[0];
			int character;
			while ((character = reader.Read()) != - 1)
			{
				char ch = (char) character;
				if (System.Char.IsWhiteSpace(ch))
				{
					if (input.Length > 0)
					{
						stemmer.SetCurrent(input.ToString());
						for (int i = repeat; i != 0; i--)
						{
							stemMethod.Invoke(stemmer, (System.Object[]) emptyArgs);
						}
						output.Write(stemmer.GetCurrent());
						output.Write('\n');
						input.Remove(0, input.Length - 0);
					}
				}
				else
				{
					input.Append(System.Char.ToLower(ch));
				}
			}
			output.Flush();
		}
Exemplo n.º 45
0
        public void LoadObjList(string filePath)
        {
            Objects.Clear();
            System.IO.StreamReader reader = new System.IO.StreamReader(filePath);
            string Name          = "";
            string Type          = "";
            string SubType       = "";
            string ImagePath     = "";
            string SpriteImgXpos = "";
            string SpriteImgYpos = "";
            string SpriteWidth   = "";
            string SpriteHeight  = "";
            char   buf           = '>';
            int    T;
            int    ST;
            int    Xpos;
            int    Ypos;
            int    Width;
            int    Height;


            while (!reader.EndOfStream)
            {
                Name          = "";
                Type          = "";
                SubType       = "";
                ImagePath     = "";
                SpriteImgXpos = "";
                SpriteImgYpos = "";
                SpriteWidth   = "";
                SpriteHeight  = "";
                buf           = '>';
                T             = 0;
                ST            = 0;
                Xpos          = 0;
                Ypos          = 0;
                Width         = 0;
                Height        = 0;

                while (buf != ',') //Load The name
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    Name = Name + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Type
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    Type = Type + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object SubType
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SubType = SubType + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's SpriteSheet
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    ImagePath = ImagePath + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's Spritesheet Xpos
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteImgXpos = SpriteImgXpos + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object's Spritesheet Ypos
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteImgYpos = SpriteImgYpos + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Sprite's Width
                {
                    buf = (char)reader.Read();
                    if (buf == ',')
                    {
                        break;
                    }
                    SpriteWidth = SpriteWidth + buf;
                }
                buf = '>';         //That char shouldn't show up so change the buffer to that!

                while (buf != ',') //Load The Object Sprite's Height
                {
                    buf = (char)reader.Read();
                    if (buf == ';')
                    {
                        break;
                    }                          //detect if the line is over
                    SpriteHeight = SpriteHeight + buf;
                }
                buf = '>'; //That char shouldn't show up so change the buffer to that!

                T      = Int32.Parse(Type);
                ST     = Int32.Parse(SubType);
                Xpos   = Int32.Parse(SpriteImgXpos);
                Ypos   = Int32.Parse(SpriteImgYpos);
                Width  = Int32.Parse(SpriteWidth);
                Height = Int32.Parse(SpriteHeight);

                MapObject MapObj = new MapObject(Name, T, ST, ImagePath, Xpos, Ypos, Width, Height);
                Objects.Add(new Point(MapObj.ID, MapObj.SubType), MapObj);

                reader.ReadLine();
            }
        }
Exemplo n.º 46
0
 public void DoFileAsync(String fn)
 {
     if (AsyncThread != null)
     {
         AsyncThread.Abort();
     }
     AsyncThread = new System.Threading.Thread(delegate()
     {
         String s = "";
         System.IO.StreamReader tsr = new System.IO.StreamReader(fn);
         if (tsr.Peek() == 8)
         {
             tsr.Read();
             tsr.Close();
             IO.SaveReader sr = new IO.SaveReader(fn);
             s = sr.ReadToEnd();
             sr.Close();
         }
         else
         {
             //tsr.Read();
             s = tsr.ReadToEnd();
             tsr.Close();
         }
         //pLuaVM.DoFile(fn);
         try
         {
             pLuaVM.DoString(s);
         }
         catch (Exception e)
         {
             IO.Log.Write("Exception in LUA engine at DoFileAsync");
             IO.Log.Write(e.Message);
             IO.Log.Write(e.Source);
             OutputEngine.WriteLine("LUA error: " + e.Message);
         }
     });
     AsyncThread.Start();
 }
Exemplo n.º 47
0
 /// <summary>
 /// Read a single character.
 /// </summary>
 /// <returns></returns>
 public override int Read()
 {
     return(inStream.Read());
 }
Exemplo n.º 48
0
		public static void  Main(System.String[] args)
		{
			
			if (args.Length != 1)
			{
				System.Console.Out.WriteLine("Usage: ProfileParser profile_file");
				System.Environment.Exit(1);
			}
			
			try
			{
				System.IO.FileInfo f = new System.IO.FileInfo(args[0]);
				System.IO.StreamReader in_Renamed = new System.IO.StreamReader(new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).BaseStream, new System.IO.StreamReader(f.FullName, System.Text.Encoding.Default).CurrentEncoding);
				char[] cbuf = new char[(int) SupportClass.FileLength(f)];
				in_Renamed.Read(cbuf, 0, (int) SupportClass.FileLength(f));
				System.String xml = System.Convert.ToString(cbuf);
				
				NuGenProfileParser pp = new NuGenProfileParser(true);
				RuntimeProfile spec = pp.parse(xml);
			}
			catch (System.Exception e)
			{
				SupportClass.WriteStackTrace(e, Console.Error);
			}
		}
Exemplo n.º 49
0
        private void sendFile(string filename)
        {
            try
            {
                updateTxtRcv("Starting sendFile(" + filename + ")");

                System.IO.StreamReader sr = new System.IO.StreamReader(filename);
                int r;
                int blockSize = 4096;
                char[] buf = new char[blockSize];
                //how many blocks to send?
                System.IO.FileInfo fi = new System.IO.FileInfo(filename);
                long lBlocks = (long)(fi.Length / blockSize);
                if (lBlocks == 0)
                    lBlocks = 1;
                updateTxtRcv("Need to send " + lBlocks.ToString() + " blocks...");
                long lBlockNr = 1;
                do
                {
                    updateTxtRcv("Sending block " + lBlockNr.ToString() + " ...");
                    r = sr.Read(buf, 0, blockSize); //r = number of bytes read
                    comport.Write(buf, 0, r);                    
                }
                while (r!=-1 && !sr.EndOfStream);
                sr.Close();
                updateTxtRcv("Finished sendFile(" + filename + ")");
            }
            catch (Exception x)
            {
                updateTxtRcv("sendFile exception:" + x.Message);
                System.Diagnostics.Debug.WriteLine(x.Message);
            }
        }
Exemplo n.º 50
0
        public static void  Main(System.String[] args)
        {
            if (args.Length != 1)
            {
                System.Console.Out.WriteLine("Usage: XMLParser pipe_encoded_file");
                System.Environment.Exit(1);
            }

            //read and parse message from file
            try
            {
                NuGenPipeParser    parser      = new NuGenPipeParser();
                System.IO.FileInfo messageFile = new System.IO.FileInfo(args[0]);
                long fileLength          = SupportClass.FileLength(messageFile);
                System.IO.StreamReader r = new System.IO.StreamReader(messageFile.FullName, System.Text.Encoding.Default);
                char[] cbuf = new char[(int)fileLength];
                System.Console.Out.WriteLine("Reading message file ... " + r.Read((System.Char[])cbuf, 0, cbuf.Length) + " of " + fileLength + " chars");
                r.Close();
                System.String messString = System.Convert.ToString(cbuf);
                Message       mess       = parser.parse(messString);
                System.Console.Out.WriteLine("Got message of type " + mess.GetType().FullName);

                Genetibase.NuGenHL7.parser.NuGenXMLParser xp = new AnonymousClassXMLParser();

                //loop through segment children of message, encode, print to console
                System.String[] structNames = mess.Names;
                for (int i = 0; i < structNames.Length; i++)
                {
                    Structure[] reps = mess.getAll(structNames[i]);
                    for (int j = 0; j < reps.Length; j++)
                    {
                        if (typeof(Segment).IsAssignableFrom(reps[j].GetType()))
                        {
                            //ignore groups
                            System.Xml.XmlDocument docBuilder = new System.Xml.XmlDocument();
                            System.Xml.XmlDocument doc        = new System.Xml.XmlDocument();                      //new doc for each segment
                            System.Xml.XmlElement  root       = doc.CreateElement(reps[j].GetType().FullName);
                            doc.AppendChild(root);
                            xp.encode((Segment)reps[j], root);
                            System.IO.StringWriter out_Renamed = new System.IO.StringWriter();
                            System.Console.Out.WriteLine("Segment " + reps[j].GetType().FullName + ": \r\n" + out_Renamed.ToString());

                            System.Type[]   segmentConstructTypes = new System.Type[] { typeof(Message) };
                            System.Object[] segmentConstructArgs  = new System.Object[] { null };
                            Segment         s = (Segment)reps[j].GetType().GetConstructor(segmentConstructTypes).Invoke(segmentConstructArgs);
                            xp.parse(s, root);
                            System.Xml.XmlDocument doc2  = new System.Xml.XmlDocument();
                            System.Xml.XmlElement  root2 = doc2.CreateElement(s.GetType().FullName);
                            doc2.AppendChild(root2);
                            xp.encode(s, root2);
                            System.IO.StringWriter out2 = new System.IO.StringWriter();

                            if (out2.ToString().Equals(out_Renamed.ToString()))
                            {
                                System.Console.Out.WriteLine("Re-encode OK");
                            }
                            else
                            {
                                System.Console.Out.WriteLine("Warning: XML different after parse and re-encode: \r\n" + out2.ToString());
                            }
                        }
                    }
                }
            }
            catch (System.Exception e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
Exemplo n.º 51
-1
        static void Main(string[] args)
        {
            string tempPath = System.Environment.GetEnvironmentVariable ("TEMP");
            if (tempPath == null) {
                tempPath = System.Environment.GetEnvironmentVariable ("TMP");
            }
            if (tempPath == null) {
                tempPath = "..\\..";
            }

            Exception exc = null;
            System.DateTime now = System.DateTime.Now;
            System.Security.Cryptography.X509Certificates.X509Certificate xc = null;
            System.IO.StreamWriter sw = null;
            System.IO.StreamReader sr = null;
            System.IO.DirectoryInfo di = null;
            bool b = false;
            System.DateTime dt = InicDateTime ();
            string[] sL = null;
            System.IO.FileInfo[] fiL = null;
            System.IO.DirectoryInfo[] diL = null;
            System.IO.FileSystemInfo[] fsiL = null;
            System.IO.FileStream fs = null;
            System.IO.FileInfo fi = null;
            System.IAsyncResult asr = null;
            int i = 0;
            long l = 0;
            string s = null;
            System.IO.IsolatedStorage.IsolatedStorageFile isf = null;
            System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = null;
            byte[] bL = null;
            System.Diagnostics.Process p = null;

            System.IO.FileInfo fileInfo = new System.IO.FileInfo (tempPath + "\\resources4file.txt");
            fileInfo.Create ().Close ();
            System.IO.StreamWriter outFile = fileInfo.AppendText ();
            System.Console.WriteLine (tempPath + "\\resources4file.txt");

            try {
                exc = null;
                xc = null;
                now = System.DateTime.Now;
                xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile (tempPath + "\\dummyFile1.txt");
            } catch (Exception e) {
                exc = e;
            } finally {
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile1.txt");
                outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile(String)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (xc));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }
            try {
                exc = null;
                xc = null;
                now = System.DateTime.Now;
                xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile (tempPath + "\\dummyFile2.txt");
            } catch (Exception e) {
                exc = e;
            } finally {
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile2.txt");
                outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(String)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (xc));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }
            /*
            try {
            System.IO.BinaryWriter.Write ();
            System.IO.BinaryWriter.Seek ();
            System.IO.BinaryWriter.Flush ();
            System.IO.BinaryWriter.Close ();
            System.IO.BinaryWriter bw = new System.IO.BinaryWriter ();
            } catch (Exception e) {
            }

            try {
            System.IO.BufferedStream.WriteByte ();
            System.IO.BufferedStream.Write ();
            System.IO.BufferedStream.ReadByte ();
            System.IO.BufferedStream.Read ();
            System.IO.BufferedStream.SetLength ();
            System.IO.BufferedStream.Seek ();
            System.IO.BufferedStream.EndWrite ();
            System.IO.BufferedStream.BeginWrite ();
            System.IO.BufferedStream.EndRead ();
            System.IO.BufferedStream.BeginRead ();
            System.IO.BufferedStream.Flush ();
            System.IO.BufferedStream.Close ();
            System.IO.BufferedStream bs = new System.IO.BufferedStream ();
            } catch (Exception e) {
            }
            */
            try {
                exc = null;
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = new System.IO.StreamWriter (tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        exc = null;
                        System.Console.SetOut (sw);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.WriteLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                            outFile.WriteLine ("Func: " + "System.Console.WriteLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.Out.Write ("hello");
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } finally {
                        try {
                            sw.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception) {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }

                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = new System.IO.StreamReader (tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        System.Console.SetIn (sr);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.ReadLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                            outFile.WriteLine ("Func: " + "System.Console.ReadLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.In.ReadLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } catch (Exception) {
                    } finally {
                        try {
                            sr.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }

                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = new System.IO.StreamWriter (tempPath + "\\dummyFile5.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        System.Console.SetError (sw);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.Error.WriteLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } finally {
                        try {
                            sw.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                try {
                    exc = null;
                    di = null;
                    now = System.DateTime.Now;
                    di = System.IO.Directory.CreateDirectory (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.CreateDirectory(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (di));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    di = null;
                    now = System.DateTime.Now;
                    di = System.IO.Directory.GetParent (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath);
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetParent(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (di));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    b = System.IO.Directory.Exists (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Exists(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (b));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetCreationTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetCreationTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetCreationTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetCreationTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetLastWriteTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastWriteTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetLastWriteTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastWriteTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetLastAccessTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastAccessTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetLastAccessTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastAccessTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sL = null;
                    now = System.DateTime.Now;
                    sL = System.IO.Directory.GetFiles (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetFiles(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sL = null;
                    now = System.DateTime.Now;
                    sL = System.IO.Directory.GetDirectories (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetDirectories(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.GetFileSystemEntries (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetFileSystemEntries(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetCurrentDirectory (tempPath + "\\TestDir1\\..");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath);
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetCurrentDirectory(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Move (tempPath + "\\TestDir1", tempPath + "\\TestDir2");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir2");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Delete (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Delete (tempPath + "\\TestDir2");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir2");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                di = null;
                di = new System.IO.DirectoryInfo (tempPath);
                System.IO.DirectoryInfo di2 = null;
                try {
                    try {
                        exc = null;
                        di2 = null;
                        now = System.DateTime.Now;
                        di2 = di.CreateSubdirectory (tempPath + "\\TestDir3");
                        di = di2;
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.CreateSubdirectory(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (di2));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        fiL = null;
                        now = System.DateTime.Now;
                        fiL = di.GetFiles ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFiles()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (fiL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        diL = null;
                        now = System.DateTime.Now;
                        diL = di.GetDirectories ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetDirectories()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (diL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        fsiL = null;
                        now = System.DateTime.Now;
                        fsiL = di.GetFileSystemInfos ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFileSystemInfos()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (fsiL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.MoveTo (tempPath + "\\TestDir4");
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                        //---
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir4");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } finally {
                    try {
                        exc = null;
                        char[] backSlash = new char[1];
                        backSlash[0] = '\\';
                        outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash));
                        now = System.DateTime.Now;
                        di.Delete ();
                    } catch  (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                }
                try {
                    di = null;
                    di = new System.IO.DirectoryInfo (tempPath + "\\TestDir5");
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.Create ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir5");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Create()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.MoveTo (tempPath + "\\TestDir6");
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir5");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                        //---
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir6");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception) {
                } finally {
                    try {
                        exc = null;
                        char[] backSlash = new char[1];
                        backSlash[0] = '\\';
                        outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash));
                        now = System.DateTime.Now;
                        di.Delete ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                }
            } catch (Exception) {
            }

            try {
                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = System.IO.File.OpenText (tempPath + "\\dummyFile6.txt");
                    sr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile6.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = System.IO.File.CreateText (tempPath + "\\dummyFile7.txt");
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile7.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.CreateText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = System.IO.File.AppendText (tempPath + "\\dummyFile8.txt");
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile8.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.AppendText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.Open (tempPath + "\\dummyFile9.txt", System.IO.FileMode.OpenOrCreate);
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Open(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetCreationTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetCreationTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetCreationTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetCreationTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetLastAccessTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetLastAccessTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetLastAccessTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetLastAccessTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetLastWriteTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetLastWriteTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetLastWriteTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetLastWriteTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.OpenRead (tempPath + "\\dummyFile10.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile10.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenRead(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.OpenWrite (tempPath + "\\dummyFile11.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile11.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.Create (tempPath + "\\testFile1.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Create(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    System.IO.File.Move (tempPath + "\\testFile1.txt", tempPath + "\\testFile2.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.Delete (tempPath + "\\testFile2.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    b = System.IO.File.Exists (tempPath + "\\testFile3.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Exists(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (b));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                fi = new System.IO.FileInfo (tempPath + "\\testFile4.txt");
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = fi.Create ();
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = fi.OpenText ();
                    sr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = fi.CreateText ();
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.CreateText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = fi.AppendText ();
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.AppendText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    fi = new System.IO.FileInfo (tempPath + "\\testFile5.txt");
                    now = System.DateTime.Now;
                    fs = fi.Open (System.IO.FileMode.Open);
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create(FileMode)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = fi.OpenWrite ();
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenWrite()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fi.MoveTo (tempPath + "\\testFile6.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile6.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    char[] backSlash = new char[1];
                    backSlash[0] = '\\';
                    outFile.WriteLine ("Name: " + fi.FullName.TrimEnd (backSlash));
                    now = System.DateTime.Now;
                    fi.Delete ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Delete()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                exc = null;
                byte[] array = new byte[1];
                array[0] = 0;
                fs = null;
                now = System.DateTime.Now;
                fs = System.IO.File.Open (tempPath + "\\dummyFile12.txt", System.IO.FileMode.OpenOrCreate);
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (fs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Lock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Lock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Unlock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Unlock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.WriteByte (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.WriteByte(Byte)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Write (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Write(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = fs.BeginWrite (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        fs.EndWrite (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                        outFile.WriteLine ("Func: " + "System.IO.FileStream.EndWrite(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.SetLength (2);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.SetLength(Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = fs.ReadByte ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.ReadByte()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = fs.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Read(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    l = 0;
                    now = System.DateTime.Now;
                    l = fs.Seek (0, System.IO.SeekOrigin.Begin);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Seek(Int64, SeekOrigin)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (l));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = fs.BeginRead (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        i = 0;
                        now = System.DateTime.Now;
                        i = fs.EndRead (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                        outFile.WriteLine ("Func: " + "System.IO.FileStream.EndRead(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (i));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Close(IAsyncResult)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception e) {
                exc = e;
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (fs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }

            try {
                System.IO.TextWriter tw = new System.IO.StreamWriter (tempPath + "\\dummyFile13.txt");
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.WriteLine ("hello");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Write ("12345678790");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                char[] array = new char[1];
                array[0] = 'a';
                System.IO.TextReader tr = new System.IO.StreamReader (tempPath + "\\dummyFile13.txt");
                try {
                    exc = null;
                    s = null;
                    now = System.DateTime.Now;
                    s = tr.ReadLine ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (s));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.ReadBlock (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadBlock(Char[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.Read ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Read()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Read(Char[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    s = null;
                    now = System.DateTime.Now;
                    s = tr.ReadToEnd ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadToEnd()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (s));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                sw = new System.IO.StreamWriter (tempPath + "\\dummyFile14.txt");
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Write (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Write(Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            /*
            try {
                exc = null;
                System.IO.IsolatedStorage.IsolatedStorageScope iss = System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain;
                isf = null;
                now = System.DateTime.Now;
                isf = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (iss, null, null);

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.Dispose ();
                } catch (Exception e) {
                    exc = e;
                }
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain ();
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly ();
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain, null, null);
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.CreateDirectory ("dummyDir");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.GetDirectoryNames ("*");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.DeleteFile ("dummyFile");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.DeleteDirectory ("dummyDir");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.GetFileNames ("*");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.Close ();
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.IsolatedStorage.IsolatedStorageFile.Remove (iss);
                } catch (Exception e) {
                    exc = e;
                }
            } catch (Exception e) {
                exc = e;
            }
            */
            try {
                exc = null;
                byte[] array = new byte[1];
                array[0] = 0;
                isfs = null;
                now = System.DateTime.Now;
                isfs = new System.IO.IsolatedStorage.IsolatedStorageFileStream (tempPath + "\\dummyFile15.txt", System.IO.FileMode.OpenOrCreate);
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (isfs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Lock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Lock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Unlock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Unlock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.WriteByte (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.WriteByte(Byte)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Write (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Write(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = isfs.BeginWrite (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        isfs.EndWrite (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                        outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndWrite(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.SetLength (2);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.SetLength(Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    l = 0;
                    now = System.DateTime.Now;
                    l = isfs.Seek (0, System.IO.SeekOrigin.Begin);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Seek(Int64, SeekOrigin)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (l));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = isfs.ReadByte ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ReadByte()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = isfs.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Read(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = isfs.BeginRead (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        i = 0;
                        now = System.DateTime.Now;
                        i = isfs.EndRead (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                        outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndRead(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (i));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception e) {
                exc = e;
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (isfs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }

            try {
                System.Net.WebClient wc = new System.Net.WebClient ();
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    wc.DownloadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Net.WebClient.DownloadFile(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    bL = null;
                    now = System.DateTime.Now;
                    bL = wc.UploadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Net.WebClient.UploadFile(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (bL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                string processString = null;
                try {
                    exc = null;
                    p = null;
                    now = System.DateTime.Now;
                    p = System.Diagnostics.Process.Start (tempPath + "\\dummyFile16.txt");
                    processString = toString (p);
                    p.Kill ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + processString);
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo (tempPath + "\\dummyFile16.txt");
                    p = null;
                    now = System.DateTime.Now;
                    p = System.Diagnostics.Process.Start (psi);
                    processString = toString (p);
                    p.Kill ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(ProcessStartInfo)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + processString);
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            /*
            try {
                now = System.DateTime.Now;
                System.Configuration.AppSettingsReader asr = new System.Configuration.AppSettingsReader ();
                asr.GetValue ("key", System.Type.GetType ("System.Object", false));
            } catch (Exception e) {
            }
            */

            /*
            try {
            System.Xml.XmlDocument.Save ();
            System.Xml.XmlDocument.LoadXml ();
            System.Xml.XmlDocument.WriteContentTo ();
            System.Xml.XmlDocument.WriteTo ();
            System.Xml.XmlDocument xd = new System.Xml.XmlDocument (System.Xml.XmlNameTable);
            System.Xml.XmlDocumentFragment.WriteContentTo ();
            System.Xml.XmlDocumentFragment.WriteTo ();
            System.Xml.XmlDocumentType.WriteContentTo ();
            System.Xml.XmlDocumentType.WriteTo ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlWriter.WriteNode ();
            System.Xml.XmlWriter.WriteAttributes ();
            System.Xml.XmlWriter.WriteStartElement ();
            System.Xml.XmlWriter.WriteAttributeString ();
            System.Xml.XmlWriter.WriteStartAttribute ();
            System.Xml.XmlWriter.WriteElementString ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlTextWriter xtw = System.Xml.XmlTextWriter (tempPath + "\\dummyFile.txt", System.Text.Encoding.ASCII);
            xtw.WriteNode ();
            xtw.WriteAttributes ();
            xtw.WriteQualifiedName ("localName", );
            xtw.WriteName ();
            xtw.WriteNmToken ();
            xtw.WriteBinHex ();
            xtw.WriteBase64 ();
            xtw.WriteRaw ();
            xtw.WriteChars ();
            xtw.WriteSurrogateCharEntity ();
            xtw.WriteString ();
            xtw.WriteWhitespace ();
            xtw.WriteCharEntity ();
            xtw.WriteEntityRef ();
            xtw.WriteProcessingInstruction ();
            xtw.WriteComment ();
            xtw.WriteCData ();
            xtw.WriteEndAttribute ();
            xtw.WriteStartAttribute ();
            xtw.WriteFullEndElement ();
            xtw.WriteEndElement ();
            xtw.WriteStartElement ();
            xtw.WriteDocType ();
            xtw.WriteEndDocument ();
            xtw.WriteStartDocument ();
            xtw.WriteAttributeString ();
            xtw.WriteElementString ();
            xtw.Flush ();
            xtw.Close ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlReader.IsStartElement ();
            System.Xml.XmlReader.ReadEndElement ();
            System.Xml.XmlReader.ReadElementString ();
            System.Xml.XmlReader.ReadStartElement ();
            System.Xml.XmlReader.MoveToContent ();
            System.Xml.XmlReader.Skip ();
            System.Xml.XmlReader.IsName ();
            System.Xml.XmlReader.IsNameToken ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlTextReader.ReadAttributeValue ();
            System.Xml.XmlTextReader.ResolveEntity ();
            System.Xml.XmlTextReader.LookupNamespace ();
            System.Xml.XmlTextReader.ReadOuterXml ();
            System.Xml.XmlTextReader.ReadInnerXml ();
            System.Xml.XmlTextReader.IsStartElement ();
            System.Xml.XmlTextReader.ReadEndElement ();
            System.Xml.XmlTextReader.ReadElementString ();
            System.Xml.XmlTextReader.ReadStartElement ();
            System.Xml.XmlTextReader.MoveToContent ();
            System.Xml.XmlTextReader.ReadString ();
            System.Xml.XmlTextReader.Skip ();
            System.Xml.XmlTextReader.Close ();
            System.Xml.XmlTextReader.Read ();
            System.Xml.XmlTextReader.MoveToElement ();
            System.Xml.XmlTextReader.MoveToNextAttribute ();
            System.Xml.XmlTextReader.MoveToFirstAttribute ();
            System.Xml.XmlTextReader.MoveToAttribute ();
            System.Xml.XmlTextReader.GetAttribute ();
            System.Xml.XmlTextReader.GetRemainder ();
            System.Xml.XmlTextReader.ReadChars ();
            System.Xml.XmlTextReader.ReadBase64 ();
            System.Xml.XmlTextReader.ReadBinHex ();
            System.Xml.XmlTextReader.ctor ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlEntityReference.WriteContentTo ();
            System.Xml.XmlEntityReference.WriteTo ();
            System.Xml.XmlImplementation.CreateDocument ();
            System.Xml.XmlImplementation.ctor ();
            System.Xml.XmlText.WriteContentTo ();
            System.Xml.XmlText.WriteTo ();
            } catch (Exception e) {
            }
            */
            outFile.Flush ();
            outFile.Close ();

            try {
                sL = System.IO.Directory.GetFiles (tempPath, "tempFile*.txt");
                foreach (string str in sL) {
                    try {
                        System.IO.File.Delete (str);
                    } catch (Exception) {
                    }
                }
                sL = System.IO.Directory.GetFiles (tempPath, "dummyFile*.txt");
                foreach (string str in sL) {
                    try {
                        System.IO.File.Delete (str);
                    } catch (Exception) {
                    }
                }
                sL = System.IO.Directory.GetDirectories (tempPath, "TempDir*");
                foreach (string str in sL) {
                    try {
                        System.IO.Directory.Delete (str);
                    } catch (Exception) {
                    }
                }
            } catch (Exception) {
            }
        }