public bool TryGetValue(string typableMapId, out Misuzilla.Applications.TwitterIrcGateway.Status status)
        {
            Int64 statusId;
            status = null;

            if (_typableMap.TryGetValue(typableMapId, out statusId))
            {
                using (TwitterIrcGatewayDataContext ctx = new TwitterIrcGatewayDataContext())
                {
                    var dbStatus = ctx.Status.Where(s => s.Id == statusId).FirstOrDefault();
                    if (dbStatus != null)
                    {
                        status = new TwitterIrcGateway.Status();
                        status.Id = dbStatus.Id;
                        status.Text = dbStatus.Text;
                        status.InReplyToStatusId = dbStatus.InReplyToId.HasValue ? dbStatus.InReplyToId.Value.ToString() : null;
                        status.CreatedAt = dbStatus.CreatedAt;
                        status.User = new TwitterIrcGateway.User();
                        status.User.ScreenName = dbStatus.ScreenName;
                        if (dbStatus.User != null)
                        {
                            status.User.Id = dbStatus.User.Id;
                            status.User.ScreenName = dbStatus.User.ScreenName;
                            status.User.Name = dbStatus.User.Name;
                            status.User.Protected = dbStatus.User.IsProtected;
                            status.User.ProfileImageUrl = dbStatus.User.ProfileImageUrl;
                        }
                    }
                }
            }

            return (status != null);
        }
        public bool Process(TypableMapCommandProcessor processor, Misuzilla.Net.Irc.PrivMsgMessage msg, Status status, string args)
        {
            Boolean isDestroy = (String.Compare(CommandName, "remove", true) == 0);

            return processor.Session.RunCheck(() =>
            {
                if (isDestroy)
                    processor.Session.TwitterService.DestroyFriendship(status.User.ScreenName);
                else
                    processor.Session.TwitterService.CreateFriendship(status.User.ScreenName);

                processor.Session.SendServer(new NoticeMessage
                {
                    Receiver = msg.Receiver,
                    Content =
                        String.Format(
                        "ユーザ {0} を {1} しました。",
                        status.User.ScreenName, (isDestroy ? "remove" : "follow")
                        )
                });
            });
        }
 public string Add(Misuzilla.Applications.TwitterIrcGateway.Status status)
 {
     return _typableMap.Add(status.Id);
 }