PivotalTrackerAPI/Domain/Model/PivotalStory.cs
/// <summary>
/// Updates the story with new values
/// </summary>
/// <remarks>Uses reflection to iterate properties, so does carry some overhead in terms of performance</remarks>
/// <param name="user">The user to get the ApiToken from</param>
/// <returns>The updated story instance</returns>
Updates the story with new values
Updates the story with new values
public PivotalStory UpdateStory(PivotalUser user)
    {
      PivotalStory updatedStory = PivotalStory.UpdateStory(user, ProjectId.GetValueOrDefault().ToString(), this);
      System.Reflection.PropertyInfo[] properties = this.GetType().GetProperties();
      foreach (System.Reflection.PropertyInfo p in properties)
      {
        p.SetValue(this, p.GetValue(updatedStory, null), null);
      }
      return this;
    }
public PivotalStory UpdateStory ( PivotalUser user ) { PivotalStory updatedStory = PivotalStory . UpdateStory ( user , ProjectId . GetValueOrDefault ( ) . ToString ( ) , this ) ; System . Reflection . PropertyInfo [ ] properties = this . GetType ( ) . GetProperties ( ) ; foreach ( System . Reflection . PropertyInfo p in properties ) { p . SetValue ( this , p . GetValue ( updatedStory , null ) , null ) ; } return this ; }
Updates the story with new values
Updates the story with new values
The updated story instance
The updated story instance
user
PivotalUser
The user to get the ApiToken from
The user to get the ApiToken from
remarks
Uses reflection to iterate properties, so does carry some overhead in terms of performance
Uses reflection to iterate properties so does carry some overhead in terms of performance