Skip to content
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

[DocsArchive-1.0.23045.1] Archive binary serialization articles #34847

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3144,7 +3144,7 @@
},
{
"source_path_from_root": "/docs/csharp/whats-new/tutorials/mixins-with-default-interface-methods.md",
"redirect_url": "/dotnet/csharp/tutorials/mixins-with-default-interface-methods"
"redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods"
},
{
"source_path_from_root": "/docs/csharp/whats-new/tutorials/nullable-reference-types.md",
Expand Down
59 changes: 52 additions & 7 deletions .openpublishing.redirection.standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,23 +583,23 @@
},
{
"source_path_from_root": "/docs/standard/serialization/marshal-by-value.md",
"redirect_url": "/dotnet/standard/serialization/serialization-concepts"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts"
},
{
"source_path_from_root": "/docs/standard/serialization/persistent-storage.md",
"redirect_url": "/dotnet/standard/serialization/serialization-concepts"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts"
},
{
"source_path_from_root": "/docs/standard/serialization/samples-binary.md",
"redirect_url": "/dotnet/standard/serialization/binary-serialization"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization"
},
{
"source_path_from_root": "/docs/standard/serialization/samples-xml.md",
"redirect_url": "/dotnet/standard/serialization/xml-and-soap-serialization"
},
{
"source_path_from_root": "/docs/standard/serialization/schemaimporterextension-technology-sample.md",
"redirect_url": "/dotnet/standard/serialization/binary-serialization"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization"
},
{
"source_path_from_root": "/docs/standard/serialization/serialization-how-to-topics.md",
Expand All @@ -615,11 +615,11 @@
},
{
"source_path_from_root": "/docs/standard/serialization/version-tolerant-serialization-technology-sample.md",
"redirect_url": "/dotnet/standard/serialization/binary-serialization"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization"
},
{
"source_path_from_root": "/docs/standard/serialization/web-services-generics-serialization-technology-sample.md",
"redirect_url": "/dotnet/standard/serialization/binary-serialization"
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization"
},
{
"source_path_from_root": "/docs/standard/serialization/web-services-ixmlserializable-technology-sample.md",
Expand All @@ -628,7 +628,7 @@
{
"source_path_from_root": "/docs/standard/serialization/write-custom-serializer-deserializer.md",
"redirect_url": "/dotnet/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter"
},
},
{
"source_path_from_root": "/docs/standard/serialization/system-text-json-character-casing.md",
"redirect_url": "/dotnet/standard/serialization/system-text-json/character-casing",
Expand Down Expand Up @@ -719,6 +719,51 @@
"redirect_url": "/dotnet/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter",
"redirect_document_id": true
},
{
"source_path": "docs/standard/serialization/binary-serialization.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/binaryformatter-event-source.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binaryformatter-event-source",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/serialization-concepts.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/basic-serialization.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/basic-serialization",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/selective-serialization.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/selective-serialization",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/custom-serialization.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/custom-serialization",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/steps-in-the-serialization-process.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/steps-in-the-serialization-process",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/version-tolerant-serialization.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/version-tolerant-serialization",
"redirect_document_id": false
},
{
"source_path": "docs/standard/serialization/serialization-guidelines.md",
"redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-guidelines",
"redirect_document_id": false
},
{
"source_path_from_root": "/docs/standard/threading/autoresetevent.md",
"redirect_url": "/dotnet/api/system.threading.autoresetevent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ For more detailed information on implementing commands, see the section [Impleme

## Source Generators

Using the MVVM Toolkit components out-of-the-box allows you to greatly simplify our ViewModel. The MVVM Toolkit allows you to simplify common code use cases even further by using [Source Generators](/dotnet/csharp/roslyn-sdk/source-generators-overview). The MVVM Toolkit source generators look for specific attributes in our code and can generate wrappers for properties and commands.
Using the MVVM Toolkit components out-of-the-box allows you to greatly simplify our ViewModel. The MVVM Toolkit allows you to simplify common code use cases even further by using [Source Generators](../../csharp/roslyn-sdk/source-generators-overview.md). The MVVM Toolkit source generators look for specific attributes in our code and can generate wrappers for properties and commands.

> [!IMPORTANT]
> The MVVM Toolkit Source Generators generate code that is additive to our existing objects. Because of this, any object that is leveraging a source generator will need to be marked as `partial`.
Expand Down
4 changes: 2 additions & 2 deletions docs/core/compatibility/unsupported-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This article organizes the affected APIs by namespace.
> [!NOTE]
>
> - This article is a work-in-progress. It is not a complete list of APIs that throw exceptions on .NET 5+.
> - This article does not include the explicit interface implementations for binary serialization that throw on .NET 5+. For more information, see [Binary serialization in .NET Core](../../standard/serialization/binary-serialization.md#net-core).
> - This article does not include the explicit interface implementations for binary serialization that throw on .NET 5+. For more information, see [Binary serialization in .NET Core](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization#net-core).

## System

Expand Down Expand Up @@ -342,5 +342,5 @@ This article organizes the affected APIs by namespace.
## See also

- [Breaking changes for migration from .NET Framework to .NET Core](fx-core.md)
- [Binary serialization in .NET Core](../../standard/serialization/binary-serialization.md#net-core)
- [Binary serialization in .NET Core](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization#net-core)
- [.NET portability analyzer](../../standard/analyzers/portability-analyzer.md)
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ foreach (string str in query)
- [Standard Query Operators Overview (C#)](./standard-query-operators-overview.md)
- [where clause](../../../language-reference/keywords/where-clause.md)
- [Dynamically specify predicate filters at run time](../../../linq/dynamically-specify-predicate-filters-at-runtime.md)
- [How to query an assembly's metadata with Reflection (LINQ) (C#)](/dotnet/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq)
- [How to query an assembly's metadata with Reflection (LINQ) (C#)](../../../advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md)
- [How to query for files with a specified attribute or name (C#)](./how-to-query-for-files-with-a-specified-attribute-or-name.md)
- [How to sort or filter text data by any word or field (LINQ) (C#)](./how-to-sort-or-filter-text-data-by-any-word-or-field-linq.md)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The term "LINQ to Objects" refers to the use of LINQ queries with any <xref:Syst
[LINQ and Strings (C#)](./linq-and-strings.md)
Explains how LINQ can be used to query and transform strings and collections of strings. Also includes links to articles that demonstrate these principles.

[LINQ and Reflection (C#)](/dotnet/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq)
[LINQ and Reflection (C#)](../../../advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md)
Links to a sample that demonstrates how LINQ uses reflection.

[LINQ and File Directories (C#)](./linq-and-file-directories.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model

### Binary Serialization

If a class implements the <xref:System.Runtime.Serialization.ISerializable> interface, you can serialize an object to any SQL binary field (`BINARY`, `VARBINARY`, `IMAGE`). The object is serialized and deserialized according to how the <xref:System.Runtime.Serialization.ISerializable> interface is implemented. For more information, see [Binary Serialization](../../../../../standard/serialization/binary-serialization.md).
If a class implements the <xref:System.Runtime.Serialization.ISerializable> interface, you can serialize an object to any SQL binary field (`BINARY`, `VARBINARY`, `IMAGE`). The object is serialized and deserialized according to how the <xref:System.Runtime.Serialization.ISerializable> interface is implemented. For more information, see [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization).

<a name="MiscMapping"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Windows Communication Foundation (WCF) includes a new serialization engine, the

- The <xref:System.Runtime.Serialization.NetDataContractSerializer.Serialize%2A> and <xref:System.Runtime.Serialization.NetDataContractSerializer.Deserialize%2A> methods are aliases for the <xref:System.Runtime.Serialization.XmlObjectSerializer.WriteObject%2A> and <xref:System.Runtime.Serialization.XmlObjectSerializer.ReadObject%2A> methods. These exist to provide a more consistent programming model with binary or SOAP serialization.

For more information about these features, see [Binary Serialization](../../../standard/serialization/binary-serialization.md).
For more information about these features, see [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization).

The XML formats that the `NetDataContractSerializer` and the `DataContractSerializer` use are normally not compatible. That is, attempting to serialize with one of these serializers and deserialize with the other is not a supported scenario.

Expand All @@ -282,5 +282,5 @@ Windows Communication Foundation (WCF) includes a new serialization engine, the
- <xref:System.Runtime.Serialization.DataContractSerializer>
- <xref:System.Runtime.Serialization.NetDataContractSerializer>
- <xref:System.Runtime.Serialization.XmlObjectSerializer>
- [Binary Serialization](../../../standard/serialization/binary-serialization.md)
- [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization)
- [Types Supported by the Data Contract Serializer](types-supported-by-the-data-contract-serializer.md)
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ The data contract programming model fully supports the version-tolerant serializ
- <xref:System.Runtime.Serialization.OnDeserializingAttribute>
- <xref:System.Runtime.Serialization.OnDeserializedAttribute>
- <xref:System.Runtime.Serialization.StreamingContext>
- [Version Tolerant Serialization](../../../standard/serialization/version-tolerant-serialization.md)
- [Version Tolerant Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/version-tolerant-serialization)
2 changes: 1 addition & 1 deletion docs/fundamentals/code-analysis/quality-rules/ca1801.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This rule does not examine the following kinds of methods:

- Methods used as event handlers.

- Serialization constructors (see [guidelines](../../../standard/serialization/serialization-guidelines.md#runtime-serialization)).
- Serialization constructors (see [guidelines](/previous-versions/dotnet/fundamentals/serialization/serialization-guidelines#runtime-serialization)).

- Serialization <xref:System.Runtime.Serialization.ISerializable.GetObjectData%2A> methods.

Expand Down
31 changes: 6 additions & 25 deletions docs/fundamentals/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,31 +585,6 @@ items:
href: ../standard/serialization/system-text-json/converters-how-to.md
- name: Customize contracts
href: ../standard/serialization/system-text-json/custom-contracts.md
- name: Binary serialization
items:
- name: Overview
href: ../standard/serialization/binary-serialization.md
displayName: binary serialization
- name: BinaryFormatter security guide
href: ../standard/serialization/binaryformatter-security-guide.md
- name: BinaryFormatter event source
href: ../standard/serialization/binaryformatter-event-source.md
- name: Serialization concepts
href: ../standard/serialization/serialization-concepts.md
- name: Basic serialization
href: ../standard/serialization/basic-serialization.md
- name: Selective serialization
href: ../standard/serialization/selective-serialization.md
- name: Custom serialization
href: ../standard/serialization/custom-serialization.md
- name: Steps in the serialization process
href: ../standard/serialization/steps-in-the-serialization-process.md
- name: Version-tolerant serialization
href: ../standard/serialization/version-tolerant-serialization.md
- name: Serialization guidelines
href: ../standard/serialization/serialization-guidelines.md
- name: "How to: Chunk serialized data"
href: ../standard/serialization/how-to-chunk-serialized-data.md
- name: XML and SOAP serialization
items:
- name: Overview
Expand Down Expand Up @@ -646,6 +621,8 @@ items:
href: ../standard/serialization/how-to-serialize-an-object-as-a-soap-encoded-xml-stream.md
- name: Override encoded SOAP XML serialization
href: ../standard/serialization/how-to-override-encoded-soap-xml-serialization.md
- name: Chunk serialized data
href: ../standard/serialization/how-to-chunk-serialized-data.md
- name: XML serialization elements
items:
- name: system.xml.serialization
Expand All @@ -664,6 +641,10 @@ items:
href: ../standard/serialization/xml-serializer-generator-tool-sgen-exe.md
- name: XML Schema Definition tool (Xsd.exe)
href: ../standard/serialization/xml-schema-definition-tool-xsd-exe.md
- name: Binary serialization
items:
- name: BinaryFormatter security guide
href: ../standard/serialization/binaryformatter-security-guide.md
- name: System.CommandLine
items:
- name: Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/orleans/host/configuration-guide/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ The <xref:Orleans.Serialization.BinaryFormatterSerializer> is the default fallba

## Exception serialization

Exceptions are serialized using the [fallback serializer](serialization.md#fallback-serialization). Using the default configuration, `BinaryFormatter` is the fallback serializer and so the [ISerializable pattern](../../../standard/serialization/custom-serialization.md) must be followed in order to ensure correct serialization of all properties in an exception type.
Exceptions are serialized using the [fallback serializer](serialization.md#fallback-serialization). Using the default configuration, `BinaryFormatter` is the fallback serializer and so the [ISerializable pattern](/previous-versions/dotnet/fundamentals/serialization/binary/custom-serialization) must be followed in order to ensure correct serialization of all properties in an exception type.

Here is an example of an exception type with correctly implemented serialization:

Expand Down
Loading