MarshalByValueComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // System.ComponentModel.MarshalByValueComponent.cs
  3. //
  4. // Author:
  5. // Rodrigo Moya ([email protected])
  6. //
  7. // (C) Ximian, Inc
  8. //
  9. using System;
  10. namespace System.ComponentModel
  11. {
  12. /// <summary>
  13. /// Implements IComponent and provides the base implementation for remotable components that are marshaled by value (a copy of the serialized object is passed).
  14. /// </summary>
  15. public class MarshalByValueComponent : IComponent, IDisposable, IServiceProvider
  16. {
  17. [MonoTODO]
  18. public MarshalByValueComponent () {
  19. // TODO: need to implement for some component model
  20. // but do not throw a NotImplementedException
  21. }
  22. public void Dispose ()
  23. {
  24. Dispose (true);
  25. GC.SuppressFinalize (this);
  26. }
  27. [MonoTODO]
  28. protected virtual void Dispose (bool disposing)
  29. {
  30. if (disposing) {
  31. // free managed objects contained here
  32. }
  33. // Free unmanaged objects
  34. // Set fields to null
  35. }
  36. ~MarshalByValueComponent ()
  37. {
  38. Dispose (false);
  39. }
  40. [MonoTODO]
  41. public virtual object GetService (Type service) {
  42. return null;
  43. }
  44. public virtual IContainer Container {
  45. [MonoTODO]
  46. get {
  47. return null;
  48. }
  49. }
  50. public virtual bool DesignMode {
  51. [MonoTODO]
  52. get {
  53. return false;
  54. }
  55. }
  56. public virtual ISite Site {
  57. [MonoTODO]
  58. get {
  59. // TODO: need to get Site
  60. return null;
  61. }
  62. [MonoTODO]
  63. set {
  64. // TODO: need to set Site
  65. }
  66. }
  67. protected EventHandlerList Events {
  68. [MonoTODO]
  69. get {
  70. // TODO: need to do, but do not
  71. // throw a NotImplementedException
  72. return null;
  73. }
  74. }
  75. public event EventHandler Disposed;
  76. }
  77. }