コード例 #1
0
 /// <summary>
 /// The to trytes.
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="padding">
 /// The padding.
 /// </param>
 /// <returns>
 /// The <see cref="TryteString"/>.
 /// </returns>
 public static TryteString ToTrytes(this long value, int padding)
 {
     return(new TryteString(
                Converter.TritsToTrytes(Converter.ConvertBigIntToTrits(new BigInteger(value), padding))));
 }
コード例 #2
0
 /// <summary>
 /// The to trytes.
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="padding">
 /// The padding.
 /// </param>
 /// <returns>
 /// The <see cref="TryteString"/>.
 /// </returns>
 public static TryteString ToTrytes(this int value, int padding)
 {
     return(new TryteString(Converter.TritsToTrytes(Converter.IntToTrits(value, padding))));
 }
コード例 #3
0
 /// <summary>
 /// The to trytes.
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="padding">
 /// The padding.
 /// </param>
 /// <returns>
 /// The <see cref="TryteString"/>.
 /// </returns>
 public static TryteString ToTrytes(this long value, int padding)
 {
     // TODO: this is ugly. create conversion method for long within converter
     return(new TryteString(
                Converter.TritsToTrytes(Converter.ConvertBigIntToTrits(new BigInteger(value.ToString(CultureInfo.InvariantCulture)), padding))));
 }