-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add segregation between legacy code and explicit objects
- Loading branch information
Showing
30 changed files
with
800 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
|
||
using RustPlusApi; | ||
|
||
using static __Constants.ExamplesConst; | ||
|
||
var rustPlus = new RustPlus(Ip, Port, PlayerId, PlayerToken); | ||
const uint entityId = 0; | ||
|
||
rustPlus.Connected += async (_, _) => | ||
{ | ||
var message = await rustPlus.GetSmartSwitchInfoAsync(entityId); | ||
|
||
Console.WriteLine($"Infos:\n{JsonConvert.SerializeObject(message, JsonSettings)}"); | ||
}; | ||
|
||
rustPlus.OnSmartSwitchTriggered += (_, message) => | ||
{ | ||
Console.WriteLine($"SmartSwitch:\n{JsonConvert.SerializeObject(message, JsonSettings)}"); | ||
}; | ||
|
||
await rustPlus.ConnectAsync(); |
15 changes: 15 additions & 0 deletions
15
RustPlusApi/Examples/GetSmartSwitchInfo/GetSmartSwitchInfo.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\RustPlusApi\RustPlusApi.csproj" /> | ||
<ProjectReference Include="..\__Constants\__Constants.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
using RustPlusApi; | ||
|
||
using static __Constants.ExamplesConst; | ||
|
||
var rustPlus = new RustPlus(Ip, Port, PlayerId, PlayerToken); | ||
const uint entityId = 0; | ||
|
||
rustPlus.Connected += async (_, _) => | ||
{ | ||
var message = await rustPlus.GetSmartSwitchInfoAsync(entityId); | ||
|
||
Console.WriteLine($"Infos:\n{JsonConvert.SerializeObject(message, JsonSettings)}"); | ||
|
||
rustPlus.Dispose(); | ||
}; | ||
|
||
await rustPlus.ConnectAsync(); |
15 changes: 15 additions & 0 deletions
15
RustPlusApi/Examples/GetStorageMonitorChanges/GetStorageMonitorChanges.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\RustPlusApi\RustPlusApi.csproj" /> | ||
<ProjectReference Include="..\__Constants\__Constants.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
|
||
using RustPlusApi; | ||
|
||
using static __Constants.ExamplesConst; | ||
|
||
var rustPlus = new RustPlus(Ip, Port, PlayerId, PlayerToken); | ||
const uint entityId = 0; | ||
|
||
rustPlus.Connected += async (_, _) => | ||
{ | ||
var message = await rustPlus.GetStorageMonitorInfoAsync(entityId); | ||
|
||
Console.WriteLine($"Infos:\n{JsonConvert.SerializeObject(message, JsonSettings)}"); | ||
}; | ||
|
||
rustPlus.OnStorageMonitorTriggered += (_, message) => | ||
{ | ||
Console.WriteLine($"StorageMonitor:\n{JsonConvert.SerializeObject(message, JsonSettings)}"); | ||
}; | ||
|
||
await rustPlus.ConnectAsync(); |
15 changes: 15 additions & 0 deletions
15
RustPlusApi/Examples/GetStorageMonitorInfo/GetStorageMonitorInfo.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\RustPlusApi\RustPlusApi.csproj" /> | ||
<ProjectReference Include="..\__Constants\__Constants.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.