FundamentalPlayground/CodeLibrary/CodeInfo.cs
/// <summary>
/// Get the message that is associated with the return value.
/// </summary>
/// <param name="languageCode">Code of the language.</param>
/// <returns>The message.</returns>
Get the message that is associated with the return value.
Get the message that is associated with the return value .
public string GetReturnMessage(string languageCode)
        {
            var attributes = (OutputMessageAttribute[])Attribute.GetCustomAttributes(method, typeof(OutputMessageAttribute));
            if (attributes.Length == 0)
                return string.Empty;
            string message = string.Empty;
            foreach (var attribute in attributes)
            {
                if (attribute.LanguageCode != languageCode)
                    continue;
                message = attribute.Message;
                break;
            }
            return message;
        }
public string GetReturnMessage ( string languageCode ) { var attributes = ( OutputMessageAttribute [ ] ) Attribute . GetCustomAttributes ( method , typeof ( OutputMessageAttribute ) ) ; if ( attributes . Length == 0 ) return string . Empty ; string message = string . Empty ; foreach ( var attribute in attributes ) { if ( attribute . LanguageCode != languageCode ) continue ; message = attribute . Message ; break ; } return message ; }
Get the message that is associated with the return value.
Get the message that is associated with the return value .
// Get the output message attributes
None
languageCode
string
Code of the language.
Code of the language .