PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/V2.2/trunk/Quickstarts/UI Composition/ViewDiscovery/Desktop/UIComposition.Modules.Employee.Tests/Mocks/MockEmployeesListPresenter.cs

#
C# | 40 lines | 21 code | 3 blank | 16 comment | 0 complexity | cd18b6f273e33a7ce2f14ed52517d50a MD5 | raw file
 1//===================================================================================
 2// Microsoft patterns & practices
 3// Composite Application Guidance for Windows Presentation Foundation and Silverlight
 4//===================================================================================
 5// Copyright (c) Microsoft Corporation.  All rights reserved.
 6// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
 7// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
 8// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 9// FITNESS FOR A PARTICULAR PURPOSE.
10//===================================================================================
11// The example companies, organizations, products, domain names,
12// e-mail addresses, logos, people, places, and events depicted
13// herein are fictitious.  No association with any real company,
14// organization, product, domain name, email address, logo, person,
15// places, or events is intended or should be inferred.
16//===================================================================================
17using System;
18using System.Collections.Generic;
19using System.Linq;
20using System.Text;
21using Microsoft.Practices.Composite.Events;
22
23namespace UIComposition.Modules.Employee.Tests.Mocks
24{
25    class MockEmployeesListPresenter : IEmployeesListPresenter
26    {
27        public IEmployeesListView View { get; set; }
28
29        public MockEmployeesListPresenter()
30        {
31            View = new MockEmployeesListView();
32            View.EmployeeSelected += delegate(object sender, DataEventArgs<BusinessEntities.Employee> e)
33            {
34                EmployeeSelected(sender, e);
35            };
36        }
37
38        public event EventHandler<DataEventArgs<BusinessEntities.Employee>> EmployeeSelected = delegate { };
39    }
40}