Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Custom API Version Format

Chris Martinez edited this pageJan 9, 2023 ·1 revision

It is now possible to extend or change the provided API version format, but that capability comes with several rules:

  1. You must extendApiVersion
  2. You must override:
    • GetHashCode
    • CompareTo
    • ToString(string,IFormatProvider)
  3. You must implementIApiVersionParser
    • It may be possible to extendApiVersionParser depending on your requirements

You will likely need to extendApiVersionFormatProvider or implement a customIFormatProvider. Although not strictly required, you may want to implement operator overloads for your custom type to retain functional parity withApiVersion. The custom parser will need to be passed to components that acceptIApiVersionParser and/or replace the default implementation registered for dependency injection.

You should consider the impact that a custom API version may have on clients. Your custom format and parsing logic may need to be distributed to them for to use.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp