xenadmin/XenModel/Utils
Konstantina Chremmou af832f23cf
Merge pull request #2848 from kc284/datasources
* DataSet field Uuid is not really a uuid. Renamed to Id to avoid misunderstandings.
* Renamed properties DataSet.Type and DataSourceItem.DataType to Category. The old name was not reflecting what they were.
* Renamed property DataSet.TypeString to DataSet.DataSourceName so it reflects better what it is.
* Renamed property DataSet.Name to DataSet.FriendlyName for clarity. Removed duplicate string.Format() call.
* The DataSourceItem.Uuid is not really a uuid. Renamed it to Id to avoid misunderstandings. Also, compacted DataSourceItem constructors.

* Removed unused and duplicate properties.
- DataKey.Hide was unused. Once removed, DataSet.Deselected was unused, hence was also removed.
- Dataset.Draw was duplicating DataSet.Show, hence was removed.
- DataSet.NeverShow is not necessary, DataSet.Hide can be used both for datasources
  that should not be shown at all as well as datasources that are wrong for this object.

* Made DataSet.FriendlyName a get-only property and compacted repetitive code.

* Use the Helpers regular expressions for assigning the datasource category.

* Removed id from the DataSet constructor parameters. It can be constructed from the XenObject and the datasource name.

* Compacted the code for readability (it was difficult to follow the build of the URIs).

Also, removed use of Helper.GetUuid to avoid the use of reflection. Minimised casts.

* CP-36567: Use the datasource units as specified in the API instead of deducing them from the datasource name.

- Also, merged static method DataSet.Create into the DataSet constructor.
- Minor restructuring of the ArchiveMaintainer file (moved all private fields
  and properties closer together).
- Added new resource file so the units can be separated from Messages.
2021-08-10 14:43:05 +01:00
..
Helpers.cs Merge pull request #2848 from kc284/datasources 2021-08-10 14:43:05 +01:00
PrettyTimeSpan.cs CP-36392 pt.1: Removed unused using directives. 2021-04-07 10:04:47 +01:00
StringExtensions.cs Move files to a better location. 2021-01-19 10:37:35 +00:00
TimeSpanExtensions.cs Move files to a better location. 2021-01-19 10:37:35 +00:00
Util.cs CP-36567: Use the datasource units as specified in the API instead of deducing them from the datasource name. 2021-08-05 15:36:46 +01:00