internal string GetParameterWithMarkerOccurance(string token, TextObject parent) { int length = token.IndexOf('!'); if (length == -1) { return(""); } string rawValue = token.Substring(0, length); string searchedIdentifier = token.Substring(length + 2, token.Length - length - 2); TextObject paramWithoutEvaluate = this.GetFunctionParamWithoutEvaluate(rawValue); TextObject to; return((parent?.Attributes != null && parent.TryGetAttributesValue(paramWithoutEvaluate.ToString(), out to) || this._variables.TryGetValue(paramWithoutEvaluate.ToString(), out to)) && to.Length > 0 ? this.CountMarkerOccurancesInString(searchedIdentifier, MBTextManager.ProcessWithoutLanguageProcessor(to)).ToString() : ""); }