Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address pr feedback
  • Loading branch information
annelo-msft committed Jan 6, 2024
commit 14dcdba0ad6a348ce6dc5d19b98c6fa3c251633e
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ClientResult

protected ClientResult(PipelineResponse response)
{
ClientUtilities.AssertNotNull(response, nameof(response));
Argument.AssertNotNull(response, nameof(response));

_response = response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public int Status
public ClientResultException(PipelineResponse response, Exception? innerException = default)
: base(CreateMessage(response), innerException)
{
ClientUtilities.AssertNotNull(response, nameof(response));
Argument.AssertNotNull(response, nameof(response));

_response = response;
_status = response.Status;
Expand All @@ -56,7 +56,7 @@ protected ClientResultException(SerializationInfo info, StreamingContext context
/// <inheritdoc />
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
ClientUtilities.AssertNotNull(info, nameof(info));
Argument.AssertNotNull(info, nameof(info));

info.AddValue(nameof(Status), Status);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class KeyCredential

public void Update(string key)
{
ClientUtilities.AssertNotNullOrEmpty(key, nameof(key));
Argument.AssertNotNullOrEmpty(key, nameof(key));

Volatile.Write(ref _key, key);
}
Expand Down
91 changes: 0 additions & 91 deletions sdk/core/System.ClientModel/src/Internal/ClientUtilities.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class StreamExtensions
{
public static async Task WriteAsync(this Stream stream, ReadOnlyMemory<byte> buffer, CancellationToken cancellation = default)
{
ClientUtilities.AssertNotNull(stream, nameof(stream));
Argument.AssertNotNull(stream, nameof(stream));
#if NETCOREAPP
await stream.WriteAsync(buffer, cancellation).ConfigureAwait(false);
#else
Expand Down Expand Up @@ -48,7 +48,7 @@ public static async Task WriteAsync(this Stream stream, ReadOnlyMemory<byte> buf

public static async Task WriteAsync(this Stream stream, ReadOnlySequence<byte> buffer, CancellationToken cancellation = default)
{
ClientUtilities.AssertNotNull(stream, nameof(stream));
Argument.AssertNotNull(stream, nameof(stream));

if (buffer.Length == 0)
return;
Expand Down