static LogDataItemCollection ParseLogDataItems(string logText) { LogDataItemCollection result = new LogDataItemCollection(); MatchCollection matches = _logDataItemParser.Matches(logText); if (matches != null) { foreach (Match match in matches) { LogDataItem item = new LogDataItem(); item.RequestedUtc = DateTime.Parse(match.Groups["time"].Value); item.UrlRequested = match.Groups["url"].Value; item.UrlReferrer = match.Groups["urlreferrer"].Value; item.UserAgent = match.Groups["useragent"].Value; item.UserDomain = match.Groups["userdomain"].Value; result.Add(item); } } return(result); }
/// <summary> /// Creates a shallow copy of the <see cref="LogDataItemCollection"/>. /// </summary> /// <returns>A shallow copy of the <see cref="LogDataItemCollection"/>.</returns> /// <remarks>Please refer to <see cref="ICloneable.Clone"/> for details.</remarks> public virtual object Clone() { LogDataItemCollection collection = new LogDataItemCollection(this.ToArray()); return(collection); }