Class SchemaDiff
The full set of differences between a persisted component schema and the current one, with an overall CompatibilityLevel.
public class SchemaDiff
- Inheritance
-
SchemaDiff
- Inherited Members
Constructors
SchemaDiff(string, int, List<FieldChange>, List<IndexChange>)
Creates a diff and computes its overall Level from the given changes (index changes raise the level to at least compatible).
public SchemaDiff(string componentName, int persistedRevision, List<FieldChange> fieldChanges, List<IndexChange> indexChanges)
Parameters
componentNamestringComponent (schema) name.
persistedRevisionintRevision of the persisted schema.
fieldChangesList<FieldChange>Field-level changes.
indexChangesList<IndexChange>Index-level changes.
Properties
ComponentName
Component (schema) name.
public string ComponentName { get; }
Property Value
FieldChanges
All field-level changes.
public List<FieldChange> FieldChanges { get; }
Property Value
HasBreakingChanges
public bool HasBreakingChanges { get; }
Property Value
HasCompatibleChanges
True when the overall severity is at least Compatible.
public bool HasCompatibleChanges { get; }
Property Value
IndexChanges
All index-level changes.
public List<IndexChange> IndexChanges { get; }
Property Value
IsIdentical
public bool IsIdentical { get; }
Property Value
Level
Overall severity — the maximum CompatibilityLevel across all changes.
public CompatibilityLevel Level { get; }
Property Value
PersistedRevision
Revision of the persisted schema being compared against.
public int PersistedRevision { get; }
Property Value
Summary
Short human-readable summary of the changes (e.g. "+2 added, -1 removed, 3 index changes"), or "identical" when there are none.
public string Summary { get; }