PageRenderTime 26ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

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