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

V3 #42

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft

V3 #42

wants to merge 41 commits into from

Conversation

csmir
Copy link
Owner

@csmir csmir commented Jan 22, 2024

This pull request will summarize all the changes between v2 and v3, serving as a progression log for the major update.

What's new?

  • CSF now targets .NET 8.
  • TypeReader(T) has been renamed to TypeConverter(T)
  • TypeConverter(T) is now asynchronous.
  • EnumTypeConverter no longer supports local implementations, automatically resolving Enum conversion.
  • PreconditionAttribute is now asynchronous.
  • The ExecuteAsync method has been renamed to TryExecuteAsync.
  • TryExecuteAsync now has a taskless overload called TryExecute
  • The pipeline now accepts object[] and object-form parsing.
  • Parser(T) has been added as a replacement to IParser.
  • StringParser has been added as a default parser implementation.
  • ModuleBase now support Before/AfterExecuteAsync for module-level logic.
  • ModuleBase now handle unknown command results using HandleUnknownInvocationResult.
  • ModuleBase now has IServiceProvider as a prepopulated argument.
  • ICommandContext no longer contains query arguments.
  • ICommandContext implementations are now dis-advised compared to implementations of CommandContext
  • CommandContext took over logging functionality, with virtual methods to override for log resolvers.
  • CommandContext now carries fallback metadata, returning the first failed result when all results fail.
  • ResultResolver has been added to resolve command results.
  • ICommandResult and 5 implementations have been added to report and track command succession rate.
    • SearchResult reports search failure, or holds the data of successful searches.
    • MatchResult reports match failure, or holds match succession data.
    • CheckResult returns PreconditionAttribute.EvaluateAsync(...) succession data.
    • ConvertResult returns TypeConverter(T).EvaluateAsync(...) succession data.
    • RunResult returns invocation failure or success.
  • Async execution now desires you to await TryExecuteAsync overloads in all cases.
  • CommandConfiguration has been renamed and received an improved API.
  • Control over async execution has been given back to the user using AsyncApproach.
  • CommandManager has a new constructor.
  • ServiceHelpers has new signatures for creation methods.
  • ThrowHelpers has been introduced.
  • Namespace delegation has been added, for better consistency with existing .NET libraries and code conventions.
  • Primary constructors took over role of some existing implementations.
  • CLS compliancy has lightened, allowing the alias overloads of Command/GroupAttribute to support CLS compliant alias implementation.
  • XML documentation has expanded.

@csmir csmir marked this pull request as draft January 22, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant