Component.cs 630 B

1234567891011121314151617181920212223242526272829303132
  1. using System.ComponentModel;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace Common.Base
  4. {
  5. public abstract class Component : Object, ISupportInitialize
  6. {
  7. private Entity owner;
  8. [BsonIgnore]
  9. public Entity Owner
  10. {
  11. get
  12. {
  13. return owner;
  14. }
  15. set
  16. {
  17. this.owner = value;
  18. this.Guid = this.owner.Guid;
  19. }
  20. }
  21. public virtual void BeginInit()
  22. {
  23. }
  24. public virtual void EndInit()
  25. {
  26. }
  27. }
  28. }