Example #1
0
        public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration configuration)
        {
            Assert.ArgumentNotNull(targetDataStore, "serializationProvider");
            Assert.ArgumentNotNull(predicate, "predicate");
            Assert.ArgumentNotNull(fieldFilter, "fieldPredicate");
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");
            Assert.ArgumentNotNull(configuration, "configuration");

            _logger = logger;
            _disableTransparentSync = !configuration.EnableTransparentSync;
            _predicate       = predicate;
            _fieldFilter     = fieldFilter;
            _targetDataStore = targetDataStore;
            _sourceDataStore = sourceDataStore;

            try
            {
                _targetDataStore.RegisterForChanges(RemoveItemFromCaches);
            }
            catch (NotImplementedException)
            {
                // if the data store doesn't implement watching, cool story bruv
            }
        }
Example #2
0
        public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration dataProviderConfiguration, PredicateRootPathResolver rootPathResolver)
        {
            Assert.ArgumentNotNull(targetDataStore, "serializationProvider");
            Assert.ArgumentNotNull(predicate, "predicate");
            Assert.ArgumentNotNull(fieldFilter, "fieldPredicate");
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");
            Assert.ArgumentNotNull(dataProviderConfiguration, "configuration");
            Assert.ArgumentNotNull(rootPathResolver, "rootPathResolver");

            _logger = logger;
            _dataProviderConfiguration = dataProviderConfiguration;
            _rootPathResolver          = rootPathResolver;
            _predicate       = predicate;
            _fieldFilter     = fieldFilter;
            _targetDataStore = targetDataStore;
            _sourceDataStore = sourceDataStore;

            // enable capturing recycle bin and archive restores to serialize the target item if included
            EventManager.Subscribe <RestoreItemCompletedEvent>(HandleItemRestored);

            try
            {
                _targetDataStore.RegisterForChanges(RemoveItemFromCaches);
            }
            catch (NotImplementedException)
            {
                // if the data store doesn't implement watching, cool story bruv
            }
        }
        public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration configuration)
        {
            Assert.ArgumentNotNull(targetDataStore, "serializationProvider");
            Assert.ArgumentNotNull(predicate, "predicate");
            Assert.ArgumentNotNull(fieldFilter, "fieldPredicate");
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");
            Assert.ArgumentNotNull(configuration, "configuration");

            _logger = logger;
            _configuration = configuration;
            _predicate = predicate;
            _fieldFilter = fieldFilter;
            _targetDataStore = targetDataStore;
            _sourceDataStore = sourceDataStore;

            try
            {
                _targetDataStore.RegisterForChanges(RemoveItemFromCaches);
            }
            catch (NotImplementedException)
            {
                // if the data store doesn't implement watching, cool story bruv
            }
        }
		// TODO

		private UnicornDataProvider CreateTestProvider(Database db, ITargetDataStore targetDataStore = null, ISourceDataStore sourceDataStore = null, IPredicate predicate = null, IFieldFilter filter = null, IUnicornDataProviderLogger logger = null, bool enableTransparentSync = false)
		{
			if (predicate == null)
			{
				predicate = CreateInclusiveTestPredicate();
			}

			if (filter == null)
			{
				filter = Substitute.For<IFieldFilter>();
				filter.Includes(Arg.Any<Guid>()).Returns(true);
			}

			targetDataStore = targetDataStore ?? Substitute.For<ITargetDataStore>();
			sourceDataStore = sourceDataStore ?? Substitute.For<ISourceDataStore>();

			var dp = new UnicornDataProvider(targetDataStore, 
				sourceDataStore, 
				predicate, 
				filter, 
				logger ?? Substitute.For<IUnicornDataProviderLogger>(), 
				new DefaultUnicornDataProviderConfiguration(enableTransparentSync), 
				new PredicateRootPathResolver(predicate, targetDataStore, sourceDataStore, Substitute.For<ILogger>()));
			
			dp.ParentDataProvider = db.GetDataProviders().First();

			return dp;
		}
        public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration dataProviderConfiguration, ISyncConfiguration syncConfiguration, PredicateRootPathResolver rootPathResolver)
        {
            Assert.ArgumentNotNull(targetDataStore, nameof(targetDataStore));
            Assert.ArgumentNotNull(predicate, nameof(predicate));
            Assert.ArgumentNotNull(fieldFilter, nameof(fieldFilter));
            Assert.ArgumentNotNull(logger, nameof(logger));
            Assert.ArgumentNotNull(sourceDataStore, nameof(sourceDataStore));
            Assert.ArgumentNotNull(dataProviderConfiguration, nameof(dataProviderConfiguration));
            Assert.ArgumentNotNull(rootPathResolver, nameof(rootPathResolver));
            Assert.ArgumentNotNull(syncConfiguration, nameof(syncConfiguration));

            _logger = logger;
            _dataProviderConfiguration = dataProviderConfiguration;
            _syncConfiguration = syncConfiguration;
            _rootPathResolver = rootPathResolver;
            _predicate = predicate;
            _fieldFilter = fieldFilter;
            _targetDataStore = targetDataStore;
            _sourceDataStore = sourceDataStore;

            // enable capturing recycle bin and archive restores to serialize the target item if included
            EventManager.Subscribe<RestoreItemCompletedEvent>(HandleItemRestored);

            try
            {
                _targetDataStore.RegisterForChanges(RemoveItemFromCaches);
            }
            catch (NotImplementedException)
            {
                // if the data store doesn't implement watching, cool story bruv
            }
        }
Example #6
0
        public DefaultDeserializer(IDefaultDeserializerLogger logger, IFieldFilter fieldFilter)
        {
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(fieldFilter, "fieldFilter");

            _logger      = logger;
            _fieldFilter = fieldFilter;
        }
Example #7
0
        private void AssertNullStringIsHanldedByFilter(IFieldFilter filter)
        {
            string nullString = null;

            var filterredString = filter.Filter(nullString);

            Assert.IsNull(filterredString);
        }
		public DefaultDeserializer(IDefaultDeserializerLogger logger, IFieldFilter fieldFilter)
		{
			Assert.ArgumentNotNull(logger, "logger");
			Assert.ArgumentNotNull(fieldFilter, "fieldFilter");

			_logger = logger;
			_fieldFilter = fieldFilter;
		}
Example #9
0
        /// <summary>
        /// Adds field interception support to the target type.
        /// </summary>
        /// <param name="targetType">The type that will be modified.</param>
        /// <param name="hostTypeFilter">The filter that determines the host types to be modified.</param>
        /// <param name="fieldFilter">The field filter that determines the fields that will be intercepted.</param>
        public static void InterceptFields(this IReflectionStructureVisitable targetType, ITypeFilter hostTypeFilter,
                                           IFieldFilter fieldFilter)
        {
            var typeWeaver  = new ImplementFieldInterceptionHostWeaver(hostTypeFilter.ShouldWeave);
            var fieldWeaver = new InterceptFieldAccess(fieldFilter);

            targetType.WeaveWith(fieldWeaver, m => true);
            targetType.Accept(typeWeaver);
        }
Example #10
0
        // used for testing
        protected YamlSerializationFormatter(IFieldFilter fieldFilter, params IFieldFormatter[] fieldFormatters)
        {
            _fieldFilter = fieldFilter;

            if (fieldFormatters != null)
            {
                FieldFormatters.AddRange(fieldFormatters);
            }
        }
Example #11
0
        /// <summary>
        /// 选择被排除以外的列(用于列多时排除某几列的情况)
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public QuerySection <T> Select(IFieldFilter filter)
        {
            Field[] fields = new Field[0];
            if (filter != null)
            {
                fields = filter.GetFields(fromSection.GetSelectFields());
            }

            return(Select(fields));
        }
Example #12
0
        public DefaultDeserializer(bool ignoreBranchId, IDefaultDeserializerLogger logger, IFieldFilter fieldFilter)
        {
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(fieldFilter, "fieldFilter");

            // In reference to issue 283. https://github.com/SitecoreUnicorn/Unicorn/issues/283
            IgnoreBranchId = ignoreBranchId;

            _logger      = logger;
            _fieldFilter = fieldFilter;
        }
Example #13
0
        /// <summary>
        /// 書きだすファイルパスとエンコーディングとフィルターを指定して CsvWriter オブジェクトを作成します。
        /// </summary>
        /// <param name="path">書きだすファイルのパス。</param>
        /// <param name="fileEncoding">書き込み用のエンコーディング。</param>
        /// <param name="filter"></param>
        public CsvWriter(string path, Encoding fileEncoding, IFieldFilter filter)
        {
            FileInfo file = new FileInfo( path );

            if ( file.Exists )
                this.writer_ = new StreamWriter( file.Open( FileMode.Truncate, FileAccess.Write ), fileEncoding );
            else
                this.writer_ = new StreamWriter( file.Open( FileMode.CreateNew, FileAccess.Write ), fileEncoding );

            this.filter_ = filter;
        }
        public SerializedAsMasterEvaluator(ISerializedAsMasterEvaluatorLogger logger, IItemComparer itemComparer, IFieldFilter fieldFilter, ISourceDataStore sourceDataStore)
        {
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(itemComparer, "itemComparer");
            Assert.ArgumentNotNull(fieldFilter, "fieldFilter");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");

            _logger = logger;
            _itemComparer = itemComparer;
            _fieldFilter = fieldFilter;
            _sourceDataStore = sourceDataStore;
        }
        public SerializedAsMasterEvaluator(ISerializedAsMasterEvaluatorLogger logger, IItemComparer itemComparer, IFieldFilter fieldFilter, ISourceDataStore sourceDataStore)
        {
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(itemComparer, "itemComparer");
            Assert.ArgumentNotNull(fieldFilter, "fieldFilter");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");

            _logger          = logger;
            _itemComparer    = itemComparer;
            _fieldFilter     = fieldFilter;
            _sourceDataStore = sourceDataStore;
        }
Example #16
0
        public void ToBytesSink(IBytesSink to, IFieldFilter p)
        {
            var serializer = new BinarySerializer(to);

            foreach (var field in this)
            {
                if (p.Evaluate(field))
                {
                    var value = fields[field];
                    serializer.Add(field, value);
                }
            }
        }
        public YamlSerializationFormatter(XmlNode configNode, IFieldFilter fieldFilter)
        {
            _fieldFilter = fieldFilter;

            if (configNode == null) return;

            var formatters = configNode.ChildNodes;

            foreach (XmlNode formatter in formatters)
            {
                if (formatter.NodeType == XmlNodeType.Element && formatter.Name.Equals("fieldFormatter")) FieldFormatters.Add(Factory.CreateObject<IFieldFormatter>(formatter));
            }
        }
        public SerializedAsMasterEvaluator(ILogger globalLogger, ISerializedAsMasterEvaluatorLogger logger, IItemComparer itemComparer, IFieldFilter fieldFilter, ISourceDataStore sourceDataStore, ITargetDataStore targetDataStore) : base(logger, sourceDataStore, targetDataStore)
        {
            Assert.ArgumentNotNull(globalLogger, "globalLogger");
            Assert.ArgumentNotNull(logger, "logger");
            Assert.ArgumentNotNull(itemComparer, "itemComparer");
            Assert.ArgumentNotNull(fieldFilter, "fieldFilter");
            Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");

            _globalLogger    = globalLogger;
            _logger          = logger;
            _itemComparer    = itemComparer;
            _fieldFilter     = fieldFilter;
            _sourceDataStore = sourceDataStore;
        }
Example #19
0
        public void Add_UnitTest()
        {
            IFieldFilter filter = default(IFieldFilter);

            ExecuteMethod(
                () => { return((IFieldFilterList)GetInstance()); },
                instance =>
            {
                filter = FieldFilterImpl_UnitTests.GetInstance();
                Add_PreCondition(instance, ref filter);
            },
                instance => { instance.Add(filter); },
                instance => { Add_PostValidate(instance, filter); });
        }
Example #20
0
        public void Remove_UnitTest()
        {
            IFieldFilter value = default(IFieldFilter);

            ExecuteMethod(
                () => { return((IFieldFilterList)GetInstance()); },
                instance =>
            {
                value = FieldFilterImpl_UnitTests.GetInstance();
                Remove_PreCondition(instance, ref value);
            },
                instance => { instance.Remove(value); },
                instance => { Remove_PostValidate(instance, value); });
        }
		public SerializedAsMasterEvaluator(ILogger globalLogger, ISerializedAsMasterEvaluatorLogger logger, IItemComparer itemComparer, IFieldFilter fieldFilter, ISourceDataStore sourceDataStore, ITargetDataStore targetDataStore, IConfiguration parentConfiguration) : base(logger, sourceDataStore, targetDataStore, parentConfiguration)
		{
			Assert.ArgumentNotNull(globalLogger, "globalLogger");
			Assert.ArgumentNotNull(logger, "logger");
			Assert.ArgumentNotNull(itemComparer, "itemComparer");
			Assert.ArgumentNotNull(fieldFilter, "fieldFilter");
			Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore");

			_globalLogger = globalLogger;
			_logger = logger;
			_itemComparer = itemComparer;
			_fieldFilter = fieldFilter;
			_sourceDataStore = sourceDataStore;
			_parentConfiguration = parentConfiguration;
		}
Example #22
0
        private static YamlSerializationFormatter CreateFormatter(IFieldFilter filter)
        {
            // shut yer gob again :D
            var config = @"<serializationFormatter type=""Rainbow.Storage.Yaml.YamlSerializationFormatter, Rainbow.Storage.Yaml"" singleInstance=""true"">
					<fieldFormatter type=""Rainbow.Formatting.FieldFormatters.MultilistFormatter, Rainbow"" />
					<fieldFormatter type=""Rainbow.Formatting.FieldFormatters.XmlFieldFormatter, Rainbow"" />
					<fieldFormatter type=""Rainbow.Formatting.FieldFormatters.CheckboxFieldFormatter, Rainbow"" />
				</serializationFormatter>"                ;

            var doc = new XmlDocument();

            doc.LoadXml(config);

            return(new YamlSerializationFormatter(doc.DocumentElement, filter));
        }
Example #23
0
        /// <summary>
        ///     Adds field interception support to the target type.
        /// </summary>
        /// <param name="targetAssembly">The type that will be modified.</param>
        /// <param name="hostTypeFilter">The filter that determines the host types to be modified.</param>
        /// <param name="fieldFilter">The field filter that determines the fields that will be intercepted.</param>
        public static void InterceptFields(this AssemblyDefinition targetAssembly, ITypeFilter hostTypeFilter,
                                           IFieldFilter fieldFilter)
        {
            var typeWeaver  = new ImplementFieldInterceptionHostWeaver(hostTypeFilter.ShouldWeave);
            var fieldWeaver = new InterceptFieldAccess(fieldFilter);

            var module      = targetAssembly.MainModule;
            var targetTypes = module.Types.Where(hostTypeFilter.ShouldWeave).ToArray();

            foreach (var type in targetTypes)
            {
                typeWeaver.Weave(type);
                foreach (var method in type.Methods.Where(m => m.HasBody))
                {
                    fieldWeaver.Rewrite(method, method.GetILGenerator(), method.Body.Instructions.ToArray());
                }
            }
        }
        public YamlSerializationFormatter(XmlNode configNode, IFieldFilter fieldFilter)
        {
            _fieldFilter = fieldFilter;

            if (configNode == null)
            {
                return;
            }

            var formatters = configNode.ChildNodes;

            foreach (XmlNode formatter in formatters)
            {
                if (formatter.NodeType == XmlNodeType.Element && formatter.Name.Equals("fieldFormatter"))
                {
                    FieldFormatters.Add(Factory.CreateObject <IFieldFormatter>(formatter));
                }
            }
        }
Example #25
0
 /// <summary>
 /// Initializes a new instance of the InterceptFieldAccess class.
 /// </summary>
 /// <param name="filter">The filter that determines which fields should be intercepted.</param>
 public InterceptFieldAccess(IFieldFilter filter)
 {
     _filter = filter;
 }
Example #26
0
 /// <summary>
 /// Initializes a new instance of the InterceptFieldAccess class.
 /// </summary>
 /// <param name="filter">The filter that determines which fields should be intercepted.</param>
 public InterceptFieldAccess(Func <FieldReference, bool> filter)
 {
     _filter = new FieldFilterAdapter(filter);
 }
Example #27
0
 /// <summary>
 /// 指定されたテキストライターとフィールドフィルターを
 /// 使用して CsvWriter オブジェクトを構築します。
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="filter"></param>
 public CsvWriter(TextWriter writer, IFieldFilter filter)
 {
     this.writer_ = writer;
     this.filter_ = filter;
 }
Example #28
0
		public FilteredItem(IItemData innerItem, IFieldFilter fieldFilter) : base(innerItem)
		{
			Assert.ArgumentNotNull(fieldFilter, "fieldFilter");

			_fieldFilter = fieldFilter;
		}
Example #29
0
 public UnicornDeserializer(IDefaultDeserializerLogger logger, IFieldFilter fieldFilter) : base(logger, fieldFilter)
 {
 }
 partial void FieldDefinition_SetCondition(ref IFieldFilter instance, ref IFieldDefinition setValue);
Example #31
0
 partial void Add_PostValidate(IFieldFilterList instance, IFieldFilter filter);
Example #32
0
 public FilteredVersion(IItemVersion innerVersion, IFieldFilter fieldFilter) : base(innerVersion)
 {
     _innerVersion = innerVersion;
     _fieldFilter  = fieldFilter;
 }
 partial void Value_SetCondition(ref IFieldFilter instance, ref Object setValue);
Example #34
0
 /// <summary>
 /// Initializes a new instance of the InterceptFieldAccess class.
 /// </summary>
 /// <param name="filter">The filter that determines which fields should be intercepted.</param>
 public InterceptFieldAccess(IFieldFilter filter)
 {
     _filter = filter;
 }
Example #35
0
 /// <summary>
 /// Initializes a new instance of the InterceptFieldAccess class.
 /// </summary>
 /// <param name="filter">The filter that determines which fields should be intercepted.</param>
 public InterceptFieldAccess(Func<FieldReference, bool> filter)
 {
     _filter = new FieldFilterAdapter(filter);
 }
Example #36
0
 /// <summary>
 /// ストリームとエンコーディング、フィルターを指定して、CsvWriter オブジェクトを作成します。
 /// </summary>
 /// <param name="stream">書き込むターゲットへのストリーム。</param>
 /// <param name="streamEncoding">ストリームのエンコーディング。</param>
 /// <param name="filter">フィールド用のフィルター。</param>
 public CsvWriter(Stream stream, Encoding streamEncoding, IFieldFilter filter)
     : this(new StreamWriter( stream, streamEncoding ), filter)
 {
 }
Example #37
0
 public TestYamlSerializationFormatter(IFieldFilter fieldFilter, params IFieldFormatter[] fieldFormatters) : base(fieldFilter, fieldFormatters)
 {
 }
Example #38
0
 partial void Add_PreCondition(IFieldFilterList instance, ref IFieldFilter filter);
		private IList<string> GetFieldSyncStatus(IItemData itemData, IItemData serializedItemData, IFieldFilter fieldFilter, IItemComparer itemComparer)
		{
			var comparison = itemComparer.Compare(new FilteredItem(itemData, fieldFilter), new FilteredItem(serializedItemData, fieldFilter));

			var db = Factory.GetDatabase(itemData.DatabaseName);

			var changedFields = comparison.ChangedSharedFields
				.Concat(comparison.ChangedVersions.SelectMany(version => version.ChangedFields))
				.Select(field => db.GetItem(new ID((field.SourceField ?? field.TargetField).FieldId)))
				.Where(field => field != null)
				.Select(field => field.DisplayName)
				.ToList();

			if (comparison.IsMoved) changedFields.Add("Item has been moved");
			if (comparison.IsRenamed) changedFields.Add("Item has been renamed");
			if (comparison.IsTemplateChanged) changedFields.Add("Item's template has changed");
			if (comparison.ChangedVersions.Any(version => version.SourceVersion == null || version.TargetVersion == null)) changedFields.Add("Item versions do not match");

			return changedFields;
		}
Example #40
0
 partial void Remove_PostValidate(IFieldFilterList instance, IFieldFilter value);
Example #41
0
 public UnicornDeserializer(IDefaultDeserializerLogger logger, IFieldFilter fieldFilter)
     : base(logger, fieldFilter)
 {
 }
Example #42
0
 partial void Remove_PreCondition(IFieldFilterList instance, ref IFieldFilter value);
Example #43
0
			public FilteredVersion(IItemVersion innerVersion, IFieldFilter fieldFilter) : base(innerVersion)
			{
				_innerVersion = innerVersion;
				_fieldFilter = fieldFilter;
			}
Example #44
0
 // Overload constructor, implemented for keeping compatibility with external tools that may not yet have updated their codebase to support the branchId switch (e.g. SideKick)
 // ReSharper disable once UnusedMember.Global
 public DefaultDeserializer(IDefaultDeserializerLogger logger, IFieldFilter fieldFilter) : this(true, logger, fieldFilter)
 {
 }
        /// <summary>
        /// Adds field interception support to the target type.
        /// </summary>
        /// <param name="targetType">The type that will be modified.</param>
        /// <param name="hostTypeFilter">The filter that determines the host types to be modified.</param>
        /// <param name="fieldFilter">The field filter that determines the fields that will be intercepted.</param>
        public static void InterceptFields(this IReflectionStructureVisitable targetType, ITypeFilter hostTypeFilter,
            IFieldFilter fieldFilter)
        {
            var typeWeaver = new ImplementFieldInterceptionHostWeaver(hostTypeFilter.ShouldWeave);
            var fieldWeaver = new InterceptFieldAccess(fieldFilter);

            targetType.WeaveWith(fieldWeaver, m => true);
            targetType.Accept(typeWeaver);
        }
Example #46
0
 public TestYamlSerializationFormatter(XmlNode configNode, IFieldFilter fieldFilter) : base(configNode, fieldFilter)
 {
 }
Example #47
0
        private IList <string> GetFieldSyncStatus(IItemData itemData, IItemData serializedItemData, IFieldFilter fieldFilter, IItemComparer itemComparer)
        {
            var comparison = itemComparer.Compare(new FilteredItem(itemData, fieldFilter), new FilteredItem(serializedItemData, fieldFilter));

            var db = Factory.GetDatabase(itemData.DatabaseName);

            var changedFields = comparison.ChangedSharedFields
                                .Concat(comparison.ChangedVersions.SelectMany(version => version.ChangedFields))
                                .Select(field => db.GetItem(new ID((field.SourceField ?? field.TargetField).FieldId)))
                                .Where(field => field != null)
                                .Select(field => field.DisplayName)
                                .ToList();

            if (comparison.IsMoved)
            {
                changedFields.Add("Item has been moved");
            }
            if (comparison.IsRenamed)
            {
                changedFields.Add("Item has been renamed");
            }
            if (comparison.IsTemplateChanged)
            {
                changedFields.Add("Item's template has changed");
            }
            if (comparison.ChangedVersions.Any(version => version.SourceVersion == null || version.TargetVersion == null))
            {
                changedFields.Add("Item versions do not match");
            }

            return(changedFields);
        }
Example #48
0
 /// <summary>
 /// 書きだすファイルパスとフィルターを指定して CsvWriter オブジェクトを作成します。
 /// </summary>
 /// <param name="path">書きだすファイルのパス。</param>
 /// <param name="filter"></param>
 public CsvWriter(string path, IFieldFilter filter)
     : this(path, Encoding.Default, filter)
 {
 }