/// <summary>Initializes a new instance of the <see cref="StringWriterAdapter" /> class that writes to the specified <see cref="T:System.Text.StringBuilder" /> and has the specified format provider.</summary> /// <param name="sb">The StringBuilder to write to. </param> /// <param name="formatProvider">An <see cref="T:System.IFormatProvider" /> object that controls formatting. </param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="sb" /> is null. </exception> public StringWriterAdapter(IStringBuilder sb, IFormatProvider formatProvider) : this(new StringWriter(sb.ToImplementation(), formatProvider)) { }
/// <summary>Initializes a new instance of the <see cref="StringWriterAdapter" /> class that writes to the specified <see cref="T:System.Text.StringBuilder" />.</summary> /// <param name="sb">The StringBuilder to write to. </param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="sb" /> is null. </exception> public StringWriterAdapter(IStringBuilder sb) : this(new StringWriter(sb.ToImplementation())) { }
/// <summary>Initializes a new instance of the <see cref="StringWriterAdapter" /> class that writes to the specified <see cref="T:System.Text.StringBuilder" /> and has the specified format provider.</summary> /// <param name="sb">The StringBuilder to write to. </param> /// <param name="formatProvider">An <see cref="T:System.IFormatProvider" /> object that controls formatting. </param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="sb" /> is null. </exception> public StringWriterAdapter([NotNull] IStringBuilder sb, [CanBeNull] IFormatProvider formatProvider) : this(sb.ToImplementation(), formatProvider) { }
/// <inheritdoc /> public bool Equals(IStringBuilder sb) { return(_instance.Equals(sb.ToImplementation())); }
/// <summary>Initializes a new instance of the <see cref="StringWriterAdapter" /> class that writes to the specified <see cref="T:System.Text.StringBuilder" />.</summary> /// <param name="sb">The StringBuilder to write to. </param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="sb" /> is null. </exception> public StringWriterAdapter([NotNull] IStringBuilder sb) : this(sb.ToImplementation()) { }