예제 #1
0
        /// <summary>
        ///     <para>
        ///         Creates a human-readable representation of the given metadata.
        ///     </para>
        ///     <para>
        ///         Warning: Do not rely on the format of the returned string.
        ///         It is designed for debugging only and may change arbitrarily between releases.
        ///     </para>
        /// </summary>
        /// <param name="column"> The metadata item. </param>
        /// <param name="options"> Options for generating the string. </param>
        /// <param name="indent"> The number of indent spaces to use before each new line. </param>
        /// <returns> A human-readable representation. </returns>
        public static string ToDebugString(
            [NotNull] this IFunctionColumn column,
            MetadataDebugStringOptions options,
            int indent = 0)
        {
            var builder      = new StringBuilder();
            var indentString = new string(' ', indent);

            builder.Append(indentString);

            var singleLine = (options & MetadataDebugStringOptions.SingleLine) != 0;

            if (singleLine)
            {
                builder.Append($"Column: {column.Table.Name}.");
            }

            builder.Append(column.Name).Append(" (");

            builder.Append(column.StoreType).Append(")");

            if (column.IsNullable)
            {
                builder.Append(" Nullable");
            }
            else
            {
                builder.Append(" NonNullable");
            }

            builder.Append(")");

            if (!singleLine &&
                (options & MetadataDebugStringOptions.IncludeAnnotations) != 0)
            {
                builder.Append(column.AnnotationsToDebugString(indent + 2));
            }

            return(builder.ToString());
        }
 /// <inheritdoc />
 public virtual IEnumerable <IAnnotation> For(IFunctionColumn column, bool designTime)
 => Enumerable.Empty <IAnnotation>();
 public virtual IEnumerable <IAnnotation> For(IFunctionColumn column)
 => Enumerable.Empty <IAnnotation>();
예제 #4
0
 public IEnumerable <IAnnotation> For(IFunctionColumn column) => _providers.SelectMany(p => p.For(column));