Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Cloudflare Resolver Source + API

This project was made to showcase what you could do with my Cloudflare Resolver API & async programming

Uses JSON.NET to deserialize JSON response from the API

[Image: su4STGV.png]

Download source code here: https://a.pomf.cat/lpqoqk.zip
[Image: Syr3DlV.png]
Try using GitHub my man. This way I dont have to download, extract, etc. to view your code.

EDIT: This is just an over-hyped API... I mean, you just need like 4 lines of code to do all this, and that includes a using statement.
its just http://resolvr.cf/?resolve=cloudflare&host=

well good start at c#
[Image: wuTJduD.jpg] If it is "human", you can NOT "trust" it. If it is "alien" you will find it at NASA. If it is "ape" you have already been robbed.. If it is "me" I will say HI!
I can tell when someone is bad just by looking at the file and element name.

Also, code in Form, sshhhh.
(Feb 13, 2017 11:38 PM)xaHyeG Wrote:  its just http://resolvr.cf/?resolve=cloudflare&host=

well good start at c#

What do you mean? I made it to showcase my API..

(Feb 14, 2017 04:13 AM)Sakuto Wrote:  I can tell when someone is bad just by looking at the file and element name.

Also, code in Form, sshhhh.

Why would there be anything wrong with putting code in the main form.cs? It's perfectly fine. Yes I'm sure you're an expert at finding bad code by only looking at names and where the code is (sarcasm in case you didn't pick it up by the post title)

Anyhow, the code consists of
API.cs (main functionality, which you'd know if you could read code)
Form1.cs (interface)
Program.cs (auto generated winforms logic)

</bash>

(Feb 12, 2017 08:33 AM)Ninja Wrote:  Try using GitHub my man. This way I dont have to download, extract, etc. to view your code.

EDIT: This is just an over-hyped API... I mean, you just need like 4 lines of code to do all this, and that includes a using statement.

Are you talking about the API, or the program?
[Image: Syr3DlV.png]
(Feb 14, 2017 06:00 AM)gigajew Wrote:  Why would there be anything wrong with putting code in the main form.cs? It's perfectly fine.

=Removed initial post=

Decided to take a look at the code. Honestly doesn't look bad. Thought it would've been the typical "everything in the form class" from the other guy's post.

"textBox1", "checkBox1", and "listView1" <- That really needs to be named better.

Looks like you're using JSON.Net too. In that case, name your properties better.

Code
public class FullResult
    {
[JsonProperty("host")]
        public string Host { get; set; }
[JsonProperty("host_ipv4")]
        public string HostIPv4 { get; set; }
    }
You have a method in your form who perform something and contain logic, it does not belong here, that's all. You should have a service to handle this.

The form class are just here to bind event, nothing more.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by GlushkoJun 13, 2018 11:13 PM 3 642 Jun 13, 2018 11:13 PM
Last Post: hostov
[.NET] by PhunKTecHJun 29, 2016 02:21 AM 7 440 Jun 29, 2016 02:21 AM
Last Post: fathurion
[.NET] by Gr0wlitApr 17, 2016 07:58 PM 30 4,757 Apr 17, 2016 07:58 PM
Last Post: Haters Ganna Hate