コード例 #1
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);
            }
コード例 #2
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;
                }
            }
コード例 #3
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
            {
            }
        }
コード例 #4
0
ファイル: XmlData.cs プロジェクト: hivie7510/csharptest-net
		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
			{
			}
		}
コード例 #5
0
ファイル: XmlData.cs プロジェクト: hivie7510/csharptest-net
			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);
			}
コード例 #6
0
ファイル: XmlData.cs プロジェクト: hivie7510/csharptest-net
			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;
			}