SDK .NET v0.1

Trackmania Forever public API and its open source PHP SDK.

Moderator: NADEO

Post Reply
User avatar
farfa
Nadeo
Nadeo
Posts: 597
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

SDK .NET v0.1

Post by farfa » 13 May 2011, 16:07

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
Also known as: satanasdiabolo

User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post by fastforza » 14 May 2011, 02:07

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. :P
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)

User avatar
farfa
Nadeo
Nadeo
Posts: 597
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post by farfa » 14 May 2011, 07:02

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
Also known as: satanasdiabolo

User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post by fastforza » 14 May 2011, 07:06

.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. :lol:

Code: Select all

string str = verb;
That is useless passing the verb variable to another variable, just use 'verb'.
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)

User avatar
farfa
Nadeo
Nadeo
Posts: 597
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post by farfa » 16 May 2011, 10:43

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.
Also known as: satanasdiabolo

User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post by fastforza » 16 May 2011, 11:15

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/. :P
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)

User avatar
farfa
Nadeo
Nadeo
Posts: 597
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post by farfa » 16 May 2011, 11:35

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))
Also known as: satanasdiabolo

User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post by fastforza » 16 May 2011, 11:38

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! 8-)
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)

User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post by fastforza » 18 May 2011, 09:36

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). :lol:
Mania Exchange - Share your maps!

ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti

Need technical help for ManiaPlanet? Click here. :)

rygos
Posts: 6
Joined: 04 Mar 2013, 08:03

Re: SDK .NET v0.1

Post by rygos » 06 Mar 2013, 09:05

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

Post Reply

Return to “Trackmania Forever Web Services”

Who is online

Users browsing this forum: No registered users and 2 guests