Пример #1
0
        public object Clone()
        {
            var documentActivities = new DocumentActivities
            {
                Id = Id,
                TranslatableDocument = (Document)TranslatableDocument.Clone()
            };


            if (Activities != null)
            {
                documentActivities.Activities = new List <DocumentActivity>();
                foreach (var da in Activities)
                {
                    documentActivities.Activities.Add((DocumentActivity)da.Clone());
                }
            }
            else
            {
                documentActivities.Activities = null;
            }


            return(documentActivities);
        }
Пример #2
0
        public object Clone()
        {
            var tca = new DocumentActivity
            {
                Id = Id,
                DocumentActivityType = DocumentActivityType,
                ProjectActivityId    = ProjectActivityId,
                DocumentId           = DocumentId,
                TranslatableDocument = (Document)TranslatableDocument.Clone(),
                ProjectId            = ProjectId,
                Started       = Started,
                Stopped       = Stopped,
                TicksActivity = TicksActivity,
                TicksRecords  = TicksRecords,
                WordCount     = WordCount,
                Records       = new List <Record>()
            };



            foreach (var tcr in Records)
            {
                tca.Records.Add((Record)tcr.Clone());
            }

            tca.DocumentStateCounters = (DocumentStateCounters)DocumentStateCounters.Clone();



            return(tca);
        }
Пример #3
0
        public object Clone()
        {
            var documentActivities = new DocumentActivities
            {
                Id = Id,
                ProjectActivityId     = ProjectActivityId,
                DocumentId            = DocumentId,
                TranslatableDocument  = (Document)TranslatableDocument.Clone(),
                DocumentActivityTicks = DocumentActivityTicks,
                DocumentRecordsTicks  = DocumentRecordsTicks,
                DocumentActivityIds   = new List <int>()
            };



            foreach (var value in DocumentActivityIds)
            {
                documentActivities.DocumentActivityIds.Add(value);
            }


            return(documentActivities);
        }