-
Notifications
You must be signed in to change notification settings - Fork 5.1k
ClientModel: Reshuffle some whitespace and files for consistency across ClientModel #41425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
annelo-msft
merged 10 commits into
Azure:main
from
annelo-msft:clientmodel-consistency-nits
Jan 20, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ae20bd7
Initial implementation of SetHeader
annelo-msft 749de83
Merge remote-tracking branch 'upstream/main' into clientmodel-request…
annelo-msft 76b661c
Add tests for SetHeader
annelo-msft d73780b
more tests
annelo-msft 1ae0a22
updates
annelo-msft 1741222
Reshuffle a bit for consistency across ClientModel files
annelo-msft 8f6b292
remove SetHeader changes that will be part of a separate PR
annelo-msft 4fa81b5
nits
annelo-msft 69709d9
Add .editorconfig
annelo-msft 8406f4e
remove most NoWarn suppressions from .csproj
annelo-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [/**.cs] | ||
| csharp_style_namespace_declarations = file_scoped:error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 27 additions & 28 deletions
55
sdk/core/System.ClientModel/src/ModelReaderWriter/IPersistableModel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,36 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace System.ClientModel.Primitives | ||
| namespace System.ClientModel.Primitives; | ||
|
|
||
| /// <summary> | ||
| /// Allows an object to control its own writing and reading. | ||
| /// The format is determined by the implementer. | ||
| /// </summary> | ||
| /// <typeparam name="T">The type the model can be converted into.</typeparam> | ||
| public interface IPersistableModel<out T> | ||
| { | ||
| /// <summary> | ||
| /// Allows an object to control its own writing and reading. | ||
| /// The format is determined by the implementer. | ||
| /// Writes the model into a <see cref="BinaryData"/>. | ||
| /// </summary> | ||
| /// <typeparam name="T">The type the model can be converted into.</typeparam> | ||
| public interface IPersistableModel<out T> | ||
| { | ||
| /// <summary> | ||
| /// Writes the model into a <see cref="BinaryData"/>. | ||
| /// </summary> | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// <returns>A binary representation of the written model.</returns> | ||
| /// <exception cref="FormatException">If the model does not support the requested <see cref="ModelReaderWriterOptions.Format"/>.</exception> | ||
| BinaryData Write(ModelReaderWriterOptions options); | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// <returns>A binary representation of the written model.</returns> | ||
| /// <exception cref="FormatException">If the model does not support the requested <see cref="ModelReaderWriterOptions.Format"/>.</exception> | ||
| BinaryData Write(ModelReaderWriterOptions options); | ||
|
|
||
| /// <summary> | ||
| /// Converts the provided <see cref="BinaryData"/> into a model. | ||
| /// </summary> | ||
| /// <param name="data">The <see cref="BinaryData"/> to parse.</param> | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// <returns>A <typeparamref name="T"/> representation of the data.</returns> | ||
| /// <exception cref="FormatException">If the model does not support the requested <see cref="ModelReaderWriterOptions.Format"/>.</exception> | ||
| T Create(BinaryData data, ModelReaderWriterOptions options); | ||
| /// <summary> | ||
| /// Converts the provided <see cref="BinaryData"/> into a model. | ||
| /// </summary> | ||
| /// <param name="data">The <see cref="BinaryData"/> to parse.</param> | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// <returns>A <typeparamref name="T"/> representation of the data.</returns> | ||
| /// <exception cref="FormatException">If the model does not support the requested <see cref="ModelReaderWriterOptions.Format"/>.</exception> | ||
| T Create(BinaryData data, ModelReaderWriterOptions options); | ||
|
|
||
| /// <summary> | ||
| /// Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// </summary> | ||
| /// <returns>The format that the model uses when communicating with the serivce.</returns> | ||
| string GetFormatFromOptions(ModelReaderWriterOptions options); | ||
| } | ||
| /// <summary> | ||
| /// Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. | ||
| /// <param name="options">The <see cref="ModelReaderWriterOptions"/> to use.</param> | ||
| /// </summary> | ||
| /// <returns>The format that the model uses when communicating with the serivce.</returns> | ||
| string GetFormatFromOptions(ModelReaderWriterOptions options); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.