Ejemplo n.º 1
0
 /// <inheritdoc/>
 public override string ToString()
 {
     return(string.Format(Strings.SchemaComparisonResultFormat,
                          SchemaComparisonStatus,
                          HasUnsafeActions.ToString().ToLower(),
                          HasColumnTypeChanges.ToString().ToLower(),
                          IsCompatibleInLegacyMode.HasValue ? IsCompatibleInLegacyMode.Value.ToString() : Strings.Unknown,
                          UnsafeActions.Any() ? UnsafeActions.ToDelimitedString("\r\n").Indent(2) : string.Empty,
                          Hints != null ? Hints.ToString().Indent(2) : string.Empty,
                          Difference != null ? Difference.ToString().Indent(2) : string.Empty));
 }
Ejemplo n.º 2
0
        // Constructors

        /// <summary>
        /// Initializes a new instance of this class.
        /// </summary>
        /// <param name="schemaComparisonStatus">The comparison status.</param>
        /// <param name="hasColumnTypeChanges">Indicates whether there are column type changes.</param>
        /// <param name="isCompatibleInLegacyMode">Indicates whether schemes are compatible in legacy mode.</param>
        /// <param name="hints">The upgrade hints.</param>
        /// <param name="difference">The difference.</param>
        /// <param name="upgradeActions">The upgrade actions.</param>
        /// <param name="unsafeActions">The unsafe (breaking) actions.</param>
        public SchemaComparisonResult(
            SchemaComparisonStatus schemaComparisonStatus,
            bool hasColumnTypeChanges,
            bool?isCompatibleInLegacyMode,
            HintSet hints,
            Difference difference,
            ActionSequence upgradeActions,
            IList <NodeAction> unsafeActions)
        {
            SchemaComparisonStatus   = schemaComparisonStatus;
            IsCompatibleInLegacyMode = isCompatibleInLegacyMode;
            HasColumnTypeChanges     = hasColumnTypeChanges;
            Hints          = hints;
            Difference     = difference;
            UpgradeActions = upgradeActions;
            UnsafeActions  = unsafeActions != null
        ? new ReadOnlyList <NodeAction>(unsafeActions)
        : new ReadOnlyList <NodeAction>(new List <NodeAction>());
            HasUnsafeActions = UnsafeActions.Any();
        }