// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications using System; using System.Collections; namespace Trade.StockTraderWebApplicationModelClasses { /// /// Model class for displaying quote data in a web page. /// public sealed class QuoteDataUI { private string _symbol; private string _companyName; private double _volume; private decimal _price; private decimal _open; private decimal _low; private decimal _high; private double _change; public QuoteDataUI() { } public QuoteDataUI(string symbol, string companyName, double volume, decimal price, decimal open, decimal low, decimal high, double change) { this._symbol = symbol; this._companyName = companyName; this._volume = volume; this._price = price; this._open = open; this._low = low; this._high = high; this._change = change; } public string symbol { get { return _symbol; } set { this._symbol = value; } } public string companyName { get { return _companyName; } set { this._companyName = value; } } public decimal price { get { return _price; } set { this._price = value; } } public decimal open { get { return _open; } set { this._open = value; } } public decimal low { get { return _low; } set { this._low = value; } } public decimal high { get { return _high; } set { this._high = value; } } public double change { get { return _change; } set { this._change = value; } } public double volume { get { return _volume; } set { this._volume = value; } } public string quoteLink { get { return DataFormatHelper.GetQuoteLink(_symbol); } } public string gainWithArrow { get { return DataFormatHelper.NumberWithStyledArrow(this._change); } } public string priceWithArrow { get { return DataFormatHelper.NumberWithStyledArrow(this._price); } } } }