summaryrefslogtreecommitdiff
path: root/DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs
diff options
context:
space:
mode:
Diffstat (limited to 'DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs')
-rw-r--r--DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs b/DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs
new file mode 100644
index 0000000..a872240
--- /dev/null
+++ b/DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs
@@ -0,0 +1,35 @@
+/*
+ * Created by: Mo
+ * Created: Friday, July 06, 2007
+ */
+
+using System;
+
+namespace DesignPatterns.Observer {
+ public class MosMotherInLaw : IObserver {
+ #region Constructors
+
+ public MosMotherInLaw( ) : this( new Mo( ) ) {}
+
+ public MosMotherInLaw( ISubject sonInLaw ) {
+ _sonInLaw = sonInLaw;
+ _sonInLaw.Add( this );
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public void Update( ) {
+ Console.Out.WriteLine( "Why is my son in law looking at cute girls?" );
+ }
+
+ #endregion
+
+ #region Private Fields
+
+ private ISubject _sonInLaw;
+
+ #endregion
+ }
+} \ No newline at end of file