private bool IsMatch(object dependentValue) { if (dependentValue != null && dependentValue is string) { dependentValue = (dependentValue as string).Trim(); } // compare the value against the target value if ((dependentValue == null && WhenValue == null) || (dependentValue != null && (WhenValue.Equals("*") || dependentValue.Equals(WhenValue)))) { // match return(true); } return(false); }
public bool Equals(ContentTypeDefaultValue input) { if (input == null) { return(false); } return (( WhenClause == input.WhenClause || (WhenClause != null && WhenClause.Equals(input.WhenClause)) ) && ( WhenValue == input.WhenValue || (WhenValue != null && WhenValue.Equals(input.WhenValue)) ) && ( DefaultValue == input.DefaultValue || (DefaultValue != null && DefaultValue.Equals(input.DefaultValue)) )); }