PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/V2.2/trunk/RI/Desktop/StockTraderRI.Modules.Position.Tests/Mocks/MockOrderDetailsPresentationModel.cs

#
C# | 70 lines | 37 code | 17 blank | 16 comment | 0 complexity | 39893dbf6afbc4486cedb03d2fb2d6a3 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 Microsoft.Practices.Composite.Presentation.Commands;
19using StockTraderRI.Infrastructure;
20using StockTraderRI.Modules.Position.Models;
21using StockTraderRI.Modules.Position.Orders;
22
23namespace StockTraderRI.Modules.Position.Tests.Mocks
24{
25    public class MockOrderDetailsPresentationModel : IOrderDetailsPresentationModel
26    {
27        public bool DisposeCalled;
28
29        public MockOrderDetailsPresentationModel()
30        {
31            View = new MockOrderDetailsView();
32        }
33
34        public event EventHandler CloseViewRequested;
35
36        public IOrderDetailsView View { get; set; }
37
38        #region IDisposable Members
39
40        public void Dispose()
41        {
42            DisposeCalled = true;
43        }
44
45        #endregion
46
47        internal void RaiseCloseViewRequested()
48        {
49            CloseViewRequested(this, EventArgs.Empty);
50        }
51
52        public TransactionInfo TransactionInfo { get; set; }
53
54        public TransactionType TransactionType { get; set; }
55
56        public string TickerSymbol { get; set;}
57
58        public int? Shares { get; set;}
59
60        public decimal? StopLimitPrice { get; set; }
61
62        public DelegateCommand<object> SubmitCommand { get; set;}
63
64        public DelegateCommand<object> CancelCommand { get; set;}
65
66        #region IOrderDetailsPresentationModel Members
67
68        #endregion
69    }
70}