Property | Value |
---|---|
Id | KO0001 |
Category | Optimizely |
Severity | Information |
Code fix | Yes |
[ContentType]
public class Block {
[Display(Order = 2)]
public virtual string Prop2 { get; set; }
[Display(Order = 1)]
public virtual string Prop1 { get; set; }
}
[ContentType]
public class Block {
[Display(Order = 1)]
public virtual string Prop1 { get; set; }
[Display(Order = 2)]
public virtual string Prop2 { get; set; }
}
Alternatively
[ContentType]
public class Block {
[Display(Order = 1)]
public virtual string Prop2 { get; set; }
[Display(Order = 2)]
public virtual string Prop1 { get; set; }
}
Will only analyze classes with an attribute named "ContentType".
Will emit a diagnostic for the following since the properties are not ordered in the
source as they are with the DisplayAttribute
.