wasabi
wasabi
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
or you could just go look. with your eyes
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
You can probably check something in procfs to see how many are used
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
watch != instance
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
Actually, looking at your error, it's not erroring because of max watches, but because of max instances. Might be the case you're creating too many FSWs
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
Nope. Gotta increase the per-user limit.
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
And Linux limits those.
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
It's been awhile since I looked, but from what I remember it opens a new inotify channel for each watched directory.
28 replies
CC#
Created by Mazranel on 9/12/2024 in #help
FileSystemWatcher causes user limit exceptions on Kubuntu Linux
The issue is INcludeSubdiretories, probably.
28 replies
CC#
Created by Cavecrush on 9/3/2024 in #help
Help on how async/await works
async Task Foo()
{
var i = 1;
await OtherThing();
return i;
}
async Task Foo()
{
var i = 1;
await OtherThing();
return i;
}
When you call Foo the first line runs. The second line runs, calling OtherThing, which returns a Task. Because you are awaiting that Task, a new Task is created that is linked to the Task that returns from OtherThing. That new task is set up to, upon completion, jump back into line 3. Whenever that happens, the new task has it's result set to i, and is marked completed, so the caller of Foo then has a Task that will eventually return 1, but only after it's bneen resumed by the first task returned by OtherThing.
12 replies
CC#
Created by Cavecrush on 9/3/2024 in #help
Help on how async/await works
So, 'async' turns a method into something magical. A state machine. That is organized so that different parts of the method can be invoked independently. What actually happens when await happens is 'control is returned', which literally means the method returns to it's caller. But it returns a Task. That Task can later be used to resume execution of the rest of the method.
12 replies
CC#
Created by MrScopes on 8/31/2024 in #help
Process not spawning as a child
If you want processes to die in response to their parents, you need to use a Job.
9 replies
CC#
Created by MrScopes on 8/31/2024 in #help
Process not spawning as a child
There's not really a real process hierarchy in windows. The best you get is that each process maintains the PID of the process that creates it, but that is used for nothing.
9 replies
CC#
Created by Yunivers on 8/24/2024 in #help
Adding modding capabilities to my C# game
The only time people use things like Detours, or Harmony, or other runtime mods, etc, is when the original app isn't built with a plugin model.
41 replies
CC#
Created by Yunivers on 8/24/2024 in #help
Adding modding capabilities to my C# game
It ain't hard.
41 replies
CC#
Created by Yunivers on 8/24/2024 in #help
Adding modding capabilities to my C# game
You make everything interfaces, and let plugins substitute the implementations.
41 replies
CC#
Created by Seth on 8/13/2024 in #help
I am having trouble with some quirks in Visual Studios SSDT (SQL Server Data Tool)
SSDT works fine. And is better in some situations than other tools. Problem is MS refuses to make the project type buildable on the .NET distrbution of MSBuild, so you need to use the VS distributed version and can't build cross platform.
8 replies
CC#
Created by Seth on 8/13/2024 in #help
I am having trouble with some quirks in Visual Studios SSDT (SQL Server Data Tool)
And then it has an option to supress errors for just taht one reference.
8 replies
CC#
Created by Seth on 8/13/2024 in #help
I am having trouble with some quirks in Visual Studios SSDT (SQL Server Data Tool)
You can add a reference to the schemas as a dacpac, which also works.
8 replies
CC#
Created by 13eck on 8/14/2024 in #help
Hope to declare class member with variable type
I'd just make it an object. And then stick a custom JSON converter on it that can determine what it is.
16 replies
CC#
Created by Will Pittenger on 8/11/2024 in #help
Abstract events implemented, but compiler warns they aren't used
https://learn.microsoft.com/en-us/dotnet/standard/events/ Typically, to raise an event, you add a method that is marked as protected and virtual (in C#) or Protected and Overridable (in Visual Basic). Name this method OnEventName; for example, OnDataReceived. The method should take one parameter that specifies an event data object, which is an object of type EventArgs or a derived type. You provide this method to enable derived classes to override the logic for raising the event. A derived class should always call the OnEventName method of the base class to ensure that registered delegates receive the event.
11 replies