コード例 #1
0
        public static IEnumerable <Cronofy.Profile> GetProfiles()
        {
            IEnumerable <Cronofy.Profile> profiles = new Cronofy.Profile[0];

            try
            {
                profiles = CronofyAccountRequest <IEnumerable <Cronofy.Profile> >(() => { return(AccountClient.GetProfiles()); });
                LogHelper.Log("GetProfiles success");
            }
            catch (CronofyException)
            {
                LogHelper.Log("GetProfiles failure");
            }

            return(profiles);
        }
コード例 #2
0
ファイル: Profile.cs プロジェクト: cronofy/cronofy-csharp
 /// <summary>
 /// Determines whether the specified <see cref="Cronofy.Profile"/> is
 /// equal to the current <see cref="Cronofy.Profile"/>.
 /// </summary>
 /// <param name="other">
 /// The <see cref="Cronofy.Profile"/> to compare with the current
 /// <see cref="Cronofy.Profile"/>.
 /// </param>
 /// <returns>
 /// <c>true</c> if the specified <see cref="Cronofy.Profile"/> is equal
 /// to the current <see cref="Cronofy.Profile"/>; otherwise,
 /// <c>false</c>.
 /// </returns>
 public bool Equals(Profile other)
 {
     return other != null
         && this.Id == other.Id
         && this.Name == other.Name
         && this.ProviderName == other.ProviderName
         && this.Connected == other.Connected
         && this.RelinkUrl == other.RelinkUrl;
 }