상속: ActivityViewModel
예제 #1
0
        public static ActivityViewModel InitializeWith(Action activity)
        {
            var model = new ActivityViewModel();
            var act = activity as CommentCardAction;
            if (act != null)
            {
                model = new CommentActivityViewModel
                {
                    Text = act.Data.Text,
                    LastEditedDate = act.Data.DateLastEdited,
                    TargetName = act.Data.Card.Name
                };
            }

            model.Id = activity.Id;
            model.Member = new MemberViewModel(activity.MemberCreator);
            model.Timestamp = activity.Date.ToLocalTime();

            return model;
        }
예제 #2
0
        public static ActivityViewModel InitializeWith(Action activity)
        {
            var model = new ActivityViewModel();
            var act   = activity as CommentCardAction;

            if (act != null)
            {
                model = new CommentActivityViewModel
                {
                    Text           = act.Data.Text,
                    LastEditedDate = act.Data.DateLastEdited,
                    TargetName     = act.Data.Card.Name
                };
            }

            model.Id        = activity.Id;
            model.Member    = new MemberViewModel(activity.MemberCreator);
            model.Timestamp = activity.Date.ToLocalTime();

            return(model);
        }