Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Fix casing of some C# names #89710

Merged
1 commit merged into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/classes/DTLSServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{
private DtlsServer _dtls = new DtlsServer();
private UdpServer _server = new UdpServer();
private Godot.Collections.Array<PacketPeerDTLS> _peers = new Godot.Collections.Array<PacketPeerDTLS>();
private Godot.Collections.Array<PacketPeerDtls> _peers = new Godot.Collections.Array<PacketPeerDtls>();

public override void _Ready()
{
Expand All @@ -59,8 +59,8 @@
{
while (Server.IsConnectionAvailable())
{
PacketPeerUDP peer = _server.TakeConnection();
PacketPeerDTLS dtlsPeer = _dtls.TakeConnection(peer);
PacketPeerUdp peer = _server.TakeConnection();
PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer);
if (dtlsPeer.GetStatus() != PacketPeerDtls.Status.Handshaking)
{
continue; // It is normal that 50% of the connections fails due to cookie exchange.
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/HTTPClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@
[/gdscript]
[csharp]
var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } };
string queryString = new HTTPClient().QueryStringFromDict(fields);
string queryString = new HttpClient().QueryStringFromDict(fields);
string[] headers = { "Content-Type: application/x-www-form-urlencoded", $"Content-Length: {queryString.Length}" };
var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString);
var result = new HttpClient().Request(HttpClient.Method.Post, "index.php", headers, queryString);
[/csharp]
[/codeblocks]
[b]Note:[/b] The [param body] parameter is ignored if [param method] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
Expand Down
8 changes: 4 additions & 4 deletions doc/classes/HTTPRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
public override void _Ready()
{
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
var httpRequest = new HttpRequest();
AddChild(httpRequest);
httpRequest.RequestCompleted += HttpRequestCompleted;

Expand All @@ -61,7 +61,7 @@
{
{ "name", "Godette" }
});
error = httpRequest.Request("https://httpbin.org/post", null, HTTPClient.Method.Post, body);
error = httpRequest.Request("https://httpbin.org/post", null, HttpClient.Method.Post, body);
if (error != Error.Ok)
{
GD.PushError("An error occurred in the HTTP request.");
Expand Down Expand Up @@ -115,7 +115,7 @@
public override void _Ready()
{
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
var httpRequest = new HttpRequest();
AddChild(httpRequest);
httpRequest.RequestCompleted += HttpRequestCompleted;

Expand All @@ -130,7 +130,7 @@
// Called when the HTTP request is completed.
private void HttpRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
{
if (result != (long)HTTPRequest.Result.Success)
if (result != (long)HttpRequest.Result.Success)
{
GD.PushError("Image couldn't be downloaded. Try a different image.");
}
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/InputEventMIDI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@

public override void _Input(InputEvent inputEvent)
{
if (inputEvent is InputEventMIDI midiEvent)
if (inputEvent is InputEventMidi midiEvent)
{
PrintMIDIInfo(midiEvent);
}
}

private void PrintMIDIInfo(InputEventMIDI midiEvent)
private void PrintMIDIInfo(InputEventMidi midiEvent)
{
GD.Print(midiEvent);
GD.Print($"Channel {midiEvent.Channel}");
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PCKPacker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
packer.flush()
[/gdscript]
[csharp]
var packer = new PCKPacker();
var packer = new PckPacker();
packer.PckStart("test.pck");
packer.AddFile("res://text.txt", "text.txt");
packer.Flush();
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PacketPeerUDP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
return
[/gdscript]
[csharp]
var socket = new PacketPeerUDP();
var socket = new PacketPeerUdp();
// Server
socket.SetDestAddress("127.0.0.1", 789);
socket.PutPacket("Time to stop".ToAsciiBuffer());
Expand Down
Loading