|
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
3. No sys-admin, networking, "how do I setup XYZ" questions. For those use the SysAdmin[^] or Hardware and Devices[^] forums.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
modified 16-Sep-19 9:31am.
|
|
|
|
|
var meth = binder.BindToMethod(BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Static, binder.GetMethodGroup(
code.Namespaces[1].Types[0],
"Bar",
BindingFlags.NonPublic | BindingFlags.Static),
ref args, null, System.Globalization.CultureInfo.CurrentCulture,null);
Console.WriteLine(CodeDomUtility.ToString(meth));
I implemented reflection binding over CodeDOM objects as though they were real types.
I even support the #)(%*@)#% BindingFlags enumeration
Above is just calling the stupid thing. You should see what the code to make it work looks like.
What it does:
say in your codedom you have
class Foo
{
public int Bar(string foo)
{
Console.WriteLine(foo);
return foo.GetHashCode();
}
public string Bar(int foo)
{
Console.WriteLine(foo);
return foo.ToString();
}
}
Based on a group of methods with the same name, and a set of arguments or types you give it, match the signature to what you passed in, and return the appropriate method that best matches the signature, including doing widening conversions on primitive types, and skipping type checking on null arguments.
This is H-A-R-D
But I did it. Woo. Does it for indexed properties as well.
Gosh I never want to have to implement a binder again.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: var meth = binder
so, you're cooking, erm, coding meth ?
I'd rather be phishing!
|
|
|
|
|
That's not even the worst of them. I've used die as short for delegate-invoke-expression recently. I've used f-c at least once that i can recall, p-s probably dozens more.
edited for forum rules
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I woke up and had an email saying a book I co-authored was FINALLY published after a year delay! (don't worry, we revised it so it's not a year behind)
So that's pretty awesome.
Because it was supposed to be released a year ago I already did a book presentation in January
This afternoon I went for the AZ-301 exam, Azure Architect Design.
I passed, and with my AZ-300 exam that I passed two weeks ago I can now officially call myself an Azure Solutions Architect
Then I got a call from my dad, who got a call from someone he used to work with who thought about me, who got a call from a customer...
Long story short, I'm calling a company tomorrow (who is a former customer from a previous employer) who may or may not need my services, possibly leaving me with a new customer.
Of course it's very premature to say anything about it, but it's nice to know my name is out there and people think about me
So did nothing go wrong today?
Unfortunately, I got wet in the rain and I spent most of my day wearing wet pants, being cold and having a ridiculous hair cut
Ah well, I'm dry and warm now so all's well that ends well
|
|
|
|
|
May I suggest a new name for you here on CodeProject:
Mr.Sunshine

|
|
|
|
|
I thought "sunshine" is a kind of insult on this forum? 
|
|
|
|
|
Not if you are Dutch, words have different meaning for us Dutch (if any at all) 
|
|
|
|
|
Careful what you say about the Dutch. My mother was from Dutch extraction, my father from German. When I tell people that, they are inclined to roll their eyes and respond like: "That explains a lot". I have no idea what that is supposed to mean. 
|
|
|
|
|
That is probably for the best.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Quote: That is probably for the best.
It is not as if I lie awake worrying what it all means! 
|
|
|
|
|
Did some Googling, and it seems to have mostly negative meanings
Well another English lesson learned ...
|
|
|
|
|
Top it off with dinner at Milliways?
It
|
|
|
|
|
Sander Rossel wrote: I'm dry and warm now so all's well that ends well But you still have the ridiculous haircut?
/ravi
|
|
|
|
|
|
I want a collar like that!
/ravi
|
|
|
|
|
|
We are re-writing our Coldfusion intranet site. We are going to use asp.net MVC, but aren't sure weather to use Core or the Standard Framework.
If you were creating a new site today, which would you use?
We are more comfortable with the Standard Framework and are widows shop so cross platform isn't a major concern. The comfort mostly comes from product maturity and easily finding support for issues.
That being said, it sounds like Core is faster and where Microsoft is focusing its development efforts.
|
|
|
|
|
So, according to .NET Standard - Demystifying .NET Core and .NET Standard | Microsoft Docs[^]
The brief summary of the two are:
.NET Core: Used for building cross-platform console apps and ASP.NET Core Web apps and cloud services.
.NET Standard: Used for building libraries that can be referenced from all .NET implementations, such as .NET Framework, .NET Core and Xamarin.
So given that you're writing an ASP.NET application, I'd go for .NET Core, regardless of whether you're wanting to support cross-platform or not, as you're not really writing a library.
Hope that helps!
|
|
|
|
|
|
We're doing something similar - going from ASP.Net Web Forms to MVC5.
Even though our apps will be "on the cloud*, we are sticking with .Net Framework. Web apps don't need to be "cross-platform", IMHO, especially in an all-Windows shop.
Even if we do switch over to core in the future, it should be fairly easy to do - if you believe Microsoft's propaganda...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
When you say "Standard Framework" are you referring to .NET Standard (the common denominator between .NET, .NET Core, Mono and Xamarin) or do you mean "the standard .NET that we've known for nearly two decades"?
If you're talking about .NET Standard, it's not a runtime so you can't write an application in it, only libraries.
In that case you clearly need .NET Core with perhaps .NET Standard libraries.
If you're talking about good old .NET, I'd still recommend .NET Core.
Personally, I've found moving from .NET to .NET Core very intuitive.
Dependency Injection comes out of the box, configuration files work with standard JSON (which allows nesting) and can be easily (strong typed) injected into your application.
Entity Framework Core has most of the regular EF and I've found it pretty easy to work with (code first).
If you're going for some basic CRUD stuff Razor Pages are fairly easy and intuitive without all the boiler plate of MVC.
If you're going for MVC I think they streamlined it a bit. No more Controller and ApiController, just one Controller and (JSON) API or HTML, it doesn't really matter anymore.
Considering Microsoft is continuing development for .NET Core and not the .NET Framework, it's a clear winner for me, .NET Core!
|
|
|
|
|
My bad, I was talking about good old .NET.
In the test projects we made, working with MVC was very similar in each environment.
Thanks for you input!
|
|
|
|
|
I have been doing a mix of the two; my non-public service architecture is running on .Core, while my public sites are running on the full Framework.
Eventually I'll migrate to Core for the front-ends, but I have quite a few HttpModules that need conversion to Middle Ware; and that has been a bumpy path.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
|
|
|
|
|
Is a sad coffee a Despresso?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|