Sun「無用」
Sun「無用」
Explore posts from servers
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
welp, if I'm giving the status/path, then I should prolly complete the info, lol
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
It has instance, which could be just the full path
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
No description
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
thx
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
I've seen way too much code with people checking for status in the json, so I just do that by default now, lol
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
ProblemDetails doesn't work properly for me and it just looks incomplete, so I just did a
public record struct ProblemResponse<T>(
HttpStatusCode StatusCode,
string Title,
string Method,
string Path,
T? Data,
ApplicationError[] Errors
);
public record struct ProblemResponse<T>(
HttpStatusCode StatusCode,
string Title,
string Method,
string Path,
T? Data,
ApplicationError[] Errors
);
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
also I like problem response and it has it there :d
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
also I'm gonna do stuff like
[HttpPut]
[HttpPatch]
async Task meh ....
[HttpPut]
[HttpPatch]
async Task meh ....
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
bc I just want the info, most users are kinda dumb :d
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
I'm lost here, lol
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
async Task<ActionResult<CoolioResponse>> Bar(
// What to inject here? HttpContext?
) {
return new CoolioResponse
{
Path = ??,
Method = ??,
};
}
async Task<ActionResult<CoolioResponse>> Bar(
// What to inject here? HttpContext?
) {
return new CoolioResponse
{
Path = ??,
Method = ??,
};
}
Like that
50 replies
CC#
Created by Sun「無用」 on 9/4/2024 in #help
Get route information on controller
yes, but it's not in the code, I can't use it as a variable or return it to the user
50 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
wdym?
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
namespace Ilanos.Application.Mappers.Joke;

// Ohno, cannot access Joke class
using Ilanos.Domain.Core.Joke;

Joke jk = new();
namespace Ilanos.Application.Mappers.Joke;

// Ohno, cannot access Joke class
using Ilanos.Domain.Core.Joke;

Joke jk = new();
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
I was just using the Joke class while a namespace ending in Joke was in scop
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
that's how I thought it was implemented at least
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
yes, but why is it ambiguous, doesn't the compiler have different "memories" for those?
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
I mean why does the compiler doesn't differenciate namespaces and classes? They're different things
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
that seems a bit counterintuitive
24 replies
CC#
Created by Sun「無用」 on 9/3/2024 in #help
Class with same name as namespace
why isn't there the difference for the compiler, though?
24 replies