Exemple #1
0
 /// <summary>
 /// 减量数值,如果成功返回减量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回减量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Single Decrement(this ThresholdNumber <Single> number)
 {
     return(number.Exchange(number.Value - 1) - 1);
 }
Exemple #2
0
 /// <summary>
 /// 加值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要增加的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Int64 Add(this ThresholdNumber <Int64> number, Int64 value)
 {
     return(number.Exchange(number.Value + value) + value);
 }
Exemple #3
0
 /// <summary>
 ///  减量数值,如果成功返回减量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回减量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static UInt16 Decrement(this ThresholdNumber <UInt16> number)
 {
     return(Convert.ToUInt16(number.Exchange(Convert.ToUInt16(number.Value - 1)) - 1));
 }
Exemple #4
0
 /// <summary>
 ///  减量数值,如果成功返回减量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回减量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Byte Decrement(this ThresholdNumber <Byte> number)
 {
     return(Convert.ToByte(number.Exchange(Convert.ToByte(number.Value - 1)) - 1));
 }
Exemple #5
0
 /// <summary>
 /// 减值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要减的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static UInt32 Subtract(this ThresholdNumber <UInt32> number, UInt32 value)
 {
     return(number.Exchange(number.Value - value) - value);
 }
Exemple #6
0
 /// <summary>
 ///  减量数值,如果成功返回减量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回减量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static UInt32 Decrement(this ThresholdNumber <UInt32> number)
 {
     return(number.Exchange(number.Value - 1) - 1);
 }
Exemple #7
0
 /// <summary>
 ///  增量数值,如果成功返回增量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回增量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Int16 Increment(this ThresholdNumber <Int16> number)
 {
     return(Convert.ToInt16(number.Exchange(Convert.ToInt16(number.Value + 1)) + 1));
 }
Exemple #8
0
 /// <summary>
 /// 加值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要增加的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Byte Add(this ThresholdNumber <Byte> number, Byte value)
 {
     return(Convert.ToByte(number.Exchange(Convert.ToByte(number.Value + value)) + value));
 }
Exemple #9
0
 /// <summary>
 ///  增量数值,如果成功返回增量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回增量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static UInt64 Increment(this ThresholdNumber <UInt64> number)
 {
     return(number.Exchange(number.Value + 1) + 1);
 }
Exemple #10
0
 /// <summary>
 ///  增量数值,如果成功返回增量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回增量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Int32 Increment(this ThresholdNumber <Int32> number)
 {
     return(number.Exchange(number.Value + 1) + 1);
 }
Exemple #11
0
 /// <summary>
 /// 减值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要减的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Single Subtract(this ThresholdNumber <Single> number, Single value)
 {
     return(number.Exchange(number.Value - value) - value);
 }
Exemple #12
0
 /// <summary>
 /// 减值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要减的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Byte Subtract(this ThresholdNumber <Byte> number, Byte value)
 {
     return(Convert.ToByte(number.Exchange(Convert.ToByte(number.Value - value)) - value));
 }
Exemple #13
0
 /// <summary>
 /// 减值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要减的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static UInt16 Subtract(this ThresholdNumber <UInt16> number, UInt16 value)
 {
     return(Convert.ToUInt16(number.Exchange(Convert.ToUInt16(number.Value - value)) - value));
 }
Exemple #14
0
 /// <summary>
 /// 加值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要增加的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static UInt32 Add(this ThresholdNumber <UInt32> number, UInt32 value)
 {
     return(number.Exchange(number.Value + value) + value);
 }
Exemple #15
0
 /// <summary>
 /// 增量数值,如果成功返回增量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回增量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Double Increment(this ThresholdNumber <Double> number)
 {
     return(number.Exchange(number.Value + 1) + 1);
 }
Exemple #16
0
 /// <summary>
 /// 加值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要增加的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static UInt16 Add(this ThresholdNumber <UInt16> number, UInt16 value)
 {
     return(Convert.ToUInt16(number.Exchange(Convert.ToUInt16(number.Value + value)) + value));
 }
Exemple #17
0
 /// <summary>
 ///  减量数值,如果成功返回减量后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <returns>返回减量后的数值</returns>
 /// <exception cref="System.ArgumentOutOfRangeException">ThresholdNumber is out of range.</exception>
 public static Int64 Decrement(this ThresholdNumber <Int64> number)
 {
     return(number.Exchange(number.Value - 1) - 1);
 }
Exemple #18
0
 /// <summary>
 /// 加值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要增加的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Single Add(this ThresholdNumber <Single> number, Single value)
 {
     return(number.Exchange(number.Value + value) + value);
 }
Exemple #19
0
 /// <summary>
 /// 减值,如果成功返回计算后的数值
 /// </summary>
 /// <param name="number">ThresholdNumber对象</param>
 /// <param name="value">要减的差量数值。</param>
 /// <returns>返回计算后的新数值。</returns>
 public static Int64 Subtract(this ThresholdNumber <Int64> number, Int64 value)
 {
     return(number.Exchange(number.Value - value) - value);
 }