public int CompareTo(SCIMRepresentationAttribute other) { switch (SchemaAttribute.Type) { case SCIMSchemaAttributeTypes.BINARY: return(ValueBinary.CompareTo(other.ValueBinary)); case SCIMSchemaAttributeTypes.DATETIME: if (ValueDateTime == null) { return(-1); } if (other.ValueDateTime == null) { return(1); } return(ValueDateTime.Value.CompareTo(other.ValueDateTime.Value)); case SCIMSchemaAttributeTypes.DECIMAL: if (ValueDecimal == null) { return(-1); } if (other.ValueDecimal == null) { return(1); } return(ValueDecimal.Value.CompareTo(other.ValueDecimal.Value)); case SCIMSchemaAttributeTypes.INTEGER: if (ValueInteger == null) { return(-1); } if (other.ValueInteger == null) { return(1); } return(ValueInteger.Value.CompareTo(other.ValueInteger.Value)); case SCIMSchemaAttributeTypes.REFERENCE: return(ValueReference.CompareTo(other.ValueReference)); case SCIMSchemaAttributeTypes.STRING: return(ValueString.CompareTo(other.ValueString)); } return(0); }
public override int CompareTo(DataType other) { Guard.AgainstNull(other, nameof(other)); return(ValueString.CompareTo(other.ValueString)); }