Skip to content

Commit

Permalink
Update to use ReadOnlyMemory<byte> instead of byte[]
Browse files Browse the repository at this point in the history
Signed-off-by: Whit Waldo <[email protected]>
  • Loading branch information
WhitWaldo committed Jul 12, 2024
1 parent 63df29d commit d6cbf51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Dapr.Jobs/DaprJobsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class DaprJobsClient
/// <param name="cancellationToken">Cancellation token.</param>
[Obsolete("The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")]
public abstract Task ScheduleCronJobAsync(string jobName, string cronExpression, DateTime? dueTime = null,
uint? repeats = null, DateTime? ttl = null, byte[]? payload = null,
uint? repeats = null, DateTime? ttl = null, ReadOnlyMemory<byte>? payload = null,
CancellationToken cancellationToken = default);

/// <summary>
Expand All @@ -53,7 +53,7 @@ public abstract Task ScheduleCronJobAsync(string jobName, string cronExpression,
/// <param name="cancellationToken">Cancellation token.</param>
[Obsolete("The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")]
public abstract Task ScheduleIntervalJobAsync(string jobName, TimeSpan interval, DateTime? startingFrom = null,
uint? repeats = null, DateTime? ttl = null, byte[]? payload = null,
uint? repeats = null, DateTime? ttl = null, ReadOnlyMemory<byte>? payload = null,
CancellationToken cancellationToken = default);

/// <summary>
Expand All @@ -64,7 +64,7 @@ public abstract Task ScheduleIntervalJobAsync(string jobName, TimeSpan interval,
/// <param name="payload">Stores the main payload of the job which is passed to the trigger function.</param>
/// <param name="cancellationToken">Cancellation token.</param>
[Obsolete("The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")]
public abstract Task ScheduleOneTimeJobAsync(string jobName, DateTime scheduledTime, byte[]? payload = null,
public abstract Task ScheduleOneTimeJobAsync(string jobName, DateTime scheduledTime, ReadOnlyMemory<byte>? payload = null,
CancellationToken cancellationToken = default);

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Jobs/Models/Responses/JobDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ public record JobDetails
/// <summary>
/// Stores the main payload of the job which is passed to the trigger function.
/// </summary>
public byte[]? Payload { get; init; } = null;
public ReadOnlyMemory<byte>? Payload { get; init; } = null;
}

0 comments on commit d6cbf51

Please sign in to comment.