Skip to content

Obsolete: Ensure placeholder messages for obsolete types, members #27

@JeremyCaney

Description

@JeremyCaney

OnTopic 5.0.0 includes a lot of breaking changes, including types, members, and parameters that have been renamed or removed. To aid in migration, we should ensure that these have a placeholders for their previous signature marked with [Obsolete]. This will make it easier to migrate code by providing clear instructions to implementations referring to the legacy signatures.

Contents

  • Types
    • Renamed
    • Removed
    • Replaced
  • Members
    • Renamed
    • Removed
  • Parameters
  • Not Possible (or Necessary?

Types

Renamed

  • [Follow(Relationships)] renamed to [Include(AssociationTypes)] (7c150d8)
    • Relationships renamed to AssociationTypes (78600fd)
  • [Relationship(RelationshipType)] renamed to [Collection(CollectionType)] (f84ae66)
    • RelationshipType renamed to CollectionType (1daf799)
  • AttributeValueCollection renamed to AttributeCollection (f51407a)
    • AttributeValue renamed to AttributeRecord (f51407a)
  • {Delete}EventArgs renamed to Topic{Delete}EventArgs (37b38f5)
  • TopicCollection to KeyedTopicCollection (826b93c)*
    • TopicCollection<T> to KeyedTopicCollection<T> (826b93c)
    • ReadOnlyTopicCollection to ReadOnlyKeyedTopicCollection (826b93c)*
      • ReadOnlyTopicCollection<T> to ReadOnlyKeyedTopicCollection<T> (826b93c)

Note: The TopicCollection and ReadOnlyTopicCollection cannot be marked as [Obsolete] as they have been subsequently replaced with non-keyed collections with the same names.

Removed

  • AttributeTypeDescriptor removed; AttributeDescriptor should be used instead (7b00274)

Replaced

  • RelatedTopicCollection replaced with TopicMultiMap (66ccd9d)
    • NamedTopicCollection replaced with KeyValuesPair<T> (66ccd9d)

Members

Renamed

  • Topic.DerivedTopic renamed to BaseTopic (2486ab2)
  • AttributeKeyAttribute.Value renamed to Key
  • TopicRepository.GetContentTypeDescriptors(ContentTypeDescriptor) renamed to SetContentTypeDescriptors() (a078fc8)
  • Topic.Relationships (was a RelatedTopicCollection, now a TopicRelationshipMultiMap) (66ccd9d)
    • SetTopic() renamed to SetValue() (34a8c52)
    • GetAllTopics() renamed to GetAllValues() (34a8c52)
    • GetTopics() renamed to GetValues() (34a8c52)
    • RemoveTopic() renamed to Remove() (34a8c52)
    • ClearTopics() renamed to Clear() (34a8c52)
  • TopicRepository
    • RenameEvent renamed to TopicRenamed (37b38f5)
    • DeleteEvent renamed to TopicDeleted (37b38f5)
    • MoveEvent renamed to TopicMoved (37b38f5)
  • INavigationViewModel.CurrentKey replaced with CurrentWebPath (8fd4d80, 31475d2)

Removed

  • Topic.Description removed, in favor of Attributes.GetValue() (6c3a2e9)
  • ReadOnlyTopicCollection.FromList() removed, in favor of constructor (b013e38)
  • ReadOnlyKeyedTopicCollection<T>.FromList() removed, in favor of constructor (b013e38)
  • StaticTypeLookupService.DefaultType removed, in favor of Lookup() fallbacks (ab4253d)
  • IRouteBuilder.MapTopicRoute() removed, in favor of IEndpointRouteBuilder.MapTopicRoute() (6be993b, 826b93c)
  • ….GetTopic() was moved to KeyedCollection (826b93c), no longer supported by:
  • ITopicViewModel.IsHidden removed, since hidden associations are not mapped (68a4e83)

Parameters

  • TopicFactory.Create() parameter order updated, with id moved after parent (69caaa2)
  • ITopicRepository (and implementations)
    • Load() parameter isRecursive moved after new referenceTopic parameter (704c8de)
    • Save() parameter isDraft parameter removed (59a7716)
  • INavigationTopicViewModel<T>.IsSelected(uniqueKey) parameter renamed to webPath (7a6e7ef)

Not Possible (or Necessary?)

The following cannot be included because the new types are implicitly compatible with the old types, thus introducing an ambiguous reference.

  • ITopicMappingService
    • MapAsync(Topic, Relationships) updated to `MapAsync(Topic, AssociationTypes) (78600fd)
    • MapAsync(…, ConcurrentDictionary<int, object>) updated to MapAsync(…, MappedTopicCache) (d8e3c68)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions