public Boolean Contains(DestinationInfo destination)
 {
     lock (Parent)
     {
         return(Destinations.Contains(destination));
     }
 }
 private void ReconstructFastDestinationArray()
 {
     // this technique is to avoid locking FastDestinationArray
     DestinationInfo[] TempFixedArray = new DestinationInfo[Destinations.Count];
     Destinations.CopyTo(TempFixedArray);
     FastDestinationArray = TempFixedArray;
 }
        public DestinationInfo AddDestination(String name, String details, Boolean bEnabled, String filterName)
        {
            DestinationInfo dInfo = AddDestination(name, details, bEnabled);

            dInfo.SetFilter(filterName);

            return(dInfo);
        }
示例#4
0
 internal static void Receive(DestinationInfo dObject, ReflectInsightPackage[] messages)
 {
     lock (dObject)
     {
         foreach (ListenerInfo listener in dObject.Listeners)
         {
             listener.Listener.Receive(messages);
         }
     }
 }
 protected void RemoveDestinationFromGroupBindings(DestinationInfo dInfo)
 {
     lock (this)
     {
         foreach (DestinationBindingGroup dGroup in FDestinationBindingGroups.Values)
         {
             dGroup.RemoveDestinationBinding(dInfo.Name);
         }
     }
 }
        public void RemoveDestinationBinding(String destinationName)
        {
            lock (Parent)
            {
                DestinationInfo dInfo = Parent.GetDestination(destinationName);
                dInfo.BindingGroupIds.Remove(Id);

                Destinations.Remove(dInfo);
                ReconstructFastDestinationArray();
            }
        }
 public void RemoveDestination(DestinationInfo dInfo)
 {
     lock (this)
     {
         if (FDestinations.Remove(dInfo.Id))
         {
             RemoveDestinationFromGroupBindings(dInfo);
             ReconstructFastDestinationArray();
             dInfo.InternalDispose(false);
         }
     }
 }
        public void AddDestinationBinding(String destinationName)
        {
            lock (Parent)
            {
                if (Parent.ContainsDestination(destinationName))
                {
                    DestinationInfo dInfo = Parent.GetDestination(destinationName);
                    dInfo.BindingGroupIds.Add(Id);

                    Destinations.Add(dInfo);
                    ReconstructFastDestinationArray();
                }
            }
        }
        public DestinationInfo AddDestination(String name, String details, Boolean bEnabled)
        {
            lock (this)
            {
                Int32           id    = RIUtils.GetStringHash(name);
                DestinationInfo dInfo = GetDestination(id);
                if (dInfo != null)
                {
                    return(dInfo);
                }

                dInfo = new DestinationInfo(name, details, bEnabled);

                FDestinations[dInfo.Id] = dInfo;
                ReconstructFastDestinationArray();

                return(dInfo);
            }
        }