Import System.Net.Http.Formatting
authorMarek Safar <marek.safar@gmail.com>
Thu, 29 Mar 2012 14:00:46 +0000 (15:00 +0100)
committerMarek Safar <marek.safar@gmail.com>
Thu, 29 Mar 2012 14:02:38 +0000 (15:02 +0100)
mcs/class/System.Net.Http.Formatting/Extensions.cs [new file with mode: 0644]
mcs/class/System.Net.Http.Formatting/Makefile [new file with mode: 0644]
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting.dll.sources [new file with mode: 0644]

diff --git a/mcs/class/System.Net.Http.Formatting/Extensions.cs b/mcs/class/System.Net.Http.Formatting/Extensions.cs
new file mode 100644 (file)
index 0000000..0f92f97
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Extension.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections.Generic;
+using System.Net.Http.Headers;
+
+//
+// Workaround for not up-to-date aspnetwebstack, once it support .net 4.5 this could be deleted
+//
+static class Extensions
+{
+       public static void TryAddWithoutValidation (this HttpHeaders headers, string key, string value)
+       {
+               headers.AddWithoutValidation (key, value);
+       }
+       
+       public static bool TryAddWithoutValidation (this HttpHeaders headers, string key, IEnumerable<string> values)
+       {
+               headers.AddWithoutValidation (key, values);
+               return true;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.Formatting/Makefile b/mcs/class/System.Net.Http.Formatting/Makefile
new file mode 100644 (file)
index 0000000..d3e1834
--- /dev/null
@@ -0,0 +1,21 @@
+thisdir = class/System.Net.Http.Formatting
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Net.Http.Formatting.dll
+
+
+System.Net.Http.Properties.CommonWebApiResources.resources: ../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx
+       $(RESGEN) "$<" "$@"
+       
+System.Net.Http.Properties.Resources.resources: ../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx
+       $(RESGEN) "$<" "$@"
+
+LIB_MCS_FLAGS = -r:System.Core.dll -r:System.dll -r:System.Net.Http.dll -r:System.Xml.dll -r:System.Runtime.Serialization.dll -r:Newtonsoft.Json.dll \
+               -d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
+               -resource:System.Net.Http.Properties.CommonWebApiResources.resources
+
+include ../../build/library.make
+
+$(the_lib): System.Net.Http.Properties.CommonWebApiResources.resources \
+       System.Net.Http.Properties.Resources.resources
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting.dll.sources b/mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting.dll.sources
new file mode 100644 (file)
index 0000000..ed7b33c
--- /dev/null
@@ -0,0 +1,82 @@
+../../../external/aspnetwebstack/src/CommonAssemblyInfo.cs
+../../../external/aspnetwebstack/src/RS.cs
+../../../external/aspnetwebstack/src/TransparentCommonAssemblyInfo.cs
+
+../../../external/aspnetwebstack/src/Common/CommonWebApiResources.Designer.cs
+../../../external/aspnetwebstack/src/Common/DictionaryExtensions.cs
+../../../external/aspnetwebstack/src/Common/Error.cs
+../../../external/aspnetwebstack/src/Common/TaskHelpers.cs
+../../../external/aspnetwebstack/src/Common/TaskHelpersExtensions.cs
+
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/BufferedMediaTypeFormatter.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/ContentNegotiationResult.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/DefaultContentNegotiator.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/DelegatingEnumerable.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/FormDataCollection.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/FormUrlEncodedJson.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/FormUrlEncodedMediaTypeFormatter.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/IContentNegotiator.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/IFormatterLogger.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/IRequiredMemberSelector.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/JsonContractResolver.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/JsonMediaTypeFormatter.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/JsonReaderQuotaException.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaRangeMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeConstants.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeFormatterCollection.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeFormatter.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeFormatterExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeHeaderValueEqualityComparer.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeHeaderValueExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeMatch.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/MediaTypeWithQualityHeaderValueComparer.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/ParsedMediaTypeHeaderValue.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/QueryStringMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/RequestHeaderMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/ResponseFormatterSelectionResult.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/ResponseMediaTypeMatch.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/SecureJsonTextReader.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/StringComparisonHelper.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/StringWithQualityHeaderValueComparer.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/UriPathExtensionMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/XHRRequestHeaderMapping.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/XmlMediaTypeFormatter.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/FormUrlEncodedParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/HttpRequestHeaderParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/HttpRequestLineParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/HttpResponseHeaderParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/HttpStatusLineParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/InternetMessageFormatHeaderParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/MimeMultipartBodyPartParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/MimeMultipartParser.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Formatting/Parsers/ParserState.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Internal/AsyncResultWithExtraData.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Internal/DelegatingStream.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Internal/NonClosingDelegatingStream.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Internal/UriQueryUtility.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.Designer.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/CloneableExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/FormattingUtilities.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/GlobalSuppressions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpClientExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpContentCollectionExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpContentExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpContentMessageExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpContentMultipartExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpHeaderExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpMessageContent.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpRequestMessageExtensions.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpUnsortedHeaders.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpUnsortedRequest.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/HttpUnsortedResponse.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/IMultipartStreamProvider.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/MimeBodyPart.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/MultipartFileStreamProvider.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/MultipartFormDataStreamProvider.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/MultipartMemoryStreamProvider.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/ObjectContent.cs
+../../../external/aspnetwebstack/src/System.Net.Http.Formatting/UriExtensions.cs
+
+Extensions.cs
\ No newline at end of file