I'm trying to document my code in a proper way.
I have a method that can throw a FaultException of a specific type. When I view the documentation for the method it doesn't show the specific type of the FaultException.
///<summary>
/// Description of method
///</summary>
/// <exception cref="FaultException{ValidationFault}">Description here</exception>
OrganizationDto Update(UpdateOrganizationRequest organizationDto);
Documentation shows: FaultException<TDetail>: Description here
I want it to show: FaultException<ValidationFault>:Description here
How can I achieve this?
Here are some noteworthy points with regards to writing generic classes in Java: T is just a name for a type parameter, like a variable name. That means you can use any name you like for the type parameter. However, there are some conventions for naming type parameters in Java: T for type; E for element; K for key; V for value, etc.
The compiler team decided to improve this by allowing an alternate syntax to refer to generic types and methods in doc comments. Specifically, instead of using the open and close angle-brackets it’s legal to use the open and close curly braces. The example above would then become:
For example, if you know that your generic class is intended for use only with reference types, apply the class constraint. That will prevent unintended use of your class with value types, and will enable you to use the as operator on T, and check for null values. Whether to factor generic behavior into base classes and subclasses.
Generics also provide compile-time type safety which allows programmers to catch invalid types at compile time. Generic means parameterized types. Using generics, the idea is to allow any data type to be it Integer, String, or any user-defined Datatype and it is possible to create classes that work with different data types.
I'm working on ReSharper version 8.2.2 and I can see the exception documentation like you wanted.
See screenshot:
On which version are you working on? maybe it is a defect related to this version?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With