public void Apply(BsonMemberMap memberMap) { if (typeof(T) == memberMap.ClassMap.ClassType) { memberMap.SetIgnoreIfDefault(true); } }
// public methods /// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetDefaultValue(_defaultValue); if (_serializeDefaultValueWasSet) { memberMap.SetIgnoreIfNull(false); memberMap.SetIgnoreIfDefault(!_serializeDefaultValue); } }
// public methods /// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetDefaultValue(_defaultValue); if (_serializeDefaultValueWasSet) { memberMap.SetIgnoreIfNull(false); memberMap.SetIgnoreIfDefault(!_serializeDefaultValue); } }
public void Apply(BsonMemberMap memberMap) { var value = _convention.SerializeDefaultValue(memberMap.MemberInfo); memberMap.SetIgnoreIfDefault(value); }
public void Apply(BsonMemberMap mm) { mm.SetIgnoreIfDefault(true); }
// public methods /// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetIgnoreIfNull(false); memberMap.SetIgnoreIfDefault(_value); }
// public methods /// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetIgnoreIfNull(false); memberMap.SetIgnoreIfDefault(_value); }
/// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetIgnoreIfDefault(_ignoreIfDefault); }
/// <summary> /// Applies a modification to the member map. /// </summary> /// <param name="memberMap">The member map.</param> public void Apply(BsonMemberMap memberMap) { memberMap.SetIgnoreIfDefault(_ignoreIfDefault); }
public void Apply(BsonMemberMap memberMap) { var value = _convention.SerializeDefaultValue(memberMap.MemberInfo); memberMap.SetIgnoreIfDefault(value); }