public void AddNullabilityCondition(NotNullConditionConfiguration notNullConditionConfiguration) { DebugCheck.NotNull(notNullConditionConfiguration); if (!NullabilityConditions.Contains(notNullConditionConfiguration)) { NullabilityConditions.Add(notNullConditionConfiguration); } }
public void AddNullabilityCondition( NotNullConditionConfiguration notNullConditionConfiguration) { if (this.NullabilityConditions.Contains(notNullConditionConfiguration)) { return; } this.NullabilityConditions.Add(notNullConditionConfiguration); }
public void Cloning_a_null_condition_clones_its_property_info() { var entityConfiguration = new EntityMappingConfiguration(); var configuration = new NotNullConditionConfiguration( entityConfiguration, new PropertyPath(new MockPropertyInfo(typeof(int), "P"))); var clone = configuration.Clone(entityConfiguration); Assert.Equal("P", clone.PropertyPath[0].Name); }
public void AddNullabilityCondition(NotNullConditionConfiguration notNullConditionConfiguration) { Contract.Requires(notNullConditionConfiguration != null); if (!NullabilityConditions.Contains(notNullConditionConfiguration)) { NullabilityConditions.Add(notNullConditionConfiguration); } }