C#


ROSLYN.USAGE.CA2234 : Pass system uri objects instead of strings (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

A call is made to a method that has a string parameter whose name contains "uri", "URI", "urn", "URN", "url", or "URL". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.

This check corresponds to Roslyn rule CA2234. For full rule details, see the Microsoft website: CA2234.

Properties

Class Name Pass system uri objects instead of strings (C#)
Significance reliability
Mnemonic ROSLYN.USAGE.CA2234
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Pass system uri objects instead of strings (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.