summaryrefslogtreecommitdiff
path: root/DesignPatterns/src/app/DesignPatterns.Observer/MosMotherInLaw.cs
blob: a872240fad4dd635e921dc4f4215277394584955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
	}
}