コード例 #1
0
ファイル: ActivityViewModel.cs プロジェクト: Bunk/trellow
        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
ファイル: ActivityViewModel.cs プロジェクト: Bunk/trellow
        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);
        }