Ejemplo n.º 1
0
        public bool AddProvider(string name)
        {
            bool result = false;

            if (!HasProvider(name))
            {
                ProviderStore.Add(name, new ProviderData(name));
                ProviderAdded?.Invoke(this, new ProviderDataEventArgs(name));
                result = true;
            }
            return(result);
        }
 // DataProvider extensions
 public static void Register(this IDataProvider dataprovider)
 {
     if (dataproviders.Contains(dataprovider))
     {
         return;
     }
     dataproviders.Add(dataprovider);
     dataprovider.DataPointAdded   += OnDataPointAdded;
     dataprovider.DataPointRemoved += OnDataPointRemoved;
     ProviderAdded?.Invoke(dataprovider);
     InvokeAddDataPointsOnAll(dataprovider);
 }