public bool Equals(FilterDefinitionMapping other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.attributes, attributes) &&
         other.parameters.ContentEquals(parameters);
 }
Ejemplo n.º 2
0
 FilterDefinitionMapping IFilterDefinition.GetFilterMapping()
 {
     var mapping = new FilterDefinitionMapping();
     mapping.Set(x => x.Name, Layer.Defaults, filterName);
     mapping.Set(x => x.Condition, Layer.Defaults, filterCondition);
     foreach (var pair in Parameters)
     {
         mapping.Parameters.Add(pair);
     }
     return mapping;
 }
Ejemplo n.º 3
0
 public FilterDefinitionMapping GetFilterMapping()
 {
     var mapping = new FilterDefinitionMapping();
     mapping.Name = filterName;
     mapping.Condition = filterCondition;
     foreach (var pair in Parameters)
     {
         mapping.Parameters.Add(pair);
     }
     return mapping;
 }
 public bool Equals(FilterDefinitionMapping other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.attributes, attributes) &&
            other.parameters.ContentEquals(parameters));
 }
 public void ShouldWriteTheFilterDefinitions()
 {
     var filterDefinition = new FilterDefinitionMapping();
     filterDefinition.Name = "sid";
     filterDefinition.Parameters.Add("george", NHibernateUtil.Int32);
     XmlFilterDefinitionWriter writer = new XmlFilterDefinitionWriter();
     writer.VerifyXml(filterDefinition)
         .RootElement.HasName("filter-def")
         .HasAttribute("name", "sid")
         .Element("filter-param")
         .HasAttribute("name", "george")
         .HasAttribute("type", "Int32");
 }
 public virtual void ProcessFilterDefinition(FilterDefinitionMapping mapping)
 {
 }
 public virtual void Visit(FilterDefinitionMapping mapping)
 {
 }
Ejemplo n.º 8
0
 public virtual void Visit(FilterDefinitionMapping mapping)
 {
 }
Ejemplo n.º 9
0
 public virtual void ProcessFilterDefinition(FilterDefinitionMapping mapping)
 {
 }
Ejemplo n.º 10
0
 public void AddFilter(FilterDefinitionMapping filterMapping)
 {
     filters.Add(filterMapping);
 }