Kind: Service
Source: Pams/Logic/Pams.CurrencyConverter/Pams.CurrencyConverter.csproj (line 1)
Part of: Pams
NuGet package dependency
System.Xml.Linq is a NuGet package dependency declared by the Pams.CurrencyConverter project. It contains LINQ-to-XML types that currency-converter code can use to read, query, and write XML data; callers interact with the converter service rather than this package directly.
Diagram
mermaidsequenceDiagram participant Client participant Converter as Pams.CurrencyConverter participant Xml as System.Xml.Linq Client->>Converter: Send currency conversion request Converter->>Xml: Load and query XML data Xml-->>Converter: Return XML elements and values Converter-->>Client: Return conversion result
Usage
tstype ConversionResult = {
from: string;
to: string;
amount: number;
convertedAmount: number;
};
async function convertCurrency(
from: string,
to: string,
amount: number,
): Promise<ConversionResult> {
const response = await fetch("/api/currency-converter/convert", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ from, to, amount }),
});
if (!response.ok) {
throw new Error("Currency conversion request failed");
}
return response.json();
}
const result = await convertCurrency("USD", "EUR", 100);
console.log(result.convertedAmount);
AI Coding Instructions
- Keep
System.Xml.Linqreferenced through thePams.CurrencyConverter.csprojproject dependency. - Use LINQ-to-XML types such as
XDocumentandXElementinside the .NET converter implementation, not in TypeScript clients. - Do not expose XML document types through service contracts; return DTOs or JSON responses to callers.
- Validate XML structure and missing element values before using them for currency conversion logic.
- Preserve the existing project-file package format when editing this legacy-format dependency.
Used by
6 references from 6 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Injected or called by (6)
Pams.Core—Pams/Core/Pams.Core/Pams.Core.csproj:1Pams.Security—Pams/Core/Pams.Security/Pams.Security.csproj:1Pams.Data—Pams/Data/Pams.Data/Pams.Data.csproj:1HelperTool—Pams/HelperTool/HelperTool.csproj:1Pams.Business—Pams/Logic/Pams.Business/Pams.Business.csproj:1Pams.CurrencyConverter—Pams/Logic/Pams.CurrencyConverter/Pams.CurrencyConverter.csproj:1
Was this page helpful?