Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

System.ClientModel

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

system.clientmodel - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0-beta.1
services/metadata/...81f807551a5340d3a0c912e936b7d327.psmdcp

Sorry, the diff of this file is not supported yet

+7
-0
# Release History
## 1.1.0-beta.1 (2024-02-01)
### Features Added
- Initial preview release of convenience types in the System.ClientModel namespace, including `ClientResult<T>`, `KeyCredential`, and `ClientResultException`.
- Initial preview release of pipeline types, including `ClientPipeline`, `PipelinePolicy`, and `PipelineMessage`.
## 1.0.0 (2024-01-03)

@@ -4,0 +11,0 @@

+373
-27

@@ -7,31 +7,206 @@ <?xml version="1.0" encoding="utf-8"?>

<members>
<member name="T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute">
<member name="M:System.ClientModel.ApiKeyCredential.#ctor(System.String)">
<summary>
Indicates that the specified method requires the ability to generate new code at runtime,
for example through <see cref="N:System.Reflection" />.
Initializes a new instance of the <see cref="T:System.ClientModel.ApiKeyCredential" /> class.
</summary>
<remarks>
This allows tools to understand which methods are unsafe to call when compiling ahead of time.
</remarks>
<param name="key">Key to use to authenticate with the Azure service.</param>
<exception cref="T:System.ArgumentNullException">
Thrown when the <paramref name="key" /> is null.
</exception>
<exception cref="T:System.ArgumentException">
Thrown when the <paramref name="key" /> is empty.
</exception>
</member>
<member name="M:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.#ctor(System.String)">
<member name="M:System.ClientModel.ClientResult.GetRawResponse">
<summary>
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute" /> class
with the specified message.
Returns the HTTP response returned by the service.
</summary>
<param name="message">
A message that contains information about the usage of dynamic code.
</param>
<returns>The HTTP response returned by the service.</returns>
</member>
<member name="P:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Message">
<member name="P:System.ClientModel.ClientResultException.Status">
<summary>
Gets a message that contains information about the usage of dynamic code.
Gets the HTTP status code of the response. Returns. <code>0</code> if response was not received.
</summary>
</member>
<member name="P:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Url">
<member name="M:System.ClientModel.ClientResultException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
Gets or sets an optional URL that contains more information about the method,
why it requires dynamic code, and what options a consumer has to deal with it.
TBD
</summary>
<param name="info"></param>
<param name="context"></param>
</member>
<member name="M:System.ClientModel.ClientResultException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>When overridden in a derived class, sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.</summary><param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param><param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param><exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</member>
<member name="M:System.ClientModel.Internal.Argument.AssertInRange``1(``0,``0,``0,System.String)">
<summary>
Throws if <paramref name="value" /> is less than the <paramref name="minimum" /> or greater than the <paramref name="maximum" />.
</summary>
<typeparam name="T">The type of to validate which implements <see cref="T:System.IComparable`1" />.</typeparam>
<param name="value">The value to validate.</param>
<param name="minimum">The minimum value to compare.</param>
<param name="maximum">The maximum value to compare.</param>
<param name="name">The name of the parameter.</param>
</member>
<member name="T:System.ClientModel.Internal.ArrayBackedPropertyBag`2">
<summary>
A property bag which is optimized for storage of a small number of items.
If the item count is less than 2, there are no allocations. Any additional items are stored in an array which will grow as needed.
MUST be passed by ref only.
</summary>
</member>
<member name="T:System.ClientModel.Internal.BitVector640">
<summary>
This type effectively stores 640 bool values, but compresses their storage
into ten ulongs, where each bit of the ulong represents a single bool value.
It exposes a public indexer so that the bool values can be accessed as a
standard .NET collection API.
It is used in System.ClientModel and Azure.Core to implement response
classifiers, where each true bit represents a status code that the
classifier considers a success code.
</summary>
</member>
<member name="M:System.ClientModel.Internal.CancellationHelper.ShouldWrapInOperationCanceledException(System.Exception,System.Threading.CancellationToken)">
<summary>Determines whether to wrap an <see cref="T:System.Exception" /> in a cancellation exception.</summary>
<param name="exception">The exception.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> that may have triggered the exception.</param>
<returns>true if the exception should be wrapped; otherwise, false.</returns>
</member>
<member name="M:System.ClientModel.Internal.CancellationHelper.CreateOperationCanceledException(System.Exception,System.Threading.CancellationToken,System.String)">
<summary>Creates a cancellation exception.</summary>
<param name="innerException">The inner exception to wrap. May be null.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> that triggered the cancellation.</param>
<param name="message">The custom message to use.</param>
<returns>The cancellation exception.</returns>
</member>
<member name="M:System.ClientModel.Internal.CancellationHelper.ThrowIfCancellationRequested(System.Threading.CancellationToken)">
<summary>Throws a cancellation exception if cancellation has been requested via <paramref name="cancellationToken" />.</summary>
<param name="cancellationToken">The token to check for a cancellation request.</param>
</member>
<member name="T:System.ClientModel.Internal.ReadTimeoutStream">
<summary>
Read-only Stream that will throw a <see cref="T:System.OperationCanceledException" /> if it has to wait longer than a configurable timeout to read more data
</summary>
</member>
<member name="T:System.ClientModel.Internal.TaskExtensions.Enumerable`1">
<summary>
Both <see cref="T:System.ClientModel.Internal.TaskExtensions.Enumerable`1" /> and <see cref="T:System.ClientModel.Internal.TaskExtensions.Enumerator`1" /> are defined as public structs so that foreach can use duck typing
to call <see cref="M:System.ClientModel.Internal.TaskExtensions.Enumerable`1.GetEnumerator" /> and avoid heap memory allocation.
Please don't delete this method and don't make these types private.
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="T:System.ClientModel.Internal.ModelWriter`1">
<summary>
Provides an efficient way to write <see cref="T:System.ClientModel.Primitives.IJsonModel`1" /> into a <see cref="T:System.BinaryData" /> using multiple pooled buffers.
</summary>
</member>
<member name="M:System.ClientModel.Internal.ModelWriter`1.#ctor(System.ClientModel.Primitives.IJsonModel{`0},System.ClientModel.Primitives.ModelReaderWriterOptions)">
<summary>
Initializes a new instance of <see cref="T:System.ClientModel.Internal.ModelWriter`1" />.
</summary>
<param name="model">The model to write.</param>
<param name="options">The <see cref="T:System.ClientModel.Primitives.ModelReaderWriterOptions" /> to use.</param>
<exception cref="T:System.NotSupportedException">If the model does not support the requested <see cref="P:System.ClientModel.Primitives.ModelReaderWriterOptions.Format" />.</exception>
</member>
<member name="T:System.ClientModel.Internal.UnsafeBufferSequence">
<summary>
This class is a helper to write to a <see cref="T:System.Buffers.IBufferWriter`1" /> in a thread safe manner.
It uses the shared pool to allocate buffers and returns them to the pool when disposed.
Since there is no way to ensure someone didn't keep a reference to one of the buffers
it must be disposed of in the same context it was created and its referenced should not be stored or shared.
</summary>
<summary>
Provides a way to read a <see cref="T:System.ClientModel.Internal.UnsafeBufferSequence" /> without exposing the underlying buffers.
This class is not thread safe and should only be used by one thread at a time.
If you dispose while another thread is copying you will end up with a partial copy.
</summary>
</member>
<member name="M:System.ClientModel.Internal.UnsafeBufferSequence.#ctor(System.Int32)">
<summary>
Initializes a new instance of <see cref="T:System.ClientModel.Internal.UnsafeBufferSequence" />.
</summary>
<param name="segmentSize">The size of each buffer segment.</param>
</member>
<member name="M:System.ClientModel.Internal.UnsafeBufferSequence.Advance(System.Int32)">
<summary>
Notifies the <see cref="T:System.ClientModel.Internal.UnsafeBufferSequence" /> that bytes bytes were written to the output <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" />.
You must request a new buffer after calling <see cref="M:System.ClientModel.Internal.UnsafeBufferSequence.Advance(System.Int32)" /> to continue writing more data; you cannot write to a previously acquired buffer.
</summary>
<param name="bytesWritten">The number of bytes written to the <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" />.</param>
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
</member>
<member name="M:System.ClientModel.Internal.UnsafeBufferSequence.GetMemory(System.Int32)">
<summary>
Returns a <see cref="T:System.Memory`1" /> to write to that is at least the requested size, as specified by the <paramref name="sizeHint" /> parameter.
</summary>
<param name="sizeHint">The minimum length of the returned <see cref="T:System.Memory`1" />. If less than 256, a buffer of size 256 will be returned.</param>
<returns>A memory buffer of at least <paramref name="sizeHint" /> bytes. If <paramref name="sizeHint" /> is less than 256, a buffer of size 256 will be returned.</returns>
</member>
<member name="M:System.ClientModel.Internal.UnsafeBufferSequence.GetSpan(System.Int32)">
<summary>
Returns a <see cref="T:System.Span`1" /> to write to that is at least the requested size, as specified by the <paramref name="sizeHint" /> parameter.
</summary>
<param name="sizeHint">The minimum length of the returned <see cref="T:System.Span`1" />. If less than 256, a buffer of size 256 will be returned.</param>
<returns>A buffer of at least <paramref name="sizeHint" /> bytes. If <paramref name="sizeHint" /> is less than 256, a buffer of size 256 will be returned.</returns>
</member>
<member name="M:System.ClientModel.Internal.UnsafeBufferSequence.Dispose">
<summary>
Disposes the SequenceWriter and returns the underlying buffers to the pool.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineMessage.ResponseClassifier">
<summary>
Gets or sets the message classifier used by the client pipeline to
determine whether the response from the service should be considered
an error, and populate the PipelineMessage.Response.IsError property.
It is expected that this property will be set once in the client's
service method with a classifier created from the service API's
published success codes. Setting this value outside the service method
will override the client-specified classifier and should be done at the
caller's risk.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineMessage.BufferResponse">
<summary>
Gets or sets the value indicating whether the response should be buffered
in-memory by the pipeline. Defaults to true.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineMessage.NetworkTimeout">
<summary>
Gets or sets the network timeout value for this message.
If <c>null</c>, the value set on the client's options will be used.
Defaults to <c>null</c>.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineRequest.Method">
<summary>
Gets or sets the request HTTP method.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineResponse.Status">
<summary>
Gets the HTTP status code.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineResponse.ReasonPhrase">
<summary>
Gets the HTTP reason phrase.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineResponse.ContentStream">
<summary>
Gets the contents of HTTP response. Returns <c>null</c> for responses without content.
</summary>
</member>
<member name="P:System.ClientModel.Primitives.PipelineResponse.IsError">
<summary>
Indicates whether the status code of the returned response is considered
an error code.
</summary>
</member>
<member name="T:System.ClientModel.Primitives.IJsonModel`1">

@@ -223,25 +398,196 @@ <summary>

</member>
<member name="T:System.ClientModel.Internal.ModelWriter`1">
<member name="T:System.ClientModel.Primitives.ClientErrorBehaviors">
<summary>
Provides an efficient way to write <see cref="T:System.ClientModel.Primitives.IJsonModel`1" /> into a <see cref="T:System.BinaryData" /> using multiple pooled buffers.
ClientErrorBehaviors controls the behavior of a service method when an unexpected
response status code is received.
</summary>
</member>
<member name="M:System.ClientModel.Internal.ModelWriter`1.#ctor(System.ClientModel.Primitives.IJsonModel{`0},System.ClientModel.Primitives.ModelReaderWriterOptions)">
<member name="F:System.ClientModel.Primitives.ClientErrorBehaviors.Default">
<summary>
Initializes a new instance of <see cref="T:System.ClientModel.Internal.ModelWriter`1" />.
The client will throw an exception from a service method if the service
returns an error response.
</summary>
<param name="model">The model to write.</param>
</member>
<member name="F:System.ClientModel.Primitives.ClientErrorBehaviors.NoThrow">
<summary>
The client will not throw an exception from a service method if the service
returns an error response. Callers of the service method must check the
Response.IsError property before accessing the response content.
</summary>
</member>
<member name="T:System.ClientModel.Primitives.ClientPipelineOptions">
<summary>
Controls the creation of a pipeline used by a service client.
Service clients must create a client-specific subtype of this class
to pass to their constructors to allow for service-specific options
with a client-wide scope.
</summary>
</member>
<member name="T:System.ClientModel.Primitives.RequestOptions">
<summary>
Controls the end-to-end duration of the service method call, including
the message being sent down the pipeline. For the duration of pipeline.Send,
this may change some behaviors in various pipeline policies and the transport.
</summary>
</member>
<member name="M:System.ClientModel.Primitives.ResponseStatusClassifier.#ctor(System.ReadOnlySpan{System.UInt16})">
<summary>
Creates a new instance of <see cref="T:System.ClientModel.Primitives.ResponseStatusClassifier" />.
</summary>
<param name="successStatusCodes">The status codes that this classifier
will consider not to be errors.</param>
</member>
<member name="M:System.ClientModel.Primitives.ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(System.ClientModel.ApiKeyCredential,System.String,System.String)">
<summary>
Create a new instance of the <see cref="T:System.ClientModel.Primitives.ApiKeyAuthenticationPolicy" /> class, where the
credential value will be specified in a request header.
</summary>
<param name="credential">The <see cref="T:System.ClientModel.ApiKeyCredential" /> used to authenticate requests.</param>
<param name="headerName">The name of the request header used to send the key credential in the request.</param>
<param name="keyPrefix">A prefix to prepend before the key credential in the header value.
If provided, the prefix string will be followed by a space and then the credential string.
For example, setting <c>valuePrefix</c> to "SharedAccessKey" will result in the header value
being set fo "SharedAccessKey {credential.Key}".</param>
</member>
<member name="T:System.ClientModel.Primitives.ClientPipeline.RequestOptionsProcessor">
<summary>
Pipeline processor to advance through policies for pipeline customized
per-request by passing RequestOptions to a protocol method.
</summary>
</member>
<member name="F:System.ClientModel.Primitives.HttpClientPipelineTransport.Shared">
<summary>
A shared instance of <see cref="T:System.ClientModel.Primitives.HttpClientPipelineTransport" /> with default parameters.
</summary>
</member>
<member name="M:System.ClientModel.Primitives.HttpClientPipelineTransport.OnSendingRequest(System.ClientModel.Primitives.PipelineMessage,System.Net.Http.HttpRequestMessage)">
<summary>
TBD. Needed for inheritdoc.
</summary>
<param name="message"></param>
<param name="httpRequest"></param>
</member>
<member name="M:System.ClientModel.Primitives.HttpClientPipelineTransport.OnReceivedResponse(System.ClientModel.Primitives.PipelineMessage,System.Net.Http.HttpResponseMessage)">
<summary>
TBD. Needed for inheritdoc.
</summary>
<param name="message"></param>
<param name="httpResponse"></param>
</member>
<member name="M:System.ClientModel.Primitives.PipelineTransport.Process(System.ClientModel.Primitives.PipelineMessage)">
<summary>
TBD: needed for inheritdoc.
</summary>
<param name="message"></param>
</member>
<member name="M:System.ClientModel.Primitives.PipelineTransport.ProcessAsync(System.ClientModel.Primitives.PipelineMessage)">
<summary>
TBD: needed for inheritdoc.
</summary>
<param name="message"></param>
</member>
<member name="M:System.ClientModel.Primitives.PipelineTransport.CreateMessage">
<summary>
TBD: needed for inheritdoc.
</summary>
</member>
<member name="T:System.ClientModel.Primitives.ResponseBufferingPolicy">
<summary>
Pipeline policy to buffer response content or add a timeout to response content
managed by the client.
</summary>
</member>
<member name="M:System.ClientModel.Primitives.ResponseBufferingPolicy.ThrowIfCancellationRequestedOrTimeout(System.Threading.CancellationToken,System.Threading.CancellationToken,System.Exception,System.TimeSpan)">
<summary>Throws a cancellation exception if cancellation has been requested via <paramref name="originalToken" /> or <paramref name="timeoutToken" />.</summary>
<param name="originalToken">The customer provided token.</param>
<param name="timeoutToken">The linked token that is cancelled on timeout provided token.</param>
<param name="inner">The inner exception to use.</param>
<param name="timeout">The timeout used for the operation.</param>
</member>
<member name="M:System.ClientModel.BinaryContent.Create(System.BinaryData)">
<summary>
Creates an instance of <see cref="T:System.ClientModel.BinaryContent" /> that wraps a <see cref="T:System.BinaryData" />.
</summary>
<param name="value">The <see cref="T:System.BinaryData" /> to use.</param>
<returns>An instance of <see cref="T:System.ClientModel.BinaryContent" /> that wraps a <see cref="T:System.BinaryData" />.</returns>
</member>
<member name="M:System.ClientModel.BinaryContent.Create``1(``0,System.ClientModel.Primitives.ModelReaderWriterOptions)">
<summary>
Creates an instance of <see cref="T:System.ClientModel.BinaryContent" /> that wraps a <see cref="T:System.ClientModel.Primitives.IPersistableModel`1" />.
</summary>
<param name="model">The <see cref="T:System.ClientModel.Primitives.IPersistableModel`1" /> to write.</param>
<param name="options">The <see cref="T:System.ClientModel.Primitives.ModelReaderWriterOptions" /> to use.</param>
<exception cref="T:System.NotSupportedException">If the model does not support the requested <see cref="P:System.ClientModel.Primitives.ModelReaderWriterOptions.Format" />.</exception>
<returns>An instance of <see cref="T:System.ClientModel.BinaryContent" /> that wraps a <see cref="T:System.ClientModel.Primitives.IPersistableModel`1" />.</returns>
</member>
<member name="M:System.ClientModel.Internal.ModelWriter`1.ToBinaryData">
<member name="M:System.ClientModel.BinaryContent.TryComputeLength(System.Int64@)">
<summary>
Converts the <see cref="T:System.ClientModel.Internal.ModelWriter`1" /> to a <see cref="T:System.BinaryData" />.
Attempts to compute the length of the underlying body content, if available.
</summary>
<returns>A <see cref="T:System.BinaryData" /> representation of the written <see cref="T:System.ClientModel.Primitives.IJsonModel`1" /> in JSON format.</returns>
<param name="length">The length of the underlying data.</param>
</member>
<member name="M:System.ClientModel.Internal.ModelWriter`1.Dispose">
<member name="M:System.ClientModel.BinaryContent.WriteToAsync(System.IO.Stream,System.Threading.CancellationToken)">
<summary>
Writes contents of this object to an instance of <see cref="T:System.IO.Stream" />.
</summary>
<param name="stream">The stream to write to.</param>
<param name="cancellationToken">To cancellation token to use.</param>
</member>
<member name="M:System.ClientModel.BinaryContent.WriteTo(System.IO.Stream,System.Threading.CancellationToken)">
<summary>
Writes contents of this object to an instance of <see cref="T:System.IO.Stream" />.
</summary>
<param name="stream">The stream to write to.</param>
<param name="cancellationToken">To cancellation token to use.</param>
</member>
<member name="M:System.ClientModel.BinaryContent.Dispose">
<summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
</member>
<member name="T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute">
<summary>
Indicates that the specified method requires the ability to generate new code at runtime,
for example through <see cref="N:System.Reflection" />.
</summary>
<remarks>
This allows tools to understand which methods are unsafe to call when compiling ahead of time.
</remarks>
</member>
<member name="M:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute" /> class
with the specified message.
</summary>
<param name="message">
A message that contains information about the usage of dynamic code.
</param>
</member>
<member name="P:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Message">
<summary>
Gets a message that contains information about the usage of dynamic code.
</summary>
</member>
<member name="P:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Url">
<summary>
Gets or sets an optional URL that contains more information about the method,
why it requires dynamic code, and what options a consumer has to deal with it.
</summary>
</member>
<member name="M:System.ClientModel.Primitives.PipelineRequestHeaders.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through a collection.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
</member>
<member name="M:System.ClientModel.Primitives.PipelineResponseHeaders.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through a collection.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
</member>
<member name="M:System.ClientModel.Primitives.ClientPipeline.RequestOptionsProcessor.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through a collection.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
</member>
<member name="M:System.ClientModel.Internal.TaskExtensions.Enumerable`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator">
<summary>Returns an enumerator that iterates through the collection.</summary><returns>An enumerator that can be used to iterate through the collection.</returns>
</member>
<member name="M:System.ClientModel.Internal.TaskExtensions.Enumerable`1.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through a collection.</summary><returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
</member>
<member name="P:System.ClientModel.Internal.TaskExtensions.Enumerator`1.System#Collections#IEnumerator#Current">
<summary>Gets the element in the collection at the current position of the enumerator.</summary><returns>The element in the collection at the current position of the enumerator.</returns>
</member>
</members>
</doc>
# System.ClientModel library for .NET
`System.ClientModel` provides shared primitives, abstractions, and helpers for .NET service client libraries.
`System.ClientModel` contains building blocks for communicating with cloud services. It provides shared primitives, abstractions, and helpers for .NET service client libraries.
`System.ClientModel` allows client libraries built from its components to expose common functionality in a consistent fashion, so that once you learn how to use these APIs in one client library, you'll know how to use them in other client libraries as well.
[Source code][source] | [Package (NuGet)][package]

@@ -24,2 +26,6 @@

### Authenticate the client
The `System.ClientModel` package provides a `KeyCredential` type for authentication.
## Key concepts

@@ -29,8 +35,34 @@

- Providing APIs to read and write models in different formats.
- Configuring service clients (`ClientPipelineOptions`).
- Accessing HTTP response details (`ClientResult`, `ClientResult<T>`).
- Exceptions for reporting errors from service requests in a consistent fashion (`ClientResultException`).
- Customizing requests (`RequestOptions`).
- Providing APIs to read and write models in different formats (`ModelReaderWriter`).
## Examples
### Simple ModelReaderWriter usage
### Send a message using the MessagePipeline
A very basic client implementation might use the following approach:
```csharp
ApiKeyCredential credential = new ApiKeyCredential(key);
ApiKeyAuthenticationPolicy authenticationPolicy = ApiKeyAuthenticationPolicy.CreateBearerAuthorizationPolicy(credential);
ClientPipeline pipeline = ClientPipeline.Create(pipelineOptions, authenticationPolicy);
PipelineMessage message = pipeline.CreateMessage();
message.Apply(requestOptions);
message.MessageClassifier = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 });
PipelineRequest request = message.Request;
request.Method = "GET";
request.Uri = new Uri("https://www.example.com/");
request.Headers.Add("Accept", "application/json");
pipeline.Send(message);
Console.WriteLine(message.Response.Status);
```
### Read and write persistable models
As a library author you can implement `IPersistableModel<T>` or `IJsonModel<T>` which will give library users the ability to read and write your models.

@@ -56,2 +88,8 @@

## Troubleshooting
You can troubleshoot `System.ClientModel`-based clients by inspecting the result of any `ClientResultException` thrown from a pipeline's `Send` method.
## Next steps
## Contributing

@@ -58,0 +96,0 @@

+4
-4

@@ -5,3 +5,3 @@ <?xml version="1.0" encoding="utf-8"?>

<id>System.ClientModel</id>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
<authors>Microsoft</authors>

@@ -13,7 +13,7 @@ <requireLicenseAcceptance>true</requireLicenseAcceptance>

<readme>README.md</readme>
<projectUrl>https://github.com/Azure/azure-sdk-for-net/blob/System.ClientModel_1.0.0/sdk/core/System.ClientModel/README.md</projectUrl>
<projectUrl>https://github.com/Azure/azure-sdk-for-net/blob/System.ClientModel_1.1.0-beta.1/sdk/core/System.ClientModel/README.md</projectUrl>
<description>Contains building blocks for clients that call cloud services.</description>
<releaseNotes>https://github.com/Azure/azure-sdk-for-net/blob/System.ClientModel_1.0.0/sdk/core/System.ClientModel/CHANGELOG.md</releaseNotes>
<releaseNotes>https://github.com/Azure/azure-sdk-for-net/blob/System.ClientModel_1.1.0-beta.1/sdk/core/System.ClientModel/CHANGELOG.md</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository type="git" url="https://github.com/Azure/azure-sdk-for-net" commit="8ffa7d7f26bb2c5e3dadf74b2aa9c9ba9c9d9208" />
<repository type="git" url="https://github.com/Azure/azure-sdk-for-net" commit="aa36789b97d00f04cf7fd2db9287ce096ee75df3" />
<dependencies>

@@ -20,0 +20,0 @@ <group targetFramework="net6.0">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display