UpdateNotify() public method

Calls UpdateNotify on the RTD server to refresh. Does not normally need to be called if UpdateValue(newValue) has been called, but can be used to force a recalculation of the RTD cell even if the value has not changed.
public UpdateNotify ( ) : void
return void
示例#1
0
 public void OnCompleted()
 {
     IsCompleted = true;
     // Force another update to ensure DisconnectData is called.
     // CONSIDER: Do we need to UpdateNotify here?
     //           Not necessarily. Next recalc will call the function, not call RTD and that will trigger DisconnectData.
     //           However, this ensures a more deterministic call to DisconnectData
     _topic.UpdateNotify();
 }
示例#2
0
        public void OnNext(object value)
        {
            Value = value;
            // Not actually setting the topic value, just poking it
            // TODO: Using the 'fake' RTD value should be optional - to give us a way to deal with 'newValues' one day.
            //       But then we'd need to be really careful with error values (which prevent restart).
            // BUGBUG: The ToOADate truncates, things might happy in the same millisecond etc.
            //         See https://exceldna.codeplex.com/workitem/9472
            //_topic.UpdateValue(DateTime.UtcNow.ToOADate());

            // 2016-03-25: Further bug here - We can't leave the Topic value as #N/A (which is what happens if we don't update it)
            //             since that prevents restart when a book is re-opened. (See details in ExcelObserverRtdServer.ConnectData)
            //             So we now initialize the Topic with a new value.

            // 2016-11-04: ExcelRtdServer.ConnectData was changed so that this call,
            //             if it happens during the ConnectData, will have no effect (saving an extra function call).
            _topic.UpdateNotify();
        }