SDK .NET v0.1

TrackMania Forever public API and its open source PHP SDK.

Moderator: NADEO

SDK .NET v0.1

Postby 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
farfa
Nadeo
Nadeo
 
Posts: 462
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late
Manialink: maniahome
TrackMania Forever:
Nickname: XCS SaTaNaSDiaBoLo aka farfa

Re: SDK .NET v0.1

Postby 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
fastforza
 
Posts: 848
Joined: 15 Jun 2010, 11:19
Location: Melbourne, Victoria, Australia
Manialink: forzyy

Re: SDK .NET v0.1

Postby 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
farfa
Nadeo
Nadeo
 
Posts: 462
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late
Manialink: maniahome
TrackMania Forever:
Nickname: XCS SaTaNaSDiaBoLo aka farfa

Re: SDK .NET v0.1

Postby 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
fastforza
 
Posts: 848
Joined: 15 Jun 2010, 11:19
Location: Melbourne, Victoria, Australia
Manialink: forzyy

Re: SDK .NET v0.1

Postby 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
farfa
Nadeo
Nadeo
 
Posts: 462
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late
Manialink: maniahome
TrackMania Forever:
Nickname: XCS SaTaNaSDiaBoLo aka farfa

Re: SDK .NET v0.1

Postby 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
fastforza
 
Posts: 848
Joined: 15 Jun 2010, 11:19
Location: Melbourne, Victoria, Australia
Manialink: forzyy

Re: SDK .NET v0.1

Postby 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
farfa
Nadeo
Nadeo
 
Posts: 462
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late
Manialink: maniahome
TrackMania Forever:
Nickname: XCS SaTaNaSDiaBoLo aka farfa

Re: SDK .NET v0.1

Postby 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: 848
Joined: 15 Jun 2010, 11:19
Location: Melbourne, Victoria, Australia
Manialink: forzyy

Re: SDK .NET v0.1

Postby 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. :)
User avatar
fastforza
 
Posts: 848
Joined: 15 Jun 2010, 11:19
Location: Melbourne, Victoria, Australia
Manialink: forzyy

Re: SDK .NET v0.1

Postby 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
rygos
 
Posts: 6
Joined: 04 Mar 2013, 08:03


Return to TrackMania Forever Web Services

Who is online

Users browsing this forum: No registered users and 0 guests