ClientCitation Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ClientCitation() |
Initializes a new instance of the ClientCitation class with default values. |
| ClientCitation(Int32, String, String, String, IList<String>, String, Nullable<ClientCitationsIconNameEnum>, Boolean) |
Initializes a new instance of the ClientCitation class with the specified citation details. |
ClientCitation()
Initializes a new instance of the ClientCitation class with default values.
public ClientCitation();
Public Sub New ()
Applies to
ClientCitation(Int32, String, String, String, IList<String>, String, Nullable<ClientCitationsIconNameEnum>, Boolean)
Initializes a new instance of the ClientCitation class with the specified citation details.
public ClientCitation(int position, string title, string abstractText, string text, System.Collections.Generic.IList<string>? keywords, string? citationLink, Microsoft.Agents.Core.Models.ClientCitationsIconNameEnum? imageName, bool useDefaultAdaptiveCard = true);
new Microsoft.Agents.Core.Models.ClientCitation : int * string * string * string * System.Collections.Generic.IList<string> * string * Nullable<Microsoft.Agents.Core.Models.ClientCitationsIconNameEnum> * bool -> Microsoft.Agents.Core.Models.ClientCitation
Public Sub New (position As Integer, title As String, abstractText As String, text As String, keywords As IList(Of String), citationLink As String, imageName As Nullable(Of ClientCitationsIconNameEnum), Optional useDefaultAdaptiveCard As Boolean = true)
Parameters
- position
- Int32
The position number of the citation, used for referencing in text (e.g., [1], [2]).
- title
- String
The title/name of the citation document. Will be trimmed to 80 characters if longer. Can be automatically wrapped in an Adaptive Card format.
- abstractText
- String
Extract of the referenced content. Will be trimmed to 160 characters if longer.
- text
- String
The detailed citation appearance text content.
Optional keywords associated with the citation for categorization and search.
- citationLink
- String
The URL of the source document. This will make the citation clickable and direct users to the specified URL. Invalid URLs will be ignored.
- imageName
- Nullable<ClientCitationsIconNameEnum>
Optional icon name to display with the citation. Will create an AppearanceImage if provided.
- useDefaultAdaptiveCard
- Boolean
If true and title is provided, wraps the title in a default Adaptive Card JSON format. Default is true.
Remarks
This constructor creates a complete citation with appearance information. It performs several validations and transformations:
- Title is trimmed to 80 characters maximum to comply with citation display requirements
- Title can be automatically wrapped in Adaptive Card JSON format for rich display
- URL validation is performed, and invalid URLs are ignored with warning traces
- Abstract text is trimmed to 160 characters maximum for proper display sizing
- Warning traces are logged when content is trimmed or URLs are invalid
- The Position property is automatically set from the position parameter
- A ClientCitationAppearance object is automatically created and populated