/// <summary> /// Determines whether a left-hand-side associative XML object is equal to any right-hand-side object using value semantics (instead of reference semantics). /// </summary> /// <param name="leftAssociativeXmlObject"> The left-hand-side associative XML object to test. </param> /// <param name="rightObject"> The right-hand-side object to test. </param> /// <returns> A value indicating whether the two objects equate using value semantics. </returns> public static bool CommonEquals(IAssociativeXmlObject leftAssociativeXmlObject, object rightObject) { object thisValue, thatValue; PropertyConstruct propertyConstruct; if ((object)leftAssociativeXmlObject == null) { throw new ArgumentNullException(nameof(leftAssociativeXmlObject)); } thisValue = leftAssociativeXmlObject.GetAssociativeObjectValue(NullTemplatingContext.Instance); if ((object)rightObject == null) { return((object)thisValue == null); } if ((propertyConstruct = rightObject as PropertyConstruct) != null) { thatValue = propertyConstruct.GetAssociativeObjectValue(NullTemplatingContext.Instance); } else { thatValue = rightObject; } return(SolderFascadeAccessor.DataTypeFascade.ObjectsEqualValueSemantics(thisValue, thatValue)); }
/// <summary> /// Gets a string representation for an associative XML object value. /// </summary> /// <param name="associativeXmlObject"> The associative XML object used to get a string representation. </param> /// <returns> The string representation of the associative XML object's value. </returns> public static string CommonToString(IAssociativeXmlObject associativeXmlObject) { object value; if ((object)associativeXmlObject == null) { throw new ArgumentNullException(nameof(associativeXmlObject)); } value = associativeXmlObject.GetAssociativeObjectValue(NullTemplatingContext.Instance); if ((object)value == null) { return(null); } return(value.SafeToString()); }
/// <summary> /// Gets a string represnetation for an associative XML object value. /// </summary> /// <param name="associativeXmlObject"> The associative XML object used to get a string representation. </param> /// <returns> The string representation of the associative XML object's value. </returns> public static string CommonToString(IAssociativeXmlObject associativeXmlObject) { object value; if ((object)associativeXmlObject == null) throw new ArgumentNullException("associativeXmlObject"); value = associativeXmlObject.GetAssociativeObjectValue(); if ((object)value == null) return null; return value.SafeToString(); }
/// <summary> /// Determines the hash code for an associative XML object. /// </summary> /// <param name="associativeXmlObject"> The associative XML object used to get a hash code. </param> /// <returns> The hash code of the associative XML object's value. </returns> public static int CommonGetHashCode(IAssociativeXmlObject associativeXmlObject) { object value; if ((object)associativeXmlObject == null) throw new ArgumentNullException("associativeXmlObject"); value = associativeXmlObject.GetAssociativeObjectValue(); if ((object)value == null) return 0; return value.GetHashCode(); }
/// <summary> /// Determines whether a left-hand-side associative XML object is equal to any right-hand-side object using value semantics (instead of reference semantics). /// </summary> /// <param name="leftAssociativeXmlObject"> The left-hand-side associative XML object to test. </param> /// <param name="rightObject"> The right-hand-side object to test. </param> /// <returns> A value indicating whether the two objects equate using value semantics. </returns> public static bool CommonEquals(IAssociativeXmlObject leftAssociativeXmlObject, object rightObject) { object thisValue, thatValue; PropertyConstruct propertyConstruct; if ((object)leftAssociativeXmlObject == null) throw new ArgumentNullException("leftAssociativeXmlObject"); thisValue = leftAssociativeXmlObject.GetAssociativeObjectValue(); if ((object)rightObject == null) return (object)thisValue == null; if ((propertyConstruct = rightObject as PropertyConstruct) != null) thatValue = propertyConstruct.GetAssociativeObjectValue(); else thatValue = rightObject; return DataType.ObjectsEqualValueSemantics(thisValue, thatValue); }
/// <summary> /// Determines whether a left-hand-side associative XML object is equal to any right-hand-side object using value semantics (instead of reference semantics). /// </summary> /// <param name="leftAssociativeXmlObject"> The left-hand-side associative XML object to test. </param> /// <param name="rightObject"> The right-hand-side object to test. </param> /// <returns> A value indicating whether the two objects equate using value semantics. </returns> public static bool CommonEquals(IAssociativeXmlObject leftAssociativeXmlObject, object rightObject) { object thisValue, thatValue; PropertyConstruct propertyConstruct; if ((object)leftAssociativeXmlObject == null) throw new ArgumentNullException(nameof(leftAssociativeXmlObject)); thisValue = leftAssociativeXmlObject.GetAssociativeObjectValue(NullTemplatingContext.Instance); if ((object)rightObject == null) return (object)thisValue == null; if ((propertyConstruct = rightObject as PropertyConstruct) != null) thatValue = propertyConstruct.GetAssociativeObjectValue(NullTemplatingContext.Instance); else thatValue = rightObject; return SolderLegacyInstanceAccessor.DataTypeFascadeLegacyInstance.ObjectsEqualValueSemantics(thisValue, thatValue); }
/// <summary> /// Gets a string representation for an associative XML object value. /// </summary> /// <param name="associativeXmlObject"> The associative XML object used to get a string representation. </param> /// <returns> The string representation of the associative XML object's value. </returns> public static string CommonToString(IAssociativeXmlObject associativeXmlObject) { object value; if ((object)associativeXmlObject == null) throw new ArgumentNullException(nameof(associativeXmlObject)); value = associativeXmlObject.GetAssociativeObjectValue(NullTemplatingContext.Instance); if ((object)value == null) return null; return value.SafeToString(); }
/// <summary> /// Determines the hash code for an associative XML object. /// </summary> /// <param name="associativeXmlObject"> The associative XML object used to get a hash code. </param> /// <returns> The hash code of the associative XML object's value. </returns> public static int CommonGetHashCode(IAssociativeXmlObject associativeXmlObject) { object value; if ((object)associativeXmlObject == null) throw new ArgumentNullException(nameof(associativeXmlObject)); value = associativeXmlObject.GetAssociativeObjectValue(NullTemplatingContext.Instance); if ((object)value == null) return 0; return value.GetHashCode(); }