Ejemplo n.º 1
0
 public Authentication(AccountCredentialInfo credential = null)
 {
     InitializeComponent();
     if (credential == null)
         credential = new AccountCredentialInfo();
     this.DataContext = new AuthenticationViewModel(credential);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the AuthenticationViewModel class.
 /// </summary>
 public AuthenticationViewModel(AccountCredentialInfo credential)
 {
     if (credential == null)
         throw new ArgumentNullException("credential");
     // クレデンシャル情報をクローニングする
     this.Credential = credential.Clone();
     // トークン・シークレットを削除
     this.Credential.Token = null;
     this.Credential.Secret = null;
 }
Ejemplo n.º 3
0
        public AccountCredentialInfo Clone()
        {
            var clone = new AccountCredentialInfo();
            clone.AcceptUserStreamsQuery = this.AcceptUserStreamsQuery;
            clone.APIRate = this.APIRate;
            clone.ConnectionMode = this.ConnectionMode;
            clone.DirectMessagePriority = this.DirectMessagePriority;
            clone.FavoritesPriority = this.FavoritesPriority;
            clone.MentionPriority = this.MentionPriority;
            clone.OverridedConsumerKey = this.OverridedConsumerKey;
            clone.OverridedConsumerSecret = this.OverridedConsumerSecret;
            clone.RateLimitMax = this.RateLimitMax;
            clone.RateLimitRemaining = this.RateLimitRemaining;
            clone.RateLimitReset = this.RateLimitReset;
            clone.Secret = this.Secret;
            clone.SuspendUpdateRelative = this.SuspendUpdateRelative;
            clone.TimelinePriority = this.TimelinePriority;
            clone.Token = this.Token;
            clone.UseApiCooperation = this.UseApiCooperation;
            clone.UserScreenName = this.UserScreenName;
            clone.UserStreamsReceiveRepliesAll = this.UserStreamsReceiveRepliesAll;
            return clone;

        }