Example #1
0
 public virtual void Visit(NestedClassValueType nestedClassValueType)
 {
 }
 public override void Visit(NestedClassValueType nestedClassValueType)
 {
     this.value = new EntityToDocumentMapper(this.mongoSession)
         .CreateDocument(nestedClassValueType.NestedClassMap, this.value);
 }
        public override void Visit(NestedClassValueType nestedClassValueType)
        {
            if (this.value == null)
                this.value = MongoDBNull.Value;

            var oldEntity = this.entity;
            var oldDocument = this.document;

            this.entity = this.value;
            this.document = new Document();

            var concreteClassMap = nestedClassValueType.NestedClassMap.GetClassMapFor(this.entity.GetType());
            concreteClassMap.Accept(this);

            this.value = this.document;
            this.entity = oldEntity;
            this.document = oldDocument;
        }