public override void Visit(ValueTypeMemberMap memberMap)
 {
     var oldValue = this.value;
     this.value = memberMap.MemberGetter(this.entity);
     base.Visit(memberMap);
     if(this.value != MongoDBNull.Value || memberMap.PersistNull)
         this.document[memberMap.Key] = this.value;
     this.value = oldValue;
 }
Example #2
0
        public override void Visit(ValueTypeMemberMap memberMap)
        {
            if (memberMap.ValueType is NestedClassValueType)
            {
                var vt = (NestedClassValueType)memberMap.ValueType;
                var oldEntity = currentEntity;
                var oldClassMap = currentClassMap;
                currentEntity = memberMap.MemberGetter(this.currentEntity);
                currentClassMap = vt.NestedClassMap;

                this.Visit(currentClassMap);

                this.currentEntity = oldEntity;
                this.currentClassMap = oldClassMap;
            }
        }
Example #3
0
 public virtual void Visit(ValueTypeMemberMap memberMap)
 {
 }