2 // DataServiceProviderMethods.cs
5 // Marek Habersack <grendel@twistedcode.net>
7 // Copyright (c) 2011 Novell, Inc
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 using System.Collections.Generic;
29 using System.Data.Services.Providers;
30 using System.Reflection;
32 namespace System.Data.Services.Providers
34 public static class DataServiceProviderMethods
36 public static object GetValue (object value, ResourceProperty property)
38 // LAMESPEC: this method is not implemented in the .NET assembly
39 throw new NotImplementedException ();
42 public static IEnumerable <T> GetSequenceValue<T> (object value, ResourceProperty property)
44 // LAMESPEC: this method is not implemented in the .NET assembly
45 throw new NotImplementedException ();
48 public static object Convert (object value, ResourceType type)
50 // LAMESPEC: this method is not implemented in the .NET assembly
51 throw new NotImplementedException ();
54 public static bool TypeIs (object value, ResourceType type)
56 // LAMESPEC: this method is not implemented in the .NET assembly
57 throw new NotImplementedException ();
60 public static int Compare (string left, string right)
62 return Comparer <string>.Default.Compare (left, right);
65 public static int Compare (bool left, bool right)
67 return Comparer <bool>.Default.Compare (left, right);
70 public static int Compare (bool? left, bool? right)
72 return Comparer <bool?>.Default.Compare (left, right);
75 public static int Compare (Guid left, Guid right)
77 return Comparer <Guid>.Default.Compare (left, right);
80 public static int Compare (Guid? left, Guid? right)
82 return Comparer <Guid?>.Default.Compare (left, right);