The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
var l = GetProperty("videos", (IList<object>)null);
return Tmdb.FromJsonArray(l, (d) =>new TmdbVideo(d));
all that lambda is for is to call the appropriate constructor.
internalstatic T FromJsonArray<T>(IList<object> array,Func<IDictionary<string,object>,T> creator)
if (null == array)
var result = new T[array.Count];
for(var i = 0;i<result.Length;i++)
var d = array[i] as IDictionary<string,object>;
if (null != d)
result[i] = creator(d);
because I can't have a contract - either an interface, a base class, or a template constraint that specifies a certain constructor signature.
This should have been in with .NET 2.0, 3.5 at the latest. That it wasn't in with 4 just floors me, especially seeing as to what the serializer stuff in the dotnet framework has to go through for its constructor requirement.
Reflection? Really? It might even be faster than using a stupid lambda (but probably not)
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.
Today I took some more pictures of the Huey. I need them because now it's time to order some decals to finally finish the job. Well, almost.
Look what the same model looks like when you order it painted and ready to fly: El Cheapo[^]
The landing gear is all wrong, not very miny details, almost no windows and look what they did with the front window with its mounting brim and very visible screws to hold it in place!
Well, I have not installed any windows yet, but at least i have a complete set. Since my last post I have corrected countless places where the paint ran under the masking tape and painted on the bigger markings with the help of custom paint masks. And most of the parts are now installed. Take a look![^]
You know what? I still am not happy. Even in sunlight the details are not very visible. The new markings already help, just as the decals will, but it's still a big, mostly green thing.
I have stolen a great idea from the guys who build model tanks. They have the same problem. A tank is a big green thing and the details of the model just disappear. So what do they do? They paint on 'dirt' or fade the paint with strongly thinned oil paint. I gave it a first try by painting dark shadows into the lines of the doors, the rails of the side doors and some air slits. It was not easy to do because it's the exact opposite of what I did up to now. No more masking and working cleanly. Now I'm deliberately messing it up almost randomly.
Takes a little to get used to, but it looks promising. After the decals are on, I'm going to do my best to get rid of that boring pristine look.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
Charlie don't surf! , I don't know if it would work, I had success with Hawker Typhoon painted it up glossy & perfect, then went over it with some rusty steel wool in some area around the chin air intake the paint was thin scuffed it off then went to work with a Steel Effect magic marker. Worked quite well...
Last Visit: 20-Nov-19 19:11 Last Update: 20-Nov-19 19:11