diff options
author | Marek Habersack <grendel@twistedcode.net> | 2011-04-28 16:25:59 +0400 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2011-04-28 16:53:46 +0400 |
commit | 14a3732f6680c1dc91e4dc84b478ab463dee7b86 (patch) | |
tree | 31a9f789d62844da2e95574e2d5adcfba057988c | |
parent | c98e69f23cef52d4df104b1db6e671320c634473 (diff) |
[system.data.services] Stubs for a few 4.0 types + some implementation + some tests
62 files changed, 3752 insertions, 39 deletions
diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 35b8fdb3ac3..6f727ba28fd 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -115,7 +115,6 @@ net_2_0_dirs := \ Mono.Tasklets \ Mono.CSharp \ Moonlight.Build.Tasks \ - System.Data.Services \ System.Net net_2_0_only_dirs := \ @@ -123,7 +122,8 @@ net_2_0_only_dirs := \ System.Web.Extensions.Design_1.0 \ Compat.ICSharpCode.SharpZipLib \ WindowsBase \ - System.Data.Services.Client + System.Data.Services.Client \ + System.Data.Services moonlight_raw_dirs := \ corlib \ @@ -174,7 +174,6 @@ net_4_0_dirs := \ System.ComponentModel.Composition \ System.Xaml \ WindowsBase \ - System.Data.Services.Client \ System.ServiceModel.Routing \ System.ServiceModel.Discovery \ System.Runtime.Caching \ @@ -182,7 +181,9 @@ net_4_0_dirs := \ Mono.CodeContracts \ Mono.Parallel \ Microsoft.Web.Infrastructure \ - WebMatrix.Data + WebMatrix.Data \ + System.Data.Services.Client \ + System.Data.Services net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) aot-compiler moonlight_raw_SUBDIRS := $(moonlight_raw_dirs) diff --git a/mcs/class/System.Data.Services/Makefile b/mcs/class/System.Data.Services/Makefile index 30ea43fae89..8ac26328afb 100644 --- a/mcs/class/System.Data.Services/Makefile +++ b/mcs/class/System.Data.Services/Makefile @@ -10,7 +10,8 @@ LIB_MCS_FLAGS = \ -r:System.Core.dll \ -r:System.ServiceModel.dll \ -r:System.ServiceModel.Web.dll \ - -TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) + -r:System.Data.Services.Client.dll + +TEST_MCS_FLAGS += -r:System.ServiceModel include ../../build/library.make diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`1.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`1.cs new file mode 100644 index 00000000000..5deba5bd8a6 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`1.cs @@ -0,0 +1,64 @@ +// +// ExpandedWrapper`1.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services; +using System.Data.Services.Internal; +using System.Runtime; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public abstract class ExpandedWrapper <TExpandedElement> : IExpandedResult + { + public string Description { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public TExpandedElement ExpandedElement { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + object IExpandedResult.ExpandedElement { + get { throw new NotImplementedException (); } + } + + public object GetExpandedPropertyValue (string name) + { + throw new NotImplementedException (); + } + + protected abstract object InternalGetExpandedPropertyValue (int nameIndex); + + protected ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`10.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`10.cs new file mode 100644 index 00000000000..3d35a7a30bf --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`10.cs @@ -0,0 +1,84 @@ +// +// ExpandedWrapper`10.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6, TProperty7, TProperty8> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + public TProperty7 ProjectedProperty7 { + get; set; + } + + public TProperty8 ProjectedProperty8 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`11.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`11.cs new file mode 100644 index 00000000000..9375a2baca8 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`11.cs @@ -0,0 +1,88 @@ +// +// ExpandedWrapper`11.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6, TProperty7, TProperty8, TProperty9> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + public TProperty7 ProjectedProperty7 { + get; set; + } + + public TProperty8 ProjectedProperty8 { + get; set; + } + + public TProperty9 ProjectedProperty9 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`12.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`12.cs new file mode 100644 index 00000000000..cd4ac61e371 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`12.cs @@ -0,0 +1,92 @@ +// +// ExpandedWrapper`12.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6, TProperty7, TProperty8, TProperty9, TProperty10> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + public TProperty7 ProjectedProperty7 { + get; set; + } + + public TProperty8 ProjectedProperty8 { + get; set; + } + + public TProperty9 ProjectedProperty9 { + get; set; + } + + public TProperty10 ProjectedProperty10 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`13.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`13.cs new file mode 100644 index 00000000000..386aa3d97c2 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`13.cs @@ -0,0 +1,96 @@ +// +// ExpandedWrapper`13.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6, TProperty7, TProperty8, TProperty9, TProperty10, TProperty11> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + public TProperty7 ProjectedProperty7 { + get; set; + } + + public TProperty8 ProjectedProperty8 { + get; set; + } + + public TProperty9 ProjectedProperty9 { + get; set; + } + + public TProperty10 ProjectedProperty10 { + get; set; + } + + public TProperty11 ProjectedProperty11 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`2.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`2.cs new file mode 100644 index 00000000000..f15e0474193 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`2.cs @@ -0,0 +1,51 @@ +// +// ExpandedWrapper`2.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`3.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`3.cs new file mode 100644 index 00000000000..e40f18269f1 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`3.cs @@ -0,0 +1,56 @@ +// +// ExpandedWrapper`3.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`4.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`4.cs new file mode 100644 index 00000000000..8cfd4ad1597 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`4.cs @@ -0,0 +1,59 @@ +// +// ExpandedWrapper`4.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`5.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`5.cs new file mode 100644 index 00000000000..16af3c07d51 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`5.cs @@ -0,0 +1,64 @@ +// +// ExpandedWrapper`5.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`6.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`6.cs new file mode 100644 index 00000000000..007a65748b9 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`6.cs @@ -0,0 +1,68 @@ +// +// ExpandedWrapper`6.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`7.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`7.cs new file mode 100644 index 00000000000..4e74b44993d --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`7.cs @@ -0,0 +1,72 @@ +// +// ExpandedWrapper`7.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`8.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`8.cs new file mode 100644 index 00000000000..b570115017b --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`8.cs @@ -0,0 +1,76 @@ +// +// ExpandedWrapper`8.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`9.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`9.cs new file mode 100644 index 00000000000..982149875c4 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ExpandedWrapper`9.cs @@ -0,0 +1,80 @@ +// +// ExpandedWrapper`9.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ExpandedWrapper <TExpandedElement, TProperty0, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6, TProperty7> : ExpandedWrapper <TExpandedElement> + { + public TProperty0 ProjectedProperty0 { + get; set; + } + + public TProperty1 ProjectedProperty1 { + get; set; + } + + public TProperty2 ProjectedProperty2 { + get; set; + } + + public TProperty3 ProjectedProperty3 { + get; set; + } + + public TProperty4 ProjectedProperty4 { + get; set; + } + + public TProperty5 ProjectedProperty5 { + get; set; + } + + public TProperty6 ProjectedProperty6 { + get; set; + } + + public TProperty7 ProjectedProperty7 { + get; set; + } + + protected override object InternalGetExpandedPropertyValue (int nameIndex) + { + throw new NotImplementedException (); + } + + public ExpandedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper.cs new file mode 100644 index 00000000000..be7b1711b91 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper.cs @@ -0,0 +1,63 @@ +// +// ProjectedWrapper.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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; +using System.ComponentModel; +using System.Data.Services; +using System.Data.Services.Internal; +using System.Linq; +using System.Linq.Expressions; +using System.Runtime; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public abstract class ProjectedWrapper + { + public string ResourceTypeName { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public string PropertyNameList { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public object GetProjectedPropertyValue (string propertyName) + { + throw new NotImplementedException (); + } + + protected abstract object InternalGetProjectedPropertyValue (int propertyIndex); + + protected ProjectedWrapper () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper0.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper0.cs new file mode 100644 index 00000000000..d101ffd9894 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper0.cs @@ -0,0 +1,49 @@ +// +// ProjectedWrapper0.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper0 : ProjectedWrapper + { + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + [TargetedPatchingOptOut ("Performance critical to inline this type of method across NGen image boundaries")] + public ProjectedWrapper0 () + { + throw new NotImplementedException (); + } + + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper1.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper1.cs new file mode 100644 index 00000000000..a4bec9e64b5 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper1.cs @@ -0,0 +1,52 @@ +// +// ProjectedWrapper1.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper1 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper1 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper2.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper2.cs new file mode 100644 index 00000000000..cb04c6f4ee7 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper2.cs @@ -0,0 +1,56 @@ +// +// ProjectedWrapper2.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper2 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper2 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper3.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper3.cs new file mode 100644 index 00000000000..7d809e33d78 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper3.cs @@ -0,0 +1,60 @@ +// +// ProjectedWrapper3.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper3 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper3 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper4.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper4.cs new file mode 100644 index 00000000000..a994c07b39c --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper4.cs @@ -0,0 +1,64 @@ +// +// ProjectedWrapper4.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper4 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper4 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper5.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper5.cs new file mode 100644 index 00000000000..c1900afd40e --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper5.cs @@ -0,0 +1,68 @@ +// +// ProjectedWrapper5.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper5 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + public object ProjectedProperty4 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper5 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper6.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper6.cs new file mode 100644 index 00000000000..515183b95b4 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper6.cs @@ -0,0 +1,72 @@ +// +// ProjectedWrapper6.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper6 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + public object ProjectedProperty4 { + get; set; + } + + public object ProjectedProperty5 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper6 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper7.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper7.cs new file mode 100644 index 00000000000..353887a0577 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper7.cs @@ -0,0 +1,76 @@ +// +// ProjectedWrapper7.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper7 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + public object ProjectedProperty4 { + get; set; + } + + public object ProjectedProperty5 { + get; set; + } + + public object ProjectedProperty6 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper7 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper8.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper8.cs new file mode 100644 index 00000000000..876fce72acd --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapper8.cs @@ -0,0 +1,80 @@ +// +// ProjectedWrapper8.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapper8 : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + public object ProjectedProperty4 { + get; set; + } + + public object ProjectedProperty5 { + get; set; + } + + public object ProjectedProperty6 { + get; set; + } + + public object ProjectedProperty7 { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapper8 () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperMany.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperMany.cs new file mode 100644 index 00000000000..23f684b6b0c --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperMany.cs @@ -0,0 +1,84 @@ +// +// ProjectedWrapperMany.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public class ProjectedWrapperMany : ProjectedWrapper + { + public object ProjectedProperty0 { + get; set; + } + + public object ProjectedProperty1 { + get; set; + } + + public object ProjectedProperty2 { + get; set; + } + + public object ProjectedProperty3 { + get; set; + } + + public object ProjectedProperty4 { + get; set; + } + + public object ProjectedProperty5 { + get; set; + } + + public object ProjectedProperty6 { + get; set; + } + + public object ProjectedProperty7 { + get; set; + } + + public ProjectedWrapperMany Next { + get; set; + } + + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapperMany () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperManyEnd.cs b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperManyEnd.cs new file mode 100644 index 00000000000..cbd230a18a7 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Internal/ProjectedWrapperManyEnd.cs @@ -0,0 +1,47 @@ +// +// ProjectedWrapperManyEnd.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.ComponentModel; +using System.Data.Services.Internal; +using System.Runtime; + +namespace System.Data.Services.Internal +{ + [EditorBrowsable (EditorBrowsableState.Never)] + public sealed class ProjectedWrapperManyEnd : ProjectedWrapperMany + { + protected override object InternalGetProjectedPropertyValue (int propertyIndex) + { + throw new NotImplementedException (); + } + + public ProjectedWrapperManyEnd () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/DataServiceProviderMethods.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/DataServiceProviderMethods.cs new file mode 100644 index 00000000000..eaa9fdebb6b --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/DataServiceProviderMethods.cs @@ -0,0 +1,85 @@ +// +// DataServiceProviderMethods.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Reflection; + +namespace System.Data.Services.Providers +{ + public static class DataServiceProviderMethods + { + public static object GetValue (object value, ResourceProperty property) + { + // LAMESPEC: this method is not implemented in the .NET assembly + throw new NotImplementedException (); + } + + public static IEnumerable <T> GetSequenceValue<T> (object value, ResourceProperty property) + { + // LAMESPEC: this method is not implemented in the .NET assembly + throw new NotImplementedException (); + } + + public static object Convert (object value, ResourceType type) + { + // LAMESPEC: this method is not implemented in the .NET assembly + throw new NotImplementedException (); + } + + public static bool TypeIs (object value, ResourceType type) + { + // LAMESPEC: this method is not implemented in the .NET assembly + throw new NotImplementedException (); + } + + public static int Compare (string left, string right) + { + return Comparer <string>.Default.Compare (left, right); + } + + public static int Compare (bool left, bool right) + { + return Comparer <bool>.Default.Compare (left, right); + } + + public static int Compare (bool? left, bool? right) + { + return Comparer <bool?>.Default.Compare (left, right); + } + + public static int Compare (Guid left, Guid right) + { + return Comparer <Guid>.Default.Compare (left, right); + } + + public static int Compare (Guid? left, Guid? right) + { + return Comparer <Guid?>.Default.Compare (left, right); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceMetadataProvider.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceMetadataProvider.cs new file mode 100644 index 00000000000..46129610c37 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceMetadataProvider.cs @@ -0,0 +1,47 @@ +// +// IDataServiceMetadataProvider.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; + +namespace System.Data.Services.Providers +{ + public interface IDataServiceMetadataProvider + { + string ContainerNamespace { get; } + string ContainerName { get; } + IEnumerable <ResourceSet> ResourceSets { get; } + IEnumerable <ResourceType> Types { get; } + IEnumerable <ServiceOperation> ServiceOperations { get; } + bool TryResolveResourceSet (string name, out ResourceSet resourceSet); + ResourceAssociationSet GetResourceAssociationSet (ResourceSet resourceSet, ResourceType resourceType, ResourceProperty resourceProperty); + bool TryResolveResourceType (string name, out ResourceType resourceType); + IEnumerable <ResourceType> GetDerivedTypes (ResourceType resourceType); + bool HasDerivedTypes (ResourceType resourceType); + bool TryResolveServiceOperation (string name, out ServiceOperation serviceOperation); + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServicePagingProvider.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServicePagingProvider.cs new file mode 100644 index 00000000000..5d564492690 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServicePagingProvider.cs @@ -0,0 +1,39 @@ +// +// IDataServicePagingProvider.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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; +using System.Data.Services.Providers; +using System.Linq; + +namespace System.Data.Services.Providers +{ + public interface IDataServicePagingProvider + { + object[] GetContinuationToken (IEnumerator enumerator); + void SetContinuationToken (IQueryable query, ResourceType resourceType, object[] continuationToken); + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceQueryProvider.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceQueryProvider.cs new file mode 100644 index 00000000000..94764c8026a --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceQueryProvider.cs @@ -0,0 +1,45 @@ +// +// IDataServiceQueryProvider.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Linq; + +namespace System.Data.Services.Providers +{ + public interface IDataServiceQueryProvider + { + object CurrentDataSource { get; set; } + bool IsNullPropagationRequired { get; } + IQueryable GetQueryRootForResourceSet (ResourceSet resourceSet); + ResourceType GetResourceType (object target); + object GetPropertyValue (object target, ResourceProperty resourceProperty); + object GetOpenPropertyValue (object target, string propertyName); + IEnumerable <KeyValuePair <string, object>> GetOpenPropertyValues (object target); + object InvokeServiceOperation (ServiceOperation serviceOperation, object[] parameters); + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceStreamProvider.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceStreamProvider.cs new file mode 100644 index 00000000000..c85141a32eb --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceStreamProvider.cs @@ -0,0 +1,45 @@ +// +// IDataServiceStreamProvider.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Data.Services.Providers; +using System.IO; + +namespace System.Data.Services.Providers +{ + public interface IDataServiceStreamProvider + { + int StreamBufferSize { get; } + Stream GetReadStream (object entity, string etag, bool? checkETagForEquality, DataServiceOperationContext operationContext); + Stream GetWriteStream (object entity, string etag, bool? checkETagForEquality, DataServiceOperationContext operationContext); + void DeleteStream (object entity, DataServiceOperationContext operationContext); + string GetStreamContentType (object entity, DataServiceOperationContext operationContext); + Uri GetReadStreamUri (object entity, DataServiceOperationContext operationContext); + string GetStreamETag (object entity, DataServiceOperationContext operationContext); + string ResolveType (string entitySetName, DataServiceOperationContext operationContext); + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceUpdateProvider.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceUpdateProvider.cs new file mode 100644 index 00000000000..87f5e24e578 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/IDataServiceUpdateProvider.cs @@ -0,0 +1,38 @@ +// +// IDataServiceUpdateProvider.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Data.Services.Providers; + +namespace System.Data.Services.Providers +{ + public interface IDataServiceUpdateProvider : IUpdatable + { + void SetConcurrencyValues (object resourceCookie, bool? checkForEquality, IEnumerable <KeyValuePair <string, object>> concurrencyValues); + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/OpenTypeMethods.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/OpenTypeMethods.cs new file mode 100644 index 00000000000..c4cd9004679 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/OpenTypeMethods.cs @@ -0,0 +1,231 @@ +// +// OpenTypeMethods.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Linq.Expressions; +using System.Reflection; + +namespace System.Data.Services.Providers +{ + public static class OpenTypeMethods + { + public static object GetValue (object value, string propertyName) + { + throw new NotImplementedException (); + } + + public static object Add (object left, object right) + { + throw new NotImplementedException (); + } + + public static object AndAlso (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Divide (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Equal (object left, object right) + { + throw new NotImplementedException (); + } + + public static object GreaterThan (object left, object right) + { + throw new NotImplementedException (); + } + + public static object GreaterThanOrEqual (object left, object right) + { + throw new NotImplementedException (); + } + + public static object LessThan (object left, object right) + { + throw new NotImplementedException (); + } + + public static object LessThanOrEqual (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Modulo (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Multiply (object left, object right) + { + throw new NotImplementedException (); + } + + public static object NotEqual (object left, object right) + { + throw new NotImplementedException (); + } + + public static object OrElse (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Subtract (object left, object right) + { + throw new NotImplementedException (); + } + + public static object Negate (object value) + { + throw new NotImplementedException (); + } + + public static object Not (object value) + { + throw new NotImplementedException (); + } + + public static object Convert (object value, ResourceType type) + { + throw new NotImplementedException (); + } + + public static object TypeIs (object value, ResourceType type) + { + throw new NotImplementedException (); + } + + public static object Concat (object first, object second) + { + throw new NotImplementedException (); + } + + public static object EndsWith (object targetString, object substring) + { + throw new NotImplementedException (); + } + + public static object IndexOf (object targetString, object substring) + { + throw new NotImplementedException (); + } + + public static object Length (object value) + { + throw new NotImplementedException (); + } + + public static object Replace (object targetString, object substring, object newString) + { + throw new NotImplementedException (); + } + + public static object StartsWith (object targetString, object substring) + { + throw new NotImplementedException (); + } + + public static object Substring (object targetString, object startIndex) + { + throw new NotImplementedException (); + } + + public static object Substring (object targetString, object startIndex, object length) + { + throw new NotImplementedException (); + } + + public static object SubstringOf (object substring, object targetString) + { + throw new NotImplementedException (); + } + + public static object ToLower (object targetString) + { + throw new NotImplementedException (); + } + + public static object ToUpper (object targetString) + { + throw new NotImplementedException (); + } + + public static object Trim (object targetString) + { + throw new NotImplementedException (); + } + + public static object Year (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Month (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Day (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Hour (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Minute (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Second (object dateTime) + { + throw new NotImplementedException (); + } + + public static object Ceiling (object value) + { + throw new NotImplementedException (); + } + + public static object Floor (object value) + { + throw new NotImplementedException (); + } + + public static object Round (object value) + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSet.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSet.cs new file mode 100644 index 00000000000..454dff9e599 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSet.cs @@ -0,0 +1,55 @@ +// +// ResourceAssociationSet.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Diagnostics; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerDisplay ("ResourceAssociationSet: ({End1.ResourceSet.Name}, {End1.ResourceType.Name}, {End1.ResourceProperty.Name}) <-> ({End2.ResourceSet.Name}, {End2.ResourceType.Name}, {End2.ResourceProperty.Name})")] + public sealed class ResourceAssociationSet + { + public string Name { + get { throw new NotImplementedException (); } + } + + public ResourceAssociationSetEnd End1 { + get { throw new NotImplementedException (); } + } + + public ResourceAssociationSetEnd End2 { + get { throw new NotImplementedException (); } + } + + public ResourceAssociationSet (string name, ResourceAssociationSetEnd end1, ResourceAssociationSetEnd end2) + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSetEnd.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSetEnd.cs new file mode 100644 index 00000000000..de6a1c29438 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceAssociationSetEnd.cs @@ -0,0 +1,54 @@ +// +// ResourceAssociationSetEnd.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Diagnostics; +using System.Runtime; + +namespace System.Data.Services.Providers +{ + [DebuggerDisplay ("ResourceAssociationSetEnd: {Name}: ({ResourceSet.Name}, {ResourceType.Name}, {ResourceProperty.Name})")] + public sealed class ResourceAssociationSetEnd + { + public ResourceSet ResourceSet { + get { throw new NotImplementedException (); } + } + + public ResourceType ResourceType { + get { throw new NotImplementedException (); } + } + + public ResourceProperty ResourceProperty { + get { throw new NotImplementedException (); } + } + + public ResourceAssociationSetEnd (ResourceSet resourceSet, ResourceType resourceType, ResourceProperty resourceProperty) + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceProperty.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceProperty.cs new file mode 100644 index 00000000000..1f3f5e7ec5b --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceProperty.cs @@ -0,0 +1,81 @@ +// +// ResourceProperty.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Diagnostics; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerDisplay ("{kind}: {name}")] + public class ResourceProperty + { + public bool CanReflectOnInstanceTypeProperty { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public ResourceType ResourceType { + get; private set; + } + + public string Name { + get; private set; + } + + public string MimeType { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public ResourcePropertyKind Kind { + get; private set; + } + + public object CustomState { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public bool IsReadOnly { + get; private set; + } + + public ResourceProperty (string name, ResourcePropertyKind kind, ResourceType propertyResourceType) + { + this.Name = name; + this.Kind = kind; + this.ResourceType = propertyResourceType; + } + + public void SetReadOnly () + { + IsReadOnly = true; + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourcePropertyKind.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourcePropertyKind.cs new file mode 100644 index 00000000000..1816d112bc6 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourcePropertyKind.cs @@ -0,0 +1,42 @@ +// +// ResourcePropertyKind.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; + +namespace System.Data.Services.Providers +{ + [Flags] + public enum ResourcePropertyKind + { + Primitive = 0x01, + Key = 0x02, + ComplexType = 0x04, + ResourceReference = 0x08, + ResourceSetReference = 0x10, + ETag = 0x20 + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceSet.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceSet.cs new file mode 100644 index 00000000000..17ca997c7d9 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceSet.cs @@ -0,0 +1,66 @@ +// +// ResourceSet.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Diagnostics; +using System.Linq; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerDisplay ("{Name}: {ResourceType}")] + public class ResourceSet + { + public string Name { + get; private set; + } + + public ResourceType ResourceType { + get; private set; + } + + public object CustomState { + get; set; + } + + public bool IsReadOnly { + get; private set; + } + + public ResourceSet (string name, ResourceType elementType) + { + this.Name = name; + this.ResourceType = elementType; + } + + public void SetReadOnly () + { + IsReadOnly = true; + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceType.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceType.cs new file mode 100644 index 00000000000..2b775bcb73c --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceType.cs @@ -0,0 +1,167 @@ +// +// ResourceType.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Collections.ObjectModel; +using System.Data.Services.Common; +using System.Diagnostics; +using System.Linq.Expressions; +using System.Reflection; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerDisplay ("{Name}: {InstanceType}, {ResourceTypeKind}")] + public class ResourceType + { + string nameSpace; + + public bool IsMediaLinkEntry { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public Type InstanceType { + get; private set; + } + + public ResourceType BaseType { + get; private set; + } + + public ResourceTypeKind ResourceTypeKind { + get; private set; + } + + public ReadOnlyCollection <ResourceProperty> Properties { + get { throw new NotImplementedException (); } + } + + public ReadOnlyCollection <ResourceProperty> PropertiesDeclaredOnThisType { + get { throw new NotImplementedException (); } + } + + public ReadOnlyCollection <ResourceProperty> KeyProperties { + get { throw new NotImplementedException (); } + } + + public ReadOnlyCollection <ResourceProperty> ETagProperties { + get { throw new NotImplementedException (); } + } + + public string Name { + get; private set; + } + + public string FullName { + get; private set; + } + + public string Namespace { + get { + if (nameSpace == null) + return String.Empty; + return nameSpace; + } + } + + public bool IsAbstract { + get; private set; + } + + public bool IsOpenType { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public bool CanReflectOnInstanceType { + get; set; + } + + public object CustomState { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public bool IsReadOnly { + get; private set; + } + + public ResourceType (Type instanceType, ResourceTypeKind resourceTypeKind, ResourceType baseType, string namespaceName, string name, bool isAbstract) + { + if (instanceType == null) + throw new ArgumentNullException ("instanceType"); + if (String.IsNullOrEmpty (name)) + throw new ArgumentNullException ("name"); + if (resourceTypeKind == ResourceTypeKind.Primitive) + throw new ArgumentException ("'Primitive' is not a valid value for resourceTypeKind", "resourceTypeKind"); + if (instanceType.IsValueType) + throw new ArgumentException ("Clr type for the resource type cannot be a value type."); + + this.InstanceType = instanceType; + this.ResourceTypeKind = resourceTypeKind; + this.BaseType = baseType; + if (String.IsNullOrEmpty (namespaceName)) + this.FullName = name; + else + this.FullName = namespaceName + "." + name; + this.Name = name; + this.nameSpace = namespaceName; + this.IsAbstract = isAbstract; + + // Appears to always be true + this.CanReflectOnInstanceType = true; + } + + public static ResourceType GetPrimitiveResourceType (Type type) + { + throw new NotImplementedException (); + } + + public void AddProperty (ResourceProperty property) + { + throw new NotImplementedException (); + } + + public void AddEntityPropertyMappingAttribute (EntityPropertyMappingAttribute attribute) + { + throw new NotImplementedException (); + } + + public void SetReadOnly () + { + // TODO: anything else? + IsReadOnly = true; + } + + protected virtual IEnumerable <ResourceProperty> LoadPropertiesDeclaredOnThisType () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceTypeKind.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceTypeKind.cs new file mode 100644 index 00000000000..d14c561cb38 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceTypeKind.cs @@ -0,0 +1,38 @@ +// +// ResourceTypeKind.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; + +namespace System.Data.Services.Providers +{ + public enum ResourceTypeKind + { + EntityType = 0, + ComplexType = 1, + Primitive = 2 + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperation.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperation.cs new file mode 100644 index 00000000000..471b5601553 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperation.cs @@ -0,0 +1,87 @@ +// +// ServiceOperation.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Collections.ObjectModel; +using System.Data.Services.Providers; +using System.Diagnostics; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerVisualizer ("ServiceOperation={Name}")] + public class ServiceOperation + { + public string Method { + get { throw new NotImplementedException (); } + } + + public string MimeType { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public string Name { + get { throw new NotImplementedException (); } + } + + public ReadOnlyCollection <ServiceOperationParameter> Parameters { + get { throw new NotImplementedException (); } + } + + public ServiceOperationResultKind ResultKind { + get { throw new NotImplementedException (); } + } + + public ResourceType ResultType { + get { throw new NotImplementedException (); } + } + + public object CustomState { + get; set; + } + + public bool IsReadOnly { + get { throw new NotImplementedException (); } + } + + public ResourceSet ResourceSet { + get { throw new NotImplementedException (); } + } + + public ServiceOperation (string name, ServiceOperationResultKind resultKind, ResourceType resultType, ResourceSet resultSet, string method, IEnumerable <ServiceOperationParameter> parameters) + { + throw new NotImplementedException (); + } + + public void SetReadOnly () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationParameter.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationParameter.cs new file mode 100644 index 00000000000..35f7ca631c2 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationParameter.cs @@ -0,0 +1,65 @@ +// +// ServiceOperationParameter.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; +using System.Diagnostics; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services.Providers +{ + [DebuggerVisualizer ("ServiceOperationParameter={Name}")] + public class ServiceOperationParameter + { + public string Name { + get; private set; + } + + public ResourceType ParameterType { + get; private set; + } + + public object CustomState { + get; set; + } + + public bool IsReadOnly { + get; private set; + } + + public ServiceOperationParameter (string name, ResourceType parameterType) + { + this.Name = name; + this.ParameterType = parameterType; + } + + public void SetReadOnly () + { + IsReadOnly = true; + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationResultKind.cs b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationResultKind.cs new file mode 100644 index 00000000000..49e912aa4f0 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services.Providers/ServiceOperationResultKind.cs @@ -0,0 +1,40 @@ +// +// ServiceOperationResultKind.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services.Providers; + +namespace System.Data.Services.Providers +{ + public enum ServiceOperationResultKind + { + DirectValue = 0, + Enumeration = 1, + QueryWithMultipleResults = 2, + QueryWithSingleResult = 3, + Void = 4 + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services.dll.sources b/mcs/class/System.Data.Services/System.Data.Services.dll.sources index edf2f3e791d..6364648d29d 100644 --- a/mcs/class/System.Data.Services/System.Data.Services.dll.sources +++ b/mcs/class/System.Data.Services/System.Data.Services.dll.sources @@ -1,28 +1,28 @@ +./Assembly/AssemblyInfo.cs ../../build/common/Consts.cs ../../build/common/Locale.cs ../../build/common/MonoTODOAttribute.cs -./Assembly/AssemblyInfo.cs -./System.Data.Services/IUpdatable.cs -./System.Data.Services/ETagAttribute.cs -./System.Data.Services/UpdateOperations.cs -./System.Data.Services/HandleExceptionArgs.cs -./System.Data.Services/DataServiceHostFactory.cs -./System.Data.Services/ExpandSegment.cs -./System.Data.Services/IExpandedResult.cs + ./System.Data.Services/ChangeInterceptorAttribute.cs ./System.Data.Services/DataService.cs -./System.Data.Services/QueryInterceptorAttribute.cs +./System.Data.Services/DataServiceException.cs +./System.Data.Services/DataServiceHost.cs +./System.Data.Services/DataServiceHostFactory.cs +./System.Data.Services/EntitySetRights.cs +./System.Data.Services/ETagAttribute.cs ./System.Data.Services/ExpandSegmentCollection.cs +./System.Data.Services/ExpandSegment.cs +./System.Data.Services/HandleExceptionArgs.cs ./System.Data.Services/IDataServiceConfiguration.cs +./System.Data.Services/IDataServiceHost.cs +./System.Data.Services/IExpandedResult.cs ./System.Data.Services/IExpandProvider.cs -./System.Data.Services/IRequestHandler.cs -./System.Data.Services/DataServiceHost.cs -./System.Data.Services/SingleResultAttribute.cs -./System.Data.Services/EntitySetRights.cs -./System.Data.Services/ServiceOperationRights.cs ./System.Data.Services/IgnorePropertiesAttribute.cs -./System.Data.Services/IDataServiceHost.cs +./System.Data.Services/IRequestHandler.cs +./System.Data.Services/IUpdatable.cs ./System.Data.Services/MimeTypeAttribute.cs ./System.Data.Services/ProcessRequestArgs.cs -./System.Data.Services/DataServiceException.cs - +./System.Data.Services/QueryInterceptorAttribute.cs +./System.Data.Services/ServiceOperationRights.cs +./System.Data.Services/SingleResultAttribute.cs +./System.Data.Services/UpdateOperations.cs diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataService.cs b/mcs/class/System.Data.Services/System.Data.Services/DataService.cs index a6afb56d5b4..73c3ddbaa3d 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/DataService.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/DataService.cs @@ -34,7 +34,11 @@ using System.ServiceModel.Channels; namespace System.Data.Services {
[ServiceBehavior (InstanceContextMode = InstanceContextMode.PerCall)]
[AspNetCompatibilityRequirements (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
- public class DataService<T> : IRequestHandler {
+ public class DataService<T> : IRequestHandler
+ {
+#if NET_4_0
+ DataServiceProcessingPipeline processingPipeline;
+#endif
public void AttachHost (IDataServiceHost host)
{
if (host == null)
@@ -59,7 +63,15 @@ namespace System.Data.Services { protected T CurrentDataSource {
get; private set;
}
-
+#if NET_4_0
+ public DataServiceProcessingPipeline ProcessingPipeline {
+ get {
+ if (processingPipeline == null)
+ processingPipeline = new DataServiceProcessingPipeline ();
+ return processingPipeline;
+ }
+ }
+#endif
protected virtual T CreateDataSource()
{
throw new NotImplementedException();
diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceBehavior.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceBehavior.cs new file mode 100644 index 00000000000..3cd5fa16f4d --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceBehavior.cs @@ -0,0 +1,53 @@ +// +// DataServiceBehavior.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Data.Services.Common; +using System.Runtime; +using System.Runtime.CompilerServices; + +namespace System.Data.Services +{ + public sealed class DataServiceBehavior + { + public bool InvokeInterceptorsOnLinkDelete { + get; set; + } + + public bool AcceptCountRequests { + get; set; + } + + public bool AcceptProjectionRequests { + get; set; + } + + public DataServiceProtocolVersion MaxProtocolVersion { + get; set; + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceConfiguration.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceConfiguration.cs new file mode 100644 index 00000000000..afcf41b09c7 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceConfiguration.cs @@ -0,0 +1,109 @@ +// +// DataServiceConfiguration.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Diagnostics; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Runtime; +using System.Text; + +namespace System.Data.Services +{ + public sealed class DataServiceConfiguration : IDataServiceConfiguration + { + public bool EnableTypeConversion { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxBatchCount { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxChangesetCount { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxExpandCount { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxExpandDepth { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxResultsPerCollection { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public int MaxObjectCountOnInsert { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public bool UseVerboseErrors { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public DataServiceBehavior DataServiceBehavior { + get { throw new NotImplementedException (); } + } + + public void SetEntitySetAccessRule (string name, EntitySetRights rights) + { + throw new NotImplementedException (); + } + + public void SetServiceOperationAccessRule (string name, ServiceOperationRights rights) + { + throw new NotImplementedException (); + } + + public void RegisterKnownType (Type type) + { + throw new NotImplementedException (); + } + + public void SetEntitySetPageSize (string name, int size) + { + throw new NotImplementedException (); + } + + public void EnableTypeAccess (string typeName) + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceException.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceException.cs index a3261cbf3d2..c9edb2e1695 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/DataServiceException.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceException.cs @@ -26,12 +26,16 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Diagnostics;
using System.Runtime.Serialization;
using System.Security;
-namespace System.Data.Services {
+namespace System.Data.Services
+{
+ [DebuggerDisplay ("{statusCode}: {Message}")]
[Serializable]
- public class DataServiceException : InvalidOperationException {
+ public sealed class DataServiceException : InvalidOperationException
+ {
public DataServiceException()
{
}
diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceHost.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceHost.cs index 5161c4e3d19..a3b5c7648a2 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/DataServiceHost.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceHost.cs @@ -31,8 +31,8 @@ using System.ServiceModel.Web; namespace System.Data.Services {
[CLSCompliant (false)]
public class DataServiceHost : WebServiceHost {
- public DataServiceHost (Type serviceType, Uri[] baseAddress)
- : base (serviceType, baseAddress)
+ public DataServiceHost (Type serviceType, Uri[] baseAddresses)
+ : base (serviceType, baseAddresses)
{
}
}
diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceOperationContext.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceOperationContext.cs new file mode 100644 index 00000000000..fd5653e3ae4 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceOperationContext.cs @@ -0,0 +1,65 @@ +// +// DataServiceOperationContext.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Net; +using System.Runtime; + +namespace System.Data.Services +{ + public sealed class DataServiceOperationContext + { + public bool IsBatchRequest { + get { throw new NotImplementedException (); } + } + + public string RequestMethod { + get { throw new NotImplementedException (); } + } + + public Uri AbsoluteRequestUri { + get { throw new NotImplementedException (); } + } + + public Uri AbsoluteServiceUri { + get { throw new NotImplementedException (); } + } + + public WebHeaderCollection RequestHeaders { + get { throw new NotImplementedException (); } + } + + public WebHeaderCollection ResponseHeaders { + get { throw new NotImplementedException (); } + } + + public int ResponseStatusCode { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipeline.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipeline.cs new file mode 100644 index 00000000000..f129f8b8921 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipeline.cs @@ -0,0 +1,60 @@ +// +// DataServiceProcessingPipeline.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Runtime; + +namespace System.Data.Services +{ + public sealed class DataServiceProcessingPipeline + { + public event EventHandler <DataServiceProcessingPipelineEventArgs> ProcessingRequest { + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + + public event EventHandler <DataServiceProcessingPipelineEventArgs> ProcessedRequest { + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + + public event EventHandler <EventArgs> ProcessingChangeset { + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + + public event EventHandler <EventArgs> ProcessedChangeset { + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + + public DataServiceProcessingPipeline () + { + throw new NotImplementedException (); + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipelineEventArgs.cs b/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipelineEventArgs.cs new file mode 100644 index 00000000000..a929a9a66b9 --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/DataServiceProcessingPipelineEventArgs.cs @@ -0,0 +1,40 @@ +// +// DataServiceProcessingPipelineEventArgs.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Diagnostics; +using System.Runtime; + +namespace System.Data.Services +{ + public sealed class DataServiceProcessingPipelineEventArgs : EventArgs + { + public DataServiceOperationContext OperationContext { + get { throw new NotImplementedException (); } + } + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/ETagAttribute.cs b/mcs/class/System.Data.Services/System.Data.Services/ETagAttribute.cs index 9c9c55c5904..be87f205923 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/ETagAttribute.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/ETagAttribute.cs @@ -30,7 +30,7 @@ using System.Collections.ObjectModel; namespace System.Data.Services {
[AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true )]
- public class ETagAttribute : Attribute {
+ public sealed class ETagAttribute : Attribute {
public ETagAttribute (string propertyName)
{
if (propertyName == null)
diff --git a/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs b/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs index afa658626f2..a5914259a54 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs @@ -26,12 +26,19 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
+#if NET_4_0
+using System.Data.Services.Providers;
+#endif
-namespace System.Data.Services {
- public class ExpandSegment {
+namespace System.Data.Services
+{
+ [DebuggerDisplay ("ExpandSegment ({name},Filter={filter})]")]
+ public class ExpandSegment
+ {
public ExpandSegment (string name, Expression filter)
{
if (name == null)
@@ -40,7 +47,13 @@ namespace System.Data.Services { this.Name = name;
this.Filter = filter;
}
-
+#if NET_4_0
+ public ResourceProperty ExpandedProperty {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+#endif
public string Name {
get;
private set;
@@ -61,12 +74,12 @@ namespace System.Data.Services { private int max_results_expected = Int32.MaxValue;
- public static bool PathHasFilter (IEnumerable<ExpandSegment> segments)
+ public static bool PathHasFilter (IEnumerable<ExpandSegment> path)
{
- if (segments == null)
- throw new ArgumentNullException ("segments");
+ if (path == null)
+ throw new ArgumentNullException ("path");
- return segments.Any (s => s.HasFilter);
+ return path.Any (s => s.HasFilter);
}
}
}
\ No newline at end of file diff --git a/mcs/class/System.Data.Services/System.Data.Services/IDataServiceHost2.cs b/mcs/class/System.Data.Services/System.Data.Services/IDataServiceHost2.cs new file mode 100644 index 00000000000..cbcf0fe804f --- /dev/null +++ b/mcs/class/System.Data.Services/System.Data.Services/IDataServiceHost2.cs @@ -0,0 +1,44 @@ +// +// IDataServiceHost2.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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.Data.Services; +using System.Net; + +namespace System.Data.Services +{ + public interface IDataServiceHost2 : IDataServiceHost + { + WebHeaderCollection RequestHeaders { + get; + } + + WebHeaderCollection ResponseHeaders { + get; + } + + } +} diff --git a/mcs/class/System.Data.Services/System.Data.Services/MimeTypeAttribute.cs b/mcs/class/System.Data.Services/System.Data.Services/MimeTypeAttribute.cs index af5bbf4ba1d..76499cb451f 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/MimeTypeAttribute.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/MimeTypeAttribute.cs @@ -28,7 +28,7 @@ namespace System.Data.Services {
[AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
- public class MimeTypeAttribute : Attribute {
+ public sealed class MimeTypeAttribute : Attribute {
public MimeTypeAttribute (string memberName, string mimeType)
{
this.MemberName = memberName;
diff --git a/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs b/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs index 517321bb49d..cdd042c34a6 100644 --- a/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs +++ b/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs @@ -28,7 +28,13 @@ namespace System.Data.Services
{
- public sealed class ProcessRequestArgs {
+ public sealed class ProcessRequestArgs
+ {
+#if NET_4_0
+ public DataServiceOperationContext OperationContext {
+ get; private set;
+ }
+#endif
public bool IsBatchOperation {
get; private set;
}
diff --git a/mcs/class/System.Data.Services/System.Data.Services_test.dll.sources b/mcs/class/System.Data.Services/System.Data.Services_test.dll.sources index 5daa8b5a423..b97d3ee88ae 100644 --- a/mcs/class/System.Data.Services/System.Data.Services_test.dll.sources +++ b/mcs/class/System.Data.Services/System.Data.Services_test.dll.sources @@ -1,3 +1,5 @@ +../../System.Web.DynamicData/Test/Common/AssertExtensions.cs + ./IgnorePropertiesAttributeTests.cs ./QueryInterceptorAttributeTests.cs ./DataServiceTests.cs @@ -7,3 +9,6 @@ ./MimeTypeAttributeTests.cs ./DataServiceExceptionTests.cs ./ETagAttributeTests.cs + +./System.Data.Services.Providers/DataServiceProviderMethodsTest.cs +./System.Data.Services.Providers/ResourceTypeTest.cs diff --git a/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/DataServiceProviderMethodsTest.cs b/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/DataServiceProviderMethodsTest.cs new file mode 100644 index 00000000000..551f85339a2 --- /dev/null +++ b/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/DataServiceProviderMethodsTest.cs @@ -0,0 +1,167 @@ +// +// DataServiceProviderMethods.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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. + +#if NET_4_0 +using System; +using System.Collections.Generic; +using System.Data.Services.Providers; + +using NUnit.Framework; +using MonoTests.Common; + +namespace MonoTests.System.Data.Services.Providers +{ + [TestFixture] + public class DataServiceProviderMethodsTest + { + [Test] + public void TypeIs () + { + var rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.TypeIs ("test", rt); + }, "#A1"); + + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.TypeIs (null, null); + }, "#A2"); + } + + [Test] + public void Convert () + { + var rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.Convert ("test", rt); + }, "#A1"); + + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.Convert (null, null); + }, "#A2"); + } + + [Test] + public void GetSequenceValue () + { + var rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + var rp = new ResourceProperty ("Length", ResourcePropertyKind.ComplexType, rt); + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.GetSequenceValue<string> ("test", rp); + }, "#A1"); + + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.GetSequenceValue<string> (null, null); + }, "#A2"); + } + + [Test] + public void GetValue () + { + var rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + var rp = new ResourceProperty ("Length", ResourcePropertyKind.ComplexType, rt); + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.GetValue ("test", rp); + }, "#A1"); + + AssertExtensions.Throws<NotImplementedException> (() => { + DataServiceProviderMethods.GetValue (null, null); + }, "#A2"); + } + + [Test] + public void Compare_String_String () + { + Assert.AreEqual (1, DataServiceProviderMethods.Compare ("right", "left"), "#A1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ("right", "right"), "#A2"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare (String.Empty, String.Empty), "#A3"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare ("left", "right"), "#A4"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (null, "right"), "#A5"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare ("right", null), "#A6"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ((string)null, (string)null), "#A7"); + } + + [Test] + public void Compare_Bool_Bool () + { + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (false, true), "#A1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare (false, false), "#A2"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare (true, false), "#A3"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare (true, true), "#A4"); + } + + [Test] + public void Compare_NullableBool_NullableBool () + { + Assert.AreEqual (-1, DataServiceProviderMethods.Compare ((bool?) false, (bool?) true), "#A1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ((bool?) false, (bool?) false), "#A2"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare ((bool?) true, (bool?) false), "#A3"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ((bool?) true, (bool?) true), "#A4"); + + Assert.AreEqual (1, DataServiceProviderMethods.Compare ((bool?) false, null), "#B1"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare ((bool?) true, null), "#B2"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (null, (bool?)false), "#B3"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (null, (bool?) true), "#B4"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ((bool?) null, (bool?) null), "#B5"); + } + + [Test] + public void Compare_Guid_Guid () + { + var guid1 = new Guid ("bdec809c-f8c5-4bc9-8b56-fb34a12a3e1c"); + var guid2 = new Guid ("898b2fe2-3530-4f56-85de-79344e59a90f"); + + Assert.AreEqual (1, DataServiceProviderMethods.Compare (guid1, guid2), "#A1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare (guid1, guid1), "#A2"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (guid2, guid1), "#A3"); + + guid1 = new Guid ("00000000-0000-0000-0000-000000000000"); + guid2 = new Guid ("00000000-0000-0000-0000-000000000001"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (guid1, guid2), "#B1"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare (guid2, guid1), "#B2"); + } + + [Test] + public void Compare_NullableGuid_NullableGuid () + { + var guid1 = new Guid ("bdec809c-f8c5-4bc9-8b56-fb34a12a3e1c"); + var guid2 = new Guid ("898b2fe2-3530-4f56-85de-79344e59a90f"); + + Assert.AreEqual (1, DataServiceProviderMethods.Compare (guid1, guid2), "#A1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare (guid1, guid1), "#A2"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (guid2, guid1), "#A3"); + + guid1 = new Guid ("00000000-0000-0000-0000-000000000000"); + guid2 = new Guid ("00000000-0000-0000-0000-000000000001"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare (guid1, guid2), "#B1"); + Assert.AreEqual (1, DataServiceProviderMethods.Compare (guid2, guid1), "#B2"); + + Assert.AreEqual (1, DataServiceProviderMethods.Compare ((Guid?)guid1, (Guid?)null), "#C1"); + Assert.AreEqual (0, DataServiceProviderMethods.Compare ((Guid?)null, (Guid?)null), "#C2"); + Assert.AreEqual (-1, DataServiceProviderMethods.Compare ((Guid?) null, (Guid?)guid1), "#C3"); + } + } +} +#endif
\ No newline at end of file diff --git a/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/ResourceTypeTest.cs b/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/ResourceTypeTest.cs new file mode 100644 index 00000000000..62d1e0ec2bb --- /dev/null +++ b/mcs/class/System.Data.Services/Test/System.Data.Services.Providers/ResourceTypeTest.cs @@ -0,0 +1,135 @@ +// +// DataServiceProviderMethods.cs +// +// Author: +// Marek Habersack <grendel@twistedcode.net> +// +// Copyright (c) 2011 Novell, Inc +// +// 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. + +#if NET_4_0 +using System; +using System.Collections.Generic; +using System.Data.Services.Providers; + +using NUnit.Framework; +using MonoTests.Common; + +namespace MonoTests.System.Data.Services.Providers +{ + [TestFixture] + public class ResourceTypeTest + { + [Test] + public void Constructor () + { + var dummy = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + ResourceType rt; + + AssertExtensions.Throws<ArgumentNullException> (() => { + rt = new ResourceType (null, ResourceTypeKind.ComplexType, dummy, "System", "Null", false); + }, "#A1-1"); + + AssertExtensions.Throws<ArgumentNullException> (() => { + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, dummy, "System", null, false); + }, "#A1-2"); + + AssertExtensions.Throws<ArgumentNullException> (() => { + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, dummy, null, null, false); + }, "#A1-3"); + + AssertExtensions.Throws<ArgumentNullException> (() => { + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, dummy, "System", String.Empty, false); + }, "#A1-4"); + + AssertExtensions.Throws<ArgumentException> (() => { + rt = new ResourceType (typeof (string), ResourceTypeKind.Primitive, null, "System", "String", false); + }, "#A2-1"); + + AssertExtensions.Throws<ArgumentException> (() => { + rt = new ResourceType (typeof (bool), ResourceTypeKind.Primitive, null, "System", "Bool", false); + }, "#A2-2"); + + AssertExtensions.Throws<ArgumentException> (() => { + rt = new ResourceType (typeof (int), ResourceTypeKind.EntityType, null, "System", "Int32", true); + }, "#A2-3"); + + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, dummy, null, "String", false); + Assert.AreEqual (typeof (string), rt.InstanceType, "#B1-1"); + Assert.AreEqual (ResourceTypeKind.ComplexType, rt.ResourceTypeKind, "#B1-2"); + Assert.AreEqual (dummy, rt.BaseType, "#B1-3"); + Assert.AreEqual (String.Empty, rt.Namespace, "#B1-4"); + Assert.AreEqual ("String", rt.Name, "#B1-5"); + Assert.AreEqual (false, rt.IsAbstract, "#B1-6"); + Assert.AreEqual ("String", rt.FullName, "#B1-7"); + + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, dummy, String.Empty, "String", false); + Assert.AreEqual (typeof (string), rt.InstanceType, "#B2-1"); + Assert.AreEqual (ResourceTypeKind.ComplexType, rt.ResourceTypeKind, "#B2-2"); + Assert.AreEqual (dummy, rt.BaseType, "#B2-3"); + Assert.AreEqual (String.Empty, rt.Namespace, "#B2-4"); + Assert.AreEqual ("String", rt.Name, "#B2-5"); + Assert.AreEqual (false, rt.IsAbstract, "#B2-6"); + Assert.AreEqual ("String", rt.FullName, "#B2-7"); + + rt = new ResourceType (typeof (string), ResourceTypeKind.ComplexType, null, "System", "String", false); + Assert.AreEqual (typeof (string), rt.InstanceType, "#B3-1"); + Assert.AreEqual (ResourceTypeKind.ComplexType, rt.ResourceTypeKind, "#B3-2"); + Assert.AreEqual (null, rt.BaseType, "#B3-3"); + Assert.AreEqual ("System", rt.Namespace, "#B3-4"); + Assert.AreEqual ("String", rt.Name, "#B3-5"); + Assert.AreEqual (false, rt.IsAbstract, "#B3-6"); + Assert.AreEqual ("System.String", rt.FullName, "#B3-7"); + + rt = new ResourceType (typeof (string), ResourceTypeKind.EntityType, null, "System", "String", false); + Assert.AreEqual (typeof (string), rt.InstanceType, "#B4-1"); + Assert.AreEqual (ResourceTypeKind.EntityType, rt.ResourceTypeKind, "#B4-2"); + Assert.AreEqual (null, rt.BaseType, "#B4-3"); + Assert.AreEqual ("System", rt.Namespace, "#B4-4"); + Assert.AreEqual ("String", rt.Name, "#B4-5"); + Assert.AreEqual (false, rt.IsAbstract, "#B4-6"); + Assert.AreEqual ("System.String", rt.FullName, "#B4-7"); + + rt = new ResourceType (typeof (string), ResourceTypeKind.EntityType, null, "System", "String", true); + Assert.AreEqual (typeof (string), rt.InstanceType, "#B5-1"); + Assert.AreEqual (ResourceTypeKind.EntityType, rt.ResourceTypeKind, "#B5-2"); + Assert.AreEqual (null, rt.BaseType, "#B5-3"); + Assert.AreEqual ("System", rt.Namespace, "#B5-4"); + Assert.AreEqual ("String", rt.Name, "#B5-5"); + Assert.AreEqual (true, rt.IsAbstract, "#B5-6"); + Assert.AreEqual ("System.String", rt.FullName, "#B5-7"); + } + + [Test] + public void CanReflectOnInstanceType () + { + var rt = new ResourceType (typeof (string), ResourceTypeKind.EntityType, null, "System", "String", true); + Assert.AreEqual (true, rt.CanReflectOnInstanceType, "#A1-1"); + rt.CanReflectOnInstanceType = false; + Assert.AreEqual (false, rt.CanReflectOnInstanceType, "#A1-2"); + + rt = new ResourceType (typeof (ResourceTypeTest), ResourceTypeKind.ComplexType, null, "MonoTests.System.Data.Services.Providers", "ResourceTypeTest", true); + Assert.AreEqual (true, rt.CanReflectOnInstanceType, "#A2-1"); + rt.CanReflectOnInstanceType = false; + Assert.AreEqual (false, rt.CanReflectOnInstanceType, "#A2-2"); + } + } +} +#endif
\ No newline at end of file diff --git a/mcs/class/System.Data.Services/net_4_0_System.Data.Services.dll.sources b/mcs/class/System.Data.Services/net_4_0_System.Data.Services.dll.sources new file mode 100644 index 00000000000..57c4cb059c1 --- /dev/null +++ b/mcs/class/System.Data.Services/net_4_0_System.Data.Services.dll.sources @@ -0,0 +1,52 @@ +#include System.Data.Services.dll.sources + +System.Data.Services/DataServiceBehavior.cs +System.Data.Services/DataServiceConfiguration.cs +System.Data.Services/DataServiceOperationContext.cs +System.Data.Services/DataServiceProcessingPipeline.cs +System.Data.Services/DataServiceProcessingPipelineEventArgs.cs +System.Data.Services/IDataServiceHost2.cs + +System.Data.Services.Internal/ExpandedWrapper`10.cs +System.Data.Services.Internal/ExpandedWrapper`11.cs +System.Data.Services.Internal/ExpandedWrapper`12.cs +System.Data.Services.Internal/ExpandedWrapper`13.cs +System.Data.Services.Internal/ExpandedWrapper`1.cs +System.Data.Services.Internal/ExpandedWrapper`2.cs +System.Data.Services.Internal/ExpandedWrapper`3.cs +System.Data.Services.Internal/ExpandedWrapper`4.cs +System.Data.Services.Internal/ExpandedWrapper`5.cs +System.Data.Services.Internal/ExpandedWrapper`6.cs +System.Data.Services.Internal/ExpandedWrapper`7.cs +System.Data.Services.Internal/ExpandedWrapper`8.cs +System.Data.Services.Internal/ExpandedWrapper`9.cs +System.Data.Services.Internal/ProjectedWrapper0.cs +System.Data.Services.Internal/ProjectedWrapper1.cs +System.Data.Services.Internal/ProjectedWrapper2.cs +System.Data.Services.Internal/ProjectedWrapper3.cs +System.Data.Services.Internal/ProjectedWrapper4.cs +System.Data.Services.Internal/ProjectedWrapper5.cs +System.Data.Services.Internal/ProjectedWrapper6.cs +System.Data.Services.Internal/ProjectedWrapper7.cs +System.Data.Services.Internal/ProjectedWrapper8.cs +System.Data.Services.Internal/ProjectedWrapper.cs +System.Data.Services.Internal/ProjectedWrapperMany.cs +System.Data.Services.Internal/ProjectedWrapperManyEnd.cs + +System.Data.Services.Providers/DataServiceProviderMethods.cs +System.Data.Services.Providers/IDataServiceMetadataProvider.cs +System.Data.Services.Providers/IDataServicePagingProvider.cs +System.Data.Services.Providers/IDataServiceQueryProvider.cs +System.Data.Services.Providers/IDataServiceStreamProvider.cs +System.Data.Services.Providers/IDataServiceUpdateProvider.cs +System.Data.Services.Providers/OpenTypeMethods.cs +System.Data.Services.Providers/ResourceAssociationSet.cs +System.Data.Services.Providers/ResourceAssociationSetEnd.cs +System.Data.Services.Providers/ResourceProperty.cs +System.Data.Services.Providers/ResourcePropertyKind.cs +System.Data.Services.Providers/ResourceSet.cs +System.Data.Services.Providers/ResourceType.cs +System.Data.Services.Providers/ResourceTypeKind.cs +System.Data.Services.Providers/ServiceOperation.cs +System.Data.Services.Providers/ServiceOperationParameter.cs +System.Data.Services.Providers/ServiceOperationResultKind.cs |