title: Duplicated function
body: <p>In my code I make a connection with the Google calendar API. First I authenticate and then I request a list with all the data I need. Now I have a problem, because I need to request in three different ways. See below:</p>
  
  <pre><code>PrivateExtendedProperty = new string[] { "UserId=" + userId },
  
  PrivateExtendedProperty = new string[] { "ClassroomId=" + classroomId },  
  
  PrivateExtendedProperty = new string[] { "ClassroomId=" + classroomId , "UserId=" + userId }, 
  </code></pre>
  
  <p>I use these in the function below. But I don't want to copy this function three times and only change the parameters and the private properties. What is the best way to refactor this and solve the duplication problem.</p>
  
  <p>The whole function:</p>
  
  <pre><code>public List&lt;Meeting&gt; GetMeetings(DateTime minTime, DateTime maxTime, string userId, int classroomId)
  {
      CalendarService service = AuthenticateAccount(CalendarId);
  
      EventsResource.ListRequest request = new EventsResource.ListRequest(service, CalendarId)
      {
          TimeMin = timeMin,
          TimeMax = timeMax,
          TimeZone = "Europe/Amsterdam",
          PrivateExtendedProperty = new string[] { "ClassroomId=" + classroomId , "UserId=" + userId },             
      };
  
      Events events = request.Execute();
  
      foreach (var item in eventList)
      {
          ....
      }
  }
  </code></pre>