SDK .NET v0.1

Trackmania Forever public API and its open source PHP SDK.

Moderator: NADEO

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

SDK .NET v0.1

Post 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
Also known as: satanasdiabolo
User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post 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. :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. :)
farfa
Nadeo
Nadeo
Posts: 601
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post 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
Also known as: satanasdiabolo
User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post 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. :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. :)
farfa
Nadeo
Nadeo
Posts: 601
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post 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.
Also known as: satanasdiabolo
User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post 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/. :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. :)
farfa
Nadeo
Nadeo
Posts: 601
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: SDK .NET v0.1

Post 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))
Also known as: satanasdiabolo
User avatar
fastforza
Posts: 859
Joined: 15 Jun 2010, 11:19
Contact:

Re: SDK .NET v0.1

Post 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! 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 »

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 »

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 1 guest