/// <inheritdoc />
 /// <see cref="SemiColon"/>
 /// <see cref="!:https://groups.google.com/forum/#!searchin/or-tools-discuss/sat$20parameter$20string%7Csort:date"/>
 /// <see cref="!:https://groups.google.com/forum/#!searchin/or-tools-discuss/sat$20parameter$20string%7Csort:date/or-tools-discuss/X4Y_ZpKIUp8/kz-xiKSYEAAJ"/>
 public string ToString(IParameterValueRenderingOptions options)
 => Collection.Any()
         ? Join($"{SemiColon} ", this.Select(x => x.ToString(options)))
         : "";
 /// <summary>
 /// Renders the <paramref name="parameters"/> assuming a nominal set of
 /// <paramref name="options"/>.
 /// </summary>
 /// <param name="parameters"></param>
 /// <param name="options"></param>
 /// <returns></returns>
 public static string RenderParameters(this IEnumerable <IParameter> parameters, IParameterValueRenderingOptions options = null)
 => Join($"{SemiColon}", parameters.Select(x => x.ToString(options)));
Пример #3
0
 /// <inheritdoc />
 /// <see cref="ParameterName"/>
 /// <see cref="ValueType"/>
 /// <see cref="WeaklyTypedValue"/>
 /// <see cref="IParameterValueRenderingOptions"/>
 /// <see cref="RenderParameterValueCallback"/>
 /// <see cref="Colon"/>
 /// <see cref="!:https://groups.google.com/forum/#!searchin/or-tools-discuss/sat$20parameter$20string%7Csort:date"/>
 /// <see cref="!:https://groups.google.com/forum/#!searchin/or-tools-discuss/sat$20parameter$20string%7Csort:date/or-tools-discuss/X4Y_ZpKIUp8/kz-xiKSYEAAJ"/>
 public virtual string ToString(IParameterValueRenderingOptions options)
 => $"{ParameterName}{Colon} {options[ValueType].Invoke(WeaklyTypedValue)}";