PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/V2.2/trunk/RI/StockTraderRI.Tests.AcceptanceTest/StockTraderRI.Tests.AcceptanceTest/TestInfrastructure/DataProvider/MockModels/AccountPosition.cs

#
C# | 88 lines | 62 code | 10 blank | 16 comment | 3 complexity | 4fc1095f08dd547107efb0919e86dd61 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 System.Collections.Generic;
  19. using System.Linq;
  20. using System.Text;
  21. namespace StockTraderRI.Tests.AcceptanceTest.TestInfrastructure
  22. {
  23. public class AccountPosition
  24. {
  25. public AccountPosition() { }
  26. public AccountPosition(string tickerSymbol, decimal costBasis, long shares)
  27. {
  28. TickerSymbol = tickerSymbol;
  29. CostBasis = costBasis;
  30. Shares = shares;
  31. }
  32. private string _tickerSymbol;
  33. public string TickerSymbol
  34. {
  35. get
  36. {
  37. return _tickerSymbol;
  38. }
  39. set
  40. {
  41. if (!value.Equals(_tickerSymbol))
  42. {
  43. _tickerSymbol = value;
  44. }
  45. }
  46. }
  47. private decimal _costBasis;
  48. public decimal CostBasis
  49. {
  50. get
  51. {
  52. return _costBasis;
  53. }
  54. set
  55. {
  56. if (!value.Equals(_costBasis))
  57. {
  58. _costBasis = value;
  59. }
  60. }
  61. }
  62. private long _shares;
  63. public long Shares
  64. {
  65. get
  66. {
  67. return _shares;
  68. }
  69. set
  70. {
  71. if (!value.Equals(_shares))
  72. {
  73. _shares = value;
  74. }
  75. }
  76. }
  77. }
  78. }