/// <summary> /// Parse space sortBy type. /// </summary> /// <param name="name">Name of the spaceSortBy type.</param> /// <returns><see cref="SpaceSortBy"/> for the name.</returns> public static SpaceSortBy Parse(string name) { SpaceSortBy spaceSortBy = null; if (name == null || !SPACE_SORT_BY_TYPES.TryGetValue(name, out spaceSortBy)) { spaceSortBy = new SpaceSortBy(name); } return(spaceSortBy); }
/// <summary> /// Determines whether this instance and another specified <see cref="SpaceSortBy"/> object have the same value. /// </summary> /// <param name="value">The space type to compare to this instance.</param> /// <returns>true if the value of the parameter is the same as the value of this instance; otherwise, false. If value is null, the method returns false.</returns> public bool Equals(SpaceSortBy value) { if (Object.ReferenceEquals(value, null)) { return(false); } if (Object.ReferenceEquals(this, value)) { return(true); } return(this.Name == value.Name); }