/// <summary>
            /// Builds an instance of <see cref="RepresentativeTransformation"/>.
            /// </summary>
            /// <returns>Returns the final <see cref="RepresentativeTransformation"/>.</returns>
            public RepresentativeTransformation Build()
            {
                RepresentativeTransformation instance = this.instance;

                this.instance = null;
                return(instance);
            }
            /// <summary>
            /// Sets the pattern used to filter on the filter field values.
            /// </summary>
            /// <param name="value">The filter text value.</param>
            /// <returns>Returns an updated builder.</returns>
            public Builder SetFilterText(Regex value)
            {
                var instance = new RepresentativeTransformation(
                    this.instance.FindText,
                    this.instance.ReplaceText,
                    this.instance.FilterField,
                    value);

                instance.newType    = this.instance.newType;
                instance.targetType = this.instance.targetType;
                this.instance       = instance;
                return(this);
            }
 private Builder(Regex findText, string replaceText, string filterField, Regex filterText)
 {
     instance = new RepresentativeTransformation(findText, replaceText, filterField, filterText);
 }