Ejemplo n.º 1
0
		public static IEnumerable<XmlData> Read(XmlReader rdr)
		{
			try
			{
				Dictionary<MethodOccurance, MethodOccurance> members = new Dictionary<MethodOccurance, MethodOccurance>();
				XmlData instance = new XmlData(rdr);

				while (rdr.Read())
				{
					string locName = rdr.LocalName;
					if (StringComparer.Ordinal.Equals(locName, "coverage"))
						instance.File.Read(instance);
					else if (StringComparer.Ordinal.Equals(locName, "module"))
						instance.Module.Read(instance);
					else if (StringComparer.Ordinal.Equals(locName, "method"))
					{
						instance.Method.Read(instance);
						MethodOccurance foundmo, mo = new MethodOccurance(instance.Method.Namespace, instance.Method.Class, instance.Method.name);
						if (members.TryGetValue(mo, out foundmo))
						{
							instance.Method.name = instance.Name(
								String.Format("{0}(overload {1})", instance.Method.name, ++foundmo.Counter)
							);
						}
						else
							members.Add(mo, mo);
					}
					else if (StringComparer.Ordinal.Equals(locName, "seqpnt"))
					{
						instance.Seqpnt.Read(instance);
						yield return instance;
					}
				}
			}
			finally
			{
			}
		}
Ejemplo n.º 2
0
			public string document;//="c:\Projects\svault\src\core\SVault.Core\Services\ServiceAttributes.cs" />

			public void Read(XmlData rdr)
			{
				visitcount = rdr.ReadLong("visitcount", 0);
				line = rdr.ReadInt("line", 0);
				column = rdr.ReadInt("column", 0);
				endline = rdr.ReadInt("endline", line);
				endcolumn = rdr.ReadInt("endcolumn", column);
				excluded = rdr.ReadBool("excluded", false);
				document = rdr.ReadName("document");
			}
Ejemplo n.º 3
0
			public string assemblyIdentity;//="SVault.Core, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=x86">

			public void Read(XmlData rdr)
			{
				int pos;
				if (null != (name = filename = rdr.ReadName("name")))
					try { name = rdr.Name(System.IO.Path.GetFileName(name)); } catch { }
				
				assemblyIdentity = rdr.ReadName("assemblyIdentity");
				if (null == (assembly = rdr.ReadName("assembly")))
				{
					if (null != (assembly = assemblyIdentity) && (pos = assembly.IndexOf(',')) > 0)
						assembly = rdr.Name(assembly.Substring(0, pos));
				}
				if (null == assembly)
					assembly = UNKOWN_NAME;

				if (assembly.StartsWith("App_Web_", StringComparison.Ordinal))
					assembly = WEB_APP_NAME;
			}
Ejemplo n.º 4
0
			public void Read(XmlData rdr)
			{
				name = rdr.ReadName("name", UNKOWN_NAME);
				excluded = rdr.ReadBool("excluded", false);
				instrumented = rdr.ReadBool("instrumented", false);

				int pos;
				string cls = rdr.ReadName("class", UNKOWN_NAME);
				
				pos = cls.IndexOf("+<");
				if (pos > 0)
					pos = cls.LastIndexOf('.', pos);
				else
					pos = cls.LastIndexOf('.');

				if (pos > 0)
				{
					Namespace = rdr.Name(cls.Substring(0, pos));
					cls = cls.Substring(pos + 1);
				}
				else Namespace = "-";

				Class = rdr.Name(cls);
			}
Ejemplo n.º 5
0
			public DateTime measureTime;//="2009-02-10T17:24:15.984375-06:00">

			public void Read(XmlData rdr)
			{
				profilerVersion = rdr.ReadString("profilerVersion");
				driverVersion = rdr.ReadString("driverVersion");
				startTime = rdr.ReadDate("startTime");
				measureTime = rdr.ReadDate("measureTime");
			}