Пример #1
0
        protected override IEnumerable <object> EnumerateReferences(MsBuildTarget record)
        {
            yield return(record.MsBuildTaskList);

            yield return(record.Name);

            yield return(record.Outputs);
        }
Пример #2
0
        protected override async Task <MsBuildTarget> AssignUpsertedReferences(MsBuildTarget record)
        {
            record.MsBuildTaskList = await _tasks.UpsertAsync(record.MsBuildTaskList);

            record.MsBuildTaskListId = record.MsBuildTaskList?.MsBuildTaskListId ?? record.MsBuildTaskListId;
            record.Name = await _strings.UpsertAsync(record.Name);

            record.NameId  = record.Name?.AsciiStringReferenceId ?? record.NameId;
            record.Outputs = await _strings.UpsertAsync(record.Outputs);

            record.OutputsId = record.Outputs?.AsciiStringReferenceId ?? record.OutputsId;
            return(record);
        }
Пример #3
0
 protected override Expression <Func <MsBuildTarget, bool> > FindExisting(MsBuildTarget record)
 => existing
 => existing.MsBuildTaskListId == record.MsBuildTaskListId &&
 existing.NameId == record.NameId &&
 ((existing.OutputsId == null && record.OutputsId == null) || (existing.OutputsId == record.OutputsId));