コード例 #1
0
 private void RemoveIndex(string alias, Meeting meeting)
 {
     lock (indexlock)
     {
         var value = index[alias];
         if (value != null)
         {
             value.Remove(meeting);
         }
     }
 }
コード例 #2
0
 private void AddIndex(Meeting meeting)
 {
     Task.Run(
         () =>
         {
             lock (indexlock)
             {
                 meeting.Members.ForEach(
                     m =>
                     {
                         if (index[m.Alias] == null)
                         {
                             index[m.Alias] = new List<Meeting>() { meeting };
                         }
                         else
                         {
                             index[m.Alias].Add(meeting);
                         }
                     });
             }
         });
 }
コード例 #3
0
 private void AddIndex(Meeting meeting)
 {
     Task.Run(
         () =>
             {
                 lock (Indexlock)
                 {
                     meeting.Members.ForEach(
                         m =>
                             {
                                 if (index.ContainsKey(m.Alias))
                                 {
                                     index[m.Alias].Add(meeting);
                                 }
                                 else
                                 {
                                     index[m.Alias] = new List<Meeting> { meeting };
                                 }
                             });
                 }
             });
 }