public static string ToDebugString( [NotNull] this ISequence sequence, MetadataDebugStringOptions options, int indent = 0) { var builder = new StringBuilder(); var indentString = new string(' ', indent); builder .Append(indentString) .Append("Sequence: "); if (sequence.Schema != null) { builder .Append(sequence.Schema) .Append("."); } builder.Append(sequence.Name); if (!sequence.IsCyclic) { builder.Append(" Cyclic"); } if (sequence.StartValue != 1) { builder.Append(" Start: ") .Append(sequence.StartValue); } if (sequence.IncrementBy != 1) { builder.Append(" IncrementBy: ") .Append(sequence.IncrementBy); } if (sequence.MinValue != null) { builder.Append(" Min: ") .Append(sequence.MinValue); } if (sequence.MaxValue != null) { builder.Append(" Max: ") .Append(sequence.MaxValue); } if ((options & MetadataDebugStringOptions.SingleLine) == 0) { if ((options & MetadataDebugStringOptions.IncludeAnnotations) != 0) { builder.Append(sequence.AnnotationsToDebugString(indent: indent + 2)); } } return(builder.ToString()); }