/// <summary> /// Expands a simple string using similar logic to the "concatenated properties" /// functionality in M-Files Admin. /// More lightweight than <see cref="ObjVerEx.ExpandPlaceholderText(string, bool, bool)"/> by only supporting /// simple property expressions (%PROPERTY_123%, %PROPERTY_{Alias}%, %PROPERTY_{Alias1}.PROPERTY_{Alias2}%, %EXTERNALID% and %INTERNALID%). /// </summary> /// <param name="objVerEx">The object containing information to use for the expansion.</param> /// <param name="concatenationString">The string containing the placeholders.</param> /// <returns>The expanded string.</returns> public static string ExpandSimpleConcatenation ( this ObjVerEx objVerEx, string concatenationString ) { // Sanity. if (null == objVerEx) { throw new ArgumentNullException(nameof(objVerEx)); } if (string.IsNullOrWhiteSpace(concatenationString)) { return(string.Empty); } // Use the internal implementation. return(objVerEx.ExpandSimpleConcatenation ( concatenationString, (o, id) => o.GetPropertyText(id), (o, id) => o.GetDirectReference(id), (o, platform) => UrlHelper.GetObjectUrl(o, platform) )); }