- use invoke instead of beginInvoke

- remove now unneeded callback
- remove RaiseGBaseEntryRemoved
pull/26/head
Simon Gockner 6 years ago
parent 7534a70423
commit 68fbf6717d
  1. 12
      GBase.Api/GBase.Api.xml
  2. 20
      GBase.Api/NotifyGBaseEntryChanged.cs

@ -141,18 +141,6 @@
<param name="columnName">The name of the IGBaseColumn</param>
<param name="value">The new value</param>
</member>
<member name="M:GBase.Api.NotifyGBaseEntryChanged.RaiseGBaseEntryRemoved(System.Object)">
<summary>
Raise the GBaseEntry removed (<see cref="E:GBase.Api.NotifyGBaseEntryChanged.GBaseEntryChanged"/> event without args)
</summary>
<param name="entry">The entry (sender)</param>
</member>
<member name="M:GBase.Api.NotifyGBaseEntryChanged.GBaseEntryChangedCallback(System.IAsyncResult)">
<summary>
Callback for the <see cref="E:GBase.Api.NotifyGBaseEntryChanged.GBaseEntryChanged"/> event
</summary>
<param name="asyncResult">The <see cref="T:System.IAsyncResult"/></param>
</member>
<member name="T:GBase.Api.Services.IGBaseColumnService">
<summary>
ServiceContract for the GBaseColumn

@ -24,25 +24,7 @@ namespace GBase.Api
/// <param name="value">The new value</param>
protected void RaiseGBaseEntryChanged(object entry, string columnName, object value)
{
GBaseEntryChanged?.BeginInvoke(entry, new GBaseEntryChangedEventArgs(columnName, value), GBaseEntryChangedCallback, null);
}
/// <summary>
/// Raise the GBaseEntry removed (<see cref="GBaseEntryChanged"/> event without args)
/// </summary>
/// <param name="entry">The entry (sender)</param>
protected void RaiseGBaseEntryRemoved(object entry)
{
GBaseEntryChanged?.BeginInvoke(entry, null, GBaseEntryChangedCallback, null);
}
/// <summary>
/// Callback for the <see cref="GBaseEntryChanged"/> event
/// </summary>
/// <param name="asyncResult">The <see cref="IAsyncResult"/></param>
private void GBaseEntryChangedCallback(IAsyncResult asyncResult)
{
GBaseEntryChanged?.EndInvoke(asyncResult); //TestMe: Does this work? Or is there something to be done with the asyncResult
GBaseEntryChanged?.Invoke(entry, new GBaseEntryChangedEventArgs(columnName, value));
}
}
}
Loading…
Cancel
Save