Ejemplo n.º 1
0
        /// <overloads>
        /// Applies a filter to the child element of this entity given it's name.
        /// </overloads>
        /// <summary>
        /// Applies a filter to the child element of this entity given it's name.
        /// </summary>
        /// <param name="name">The filter's name</param>
        /// <param name="condition">The condition to apply</param>
        public ManyToManyPart <TChild> ApplyChildFilter(string name, string condition)
        {
            var part = new FilterPart(name, condition);

            childFilters.Add(part);
            return(this);
        }
Ejemplo n.º 2
0
        /// <overloads>
        /// Applies a named filter to the child element of this many-to-many.
        /// </overloads>
        /// <summary>
        /// Applies a named filter to the child element of this many-to-many.
        /// </summary>
        /// <param name="condition">The condition to apply</param>
        /// <typeparam name="TFilter">
        /// The type of a <see cref="FilterDefinition"/> implementation
        /// defining the filter to apply.
        /// </typeparam>
        public ManyToManyPart <TChild> ApplyChildFilter <TFilter>(string condition) where TFilter : FilterDefinition, new()
        {
            var part = new FilterPart(new TFilter().Name, condition);

            childFilters.Add(part);
            return(this);
        }
Ejemplo n.º 3
0
        /// <overloads>
        /// Applies a filter to this entity given it's name.
        /// </overloads>
        /// <summary>
        /// Applies a filter to this entity given it's name.
        /// </summary>
        /// <param name="name">The filter's name</param>
        /// <param name="condition">The condition to apply</param>
        public ClassMap <T> ApplyFilter(string name, string condition)
        {
            var part = new FilterPart(name, condition);

            filters.Add(part);
            return(this);
        }
Ejemplo n.º 4
0
        /// <overloads>
        /// Applies a filter to this entity given it's name.
        /// </overloads>
        /// <summary>
        /// Applies a filter to this entity given it's name.
        /// </summary>
        /// <param name="name">The filter's name</param>
        /// <param name="condition">The condition to apply</param>
        public T ApplyFilter(string name, string condition)
        {
            var part = new FilterPart(name, condition);

            filters.Add(part);
            return((T)this);
        }
Ejemplo n.º 5
0
        /// <overloads>
        /// Applies a named filter to this one-to-many.
        /// </overloads>
        /// <summary>
        /// Applies a named filter to this one-to-many.
        /// </summary>
        /// <param name="condition">The condition to apply</param>
        /// <typeparam name="TFilter">
        /// The type of a <see cref="FilterDefinition"/> implementation
        /// defining the filter to apply.
        /// </typeparam>
        public T ApplyFilter <TFilter>(string condition) where TFilter : FilterDefinition, new()
        {
            var part = new FilterPart(new TFilter().Name, condition);

            Filters.Add(part);
            return((T)this);
        }
Ejemplo n.º 6
0
 public bool Equals(FilterPart other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.filterName, filterName) && Equals(other.condition, condition) && Equals(other.attributes, attributes));
 }
Ejemplo n.º 7
0
 public bool Equals(FilterPart other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.filterName, filterName) && Equals(other.condition, condition) && Equals(other.attributes, attributes);
 }