Pedro Gil Mora
Pedro Gil Mora
Explore posts from servers
CC#
Created by Pedro Gil Mora on 10/7/2024 in #help
Dictionary vs switch in source generated code
I have doubt. Im generating a compiled communication framework and the "endpoint handler" is a dictionary is int64 key-based with actions processing the context. keyvalue pairs are generated with my source generator. My question is. if I generate the equivalent switch to handle like 150 cases in compile time. would be inefficient?
52 replies
CC#
Created by Pedro Gil Mora on 10/29/2022 in #help
Retrive TypeDeclarationSyntax from a referenced type
Hi everybody I'm writing a source generator and I have a property Type which I want to retrieve its declaration syntax
// ITest.cs
interface ITest {
//⬇️ I want to get [IType] declaration syntax
IType Property {get;}
}
// ITest.cs
interface ITest {
//⬇️ I want to get [IType] declaration syntax
IType Property {get;}
}
1 replies