Пример #1
0
 public static DailyStats Create(DateTime date, int impressions)
 {
     DailyStats dailyStats = new DailyStats
     {
         Date = date,
         Impressions = impressions
     };
     return dailyStats;
 }
Пример #2
0
        public static DailyStats CreateFromXML(XElement xml, XNamespace ns)
        {
            DailyStats dailyStats = new DailyStats
            {
                Date = DateTime.Parse(xml.Attribute("startTime").Value),
                Impressions = Int32.Parse(xml.Element(ns + "impressionRequests").Value),
                // PositiveRequests = Int32.Parse(xml.Element(ns + "positiveImpressionRequests").Value),
                // AdImpressions = Int32.Parse(xml.Element(ns + "filteredImpressionRequests").Element(ns + "adImpressions").Value),

            };
            return dailyStats;
        }