Example #1
0
 public FormattingInfo(FormattingInfo?parent, FormatDetails formatDetails, Format format, object?currentValue)
 {
     Parent        = parent;
     CurrentValue  = currentValue;
     Format        = format;
     FormatDetails = formatDetails;
 }
Example #2
0
 public FormattingInfo(FormattingInfo parent, FormatDetails formatDetails, Placeholder placeholder, object currentValue)
 {
     this.Parent        = parent;
     this.FormatDetails = formatDetails;
     this.Placeholder   = placeholder;
     this.Format        = placeholder.Format;
     this.CurrentValue  = currentValue;
 }
Example #3
0
 public FormattingInfo(FormattingInfo?parent, FormatDetails formatDetails, Placeholder placeholder,
                       object?currentValue)
 {
     Parent        = parent;
     FormatDetails = formatDetails;
     Placeholder   = placeholder;
     Format        = placeholder.Format;
     CurrentValue  = currentValue;
 }
Example #4
0
        /// <summary>
        /// Creates a new class instance, that contains fields and methods which are necessary for formatting.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="formatDetails"></param>
        /// <param name="placeholder"></param>
        /// <param name="currentValue"></param>
        public FormattingInfo Initialize(FormattingInfo?parent, FormatDetails formatDetails, Placeholder placeholder,
                                         object?currentValue)
        {
            Parent        = parent;
            FormatDetails = formatDetails;
            Placeholder   = placeholder;
            Format        = placeholder.Format;
            CurrentValue  = currentValue;
            // inherit alignment
            Alignment = placeholder.Alignment;

            return(this);
        }
Example #5
0
        /// <summary>
        /// Creates a new class instance, that contains fields and methods which are necessary for formatting.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="formatDetails"></param>
        /// <param name="format">The <see cref="Parsing.Format"/> argument is used with <see cref="CreateChild(Parsing.Format,object?)"/></param>
        /// <param name="currentValue"></param>
        public FormattingInfo Initialize(FormattingInfo?parent, FormatDetails formatDetails, Format format, object?currentValue)
        {
            Parent        = parent;
            CurrentValue  = currentValue;
            FormatDetails = formatDetails;
            Format        = format;
            // inherit alignment
            if (parent != null)
            {
                Alignment = parent.Alignment;
            }
            else if (format.ParentPlaceholder != null)
            {
                Alignment = format.ParentPlaceholder.Alignment;
            }

            return(this);
        }
Example #6
0
 public FormattingInfo(FormatDetails formatDetails, Format format, object?currentValue)
     : this(null, formatDetails, format, currentValue)
 {
 }
Example #7
0
 /// <summary>
 /// Creates a new class instance, that contains fields and methods which are necessary for formatting.
 /// </summary>
 /// <param name="formatDetails"></param>
 /// <param name="format"></param>
 /// <param name="currentValue"></param>
 public FormattingInfo Initialize(FormatDetails formatDetails, Format format, object?currentValue)
 {
     return(Initialize(null, formatDetails, format, currentValue));
 }