Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit bc85dd0

Browse files
committed
Merge pull request #1969 from dotnet-bot/from-tfs
Merge changes from TFS
2 parents d955381 + 79e7de8 commit bc85dd0

File tree

65 files changed

+11506
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+11506
-188
lines changed

src/System.Private.DataContractSerialization/src/Resources/Strings.resx

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,4 +921,167 @@
921921
<data name="UnknownDataContract" xml:space="preserve">
922922
<value>Unknown data contract: '{0}'.</value>
923923
</data>
924+
<data name="SerializationCodeIsMissingForType" xml:space="preserve">
925+
<value>Type '{0}' cannot be serialized, serialization code for the type is missing. Consult the SDK documentation for adding it as a root serialization type.</value>
926+
</data>
927+
<data name="InvalidXmlDeserializingExtensionData" xml:space="preserve">
928+
<value>The XML encountered when deserializing extension data is invalid.</value>
929+
</data>
930+
<data name="InvalidStateInExtensionDataReader" xml:space="preserve">
931+
<value>An internal error has occurred. ExtensionDataReader is in an invalid state.</value>
932+
</data>
933+
<data name="InvalidDataNode" xml:space="preserve">
934+
<value>'{0}' is an invalid data node when deserializing extension data.</value>
935+
</data>
936+
<data name="JsonTypeNotSupportedByDataContractJsonSerializer" xml:space="preserve">
937+
<value>DataContractJsonSerializer does not support objects of type '{0}'.</value>
938+
</data>
939+
<data name="GetOnlyCollectionMustHaveAddMethod" xml:space="preserve">
940+
<value>Collection interface type '{0}' is being used as a get-only property and does not have an Add method. Consider adding a setter to the property or using a collection data contract that does have an Add method - for example IList or ICollection&lt;T&gt;.</value>
941+
</data>
942+
<data name="JsonUnexpectedAttributeValue" xml:space="preserve">
943+
<value>The attribute 'type' must have one of the following strings as its values: 'string', 'number', 'array', 'object', 'null', or 'boolean'. Encountered unexpected value '{0}'</value>
944+
</data>
945+
<data name="JsonInvalidDateTimeString" xml:space="preserve">
946+
<value>DateTime content '{0}' does not start with '{1}' and end with '{2}' as required for JSON.</value>
947+
</data>
948+
<data name="GenericCallbackException" xml:space="preserve">
949+
<value>A user callback threw an exception. Check the exception stack and inner exception to determine the callback that failed.</value>
950+
</data>
951+
<data name="JsonEncounteredUnexpectedCharacter" xml:space="preserve">
952+
<value>Encountered unexpected character '{0}'.</value>
953+
</data>
954+
<data name="JsonOffsetExceedsBufferSize" xml:space="preserve">
955+
<value>The specified offset exceeds the buffer size ({0} bytes).</value>
956+
</data>
957+
<data name="JsonSizeExceedsRemainingBufferSpace" xml:space="preserve">
958+
<value>The specified size exceeds the remaining buffer space ('{0}' bytes).</value>
959+
</data>
960+
<data name="InvalidCharacterEncountered" xml:space="preserve">
961+
<value>Encountered invalid character '{0}'.</value>
962+
</data>
963+
<data name="JsonInvalidFFFE" xml:space="preserve">
964+
<value>Characters with hexadecimal values 0xFFFE and 0xFFFF are not valid.</value>
965+
</data>
966+
<data name="JsonDateTimeOutOfRange" xml:space="preserve">
967+
<value>DateTime values that are greater than DateTime.MaxValue or smaller than DateTime.MinValue when converted to UTC cannot be serialized to JSON.</value>
968+
</data>
969+
<data name="JsonWriteArrayNotSupported" xml:space="preserve">
970+
<value>To write JSON arrays, use XML writer methods to write the attribute type='array' followed by methods like WriteStartElement (with the local name 'item'), WriteAttributeString, and WriteEndElement to write the JSON array items.</value>
971+
</data>
972+
<data name="JsonMethodNotSupported" xml:space="preserve">
973+
<value>This XmlDictionaryWriter implementation does not support the '{0}' method.</value>
974+
</data>
975+
<data name="JsonNoMatchingStartAttribute" xml:space="preserve">
976+
<value>There is no open attribute.</value>
977+
</data>
978+
<data name="JsonNamespaceMustBeEmpty" xml:space="preserve">
979+
<value>Encountered unexpected namespace '{0}'. The namespace must be empty.</value>
980+
</data>
981+
<data name="JsonEndElementNoOpenNodes" xml:space="preserve">
982+
<value>No corresponding start element is open.</value>
983+
</data>
984+
<data name="JsonOpenAttributeMustBeClosedFirst" xml:space="preserve">
985+
<value>Cannot call {0} while an attribute is being written.</value>
986+
</data>
987+
<data name="JsonMustSpecifyDataType" xml:space="preserve">
988+
<value>You must write an attribute '{0}'='{1}' after writing the attribute with local name '{2}'.</value>
989+
</data>
990+
<data name="JsonXmlProcessingInstructionNotSupported" xml:space="preserve">
991+
<value>Processing instructions (other than the XML declaration) are not supported.</value>
992+
</data>
993+
<data name="JsonXmlInvalidDeclaration" xml:space="preserve">
994+
<value>XML declaration can only be written at the beginning of the document.</value>
995+
</data>
996+
<data name="JsonInvalidLocalNameEmpty" xml:space="preserve">
997+
<value>The empty string is not a valid local name in JSON.</value>
998+
</data>
999+
<data name="JsonPrefixMustBeNullOrEmpty" xml:space="preserve">
1000+
<value>Encountered unexpected prefix '{0}'. The prefix must be null or empty.</value>
1001+
</data>
1002+
<data name="JsonAttributeMustHaveElement" xml:space="preserve">
1003+
<value>WriteStartElement must be called at least once before WriteStartAttribute may be called.</value>
1004+
</data>
1005+
<data name="JsonAttributeAlreadyWritten" xml:space="preserve">
1006+
<value>Cannot write attribute with local name '{0}' multiple times.</value>
1007+
</data>
1008+
<data name="JsonServerTypeSpecifiedForInvalidDataType" xml:space="preserve">
1009+
<value>Attempted to write an attribute with local name '{0}' after writing the attribute '{1}'='{2}'. An attribute with local name '{0}' may be written only after writing the attribute '{1}'='{3}'.</value>
1010+
</data>
1011+
<data name="JsonUnexpectedAttributeLocalName" xml:space="preserve">
1012+
<value>Encountered unexpected attribute local name '{0}'. 'type' and '__type' are the only allowed local names for attributes. 'type' can be used to influence how data is written; its valid values are 'object', 'string', 'number', 'null', 'boolean', and 'array'. '__type' can be used to provide type hint information to the writer.</value>
1013+
</data>
1014+
<data name="JsonInvalidWriteState" xml:space="preserve">
1015+
<value>'{0}' cannot be called while WriteState is '{1}'.</value>
1016+
</data>
1017+
<data name="JsonMultipleRootElementsNotAllowedOnWriter" xml:space="preserve">
1018+
<value>This XmlDictionaryWriter implementation does not support the writing of multiple root elements.</value>
1019+
</data>
1020+
<data name="JsonInvalidRootElementName" xml:space="preserve">
1021+
<value>Encountered invalid root element name '{0}'. '{1}' is the only allowed root element name.</value>
1022+
</data>
1023+
<data name="JsonNodeTypeArrayOrObjectNotSpecified" xml:space="preserve">
1024+
<value>WriteStartElement cannot be called immediately after WriteStartElement without writing the 'type'='array' or 'type='object' attribute.</value>
1025+
</data>
1026+
<data name="JsonInvalidItemNameForArrayElement" xml:space="preserve">
1027+
<value>Encountered unexpected element local name '{0}' for item in collection. '{1}' is the only valid local name for elements in a collection.</value>
1028+
</data>
1029+
<data name="JsonInvalidStartElementCall" xml:space="preserve">
1030+
<value>WriteStartElement can be called at only the start of a document or immediately after calling WriteEndElement.</value>
1031+
</data>
1032+
<data name="JsonOnlyWhitespace" xml:space="preserve">
1033+
<value>Unexpected character '{0}'. '{1}' can write only white space characters.</value>
1034+
</data>
1035+
<data name="JsonWriterClosed" xml:space="preserve">
1036+
<value>The writer is closed.</value>
1037+
</data>
1038+
<data name="JsonCannotWriteStandaloneTextAfterQuotedText" xml:space="preserve">
1039+
<value>Cannot write a CLR value that maps to number, array, object, true, false or null in JSON after a string value has been written.</value>
1040+
</data>
1041+
<data name="JsonMustUseWriteStringForWritingAttributeValues" xml:space="preserve">
1042+
<value>To write attribute values with this XmlDictionaryWriter implementation, you must write either string or char[] values.</value>
1043+
</data>
1044+
<data name="JsonInvalidDataTypeSpecifiedForServerType" xml:space="preserve">
1045+
<value>Attempted to write an attribute '{0}'='{1}' after writing the attribute with local name '{2}'. The attribute with local name '{2}' is only valid with an attribute '{0}'='{3}'.</value>
1046+
</data>
1047+
<data name="JsonInvalidMethodBetweenStartEndAttribute" xml:space="preserve">
1048+
<value>Cannot write content while an attribute is being written.</value>
1049+
</data>
1050+
<data name="JsonCannotWriteTextAfterNonTextAttribute" xml:space="preserve">
1051+
<value>Attempted to write text after writing attribute type='{0}'. Text may be written only after the attributes type='number', type='boolean', or type='string'.</value>
1052+
</data>
1053+
<data name="JsonNestedArraysNotSupported" xml:space="preserve">
1054+
<value>Nested arrays are not supported.</value>
1055+
</data>
1056+
<data name="JsonEncodingNotSupported" xml:space="preserve">
1057+
<value>Encoding not supported in JSON. UTF-8, Unicode, and BigEndianUnicode are the only supported encodings.</value>
1058+
</data>
1059+
<data name="JsonExpectedEncoding" xml:space="preserve">
1060+
<value>The expected encoding '{0}' does not match the actual encoding '{1}'.</value>
1061+
</data>
1062+
<data name="JsonUnexpectedEndOfFile" xml:space="preserve">
1063+
<value>Unexpected end of file.</value>
1064+
</data>
1065+
<data name="AssemblyNotFound" xml:space="preserve">
1066+
<value>Assembly '{0}' is not found.</value>
1067+
</data>
1068+
<data name="ClrTypeNotFound" xml:space="preserve">
1069+
<value>The deserializer cannot load the type to deserialize because type '{1}' could not be found in assembly '{0}'. Check that the type being serialized has the same contract as the type being deserialized and the same assembly is used.</value>
1070+
</data>
1071+
<data name="AttributeNotFound" xml:space="preserve">
1072+
<value>XML '{2}' '{3}:{4}' does not contain expected attribute '{0}:{1}'. The deserializer has no knowledge of which type to deserialize. Check that the type being serialized has the same contract as the type being deserialized.</value>
1073+
</data>
1074+
<data name="JsonDuplicateMemberInInput" xml:space="preserve">
1075+
<value>The data contract type '{0}' cannot be deserialized because the data member '{1}' was found more than once in the input.</value>
1076+
</data>
1077+
<data name="JsonRequiredMembersNotFound" xml:space="preserve">
1078+
<value>The data contract type '{0}' cannot be deserialized because the required data members '{1}' were not found.</value>
1079+
</data>
1080+
<data name="JsonOneRequiredMemberNotFound" xml:space="preserve">
1081+
<value>The data contract type '{0}' cannot be deserialized because the required data member '{1}' was not found.</value>
1082+
</data>
1083+
<data name="EnumTypeNotSupportedByDataContractJsonSerializer" xml:space="preserve">
1084+
<value>DataContractJsonSerializer does not support data members of type '{0}'. Consider using int, System.Object, or a concrete enum definition instead.</value>
1085+
</data>
1086+
9241087
</root>

src/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</PropertyGroup>
2424
<ItemGroup>
2525
<Compile Include="$(CommonPath)\System\__HResults.cs" />
26+
<Compile Include="$(CommonPath)\System\NotImplemented.cs" />
2627
<Compile Include="$(RuntimeSerializationSources)\Attributes.cs" />
2728
<Compile Include="$(RuntimeSerializationSources)\CodeGenerator.cs" />
2829
<Compile Include="$(RuntimeSerializationSources)\ClassDataContract.cs" />
@@ -37,8 +38,12 @@
3738
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializerSettings.cs" />
3839
<Compile Include="$(RuntimeSerializationSources)\DataMember.cs" />
3940
<Compile Include="$(RuntimeSerializationSources)\EnumDataContract.cs" />
41+
<Compile Include="$(RuntimeSerializationSources)\ExtensionDataObject.cs" />
42+
<Compile Include="$(RuntimeSerializationSources)\ExtensionDataReader.cs" />
4043
<Compile Include="$(RuntimeSerializationSources)\Globals.cs" />
44+
<Compile Include="$(RuntimeSerializationSources)\GenericParameterDataContract.cs" />
4145
<Compile Include="$(RuntimeSerializationSources)\HybridObjectCache.cs" />
46+
<Compile Include="$(RuntimeSerializationSources)\InvalidDataContract.cs" />
4247
<Compile Include="$(RuntimeSerializationSources)\ObjectToIdCache.cs" />
4348
<Compile Include="$(RuntimeSerializationSources)\ObjectReferenceStack.cs" />
4449
<Compile Include="$(RuntimeSerializationSources)\PrimitiveDataContract.cs" />
@@ -61,8 +66,10 @@
6166
<Compile Include="$(RuntimeSerializationSources)\TypeCode.cs" />
6267
<Compile Include="$(RuntimeSerializationSources)\ExceptionDataContract.cs" />
6368
<Compile Include="$(RuntimeSerializationSources)\KnownTypeDataContractResolver.cs" />
69+
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerReadContextComplex.cs" />
70+
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContextComplex.cs" />
6471
<Compile Include="$(XmlSources)\ArrayHelper.cs" />
65-
<Compile Include="$(XmlSources)\IStreamProvider.cs" Condition="'$(BuildProjectName)' == 'CoreSys'" />
72+
<Compile Include="$(XmlSources)\IStreamProvider.cs" />
6673
<Compile Include="$(XmlSources)\IXmlDictionary.cs" />
6774
<Compile Include="$(XmlSources)\PrefixHandle.cs" />
6875
<Compile Include="$(XmlSources)\StringHandle.cs" />
@@ -83,14 +90,31 @@
8390
<Compile Include="$(XmlSources)\XmlDictionaryReaderQuotas.cs" />
8491
<Compile Include="$(XmlSources)\XmlDictionaryString.cs" />
8592
<Compile Include="$(XmlSources)\XmlExceptionHelper.cs" />
93+
<Compile Include="$(XmlSources)\XmlNodeReader.cs" />
8694
<Compile Include="$(XmlSources)\XmlNodeWriter.cs" />
8795
<Compile Include="$(XmlSources)\XmlStreamNodeWriter.cs" />
8896
<Compile Include="$(XmlSources)\XmlSchemaSet.cs" />
8997
<Compile Include="$(XmlSources)\XmlUTF8TextReader.cs" />
98+
<Compile Include="$(XmlSources)\XmlUTF8TextWriter.cs" />
9099
<Compile Include="$(XmlSources)\EncodingStreamWrapper.cs" />
91100
<Compile Include="$(TextSources)\Base64Encoding.cs" />
92101
<Compile Include="$(TextSources)\SurrogateChar.cs" />
102+
<Compile Include="$(TextSources)\BinHexEncoding.cs" />
93103
<Compile Include="$(JsonSources)\DataContractJsonSerializer.cs" />
104+
<Compile Include="$(JsonSources)\JsonByteArrayDataContract.cs" />
105+
<Compile Include="$(JsonSources)\JsonClassDataContract.cs" />
106+
<Compile Include="$(JsonSources)\JsonCollectionDataContract.cs" />
107+
<Compile Include="$(JsonSources)\JsonDataContract.cs" />
108+
<Compile Include="$(JsonSources)\JsonEnumDataContract.cs" />
109+
<Compile Include="$(JsonSources)\JsonFormatWriterGenerator.cs" />
110+
<Compile Include="$(JsonSources)\JsonFormatReaderGenerator.cs" />
111+
<Compile Include="$(JsonSources)\JsonObjectDataContract.cs" />
112+
<Compile Include="$(JsonSources)\JsonQNameDataContract.cs" />
113+
<Compile Include="$(JsonSources)\JsonReaderDelegator.cs" />
114+
<Compile Include="$(JsonSources)\JsonWriterDelegator.cs" />
115+
<Compile Include="$(JsonSources)\JsonStringDataContract.cs" />
116+
<Compile Include="$(JsonSources)\JsonUriDataContract.cs" />
117+
<Compile Include="$(JsonSources)\JsonXmlDataContract.cs" />
94118
<Compile Include="$(JsonSources)\JsonGlobals.cs" />
95119
<Compile Include="$(JsonSources)\XmlObjectSerializerReadContextComplexJson.cs" />
96120
<Compile Include="$(JsonSources)\XmlObjectSerializerWriteContextComplexJson.cs" />
@@ -103,6 +127,14 @@
103127
<Compile Include="$(JsonSources)\DateTimeFormat.cs" />
104128
<Compile Include="$(JsonSources)\EmitTypeInformation.cs" />
105129
<Compile Include="$(JsonSources)\DataContractJsonSerializerSettings.cs" />
130+
<Compile Include="$(JsonSources)\XmlJsonReader.cs" />
131+
<Compile Include="$(JsonSources)\XmlJsonWriter.cs" />
132+
<Compile Include="$(JsonSources)\JsonReaderWriterFactory.cs" />
133+
<Compile Include="$(JsonSources)\JsonNodeType.cs" />
134+
<Compile Include="$(JsonSources)\IXmlJsonReaderInitializer.cs" />
135+
<Compile Include="$(JsonSources)\IXmlJsonWriterInitializer.cs" />
136+
<Compile Include="$(JsonSources)\ByteArrayHelperWithString.cs" />
137+
<Compile Include="$(JsonSources)\JsonEncodingStreamWrapper.cs" />
106138
</ItemGroup>
107139
<ItemGroup>
108140
<ProjectReference Include="..\..\System.Runtime.Serialization.Primitives\src\System.Runtime.Serialization.Primitives.csproj">

0 commit comments

Comments
 (0)