Example #1
0
 public CallCenterActivity(string callActivity)
 {
     AgentStistics = new List<AgentStatistic>();
     using(var reader = new StringReader(callActivity))
     {
          ActivityDate = ParseActivityDate(reader.ReadLine());
          MaxAgents = ExtractInt(reader);
          MinAgents = ExtractInt(reader);
          //(Snip)
          AvarageTimeBeforeAbandon = ExtractInt(reader);
          if(reader.ReadLine().Trim().Equals("Per agent statistics:") == false)
              throw new InvalidDataException("We where not on the line we expected to be for \"Per Agent statistics:\"");
          string currentLine;
          //This loops till we break out of the agent section
          while((currentLine = reader.ReadLine()).Trim().Equals("Queue related statistics:")
          {
               var agent = new AgentStatistic();
               agent.AgentId = ExtractInt(reader);
               agent.DirectCallsAnswered = ExtractInt(reader);
               //(snip)
               agent.QueueLongestTimeInCall = ExtractInt(reader);
              
               AgentStistics.Add(agent);
          }
          TotalCallsPresentedToQueue = ExtractInt(reader);
          //(Snip)
          CallsAnsweredByVoiceMail = ExtractInt(reader);
     }
 }
Example #2
0
 public AgentStatisticValue this[AgentStatistic stat]
 {
     get { return this.stats[stat]; }
 }