SonarQube C#
  1. SonarQube C#
  2. SONARCS-312

Improve parser (C# 5.0) Support asynchronous methods

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: C# Squid Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      See http://www.mindscapehq.com/blog/index.php/2012/03/13/asynchronous-programming-in-c-5/ for an overview

      The C# language specification seems outdates (says C# 4.0) http://msdn.microsoft.com/en-us/library/ms228593.aspx

      But it looks like there is an extension: http://www.microsoft.com/en-us/download/details.aspx?id=23753

      The following code snippet must parse properly:

      class A {
        public static async Task<string> GetReferencedContent(string filename) // New *contextual* keywork: async
        {
          string url = await BeginReadFromFile(filename);                      // New *contextual* keyword: await
          string contentOfUrl = await BeginHttpGetFromUrl(url);
          return contentOfUrl;
        }
      }
      

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          Manually tested!

          Show
          Fabrice Bellingard added a comment - Manually tested!

            People

            • Assignee:
              Dinesh Bolkensteyn
              Reporter:
              Dinesh Bolkensteyn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: