Now that log files can expose an arbitrary list of properties and Tailviewer can show these to the end-user, we want to allow the user to be able to change a select few. Which properties may changed is determined by its descriptor.
Only a subset of all properties will ever be changeable by the user, and thus by default all properties are read-only.
Only those properties which implement the non-read-only tag interface IPropertyDescriptor may be changed by end-users. All others remain read-only.
With this, we give an ILogFile implementation an amazing flexibility to interact with its users:
Plugins may ship their own properties, have them exposed to the user and the user will be able to change them back to which the plugin can react again.
List of changed types
Renamed ILogFilePropertyDescriptor to IReadOnlyPropertyDescriptor
Introduce IPropertyDescriptor for non-read-only properties
Changed LogFileProperties.Encoding to be non-read-only
Added IlogFile.SetProperty() method
Renamed LogFileColumns class to Columns in context, the LogFile suffix was superfluous
Renamed LogFileProperties class to Properties in context, the LogFile suffix was superfluous
Added plugins
Introduced the IPropertyPresenterPlugin which allows plugin authors to create their own custom IPropertyPresenters in case those created by Tailviewer by default are not their liking.
Any expected problems concerning backwards compatibility of existing plugins?
Yes
Any expected problems concerning backwards compatibility of existing user settings?
Reason for this MR
In preparation for #284
Now that log files can expose an arbitrary list of properties and Tailviewer can show these to the end-user, we want to allow the user to be able to change a select few. Which properties may changed is determined by its descriptor. Only a subset of all properties will ever be changeable by the user, and thus by default all properties are read-only. Only those properties which implement the non-read-only tag interface
IPropertyDescriptor
may be changed by end-users. All others remain read-only.With this, we give an
ILogFile
implementation an amazing flexibility to interact with its users:Plugins may ship their own properties, have them exposed to the user and the user will be able to change them back to which the plugin can react again.
List of changed types
ILogFilePropertyDescriptor
toIReadOnlyPropertyDescriptor
IPropertyDescriptor
for non-read-only propertiesLogFileProperties.Encoding
to be non-read-onlyIlogFile.SetProperty()
methodLogFileColumns
class toColumns
in context, the LogFile suffix was superfluousLogFileProperties
class toProperties
in context, the LogFile suffix was superfluousAdded plugins
Introduced the
IPropertyPresenterPlugin
which allows plugin authors to create their own customIPropertyPresenter
s in case those created by Tailviewer by default are not their liking.Any expected problems concerning backwards compatibility of existing plugins?
Yes
Any expected problems concerning backwards compatibility of existing user settings?
No
Does this break existing user workflows?
No