/// <summary> /// Handler called when getting the custom Directionality value from a spanning code element. The value /// depends on the hierarchy of the ancestry. /// </summary> /// <param name="element">The element that the property is for.</param> /// <param name="property">The name of the property that is to be returned.</param> /// <returns>The custom value.</returns> private object LanguageInheritanceHandler(XliffElement element, string property) { object result; XliffDocument document; Debug.Assert(property == "Language", "Property name is not supported."); result = null; document = element.FindAncestor<XliffDocument>(); if (document != null) { result = document.SourceLanguage; } return result; }
/// <summary> /// Handler called when getting the custom Directionality value from a spanning code element. The value /// depends on the hierarchy of the ancestry. /// </summary> /// <param name="element">The element that the property is for.</param> /// <param name="property">The name of the property that is to be returned.</param> /// <returns>The custom value.</returns> private object LanguageInheritanceHandler(XliffElement element, string property) { object result; XliffDocument document; Debug.Assert(property == "Language", "Property name is not supported."); result = null; document = element.FindAncestor <XliffDocument>(); if (document != null) { result = document.TargetLanguage; } return(result); }