private SpannerDbType(TypeCode typeCode, int?size = null) { GaxPreconditions.CheckNonNegative(size.GetValueOrDefault(), "Size must be nonnegative."); TypeCode = typeCode; Size = size; }
/// <summary> /// Creates a new instance with the specified settings. /// </summary> /// <param name="maxOutstandingElementCount">The maximum number of elements that can be outstanding before data flow is restricted, or /// null if there is no specified limit.</param> /// <param name="maxOutstandingByteCount">The maximum number of bytes that can be outstanding before data flow is restricted, or /// null if there is no specified limit.</param> public FlowControlSettings(long?maxOutstandingElementCount, long?maxOutstandingByteCount) { MaxOutstandingElementCount = GaxPreconditions.CheckNonNegative(maxOutstandingElementCount, nameof(maxOutstandingElementCount)); MaxOutstandingByteCount = GaxPreconditions.CheckNonNegative(maxOutstandingByteCount, nameof(maxOutstandingByteCount)); }