PageRenderTime 48ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/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. //===================================================================================
  17. using System;
  18. using Microsoft.Practices.Composite.Presentation.Commands;
  19. using StockTraderRI.Infrastructure;
  20. using StockTraderRI.Modules.Position.Models;
  21. using StockTraderRI.Modules.Position.Orders;
  22. namespace StockTraderRI.Modules.Position.Tests.Mocks
  23. {
  24. public class MockOrderDetailsPresentationModel : IOrderDetailsPresentationModel
  25. {
  26. public bool DisposeCalled;
  27. public MockOrderDetailsPresentationModel()
  28. {
  29. View = new MockOrderDetailsView();
  30. }
  31. public event EventHandler CloseViewRequested;
  32. public IOrderDetailsView View { get; set; }
  33. #region IDisposable Members
  34. public void Dispose()
  35. {
  36. DisposeCalled = true;
  37. }
  38. #endregion
  39. internal void RaiseCloseViewRequested()
  40. {
  41. CloseViewRequested(this, EventArgs.Empty);
  42. }
  43. public TransactionInfo TransactionInfo { get; set; }
  44. public TransactionType TransactionType { get; set; }
  45. public string TickerSymbol { get; set;}
  46. public int? Shares { get; set;}
  47. public decimal? StopLimitPrice { get; set; }
  48. public DelegateCommand<object> SubmitCommand { get; set;}
  49. public DelegateCommand<object> CancelCommand { get; set;}
  50. #region IOrderDetailsPresentationModel Members
  51. #endregion
  52. }
  53. }