GooBad
GooBad
CC#
Created by GooBad on 10/17/2024 in #help
MVVM Toolkit Messenger - RequestMessage
I have no idea why one of the methods is never executed... take a look at this vs Messenger
C#
public class AsyncRLoginMsgReq : AsyncRequestMessage<bool>{};
C#
public class AsyncRLoginMsgReq : AsyncRequestMessage<bool>{};
C#
public class LoginRequestProcessor{
public readonly IMessenger Messenger;

public LoginRequestProcessor(IMessenger messenger) {
Messenger = messenger;
}

public void RegisterAll() {
// \/
Messenger.Register<AsyncRLoginMsgReq>(this, (r, m) =>
{
// NEVER EXECUTED
m.Reply(Task.FromResult(true));
});
// \/
Messenger.Register<AsyncRLoginMsgReq>(Messenger, (r, m) =>
{
// EXECUTED
m.Reply(Task.FromResult(true));
});
}

}
C#
public class LoginRequestProcessor{
public readonly IMessenger Messenger;

public LoginRequestProcessor(IMessenger messenger) {
Messenger = messenger;
}

public void RegisterAll() {
// \/
Messenger.Register<AsyncRLoginMsgReq>(this, (r, m) =>
{
// NEVER EXECUTED
m.Reply(Task.FromResult(true));
});
// \/
Messenger.Register<AsyncRLoginMsgReq>(Messenger, (r, m) =>
{
// EXECUTED
m.Reply(Task.FromResult(true));
});
}

}
C#
// some other class
var r = await _messenger.Send(new AsyncRLoginMsgReq());
C#
// some other class
var r = await _messenger.Send(new AsyncRLoginMsgReq());
3 replies
CC#
Created by GooBad on 7/18/2024 in #help
What is the name of this Linting rule in Rider?
No description
9 replies
CC#
Created by GooBad on 2/16/2024 in #help
Logging...
public DataService() {
this.Logger = LoggerFactory.Create(builder => {
builder.AddSimpleConsole();
builder.AddDebug();
builder.SetMinimumLevel(LogLevel.Information);
}).CreateLogger("DataService");
}
public DataService() {
this.Logger = LoggerFactory.Create(builder => {
builder.AddSimpleConsole();
builder.AddDebug();
builder.SetMinimumLevel(LogLevel.Information);
}).CreateLogger("DataService");
}
This is logger on my class, i want to configure the builder globally how do i do that? there is 3000 articles in google total spam of paid medium etc. documentation has 304909 of usless words but i just want to know how to use a simple pattern like in python logging.basicconfig(level=) that will configure the logging level for my whole application :/
18 replies