コード例 #1
0
 /// <summary>
 /// Creates an option whose value is the result of calling the given function.
 /// </summary>
 /// <param name="getCurrentFixedValue">A function that returns the current value of the option as an <see cref="Opt{T}"/>.</param>
 public DeferredOpt(Func <Opt <T> > getCurrentFixedValue)
 {
     this.getCurrentFixedValue = Checker.NotNull(getCurrentFixedValue, "getCurrentFixedValue");
 }
コード例 #2
0
 private static ulong EnsureMaxCountNotNegative(long maxCount)
 {
     return((ulong)Checker.NotNegative(maxCount, "maxCount"));
 }
コード例 #3
0
 private static int EnsureMaxCountNotNegative(int maxCount)
 {
     return(Checker.NotNegative(maxCount, "maxCount"));
 }
コード例 #4
0
 public BinaryReaderTriflesByteReader(BinaryReader source)
 {
     Checker.NotNull(source, "source");
     this.source = source;
 }
コード例 #5
0
 internal static ITriflesByteReader ToTriflesByteReader(ITriflesByteReader source)
 {
     Checker.NotNull(source, "source");
     return(source);
 }
コード例 #6
0
 internal static IEnumerable <int> ReadViaArray(ITriflesByteReader source, byte[] buffer)
 {
     Checker.NotNull(buffer, "buffer");
     EnsureBufferNonZero(buffer);
     return(ReadViaArrayNoCheck(source, buffer));
 }