code-generation Questions
3
Solved
I'm trying to write an annotation processor to insert methods and fields on a class... and the documentation is so sparse. I'm not getting far and I don't know if I'm approaching it correctly.
The...
Monofilament asked 3/12, 2012 at 19:28
1
Solved
I want my page classes inherit from the following base class:
public abstract class BaseContentPage<T> : ContentPage where T : BaseViewModel
{
public BaseContentPage(T viewModel, string page...
Candlepower asked 6/10, 2021 at 15:13
3
Solved
I am writing python script which is generating C++ code based on the data.
I have python variable string which contains a string which can be composed
of characters like " or newlines.
What is ...
Apostolic asked 18/2, 2013 at 20:53
2
Solved
I'm trying to use //go:generate to run an external tool before compiling my code, and as I need to pass a certain number of parameters, the line becomes rather long.
It seems that there is no way ...
Yazzie asked 9/4, 2019 at 18:18
1
Solved
I am trying to move a lot of my runtime reflection stuff to AOT with the new Source Generators, however I am facing a few issues.
Let me first talk through the requirements I have.
The code of the...
Redundant asked 23/10, 2020 at 18:52
4
I'd like to create a setter/getter pair of functions where the names are automatically generated based on a shared component, but I couldn't find any example of macro rules generating a new name.
...
Armor asked 11/12, 2014 at 3:44
0
TL;DR
How to reference custom Roslyn code generators from Unity?
How reliable are local "conventional" projects?
How to reference "conventional" dotnet projects in Unity?
Ca...
Damal asked 1/7, 2021 at 14:48
2
I am working on a project where Java's native serialization is slow, so we want to move to implementing Externalize interface on the classes for superior performance.
However, these classes have ...
Digestive asked 16/8, 2011 at 22:25
1
Solved
I'm attempting to develop a source generator to auto-implement an interface on partial classes with that interface.
I believe this has to be a common use case for Microsoft's new Source Generators,...
Blanketing asked 17/6, 2021 at 13:6
1
I've looked at the rails casts on how to create your own generator and have read a number of stack overflow questions. Basically what I am trying to do is to build a generator like the built-in rai...
Fash asked 16/6, 2015 at 1:37
1
Solved
I'm writing a Roslyn source generator, and as a matter of principle I'd like to make sure the generated source (which is now visible, debuggable, etc) adheres at least somewhat to the user's config...
Family asked 1/5, 2021 at 22:9
2
Solved
I have two Go modules, let's name them example.com/a and example.com/b.
Let this be example.com/a's go.mod:
module example.com/a
go 1.12
require (
example.com/b v0.4.2
)
In example.com/b's root...
Thorfinn asked 22/4, 2021 at 10:56
2
Solved
I have an OpenAPI 3.0 schema YAML document that defines some API endpoints with all the required parameters and responses.
Now, I'd like to generate some boilerplate server-side code: the control...
Plutocracy asked 5/2, 2018 at 10:57
3
Solved
I'm using protobuf to generate swift classes from protofiles (I've written a script for this purpose). Now I need to add all generated files into target in Xcode project.
How can I do this progra...
Lowgrade asked 3/8, 2017 at 15:3
4
Solved
I'm generating business objects from this schema using Enterprise Architect.
The schema has the following enumeration specification:
<xs:simpleType name="PackageMedium">
<xs:restriction...
Verulamium asked 13/1, 2012 at 14:44
2
There seems to be millions of options out there for every platform, but I'm struggling to find a simple solution for C#. All the ones I have found seem to have given me trouble: either they simply ...
Resistless asked 14/3, 2016 at 11:29
4
Solved
I have a tool which dynamically generates .xaml and .xaml.cs files and puts them in the appropriate Visual Studio directory.
To add them to the project, I have to then:
right-click on that dire...
Philippians asked 16/11, 2009 at 16:57
6
Solved
I am modifying an existing class using internal sun APIs (com.sun.tools.javac) with an annotation processor. I am able to generate and add a MethodDecl to a ClassDecl using the following code:
JCT...
Bronson asked 22/10, 2017 at 12:34
3
Solved
I have a project under CMake with some files generated with python generator from XML files. I cannot specify all files generated by this generator in CMakeLists.txt so I use file globbing for this...
Strephon asked 16/6, 2014 at 14:30
2
Solved
Is there any way to omit the redundant public modifier from types and properties generated via
KotlinPoet's TypeSpec.Builder and PropertySpec.Builder respectively?
Fransis asked 19/11, 2020 at 15:18
1
Solved
I'm trying to write a build.rs script that creates an up-to-date HashMap that maps the first 6 characters of a MAC address with its corresponding vendor.
It has 29231 key-value pairs which causes c...
Micra asked 11/1, 2021 at 16:44
3
Solved
I am using Asp.net core and I have scaffolded all the identity pages, it created a folder in my root directory named areas > Identity > Pages, and I have all the razor pages here and some pages in ...
Flagpole asked 19/10, 2019 at 13:32
11
Solved
I have seen examples like the following:
$data = array(
'username' => $user->getUsername(),
'userpass' => $user->getPassword(),
'email' => $user->getEmail(),
);
However, in ...
Eakins asked 13/5, 2010 at 19:13
4
Solved
I'm new to annotation processing and code generation. I want to find out how can I perform such operation like appending new method to existing class. Here is an example of what I want to do:
Assu...
Axle asked 10/5, 2018 at 13:20
5
Solved
I have plenty of java domain objects that I need to transform to DTOs.
Please, don't start with the anti-pattern thing, the Domain Objects are what they are because of a long history, and I ...
Hackworth asked 13/5, 2010 at 16:13
© 2022 - 2024 — McMap. All rights reserved.