Replace switch by method name in SerializerFinderVisitMethodCall with lookup table with MethodInfo as a key

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      The main method of SerializerFinderVisitMethodCall uses huge switch by method name and then each DeductXXXMethodSerializers double-checks if the methodinfo belongs to list of supported method, that list sometimes could be relatively big and we iterating through all items.

      We can improve this by having static Dictionary<MethodInfo, delegate> which will contains all serializer deducers by methodInfo. Having single dictionary instead of switch and double-checking methodInfo reduce amount of code required for each method support, reduces risk of wrong copy-pasting and probably more performant.

            Assignee:
            Oleksandr Poliakov
            Reporter:
            Oleksandr Poliakov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: