Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interop between AS types and common CLR types #14

Closed
17 tasks done
warriordog opened this issue Jun 26, 2023 · 2 comments
Closed
17 tasks done

Interop between AS types and common CLR types #14

warriordog opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
area:code Affects or applies to the library code type:feature New feature or request

Comments

@warriordog
Copy link
Owner

warriordog commented Jun 26, 2023

Various tweaks and small refactors to improve compatibility between AS and .NET. Depends on changes in #8.

Create new types:

  • ASUri (use ASUriConverter)
  • LinkRel (use LinkRelConverter)

Implement these implicit casts between AS / CLR types:

  • ASUri <-> string, Uri
  • ASLink <-> ASUri, Uri
  • MentionLink <-> ASUri, Uri, string
  • Linkable<T> <-- ASLink, ASUri, Uri, string, T
  • Linkable<T> --> ASLink?, T?
  • LinkRel <-> string
  • ASCollection <-- List<T>, T
  • ASOrderedCollection <-- List<T>, T
  • ASCollectionPage <-- List<T>, T
  • ASOrderedCollectionPage <-- List<T>, T

Implement these custom JsonConverters:

  • ASUriConverter <-> JsonTokenType.String
  • LinkRelConverter <-> string

Change the type of these properties:

  • ASLink.HRef to type ASUri
  • ASLink.Rel to type LinkRel

REMOVE these implicit casts:

Additionally, add unit tests for all new types and behavior.

@warriordog warriordog added type:feature New feature or request area:code Affects or applies to the library code labels Jun 26, 2023
@warriordog warriordog self-assigned this Jun 27, 2023
warriordog added a commit that referenced this issue Jun 27, 2023
warriordog added a commit that referenced this issue Jul 16, 2023
@warriordog
Copy link
Owner Author

Duration is going to be a brutal pain to implement, so dropping it from this issue.

@warriordog
Copy link
Owner Author

Done! 🎉

@warriordog warriordog added this to the MVP of Types package milestone Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:code Affects or applies to the library code type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant