void IValueConsumer.Refresh()
 {
     if (provider != null)
     {
         dateValueStamp = provider.GetDate();
         SetValue(provider.GetValue(), initialize: true);
     }
     else
     {
         SetValue(Value, initialize: true);
     }
 }
 private void AttachToProvider()
 {
     if (provider != null)
     {
         if (provider.GetValueProviderName() == baseValueName)
         {
             return;
         }
         provider.DetachConsumer(this);
         provider = null;
     }
     if (!(baseValueName == string.Empty) && IsConnectedInCollecton())
     {
         provider = LocateProviderByName(baseValueName);
         if (provider == null)
         {
             throw new ArgumentException(Utils.SRGetStr("ExceptioncalCulatedValueProvider", baseValueName));
         }
         provider.AttachConsumer(this);
         SetValueInternal(provider.GetValue(), provider.GetDate());
         ((IValueConsumer)this).Refresh();
     }
 }