示例#1
0
        protected virtual void Visit(PropertyMapping propertyMapping)
        {
            // this is a switching node, so no object header and footer will be add for this node,
            // also this Visit won't add the object to the seen list

            if (propertyMapping.GetType()
                == typeof(ComplexPropertyMapping))
            {
                Visit((ComplexPropertyMapping)propertyMapping);
            }
            else if (propertyMapping.GetType()
                     == typeof(ConditionPropertyMapping))
            {
                Visit((ConditionPropertyMapping)propertyMapping);
            }
            else if (propertyMapping.GetType()
                     == typeof(ScalarPropertyMapping))
            {
                Visit((ScalarPropertyMapping)propertyMapping);
            }
            else
            {
                Debug.Fail(
                    String.Format(
                        CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", propertyMapping.GetType()));
            }
        }
示例#2
0
 protected virtual void Visit(PropertyMapping propertyMapping)
 {
     if (propertyMapping.GetType() == typeof(ComplexPropertyMapping))
     {
         this.Visit((ComplexPropertyMapping)propertyMapping);
     }
     else if (propertyMapping.GetType() == typeof(ConditionPropertyMapping))
     {
         this.Visit((ConditionPropertyMapping)propertyMapping);
     }
     else
     {
         if (!(propertyMapping.GetType() == typeof(ScalarPropertyMapping)))
         {
             return;
         }
         this.Visit((ScalarPropertyMapping)propertyMapping);
     }
 }