Exemple #1
0
 public void Add(EventRequestIncrementArgs e)
 {
     Interlocked.Increment(ref this.mCount);
     TimeConuter.UrlConuter urlConuter = new TimeConuter.UrlConuter
     {
         Url = e.Request.GetSourceBaseUrl()
     };
     if (!this.Urls.TryAdd(urlConuter.Url, urlConuter))
     {
         this.Urls.TryGetValue(urlConuter.Url, out urlConuter);
     }
     urlConuter.Add();
 }
Exemple #2
0
            public void Load(StreamReader reader)
            {
                string text = reader.ReadLine();

                while (!string.IsNullOrEmpty(text))
                {
                    string[] array = text.Split('|', StringSplitOptions.None);
                    TimeConuter.UrlConuter urlConuter = new TimeConuter.UrlConuter
                    {
                        Url = array[0]
                    };
                    if (!this.Urls.TryAdd(urlConuter.Url, urlConuter))
                    {
                        this.Urls.TryGetValue(urlConuter.Url, out urlConuter);
                    }
                    urlConuter.Count = int.Parse(array[1]);
                    text             = reader.ReadLine();
                }
            }