Error CS1519 in line 1 column 9, Unexpected symbol `using' in class, struct, or interface member declaration
Error CS1519 in line 1 column 17, Unexpected symbol `;' in class, struct, or interface member declaration
Error CS1519 in line 2 column 16, Unexpected symbol `;' in class, struct, or interface member declaration
Error CS1519 in line 3 column 17, Unexpected symbol `;' in class, struct, or interface member declaration
Error CS1519 in line 4 column 18, Unexpected symbol `;' in class, struct, or interface member declaration
I'm not sire how you configura your automation, but putting the code in run will be equivalent to create one additional event handler at each execution. I'm not sure it really make sense.
In terms of behavior, your code does not do anything on the server, so even if it's working fine, you will not know it.
I suggest to add some debug string like
Console.WriteLine("step 1 executed");
.
Once done you stop EasyIoT service and you run it by the command line. Every time your command is executed, your string will be print on the command line.
I've put the line of code that you were suggested and there is effectively no output on the command line. My configuration should be the problem.
I've created a node in virtual, it's GENERIC type, it's configured as a "digital output (DO)". In the parameter the name is Sensor.DigitalValue.
In automation the program is enabled and the cron setting is "* * * * *".
With Cron setting * * * * * you will have your code executed every minute. Are you sure is what you really want? I believe does not make sense create a new event handler every minute. You can just create once at startup without the usage of Cron.
Try removing your webrequest code and just make the console. On top you move from run function to setup and in Cron configuration you leave it empty.
When you will save, you should see in the console our output string...
If it's not the case you have something wrong somewhere else.