1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2025-02-28 00:46:01 +01:00

Add comments to GetFullMetadataNameForFileName

This commit is contained in:
Sergio Pedri 2021-12-29 18:22:03 +01:00
parent f8dcd09581
commit 53614e7e3c

View File

@ -33,6 +33,10 @@ static StringBuilder BuildFrom(ISymbol? symbol, StringBuilder builder)
};
}
// Build the full metadata name by concatenating the metadata names of all symbols from the input
// one to the outermost namespace, if any. Additionally, the ` and + symbols need to be replaced
// to avoid errors when generating code. This is a known issue with source generators not accepting
// those characters at the moment, see: https://github.com/dotnet/roslyn/issues/58476.
return BuildFrom(symbol, new StringBuilder(256)).ToString().Replace('`', '-').Replace('+', '.');
}