static void Main(string[] args) { Person personObj = new Person(); Library _lib = new Library(); _lib.Visit(personObj); Office _office = new Office(); _office.Work(personObj); FriendCircle _meetup = new FriendCircle(); _meetup.Hangout(personObj); }
public Task <HttpResponseMessage> GetFriendCircleDetail(FriendCircle friendCircle) { ResponseBase <FriendCircleResponse> response = new ResponseBase <FriendCircleResponse>(); try { var result = wechat.SnsUserPage(friendCircle.FristPageMd5, friendCircle.WxId, friendCircle.ToWxId); if (result == null || result.baseResponse.ret != (int)MMPro.MM.RetConst.MM_OK) { response.Success = false; response.Code = "402"; response.Message = result.baseResponse.errMsg.@string ?? "获取失败"; } else { response.Data = new FriendCircleResponse() { FristPageMd5 = result.fristPageMd5, ObjectList = result.objectList }; } } catch (ExpiredException ex) { response.Success = false; response.Code = "401"; response.Message = ex.Message; } catch (Exception ex) { response.Success = false; response.Code = "500"; response.Message = ex.Message; } return(response.ToHttpResponseAsync()); }