orlac
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
MS has tons of examples, somehow none of which truly show me how to approach some of this stuff. Just bits and pieces from their examples have slowly guided me towards something that's starting to work when it comes to the VS side of things. Once that's out of the way I should be able to actually sit down and mess around with the language a lot more since I can just implement the inner workings of it all and not have to worry about the scattered docs / examples they have for the SDKs.
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
yeah, i know what you mean. this type of thing has been my entire experience with these SDKs so far haha. I ended up needing one library to run the out of process parts of the extension, then had to link (or whatever it'd be called in C# - "referenced" maybe haha) that to another library that runs the other parts of the extension in the same process as VS2022... plus need to wrangle the C++ LSP to get selected symbol information, needed to get a WebView2 working in this weird mixed environment of SDKs, etc etc. The stuff I thought would take the least amount of time have taken over the past few weekends for me haha. At least when this is done a somewhat comprehensive example will be out there for people to use as a reference.
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
if that doesn't end up working i may actually mess around with the stuff that article goes over. it doesn't seem to bad. C# as a language is quite nice to mess with whenever i'm not trying to fight my way through the SDKs i need to use and actually get to implement stuff. I think it's the first language I've tried in the past decade that actually has a decent approach to parsing XML
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
the one used in this project is whatever this is:
https://github.com/vorlac/cppreference-docs-vs-extension/blob/main/CppReferenceDocsExtension/CppReferenceDocsExtension.csproj#L139-L142
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
^ that gets generated from this file:
https://github.com/vorlac/cppreference-docs-vs-extension/blob/main/CppReferenceDocsExtension/Resources/VSPackage.resx
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
you're talking about code gen like this file, right?... or did you mean something else entirely? https://github.com/vorlac/cppreference-docs-vs-extension/blob/main/CppReferenceDocsExtension/Resources/VSPackage.Designer.cs
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
although, now that I think about it, i think some of the resource files worked into the VS SDKs will handle source generation for strings (mostly for localization)... but i'll have to see if these end up working out OK using one of those resource files.
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
yeah if it's something where people with actual C# experience would consider a pain, it definitely isn't needed for this project then haha. i'm dealing with enough pain trying to work with the collection of Visual Studio SDKs.... they seem to be in a state where they're in the middle of migrating from a few older SDKs into a newer model. Somehow I think i ended up where i need to use both the old and new SDK for what i'm trying to build.
50 replies
Pattern matching `Type` in a way that can be assigned to a `const` variable... is it possible?
i'm a c++ programmer so i'm very out of my element with this stuff lol. i'm guessing anything in the
Reflection
library also won't be compile time, assuming that's actually what const
boils down to in C#... do i have that part right at least?50 replies