Page 1 of 1
SDK .NET v0.1
Posted: 13 May 2011, 16:07
by farfa
Hi everyone,
I created a DLL for .NET developers, for the moment it's only in for .NET4
You can download it here:
http://files.trackmania.com/trackmania- ... K_NET4.dll
I'm also working on a WP7 library and maybe a conversion to .NET3.5
Re: SDK .NET v0.1
Posted: 14 May 2011, 02:07
by fastforza
I analyzed the library and I hope to god you are not using '
goto', that is some seriously bad programming there. There also are few other (minor) things you could touch up on (bring it to C# 4.0 standards) as well.
A quick one ...
Code: Select all
getResponseObject(Type) > GetResponseObject(Type)
I would never begin a method name with a lower case.

Re: SDK .NET v0.1
Posted: 14 May 2011, 07:02
by farfa
Hi,
For this error it's a bad habit of php dev

Don't worry there is no goto in my code. The goto is baaaaaad, very very baaaaaaaad
Re: SDK .NET v0.1
Posted: 14 May 2011, 07:06
by fastforza
.NET reflector is generating decompiling in it's unusual manner again.
Code: Select all
if (str != null)
{
if ((!(str == "HEAD") && !(str == "GET")) && !(str == "DELETE"))
{
if ((str == "POST") || (str == "PUT"))
{
goto Label_00CA;
}
}
else
{
request.Method = verb;
}
}
As you can see, I read it and see it as you using goto.
That is useless passing the verb variable to another variable, just use 'verb'.
Re: SDK .NET v0.1
Posted: 16 May 2011, 10:43
by farfa
The code you get is not the real code, it 's the code after compilation by the framework. But I'm gonna publish the sources on codeplex. If you give me your email address I can add you to the project, to check everything. But this refactor imply that I can optimize some stuff.
Re: SDK .NET v0.1
Posted: 16 May 2011, 11:15
by fastforza
The code I get from reflector is the code, with the addition of compiler generated stuff (i.e the goto) which is generated at build time, I was quite stumped as to why it generated it though.
I've also setup my second codeplex project (TMWS.NET) which has my .NET client:
http://tmwsnet.codeplex.com/.

Re: SDK .NET v0.1
Posted: 16 May 2011, 11:35
by farfa
I've also created mine, and added you as Editor. And maybe it's better if we are two working together instead of on the same stuff in our side ? What do you think ? (I'll keep the Idea of the Generic method Execute (nice one))
Re: SDK .NET v0.1
Posted: 16 May 2011, 11:38
by fastforza
Sounds like a plan if we collaborate? I'll touch up the final services in mine within the next couple of days just so we can equal out both projects. Oh and thanks!

Re: SDK .NET v0.1
Posted: 18 May 2011, 09:36
by fastforza
The TMWS.NET is complete. New addition to my library is the support for stripping TM colour codes.
Don't know how you want to stay in touch if we collaborate; email, PM, MSN (yes I do have yours).

Re: SDK .NET v0.1
Posted: 06 Mar 2013, 09:05
by rygos
This is a very interesting Project. Is there any Chance to get a new Version?
I want to create a Application for Group/Website-Administration and i like to share the results with the community.
I dont like to develope the wheel for a second time. =P