当前位置: 首页>>代码示例>>C#>>正文


C# Authentication.AccountInfo类代码示例

本文整理汇总了C#中Inscribe.Authentication.AccountInfo的典型用法代码示例。如果您正苦于以下问题:C# AccountInfo类的具体用法?C# AccountInfo怎么用?C# AccountInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AccountInfo类属于Inscribe.Authentication命名空间,在下文中一共展示了AccountInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UserLinkData

 public UserLinkData(AccountInfo info, UserSelectorViewModel parent, bool isLink)
 {
     this.parent = parent;
     this.info = info;
     this._profileImageProvider = new ProfileImageProvider(info);
     this._IsLink = isLink;
 }
开发者ID:sor593,项目名称:Mystique,代码行数:7,代码来源:UserSelectorViewModel.cs

示例2: ReceiveInidividualInfo

 /// <summary>
 /// 指定アカウントの依存情報を受信します。
 /// </summary>
 public static void ReceiveInidividualInfo(AccountInfo info)
 {
     // アカウント情報の受信
     SafeExec(() => UserStorage.Register(info.GetUserByScreenName(info.ScreenName)));
     // フォロー/フォロワー/ブロックの受信
     SafeExec(() => info.GetFriendIds(screenName: info.ScreenName).ForEach(i => info.RegisterFollowing(i)));
     SafeExec(() => info.GetFollowerIds(screenName: info.ScreenName).ForEach(i => info.RegisterFollower(i)));
     SafeExec(() => info.GetBlockingIds().ForEach(i => info.RegisterBlocking(i)));
 }
开发者ID:c0a5tar,项目名称:Mystique,代码行数:12,代码来源:UserInformationManager.cs

示例3: GetScheduler

 public static AccountScheduler GetScheduler(AccountInfo info)
 {
     if (info == null)
         throw new ArgumentNullException("info");
     AccountScheduler sched;
     if (schedulers.TryGetValue(info, out sched))
         return sched;
     else
         return null;
 }
开发者ID:sor593,项目名称:Mystique,代码行数:10,代码来源:AutoCruiseSchedulerManager.cs

示例4: TweetWorker

 public TweetWorker(InputBlockViewModel parent, AccountInfo info, string body, long inReplyToId, string attachedImage, string[] tag)
 {
     this.parent = parent;
     this.TweetSummary = info.ScreenName + ": " + body;
     this.accountInfo = info;
     this.body = body;
     this.inReplyToId = inReplyToId;
     this.attachImagePath = attachedImage;
     this.tags = tag;
 }
开发者ID:deflis,项目名称:Mystique,代码行数:10,代码来源:UpdateWorker.cs

示例5: AccountScheduler

 public AccountScheduler(AccountInfo info)
 {
     this._accountInfo = info;
     this.AddSchedule(new HomeReceiveTask(info));
     this.AddSchedule(new MentionReceiveTask(info));
     this.AddSchedule(new DirectMessageReceiveTask(info));
     this.AddSchedule(new SentDirectMessageReceiveTask(info));
     this.AddSchedule(new FavoritesReceiveTask(info));
     this.AddSchedule(new MyTweetsTask(info));
     ThreadHelper.Halt += this.StopSchedule;
 }
开发者ID:sor593,项目名称:Mystique,代码行数:11,代码来源:AccountScheduler.cs

示例6: DeleteAccount

 public static bool DeleteAccount(AccountInfo info)
 {
     if (info != null && accounts.Contains(info))
     {
         accounts.Remove(info);
         OnAccountsChanged(EventArgs.Empty);
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:sor593,项目名称:Mystique,代码行数:13,代码来源:AccountStorage.cs

示例7: TweetWorker

 public TweetWorker(InputBlockViewModel parent, AccountInfo info, string body, long inReplyToId, string attachedImage, string[] tag)
 {
     isImageAttached = false;
     isBodyStandby = false;
     if (info == null)
         throw new ArgumentNullException("info");
     this.parent = parent;
     this.TweetSummary = info.ScreenName + ": " + body;
     this.accountInfo = info;
     this.body = body;
     this.inReplyToId = inReplyToId;
     this.attachImagePath = attachedImage;
     this.tags = tag;
 }
开发者ID:runceel,项目名称:Mystique,代码行数:14,代码来源:UpdateWorker.cs

示例8: RefreshConnection

        /// <summary>
        /// 接続を開始します。<para />
        /// すでに接続が存在する場合は、すでに存在している接続を破棄します。
        /// </summary>
        public static bool RefreshConnection(AccountInfo info)
        {
            if (info == null)
                throw new ArgumentNullException("info", "AccountInfo is not set.");

            System.Diagnostics.Debug.WriteLine("Refresh connection: " + info.ToString());

            UserStreamsConnection ncon;
            lock (info)
            {
                UserStreamsConnection prevCon;
                // 旧接続の破棄
                if (connections.TryGetValue(info, out prevCon))
                {
                    connections.Remove(info);
                    if (prevCon != null)
                        prevCon.Dispose();
                }

                // User Streams接続しない設定になっている
                if (!info.AccountProperty.UseUserStreams)
                    return false;

                ncon = new UserStreamsConnection(info);
                if (!connections.TryAdd(info, ncon))
                    throw new InvalidOperationException("Connection refresh violation.");
            }

            var queries = lookupDictionary.Where(v => v.Value == info).Select(v => v.Key).ToArray();
            try
            {
                ncon.Connect(queries);
                return true;
            }
            catch (Exception e)
            {
                connections[info] = null;
                ncon.Dispose();
                ExceptionStorage.Register(e, ExceptionCategory.TwitterError,
                    "User Streams接続に失敗しました。", () =>
                        {
                            if (connections.ContainsKey(info) && connections[info] == null)
                                RefreshConnection(info);
                        });
                return false;
            }
        }
开发者ID:sor593,项目名称:Mystique,代码行数:51,代码来源:ConnectionManager.cs

示例9: AccountViewModel

 public AccountViewModel(AccountInfo info)
 {
     this.Info = info;
     this._profileImageProvider = new Common.ProfileImageProvider(info);
     Task.Factory.StartNew(() => UpdatePostChunk());
     ViewModelHelper.BindNotification(info.ConnectionStateChangedEvent, this,
         (o, e) => RaisePropertyChanged(() => ConnectState));
     ViewModelHelper.BindNotification(TimeTickCall, this, (o, e) =>
     {
         Task.Factory.StartNew(() => UpdatePostChunk());
     });
     ViewModelHelper.BindNotification(PostOffice.OnUnderControlChangedEvent, this, (o, e) =>
     {
         RaisePropertyChanged(() => IsAccountUnderControlled);
         RaisePropertyChanged(() => AccountControlReleaseTime);
     });
 }
开发者ID:sor593,项目名称:Mystique,代码行数:17,代码来源:SystemInfoViewModel.cs

示例10: AccountScheduler

 public AccountScheduler(AccountInfo info)
 {
     this._accountInfo = info;
     this.AddSchedule(new HomeReceiveTask(info));
     this.AddSchedule(new MentionReceiveTask(info));
     this.AddSchedule(new DirectMessageReceiveTask(info));
     this.AddSchedule(new SentDirectMessageReceiveTask(info));
     this.AddSchedule(new FavoritesReceiveTask(info));
     this.AddSchedule(new MyTweetsTask(info));
     Task.Factory.StartNew(() =>
         {
             try
             {
                 // テストを飛ばす
                 ApiHelper.ExecApi(() => info.Test());
             }
             catch { }
         });
     ThreadHelper.Halt += () => this.StopSchedule();
 }
开发者ID:azyobuzin,项目名称:Mystique,代码行数:20,代码来源:AccountScheduler.cs

示例11: RefreshConnection

 /// <summary>
 /// 接続を開始します。<para />
 /// すでに接続が存在する場合は、すでに存在している接続を破棄します。
 /// </summary>
 public static bool RefreshConnection(AccountInfo info)
 {
     if (info == null)
         throw new ArgumentNullException("info", "AccountInfo is not set.");
     var ncon = new UserStreamsConnection(info);
     if (connections.ContainsKey(info))
     {
         var pcon = connections[info];
         // 以前の接続がある
         connections[info] = ncon;
         if (pcon != null)
             pcon.Dispose();
     }
     else
     {
         connections.AddOrUpdate(info, ncon);
     }
     var queries = lookupDictionary.Where(v => v.Value == info).Select(v => v.Key).ToArray();
     try
     {
         ncon.Connect(queries);
         return true;
     }
     catch (Exception e)
     {
         connections[info] = null;
         ncon.Dispose();
         ExceptionStorage.Register(e, ExceptionCategory.TwitterError,
             "User Streams接続に失敗しました。", () =>
                 {
                     if (connections.ContainsKey(info) && connections[info] == null)
                         RefreshConnection(info);
                 });
         return false;
     }
 }
开发者ID:c0a5tar,项目名称:Mystique,代码行数:40,代码来源:ConnectionManager.cs

示例12: RemoveRetweetCore

 private static void RemoveRetweetCore(AccountInfo d, TweetViewModel status)
 {
     // リツイートステータスの特定
     var rts = TweetStorage.GetAll(vm =>
         vm.Status.User.ScreenName == d.ScreenName && vm.Status is TwitterStatus &&
         ((TwitterStatus)vm.Status).RetweetedOriginal != null &&
         ((TwitterStatus)vm.Status).RetweetedOriginal.Id == status.Status.Id).FirstOrDefault();
     if (rts == null || ApiHelper.ExecApi(() => d.DestroyStatus(rts.Status.Id) == null))
         throw new ApplicationException();
 }
开发者ID:azyobuzin,项目名称:Mystique,代码行数:10,代码来源:PostOffice.cs

示例13: RemoveDMSink

 private static void RemoveDMSink(AccountInfo info, long tweetId)
 {
     var tweet = ApiHelper.ExecApi(() => info.DestroyDirectMessage(tweetId.ToString()));
     if (tweet != null)
     {
         if (tweet.Id != tweetId)
         {
             NotifyStorage.Notify("削除には成功しましたが、ダイレクトメッセージIDが一致しません。(" + tweetId.ToString() + " -> " + tweet.Id.ToString() + ")");
         }
         else
         {
             TweetStorage.Remove(tweetId);
             NotifyStorage.Notify("削除しました:" + tweet.ToString());
         }
     }
     else
     {
         NotifyStorage.Notify("ダイレクトメッセージを削除できませんでした(@" + info.ScreenName + ")");
     }
 }
开发者ID:azyobuzin,项目名称:Mystique,代码行数:20,代码来源:PostOffice.cs

示例14: MyTweetsTask

 public MyTweetsTask(AccountInfo info)
 {
     this._accountInfo = info;
 }
开发者ID:sor593,项目名称:Mystique,代码行数:4,代码来源:MyTweetsTask.cs

示例15: RegisterAccount

 /// <summary>
 /// アカウントを登録します。
 /// </summary>
 /// <param name="accountInfo">登録するアカウント情報</param>
 public static void RegisterAccount(AccountInfo accountInfo)
 {
     if (accountInfo == null)
         throw new ArgumentNullException("accountInfo");
     accounts.Add(accountInfo);
     OnAccountsChanged(EventArgs.Empty);
     // アカウント情報のキャッシュ
     // Task.Factory.StartNew(() => accountInfo.UserViewModel);
 }
开发者ID:deflis,项目名称:Mystique,代码行数:13,代码来源:AccountStorage.cs


注:本文中的Inscribe.Authentication.AccountInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。