Пример #1
0
        public void Update(IDataFileTemplateUpdatable fields, out List <UpdatedField> updated)
        {
            fields.ThrowIfNull(nameof(fields));

            updated = new List <UpdatedField>();

            if (FileName != fields.FileName && fields.FileName.IsNotNullOrWhiteSpace())
            {
                updated.Add(new UpdatedField
                {
                    FieldName = nameof(FileName),
                    OldValue  = FileName,
                    NewValue  = fields.FileName
                });

                FileName = fields.FileName;
            }

            // ParseOption은 일일히 비교하기 어려우므로 무조건 업데이트 처리
            {
                updated.Add(new UpdatedField
                {
                    FieldName = nameof(ParseOption),
                    OldValue  = ParseOption,
                    NewValue  = fields.ParseOption
                });

                ParseOption = fields.ParseOption;
            }

            if (updated.Any())
            {
                Validate();
            }
        }
Пример #2
0
        public void Update(IDataFileTemplateUpdatable fields)
        {
            List <UpdatedField> updated = null;

            this.Update(fields, out updated);
        }