private T ValidateProperties(FieldProperties newProperties) { if (!(newProperties is T typedProperties)) { throw new ArgumentException($"Properties must be of type '{typeof(T)}", nameof(newProperties)); } return(typedProperties); }
public override void Update(FieldProperties newProperties) { var typedProperties = ValidateProperties(newProperties); properties = typedProperties; }
public abstract void Update(FieldProperties newProperties);