protected virtual void ConfigureProperty(JsonProperty property, IMemberConfiguration memberConfiguration) { var predicate = memberConfiguration.ShouldSerializePredicate; if (predicate != null) //Can be the function defined in this.CreateProperty (check NHibernate initialized property) or a custom one { if (property.ShouldSerialize != null) { property.ShouldSerialize = instance => property.ShouldSerialize(instance) && predicate(instance); //first check if property is initialized } else { property.ShouldSerialize = predicate; } } var predicate2 = memberConfiguration.ShouldDeserializePredicate; if (predicate2 != null) { if (property.ShouldDeserialize != null) { property.ShouldDeserialize = instance => property.ShouldDeserialize(instance) && predicate2(instance); } else { property.ShouldDeserialize = predicate2; } } property.DefaultValueHandling = memberConfiguration.DefaultValueHandling; property.DefaultValue = memberConfiguration.DefaultValue; if (!string.IsNullOrEmpty(memberConfiguration.SerializedName)) { property.PropertyName = memberConfiguration.SerializedName; } property.Converter = memberConfiguration.Converter; property.Ignored = memberConfiguration.Ignored.HasValue && memberConfiguration.Ignored.Value; property.Writable = memberConfiguration.Writable ?? property.Writable; property.Readable = memberConfiguration.Readable ?? property.Readable; property.ValueProvider = new BreezeValueProvider(property.ValueProvider, memberConfiguration); property.Order = memberConfiguration.Order ?? property.Order; }