Skip to content

Commit

Permalink
Fix typo (OnRawResponseReceived)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximn committed Oct 9, 2024
1 parent a512ada commit ccf7710
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions GoogleMapsApi.Test/IntegrationTests/DistanceMatrixTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static Uri onUriCreated(Uri uri)

[Test]
[Ignore("Need to fix it")]
public async Task ShouldPassRawDataToOnRawResponseRecivied()
public async Task ShouldPassRawDataToOnRawResponseReceived()
{
var request = new DistanceMatrixRequest
{
Expand All @@ -229,8 +229,8 @@ public async Task ShouldPassRawDataToOnRawResponseRecivied()

var rawData = Array.Empty<byte>();

void onRawResponseRecivied(byte[] data) => rawData = data;
GoogleMaps.DistanceMatrix.OnRawResponseRecivied += onRawResponseRecivied;
void onRawResponseReceived(byte[] data) => rawData = data;
GoogleMaps.DistanceMatrix.OnRawResponseReceived += onRawResponseReceived;

try
{
Expand All @@ -242,7 +242,7 @@ public async Task ShouldPassRawDataToOnRawResponseRecivied()
}
finally
{
GoogleMaps.DistanceMatrix.OnRawResponseRecivied -= onRawResponseRecivied;
GoogleMaps.DistanceMatrix.OnRawResponseReceived -= onRawResponseReceived;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions GoogleMapsApi/Engine/MapsAPIGenericEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
namespace GoogleMapsApi.Engine
{
public delegate Uri UriCreatedDelegate(Uri uri);
public delegate void RawResponseReciviedDelegate(byte[] data);
public delegate void RawResponseReceivedDelegate(byte[] data);

public abstract class MapsAPIGenericEngine<TRequest, TResponse>
where TRequest : MapsBaseRequest, new()
where TResponse : IResponseFor<TRequest>
{
internal static event UriCreatedDelegate OnUriCreated;

Check warning on line 20 in GoogleMapsApi/Engine/MapsAPIGenericEngine.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable event 'OnUriCreated' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the event as nullable.
internal static event RawResponseReciviedDelegate OnRawResponseRecivied;
internal static event RawResponseReceivedDelegate OnRawResponseReceived;

Check warning on line 21 in GoogleMapsApi/Engine/MapsAPIGenericEngine.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable event 'OnRawResponseReceived' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the event as nullable.
internal static TimeSpan DefaultTimeout = TimeSpan.FromSeconds(100);

protected internal static async Task<TResponse> QueryGoogleAPIAsync(TRequest request, TimeSpan timeout, CancellationToken token = default)
Expand Down
8 changes: 4 additions & 4 deletions GoogleMapsApi/EngineFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ public event UriCreatedDelegate OnUriCreated
}

/// <summary>
/// Occurs when raw data from Google API recivied.
/// Occurs when raw data from Google API received.
/// </summary>
public event RawResponseReciviedDelegate OnRawResponseRecivied
public event RawResponseReceivedDelegate OnRawResponseReceived
{
add
{
MapsAPIGenericEngine<TRequest, TResponse>.OnRawResponseRecivied += value;
MapsAPIGenericEngine<TRequest, TResponse>.OnRawResponseReceived += value;
}
remove
{
MapsAPIGenericEngine<TRequest, TResponse>.OnRawResponseRecivied -= value;
MapsAPIGenericEngine<TRequest, TResponse>.OnRawResponseReceived -= value;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GoogleMapsApi.Entities.Directions.Response
public class DirectionsResponse : IResponseFor<DirectionsRequest>
{
/// <summary>
/// Error message recived from the server when the call fails
/// Error message received from the server when the call fails
/// </summary>
/// <value>Error message</value>
[DataMember(Name = "error_message")]
Expand Down
6 changes: 3 additions & 3 deletions GoogleMapsApi/IEngineFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public interface IEngineFacade<in TRequest, TResponse>
/// <summary>
/// Occurs when the Url created. Can be used for override the Url.
/// </summary>
event UriCreatedDelegate OnUriCreated;
public event UriCreatedDelegate OnUriCreated;

/// <summary>
/// Occurs when raw data from Google API recivied.
/// Occurs when raw data from Google API received.
/// </summary>
event RawResponseReciviedDelegate OnRawResponseRecivied;
public event RawResponseReceivedDelegate OnRawResponseReceived;

/// <summary>
/// Asynchronously query the Google Maps API using the provided request.
Expand Down

0 comments on commit ccf7710

Please sign in to comment.