DataServiceProviderMethods.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // DataServiceProviderMethods.cs
  3. //
  4. // Author:
  5. // Marek Habersack <[email protected]>
  6. //
  7. // Copyright (c) 2011 Novell, Inc
  8. //
  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:
  15. //
  16. // The above copyright notice and this permission notice shall be included in
  17. // all copies or substantial portions of the Software.
  18. //
  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
  25. // THE SOFTWARE.
  26. using System;
  27. using System.Collections.Generic;
  28. using System.Data.Services.Providers;
  29. using System.Reflection;
  30. namespace System.Data.Services.Providers
  31. {
  32. public static class DataServiceProviderMethods
  33. {
  34. public static object GetValue (object value, ResourceProperty property)
  35. {
  36. // LAMESPEC: this method is not implemented in the .NET assembly
  37. throw new NotImplementedException ();
  38. }
  39. public static IEnumerable <T> GetSequenceValue<T> (object value, ResourceProperty property)
  40. {
  41. // LAMESPEC: this method is not implemented in the .NET assembly
  42. throw new NotImplementedException ();
  43. }
  44. public static object Convert (object value, ResourceType type)
  45. {
  46. // LAMESPEC: this method is not implemented in the .NET assembly
  47. throw new NotImplementedException ();
  48. }
  49. public static bool TypeIs (object value, ResourceType type)
  50. {
  51. // LAMESPEC: this method is not implemented in the .NET assembly
  52. throw new NotImplementedException ();
  53. }
  54. public static int Compare (string left, string right)
  55. {
  56. return Comparer <string>.Default.Compare (left, right);
  57. }
  58. public static int Compare (bool left, bool right)
  59. {
  60. return Comparer <bool>.Default.Compare (left, right);
  61. }
  62. public static int Compare (bool? left, bool? right)
  63. {
  64. return Comparer <bool?>.Default.Compare (left, right);
  65. }
  66. public static int Compare (Guid left, Guid right)
  67. {
  68. return Comparer <Guid>.Default.Compare (left, right);
  69. }
  70. public static int Compare (Guid? left, Guid? right)
  71. {
  72. return Comparer <Guid?>.Default.Compare (left, right);
  73. }
  74. }
  75. }