Use fully qualified names to reduce namespace clashes. (#68)

* Use fully qualified names to reduce namespace clashes.

* Small code style fixes.

* Make properties in ProxyData immutable.

* Remove clutter by joining TrimEnd() to previous line.

* Introduce Extension method to retrieve ITypeSymbol FullyQualifiedDisplayString

* Fixed some code issues.

* Fixed method call in BaseGenerator

* Refactor metadata name
This commit is contained in:
David
2024-04-28 10:25:50 +02:00
committed by GitHub
parent 68864378d0
commit 39d85588e6
56 changed files with 1123 additions and 1146 deletions
@@ -12,7 +12,7 @@ internal partial class ProxyClassesGenerator
foreach (var replacedType in Context.ReplacedTypes)
{
TryFindProxyDataByTypeName(replacedType.Key, out var fullTypeName);
var classNameProxy = $"{fullTypeName!.Namespace}.{fullTypeName.ShortTypeName}Proxy";
var classNameProxy = $"global::{fullTypeName!.NamespaceDot}{fullTypeName!.ShortMetadataName}Proxy";
var instance = $"instance{(replacedType.Key + replacedType.Value).GetDeterministicHashCodeAsString()}";
var proxy = $"proxy{(replacedType.Value + replacedType.Key).GetDeterministicHashCodeAsString()}";