Thinktecture.Tools.Web.Services.CodeGeneration.CodeDomExtensions.FindArgument C# (CSharp) Method

FindArgument() public static method

Finds an argument in an attribute declaration.
The argument name is case-sensitive.
public static FindArgument ( this attributeDeclaration, string argumentName ) : CodeAttributeArgument
attributeDeclaration this The attribute declaration.
argumentName string Name of the argument.
return System.CodeDom.CodeAttributeArgument
        public static CodeAttributeArgument FindArgument(this CodeAttributeDeclaration attributeDeclaration, string argumentName)
        {
            return attributeDeclaration.Arguments
                .OfType<CodeAttributeArgument>()
                .FirstOrDefault(a => a.Name == argumentName);
        }