示例#1
0
        /// <summary>
        /// Copy the entity if it matches the filter
        /// </summary>
        /// <param name="filter"></param>
        /// <typeparam name="T"></typeparam>
        protected void Copy <T>(TranslateEntityFilter <T, TSchema> filter)
            where T : TSchema
        {
            var specification = new CopyEntityTranslatorSpecification <T, TSchema>(filter);

            _specification.Add(specification);
        }
示例#2
0
        /// <summary>
        /// Exclude entities of the specified entity type that match the provided filter.
        /// </summary>
        /// <param name="filter"></param>
        /// <typeparam name="T"></typeparam>
        protected void Exclude <T>(TranslateEntityFilter <T, TSchema> filter)
            where T : TSchema
        {
            var specification = new ExcludeEntityTranslateSpecification <T, TSchema>(filter);

            _specification.Add(specification);
        }
示例#3
0
        public CopyEntityTranslator(TranslateEntityFilter <TEntity, TSchema> filter = null)
        {
            _filter = filter;

            _observers = new TranslatorObservable <TSchema>();
        }
示例#4
0
 public ExcludeEntityTranslatorSpecification(TranslateEntityFilter <TEntity, TSchema> filter = null)
 {
     _filter = filter;
 }
示例#5
0
 public CopyEntityTranslateSpecification(TranslateEntityFilter <TEntity, TSchema> filter = null)
 {
     _filter = filter;
 }