--- lang: ja-jp breaks: true --- # C# 指定したインターフェイスを実装するクラスを動的に生成する。 2021-10-28 > ILを使った動的なコード生成入門(高速リフレクション-インスタンス生成編) > https://qiita.com/yamaokunousausa/items/4061ed39ae9629823e7f > https://github.com/usausa/Example-Net-Misc/tree/master/EmitExample > 動的なILの生成と編集 > https://www.slideshare.net/terurou/il-24446284 > https://image.slidesharecdn.com/il-130720041732-phpapp01/95/il-23-638.jpg?cb=1374294766  > DapperLib/Dapper.Contrib > Dapper.Contrib/src/Dapper.Contrib/SqlMapperExtensions.cs > https://github.com/DapperLib/Dapper.Contrib/blob/d5c8016fed56227c7352fbdaa804be0924433a13/src/Dapper.Contrib/SqlMapperExtensions.cs#L566 > Cysharp/MagicOnion > MagicOnion/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/DynamicClientBuilder.cs > https://github.com/Cysharp/MagicOnion/blob/master/src/MagicOnion.Client/DynamicClientBuilder.cs#L47 > 【C#】System.Reflection.Emitで動的コード生成 初回 > https://qiita.com/Binary_number/items/0988ed5fe1da85d7cfbb ## `LambdaExpression.CompileToMethod`メソッドは、`.NET Core`で利用できない。。 > Alternatives of CompileToMethod in .Net Standard > https://stackoverflow.com/questions/41520319/alternatives-of-compiletomethod-in-net-standard > yantrajs/yantra > https://github.com/yantrajs/yantra > YantraJS.ExpressionCompiler > https://github.com/yantrajs/yantra/wiki/Expression-Compiler `ILGenerator`を使って生成する方法が現実的なようだ。 > Introduction to the pragmatic IL via C# > https://neue.cc/2017/12/04_560.html ###### tags: `C#` `インターフェイス` `動的に生成` `ILGenerator`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up