title: Why am I getting the ReSharper error "The extracted code has multiple entry points"?
body: <p>I am using the ReSharper to re-factor my code. When I try to move a block of code to the method, I get the following warning:</p>
  
  <p><code>The extracted code has multiple entry points</code></p>
  
  <p>Here is the method signature I am planning to use:    </p>
  
  <pre><code>private void GetRatePlanComponents(ProductPlan productPlan, 
      ProductRatePlan productRatePlan)    
  </code></pre>
  
  <p>I searched the web to understand what does it mean. But didn't have much luck. Would someone explain it?</p>
  
  <p>For your reference, here is the code snippet I am trying to move to a separate method:</p>
  
  <pre><code>QueryResult productRatePlanChargeQueryResult = 
      _zuoraService.query(string.Format(@"select Id, Name, IncludedUnits from
          ProductRatePlanCharge where ProductRatePlanId = '{0}' and 
          ChargeModel = 'Overage Pricing'", productRatePlan.Id));
  
  if (productRatePlanChargeQueryResult.size &gt; 0)
  {
      foreach (ProductRatePlanCharge productRatePlanCharge 
          in productRatePlanChargeQueryResult.records)
      {
          string numberOfUnits = productRatePlanCharge.IncludedUnits.ToString();
  
          if (productRatePlanCharge.Name.Equals("Users"))
          {
              productPlan.NumberofUsers = numberOfUnits;
          }
          else if (productRatePlanCharge.Name.Equals("Projects"))
          {
              productPlan.NumberofProjects = numberOfUnits;
          }
          else if (productRatePlanCharge.Name.Equals("Storage"))
          {
              decimal volumeOfStorage;
              if (decimal.TryParse(productRatePlanCharge.IncludedUnits.ToString(), 
                  out volumeOfStorage))
              {
                  if (volumeOfStorage &lt; 1) volumeOfStorage *= 1000;
                      productPlan.VolumeofStorage = volumeOfStorage.ToString();
                  }
                  else
                  {
                      productPlan.VolumeofStorage = numberOfUnits;
                  }
              }
          }
      }
  }
  </code></pre>