Commit Graph
67 Commits
Author SHA1 Message Date
Miguel de Icaza 2852ed0b59 Update copyrights 2011-09-13 18:26:13 -04:00
Atsushi Eno 3d385eb270 Skip serialization when the return type is void.
This batch should fix bug #206.
2011-08-24 12:14:48 -07:00
Atsushi Eno 78c5897e95 When there was no path parameter, it ignored the whole path part. 2011-08-24 12:02:38 -07:00
Atsushi Eno cc8c07fb8c UriTemplate should not be mandatory, make it optional. Fix unit test. 2011-08-23 11:31:06 -07:00
Atsushi Eno 77ed4bb435 Support named wildcard in UriTemplate matching. Fixed bug #693996. 2011-05-23 20:31:00 +09:00
Atsushi Eno 15d313b0e3 Fix regression for counter case to 6005f0a7.
http://localhost/x + X should not result in http://localhost/xX.
2011-04-15 16:37:58 +09:00
Atsushi Eno 0dde95d9af Implement 4.0 WebOperationContext.Create[Atom10|Json]Response() methods. 2011-04-08 21:38:09 +09:00
Atsushi Eno 5670f5b5ce Auto-detect text encoding from input stream for JsonReader. Fix DBCS pushback. 2011-04-05 18:22:56 +09:00
Atsushi Eno 3f0fe0dcde IDictionary`2 serialization support was missing in DataContractJsonSerializer.
Fixed bug #685042.
2011-04-05 13:19:54 +09:00
Atsushi Eno 7917753273 null JSON type must be handled in JsonWriter. 2011-03-26 21:27:19 +09:00
Atsushi Eno 96ca8b4b42 More xml output fixes in XmlSyndicationContent and SydicationElementExtension.
They have couple of complicated xml outputs in both GetReader(AtContent)
and Write(Contents)To methods... check new tests for details.
2011-03-08 22:04:18 +09:00
Atsushi Eno eafe520c4b Couple of fixes around XmlSyndicationContent.GetReaderAtContent().
- The returned XmlReader is positioned at the beginning of the element.
- XmlSyndicationContent.GetReaderAtContent() returns XmlReader that begins
  with the "wrapper" which is dummy Atom 1.0 content element.
2011-03-08 18:56:00 +09:00
Atsushi Eno 2464cfc869 Read body content if required. Fixed all issues in bug #656020.
Now it considers message content format and IsWrapped[Request|Response] to
retrieve XmlObjectSerializer.
2011-01-20 15:32:33 +09:00
Atsushi Eno 997a5664a9 Enable duplicate "UriMatched" error check, with couple of FIXMEs.
.NET is very unclear about those UriTemplate behavior. Too minor to mind.
2011-01-19 20:22:45 +09:00
Atsushi Eno 7d5b5a1b7f Fix template match logic to first check HTTP-method-matching ones.
Part of the fix for bug #656020.
2011-01-19 19:01:49 +09:00
Marek Habersack 6005f0a7df [wcf] UriTemplate must trim the first leading slash in the rendered template.
When using BindBy{Name,Position} UriTemplate must remove the the first slash from
the rendered URI. This fixes the 4 failing tests.
2011-01-04 13:56:12 +01:00
Frank Wilhelm 37329cdd7c Make Validate() less restrictive for contracts with explicit UriTemplate. 2010-10-15 19:41:33 +09:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Atsushi Eno 5628b49a01 implemented large parts of WCF standard endpoints and configuration support. 2010-09-13 22:36:37 +09:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Atsushi Eno cee551a2f4 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageEncoder.cs : support Raw message in ReadMessage() too.
	  Allow null content type.

	* WebMessageFormatter.cs : do not depend on WebOperationContext.
	  add support for Raw format request.

	* WebMessageEncodingBindingElementTest.cs : add test for null
	  content type for ReadMessage() (allowed),

	* WebHttpBehaviorTest.cs : add test for deserializing Raw request
	  message too.


svn path=/trunk/mcs/; revision=160377
2010-07-14 18:24:54 +00:00
Atsushi Eno 74ec2c95ef 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : add support for Raw format.

	* WebMessageEncoder.cs : support Raw message. Fixed bug #619542.

	* WebHttpBehaviorTest.cs : add test for bug #619542 (not sure if it
	  works on mono; run-test is broken in trunk. Verified under .NET).


svn path=/trunk/mcs/; revision=160341
2010-07-14 08:43:31 +00:00
Atsushi Eno 3e59168e9d 2010-07-06 Atsushi Enomoto <[email protected]>
* TypeMap.cs :
	  Do not try to add static members as serialization targets.
	  Support OnDeserializing and OnDeserialized. Fixed bug #615800.

	* DataContractJsonSerializerTest.cs : add test for bug #615800.


svn path=/trunk/mcs/; revision=159958
2010-07-06 13:41:08 +00:00
Atsushi Eno 6ce2b49f94 2010-07-06 Atsushi Enomoto <[email protected]>
* TypeMap.cs : when an object is null, return null, not just an 
	  uninitialized object.

	* DataContractJsonSerializerTest.cs : add test for bug #615801.


svn path=/trunk/mcs/; revision=159944
2010-07-06 09:08:57 +00:00
Atsushi Eno 607b85ba51 2010-06-22 Atsushi Enomoto <[email protected]>
* WebMessageEncodingBindingElement.cs : return MessageVersion in
	  GetProperty<T>(). Fixed WebHttpBinding working.

	* WebMessageEncodingBindingElementTest.cs : add test for
	  GetProperty<MessageVersion>().


svn path=/trunk/mcs/; revision=159316
2010-06-22 08:59:54 +00:00
Atsushi Eno a1375bd687 2010-05-24 Atsushi Enomoto <[email protected]>
* JsonQueryStringConverter.cs : objects are regarded serializable as
	  long as they are public here, with some exceptions (not implemented).

	* JsonQueryStringConverterTest.cs : add more tests for CanConvert()
	  and reorganized some classes to make tests rational.


svn path=/trunk/mcs/; revision=157795
2010-05-24 12:38:12 +00:00
Atsushi Eno 546b5d35f2 2010-04-05 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : don't use ToUniversalTime()
	  which makes test results timezone dependent.


svn path=/trunk/mcs/; revision=154780
2010-04-05 05:57:39 +00:00
Atsushi Eno fb01abdaa2 2010-03-10 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : oops, the test was careless.
	  Use fixed date.


svn path=/trunk/mcs/; revision=153390
2010-03-10 08:29:40 +00:00
Atsushi Eno 2e11b2e4fa 2010-03-09 Atsushi Enomoto <[email protected]>
* JsonSerializationWriter.cs, JsonSerializationReader.cs,
	  JsonWriter.cs : Fix DateTime serialization and "\/" string escape
	  issues. Fixed bug #586169.

	* DataContractJsonSerializerTest.cs : add test for bug #586169.
	* JsonWriterTest.cs : add standalone write case for "\/".


svn path=/trunk/mcs/; revision=153318
2010-03-09 11:21:24 +00:00
Atsushi Eno 3c732b3a95 2010-03-02 Atsushi Enomoto <[email protected]>
* EncodingConverter.cs, WebHttpBindingElement.cs,
	  WebHttpSecurityElement.cs : implement OnApplyConfiguration(), fill
	  some TypeConverters, and fix BindingElementType, based on the patch
	  by Sander Rijken.

2010-03-01  Sander Rijken  <[email protected]>

	* webHttpBinding, webHttpBinding.config : new test files.

2010-03-01  Sander Rijken  <[email protected]>

	* WebHttpBindingElementTest.cs : new test.

2010-03-02  Atsushi Enomoto  <[email protected]>

	* System.ServiceModel.Web_test.dll.sources : add new test.
	* Makefile : add new extra dist.


svn path=/trunk/mcs/; revision=152807
2010-03-02 07:46:25 +00:00
Atsushi Eno 9579012ec5 2010-01-27 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer.cs : KnownTypes does not include root
	  type. Fixed bug #573689.

	* DataContractJsonSerializerTest.cs :
	  enable TypeIsNotPartsOfKnownTypes(), and add more related tests.


svn path=/trunk/mcs/; revision=150279
2010-01-27 06:17:48 +00:00
Atsushi Eno 691da3318e 2010-01-27 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : make some tests narrow down
	  possible cause of errors to detect expected errors more precisely.


svn path=/trunk/mcs/; revision=150278
2010-01-27 06:06:21 +00:00
Atsushi Eno 6cd5a57fc3 2010-01-27 Atsushi Enomoto <[email protected]>
* JsonSerializationReader.cs : "null" for string should be read as
	  null, not String.Empty. Fixed bug #573690.

	* DataContractJsonSerializerTest.cs : null-string case is working.


svn path=/trunk/mcs/; revision=150276
2010-01-27 05:36:54 +00:00
Atsushi Eno ae084ccf3e 2010-01-27 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializerTest.cs : invalidate previous non-working
	  tests.


svn path=/trunk/mcs/; revision=150275
2010-01-27 05:26:00 +00:00
Sebastien Pouliot 4ec2a8c5a3 2010-01-25 Sebastien Pouliot <[email protected]>
* DataContractJsonSerializerTest.cs: Add non-working test cases
	for null-string, known types and handling floating point special
	values


svn path=/trunk/mcs/; revision=150151
2010-01-25 21:00:38 +00:00
Chris Toshok f231a6cb9b in System.Runtime.Serialization.Json:
2009-12-11  Chris Toshok  <[email protected]>

	* TypeMap.cs (CreateDefaultTypeMap): only include non-public
	property info when dealing with KeyValuePair<,>.  This is *not*
	the way MS handles it, but we emulate things much better with this
	hack.

in test/System.Runtime.Serialization.Json/:
2009-12-11  Chris Toshok  <[email protected]>

	* DataContractJsonSerializerTest.cs: add a test case for
	non-public properties.


svn path=/trunk/mcs/; revision=148184
2009-12-12 00:14:23 +00:00
Atsushi Eno 6557535276 2009-12-11 Atsushi Enomoto <[email protected]>
* JsonReader.cs : e- and e+ was resulting in wrong parse error.
	  This should fix part of bug #531904.

	* JsonReaderTest.cs : another number parse case.


svn path=/trunk/mcs/; revision=148099
2009-12-11 12:54:10 +00:00
Atsushi Eno f2689b52df 2009-11-20 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer.cs, JsonReader.cs : Silverlight uses
	  LAME parser that allows object member name as *raw* string
	  without double-quotes. (This also reverts the previous change.)

	* DataContractJsonSerializerTest.cs : added ignored test case that
	  verifies 2.1 behavior (with another case that justifies removal
	  of the previous hack).


svn path=/trunk/mcs/; revision=146599
2009-11-20 06:07:51 +00:00
Atsushi Eno 90a896ed4d 2009-10-08 Atsushi Enomoto <[email protected]>
* WebScriptEnablingBehaviorTest.cs : new test.

	* System.ServiceModel.Web_test.dll.sources :
	  add WebScriptEnablingBehaviorTest.cs.


svn path=/trunk/mcs/; revision=143756
2009-10-08 11:21:14 +00:00
Atsushi Eno ae41bed338 2009-10-08 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer.cs, JsonSerializationWriter.cs:
	  alwaysEmitTypeInformation is  false by default. It is for __type
	  attribute, not for type attribute. __type name is always with ":#".
	* TypeMap.cs : sort members in default typemap (it is ordered).
	  Uncomment EmitDefaultValue.
	* JsonWriter.cs : handle "null" string (it is somewhat messy).

	* WebMessageEncoder.cs : use alwaysEmitTypeInformation to output
	  object __type.

	* DataContractJsonSerializerTest.cs : added test for
	  alwaysEmitTypeInformation argument.


svn path=/trunk/mcs/; revision=143748
2009-10-08 09:55:36 +00:00
Atsushi Eno cd263cb1f4 2009-10-08 Atsushi Enomoto <[email protected]>
* JsonQueryStringConverter.cs : add custom body name support (used.
	  for AJAX). Handle string value (in very LAMESPEC way).
	* WebMessageFormatter.cs : add custom body name support.
	  Slightly changed reply serialization.
	  Convert deserialized values using QueryStringConverter.

	* WebScriptEnablingBehavior.cs : use JsonQueryStringConverter, with
	  "d" wrapper name. Allow only WrappedRequest.

	* JsonQueryStringConverterTest.cs : added some string deserialization
	  test. It just proved .NET is too lame.


svn path=/trunk/mcs/; revision=143747
2009-10-08 08:59:56 +00:00
Atsushi Eno fd2cd12aae 2009-10-07 Atsushi Enomoto <[email protected]>
* SyndicationVersions.cs :
	  Handle atom feed as well. Patch by David Mitchell.

	* SyndicationItemTest.cs, SyndicationFeedTest.cs : allow atom feed
	  too. More Load() tests. Patch by David Mitchell.


svn path=/trunk/mcs/; revision=143704
2009-10-07 19:12:26 +00:00
Atsushi Eno 3ae78fa0b4 2009-10-07 Atsushi Enomoto <[email protected]>
* WebScriptServiceHostFactory.cs : I have to again revert the
	  previous change; it does fill endpoints regardless of hosting
	  environment (now with tests).

	* WebScriptEnablingBehavior.cs : validate body style.
	* WebHttpBehavior.cs : operations could miss WebGet/WebInvoke and
	  we should not crash by NRE because of missing of those atts.

	* WebScriptServiceHostFactoryTest.cs : add tests for contract and
	  wrapped validity.


svn path=/trunk/mcs/; revision=143637
2009-10-07 12:57:57 +00:00
Atsushi Eno 83a2cc75f8 2009-10-07 Atsushi Enomoto <[email protected]>
* SyndicationElementExtension.cs : give OuterName and OuterNamespace
	  for extensions with .ctor(XmlReader).

	* SyndicationElementExtensionTest.cs : added test for OuterName/ns
	  with .ctor(XmlReader).
	* SyndicationItemTest.cs : added failure case for LoadItem() with
	  feed element.


svn path=/trunk/mcs/; revision=143592
2009-10-07 01:51:07 +00:00
Atsushi Eno 90d557790e 2009-10-02 Atsushi Enomoto <[email protected]>
* WebScriptServiceHostFactoryTest.cs : new test.

	* System.ServiceModel.Web_test.dll.sources :
	   add WebScriptServiceHostFactoryTest.cs.


svn path=/trunk/mcs/; revision=143248
2009-10-02 07:38:39 +00:00
Atsushi Eno cdd92159ec 2009-09-22 Atsushi Enomoto <[email protected]>
* UriTemplate.cs : Fix method signatures. Take care of dictionary
	  case sensitivity.

	* UriTemplateTest.cs : add test for case-insensitive comparison in
	  IDictionary, and test for null-value string in there.


svn path=/trunk/mcs/; revision=142428
2009-09-22 17:52:31 +00:00
Atsushi Eno 7dcf3d38a6 2009-09-17 Atsushi Enomoto <[email protected]>
* UriTemplateTable.cs : do not raise an error when MatchSingle() did
	  not result in any match. Match methods should reject empty table.

	* UriTemplateTableTest.cs : new test file.

	* System.ServiceModel.Web_test.dll.sources :
	  added UriTemplateTableTest.cs.


svn path=/trunk/mcs/; revision=142114
2009-09-17 14:44:26 +00:00
Atsushi Eno b7b8e92332 2009-09-15 Atsushi Enomoto <[email protected]>
* WebHttpBehaviorTest.cs : enable working test.


svn path=/trunk/mcs/; revision=141927
2009-09-15 06:45:12 +00:00