Author: igorz
Date: 2007-05-29 05:33:23 -0400 (Tue, 29 May 2007)
New Revision: 78104
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptConverter.cs
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptTypeResolver.cs
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ScriptIgnoreAttribute.cs
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/SimpleTypeResolver.cs
Log:
Initial drop for System.Web.Extensions assembly
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptConverter.cs
===================================================================
---
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptConverter.cs
2007-05-29 09:22:35 UTC (rev 78103)
+++
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptConverter.cs
2007-05-29 09:33:23 UTC (rev 78104)
@@ -0,0 +1,45 @@
+//
+// JavaScriptConverter.cs
+//
+// Author:
+// Igor Zelmanovich <[EMAIL PROTECTED]>
+//
+// (C) 2007 Mainsoft, Inc. http://www.mainsoft.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;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.Script.Serialization
+{
+ public abstract class JavaScriptConverter
+ {
+ protected JavaScriptConverter () { }
+
+ public abstract IEnumerable<Type> SupportedTypes { get; }
+
+ public abstract object Deserialize (IDictionary<string, object>
dictionary, Type type, JavaScriptSerializer serializer);
+ public abstract IDictionary<string, object> Serialize (object
obj, JavaScriptSerializer serializer);
+ }
+}
Property changes on:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptConverter.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
===================================================================
---
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
2007-05-29 09:22:35 UTC (rev 78103)
+++
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
2007-05-29 09:33:23 UTC (rev 78104)
@@ -0,0 +1,88 @@
+//
+// JavaScriptSerializer.cs
+//
+// Author:
+// Igor Zelmanovich <[EMAIL PROTECTED]>
+//
+// (C) 2007 Mainsoft, Inc. http://www.mainsoft.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;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.Script.Serialization
+{
+ public class JavaScriptSerializer
+ {
+ public JavaScriptSerializer () {
+ throw new NotImplementedException ();
+ }
+
+ public JavaScriptSerializer (JavaScriptTypeResolver resolver) {
+ throw new NotImplementedException ();
+ }
+
+ public int MaxJsonLength {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int RecursionLimit {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public T ConvertToType<T> (object obj) {
+ throw new NotImplementedException ();
+ }
+
+ public T Deserialize<T> (string input) {
+ throw new NotImplementedException ();
+ }
+
+ public object DeserializeObject (string input) {
+ throw new NotImplementedException ();
+ }
+
+ public void RegisterConverters
(IEnumerable<JavaScriptConverter> converters) {
+ throw new NotImplementedException ();
+ }
+
+ public string Serialize (object obj) {
+ throw new NotImplementedException ();
+ }
+
+ public void Serialize (object obj, StringBuilder output) {
+ throw new NotImplementedException ();
+ }
+ }
+}
Property changes on:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptTypeResolver.cs
===================================================================
---
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptTypeResolver.cs
2007-05-29 09:22:35 UTC (rev 78103)
+++
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptTypeResolver.cs
2007-05-29 09:33:23 UTC (rev 78104)
@@ -0,0 +1,43 @@
+//
+// JavaScriptTypeResolver.cs
+//
+// Author:
+// Igor Zelmanovich <[EMAIL PROTECTED]>
+//
+// (C) 2007 Mainsoft, Inc. http://www.mainsoft.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;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.Script.Serialization
+{
+ public abstract class JavaScriptTypeResolver
+ {
+ protected JavaScriptTypeResolver () { }
+
+ public abstract Type ResolveType (string id);
+ public abstract string ResolveTypeId (Type type);
+ }
+}
Property changes on:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptTypeResolver.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ScriptIgnoreAttribute.cs
===================================================================
---
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ScriptIgnoreAttribute.cs
2007-05-29 09:22:35 UTC (rev 78103)
+++
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ScriptIgnoreAttribute.cs
2007-05-29 09:33:23 UTC (rev 78104)
@@ -0,0 +1,40 @@
+//
+// ScriptIgnoreAttribute.cs
+//
+// Author:
+// Igor Zelmanovich <[EMAIL PROTECTED]>
+//
+// (C) 2007 Mainsoft, Inc. http://www.mainsoft.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;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.Script.Serialization
+{
+ [AttributeUsage (AttributeTargets.Property | AttributeTargets.Field)]
+ public sealed class ScriptIgnoreAttribute : Attribute
+ {
+ }
+}
Property changes on:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ScriptIgnoreAttribute.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/SimpleTypeResolver.cs
===================================================================
---
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/SimpleTypeResolver.cs
2007-05-29 09:22:35 UTC (rev 78103)
+++
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/SimpleTypeResolver.cs
2007-05-29 09:33:23 UTC (rev 78104)
@@ -0,0 +1,46 @@
+//
+// SimpleTypeResolver.cs
+//
+// Author:
+// Igor Zelmanovich <[EMAIL PROTECTED]>
+//
+// (C) 2007 Mainsoft, Inc. http://www.mainsoft.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;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.Script.Serialization
+{
+ public class SimpleTypeResolver : JavaScriptTypeResolver
+ {
+ public override Type ResolveType (string id) {
+ throw new NotImplementedException ();
+ }
+
+ public override string ResolveTypeId (Type type) {
+ throw new NotImplementedException ();
+ }
+ }
+}
Property changes on:
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/SimpleTypeResolver.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches