Example #1
0
        public Int32 GetPosterId(String name, Action <String, Int32> callback)
        {
            Int32 id = 0;

            id = _db.GetPlayerId(name);
            if (id <= 0)
            {
                _forum.GetPostersLike(name,
                                      (fragment, posters) =>
                {
                    _synchronousInvoker(() =>
                    {
                        _db.AddPosters(posters);
                        foreach (POG.Forum.Poster p in posters)
                        {
                            if (p.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase))
                            {
                                callback(p.Name, p.Id);
                                return;
                            }
                        }
                        callback(name, 0);
                    }
                                        );
                }
                                      );
            }
            return(id);
        }
Example #2
0
        public Int32 GetPlayerId(String name)
        {
            Int32 id = _db.GetPlayerId(name);

            return(id);
        }