コード例 #1
0
 /// <summary>
 /// Gets all the Albums for the user.
 /// </summary>
 /// <returns>An <see cref="Array"/> of <see cref="Album"/>.
 /// <remarks>Albums are cached for the existing Session.
 /// Throws an <see cref="SmugMugException"/>
 /// if an error occurs trying to retrieve the Albums.</remarks>
 public Album[] GetAlbums()
 {
     if (this.albums == null)
     {
         try
         {
             this.albums = proxy.GetAlbums(this.credentials.SessionID);
             return(this.albums);
         }
         catch (Exception ex)
         {
             throw new SmugMugException("Could not retrieve Albums", ex.InnerException);
         }
     }
     else
     {
         return(this.albums);
     }
 }