Comments (4)
According to SharpLab, it compiles to smth like this:
[CompilerGenerated]
internal unsafe static Func<object> <<Main>$>g__Del4|0_3(object o)
{
return new Func<object>(o, (nint)(delegate*<object, object>)(&Helper.This));
}
But I cannot write such code manually, I can't even find Func constructor with two parameters.
from mobileblazorbindings.
Tricky thing here is that delegates, created for the same object, should be considered equal.
That is possible with regular static method, but requires using reflection and is much slower (probably neglectable for our needs, but anyway):
from mobileblazorbindings.
Interesting, that is definitely something to consider. I wonder if there's some clever syntax to avoid reflection and have the compiler provide the delegate with the right identity? It's just so unusual for extension methods to provide any concrete benefit aside from the compiler syntax sugar!
from mobileblazorbindings.
Anyway, this is hardly a big matter, I just don't like extension methods on object 😁
from mobileblazorbindings.
Related Issues (20)
- debug windows app that has a blazorwebview HOT 1
- Renderer was called before InitAsync
- IJSRuntime : {System.NullReferenceException: Object reference not set to an instance of an object. in DelegatingHandler HOT 2
- Does blazor hybrid work on iOS? HOT 5
- Is this project is dead ? HOT 1
- this project are discontinued? HOT 2
- True Fullscreen on blazor windows HOT 4
- How to change WebView EBWebView folder path? HOT 2
- OnParametersSet is not invoked on Shell navigation
- Allow text content for Label control
- Allow passing additional parameters during Shell navigation
- Blazor WebView freeze after maximizing WPF Windows App
- Update Picker.ItemDisplayBinding to be Func instead of string
- Unable to load image from URL HOT 1
- WFP blazor Support MVVM in future release? HOT 4
- When will this project continue? HOT 3
- Window size
- NavigationManager does not work anymore on Hybrid Apps HOT 2
- VS 2022 Community is forever Installing SDK Components and never completes. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobileblazorbindings.