External/OxyPlot/OxyPlot/Foundation/PlotLength.cs
author StephaneLenclud
Tue, 03 Feb 2015 10:14:18 +0100
branchMiniDisplay
changeset 450 f2d8620e2434
permissions -rw-r--r--
Rebracer update.
     1 // --------------------------------------------------------------------------------------------------------------------
     2 // <copyright file="PlotLength.cs" company="OxyPlot">
     3 //   The MIT License (MIT)
     4 //   
     5 //   Copyright (c) 2012 Oystein Bjorke
     6 //   
     7 //   Permission is hereby granted, free of charge, to any person obtaining a
     8 //   copy of this software and associated documentation files (the
     9 //   "Software"), to deal in the Software without restriction, including
    10 //   without limitation the rights to use, copy, modify, merge, publish,
    11 //   distribute, sublicense, and/or sell copies of the Software, and to
    12 //   permit persons to whom the Software is furnished to do so, subject to
    13 //   the following conditions:
    14 //   
    15 //   The above copyright notice and this permission notice shall be included
    16 //   in all copies or substantial portions of the Software.
    17 //   
    18 //   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    19 //   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    20 //   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    21 //   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    22 //   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    23 //   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    24 //   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    25 // </copyright>
    26 // <summary>
    27 //   Represents lengths in the plot.
    28 // </summary>
    29 // --------------------------------------------------------------------------------------------------------------------
    30 
    31 namespace OxyPlot
    32 {
    33     /// <summary>
    34     /// Represents lengths in the plot. 
    35     /// </summary>
    36     public struct PlotLength
    37     {
    38         /// <summary>
    39         /// The unit type
    40         /// </summary>
    41         private readonly PlotLengthUnit unit;
    42 
    43         /// <summary>
    44         /// The value
    45         /// </summary>
    46         private readonly double value;
    47 
    48         /// <summary>
    49         /// Initializes a new instance of the <see cref="PlotLength"/> struct.
    50         /// </summary>
    51         /// <param name="value">
    52         /// The value.
    53         /// </param>
    54         /// <param name="unit">
    55         /// The unit.
    56         /// </param>
    57         public PlotLength(double value, PlotLengthUnit unit)
    58         {
    59             this.value = value;
    60             this.unit = unit;
    61         }
    62 
    63         /// <summary>
    64         /// Gets the value.
    65         /// </summary>
    66         /// <value>
    67         /// The value.
    68         /// </value>
    69         public double Value
    70         {
    71             get
    72             {
    73                 return this.value;
    74             }
    75         }
    76 
    77         /// <summary>
    78         /// Gets the type of the unit.
    79         /// </summary>
    80         /// <value>
    81         /// The type of the unit.
    82         /// </value>
    83         public PlotLengthUnit Unit
    84         {
    85             get
    86             {
    87                 return this.unit;
    88             }
    89         }
    90     }
    91 }