danikf / tik4net

Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Apache License 2.0
174 stars 93 forks source link

Example for /tool wol #25

Closed hkusulja closed 6 years ago

hkusulja commented 6 years ago

How to use ITikCommand with /tool wol interaface=ether1 mac=AA...

danikf commented 6 years ago

Hi,

it is easy to achieve by ADO like API. But I have already commited easy to use facade ToolWol (highlevel API). See de9bb3a commit.

var command = connection.CreateCommandAndParameters("/tool/wol", TikCommandParameterFormat.NameValue, "mac", macAddress.Address);
command.ExecuteSingleRow();

D