Esempio n. 1
0
 public void StatusProvider_Record(object sender, RecordEventArgs e)
 {
     foreach (IStatusChangedHandler subscriber in _subscribers.ToList())
     {
         try
         {
             subscriber.Record(new RecordData(e.Record.ID, e.Record.Time, EnumConverter.ConvertEnumValue <RecordStatus, RecordStatusData>(e.Record.Status),
                                              e.Record.Folder, e.Record.SFVName, e.Record.RARName, e.Record.RARCount, e.Record.RARSize));
         }
         catch
         {
             _subscribers.Remove(subscriber);
         }
     }
 }
Esempio n. 2
0
 private void RaiseSubRecordAddedEvent(SubRecordData subRecordData)
 {
     if (SubRecordAdded != null)
     {
         SubRecordAdded(this, new SubRecordEventArgs(subRecordData.ParentID, new SubRecord(subRecordData.Time,
                                                                                           EnumConverter.ConvertEnumValue <RecordStatusData, RecordStatus>(subRecordData.Status), subRecordData.Folder, subRecordData.Name, subRecordData.Size)));
     }
 }
Esempio n. 3
0
 private void RaiseRecordAddedEvent(RecordData recordData)
 {
     if (RecordAdded != null)
     {
         RecordAdded(this, new RecordEventArgs(new Record(recordData.ID, recordData.Time, EnumConverter.ConvertEnumValue <RecordStatusData, RecordStatus>(recordData.Status),
                                                          recordData.Folder, recordData.SFVName, recordData.RARName, recordData.RARCount, recordData.RARSize)));
     }
 }