├── .editorconfig
├── .editorconfig - Copy
├── .gitattributes
├── .github
└── workflows
│ └── dotnet.yml
├── .gitignore
├── Epp Net.csproj
├── Epp Net.sln
├── EppNet-SourceGen
├── .editorconfig
├── .roslynatorconfig
├── AnalyzerReleases.Shipped.md
├── AnalyzerReleases.Unshipped.md
├── EppNet-SourceGen.csproj
└── Source
│ ├── Analysis
│ ├── AnalysisDiagnostic.cs
│ ├── DiagnosticList.cs
│ └── NetworkObjectAnalysis.cs
│ ├── ExecutionContext.cs
│ ├── GenerateObjectSource.cs
│ ├── Globals.cs
│ ├── Models
│ ├── EquatableDictionary.cs
│ ├── EquatableHashSet.cs
│ ├── EquatableList.cs
│ ├── NetworkMethodModel.cs
│ ├── NetworkObjectModel.cs
│ ├── NetworkParameterTypeModel.cs
│ └── ResolverModel.cs
│ └── RegisterObjectsGenerator.cs
├── EppNet-Unity
├── EppNet-Unity - Backup.csproj
├── EppNet-Unity.csproj
├── EppNetUnity.cs
├── Source
│ └── Data
│ │ └── Resolvers
│ │ ├── UnityQuaternionResolver.cs
│ │ ├── UnityVector2IntResolver.cs
│ │ ├── UnityVector2Resolver.cs
│ │ ├── UnityVector3IntResolver.cs
│ │ ├── UnityVector3Resolver.cs
│ │ ├── UnityVector4Resolver.cs
│ │ └── UnityVectorResolverBase.cs
└── UnityEngine.dll
├── README.md
├── Source
├── Attributes
│ ├── NetworkMemberAttribute.cs
│ ├── NetworkMethodAttribute.cs
│ ├── NetworkObjectAttribute.cs
│ ├── NetworkPropertyAttribute.cs
│ └── NetworkTypeResolverAttribute.cs
├── Collections
│ ├── Iterator.cs
│ ├── ObjectCommandList.cs
│ ├── OrderedDictionary.cs
│ └── PageList.cs
├── Commands
│ ├── Command.cs
│ ├── CommandContext.cs
│ ├── EnumCommandResult.cs
│ ├── ObjectCommands.cs
│ └── SlimCommand.cs
├── Connections
│ ├── ClientConnection.cs
│ ├── ConnectEvent.cs
│ ├── Connection.cs
│ ├── ConnectionService.cs
│ ├── ConnectionSlot.cs
│ ├── DisconnectEvent.cs
│ ├── DisconnectReason.cs
│ └── ServerConnection.cs
├── Data
│ ├── BytePayload.cs
│ ├── Datagrams
│ │ ├── Datagram.cs
│ │ ├── DisconnectDatagram.cs
│ │ ├── IDatagram.cs
│ │ ├── ObjectUpdateDatagram.cs
│ │ └── PingDatagram.cs
│ ├── ICloneable.cs
│ ├── IDataHolder.cs
│ ├── IMessageHandler.cs
│ ├── INameable.cs
│ ├── ISignatureEquatable.cs
│ ├── InternalProperty.cs
│ ├── LockQueue.cs
│ ├── NetworkArg.cs
│ ├── NetworkArgs.cs
│ ├── QuaternionAdapter.cs
│ ├── Resolver.cs
│ ├── Resolvers
│ │ ├── BoolResolver.cs
│ │ ├── ByteResolver.cs
│ │ ├── ColorResolver.cs
│ │ ├── FloatResolver.cs
│ │ ├── GuidResolver.cs
│ │ ├── Int32Resolver.cs
│ │ ├── LongResolver.cs
│ │ ├── QuaternionResolver.cs
│ │ ├── QuaternionResolverBase.cs
│ │ ├── SByteResolver.cs
│ │ ├── ShortResolver.cs
│ │ ├── String16Resolver.cs
│ │ ├── String8Resolver.cs
│ │ ├── TimeSpanResolver.cs
│ │ ├── UInt32Resolver.cs
│ │ ├── ULongResolver.cs
│ │ ├── UShortResolver.cs
│ │ ├── Vector2Resolver.cs
│ │ ├── Vector3Resolver.cs
│ │ ├── Vector4Resolver.cs
│ │ └── VectorResolverBase.cs
│ ├── SlottableEnum.cs
│ ├── StringTypes.cs
│ └── Timestamp.cs
├── Distribution.cs
├── EppNet.cs
├── Events
│ └── EventBase.cs
├── Exceptions
│ ├── BytePayloadReadException.cs
│ ├── ExceptionStrategy.cs
│ └── NetworkException.cs
├── Logging
│ ├── ILoggable.cs
│ ├── LogLevelFlags.cs
│ ├── LogService.cs
│ ├── RuntimeFileMetadata.cs
│ └── TemplatedMessage.cs
├── Messaging
│ ├── Channel.cs
│ ├── ChannelAlreadyExistsException.cs
│ ├── ChannelFlags.cs
│ ├── ChannelService.cs
│ ├── IMessageHandler.cs
│ ├── MalformedMessageReceivedException.cs
│ ├── MessageDirector.cs
│ └── MessageSubscriber.cs
├── NetworkFlags.cs
├── Node
│ ├── INodeDescendant.cs
│ ├── NetworkNode.cs
│ ├── NetworkNodeBuilder.cs
│ └── NetworkNodeManager.cs
├── Objects
│ ├── EnumObjectState.cs
│ ├── INetworkObject.cs
│ ├── IObjectService.cs
│ ├── MyTestObject.cs
│ ├── NetworkObjectDefinition.cs
│ ├── ObjectAgent.cs
│ ├── ObjectEvents.cs
│ ├── ObjectMemberDefinition.cs
│ ├── ObjectMethodDefinition.cs
│ ├── ObjectRegistration.cs
│ ├── ObjectService.cs
│ ├── ObjectSlot.cs
│ ├── Update.cs
│ └── UpdateQueue.cs
├── Processes
│ ├── Events
│ │ └── PacketReceivedEvent.cs
│ ├── MultithreadedBuffer.cs
│ └── PacketDeserializer.cs
├── Registers
│ ├── DatagramRegister.cs
│ ├── ICompilable.cs
│ ├── IRegistration.cs
│ ├── ObjectRegister.cs
│ ├── Register.cs
│ └── Registration.cs
├── Services
│ ├── IRunnable.cs
│ ├── IService.cs
│ ├── Service.cs
│ ├── ServiceManager.cs
│ └── ServiceStateChangedEvent.cs
├── Settings
│ ├── Configuration.cs
│ ├── ConfigurationGroup.cs
│ ├── IConfigurationDescendant.cs
│ ├── ISetting.cs
│ ├── PrimitiveSetting.cs
│ ├── SettingValueChangedEvent.cs
│ └── Writeable.cs
├── Snapshots
│ ├── DesyncEvent.cs
│ ├── ObjectSnapshot.cs
│ ├── SequenceNumber.cs
│ ├── Snapshot.cs
│ ├── SnapshotBase.cs
│ ├── SnapshotService.cs
│ └── SnapshotServiceBase.cs
├── Sockets
│ ├── BaseSocket.cs
│ ├── ClientSocket.cs
│ └── ServerSocket.cs
├── Tests
│ ├── BytePayloadBenchmarks.cs
│ ├── BytePayloadTests.cs
│ ├── GlobalUsings.cs
│ ├── PageListTests.cs
│ ├── RegisterTests.cs
│ ├── ResolverTests.cs
│ ├── SocketTest.cs
│ └── Tests.csproj
├── Time
│ ├── Clock.cs
│ ├── ITimestamped.cs
│ └── TimeExtensions.cs
├── Utilities
│ ├── ActionExtensions.cs
│ ├── AttributeFetcher.cs
│ ├── BitOperations.cs
│ ├── ByteExtensions.cs
│ ├── FastMath.cs
│ ├── FlagEnumExtensions.cs
│ ├── Guard.cs
│ ├── NumberExtensions.cs
│ ├── SortedListExtensions.cs
│ └── StringUtilities.cs
└── Zones
│ └── IZone.cs
└── packages
├── MSTest.TestAdapter.2.2.10
├── .signature.p7s
├── Icon.png
└── MSTest.TestAdapter.2.2.10.nupkg
├── MSTest.TestFramework.2.2.10
├── .signature.p7s
├── Icon.png
├── MSTest.TestFramework.2.2.10.nupkg
└── lib
│ ├── net45
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.dll
│ ├── cs
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── de
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── es
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── fr
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── it
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ja
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ko
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pl
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pt-BR
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ru
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── tr
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── zh-Hans
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ └── zh-Hant
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── net5.0
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.dll
│ ├── cs
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── de
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── es
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── fr
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── it
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ja
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ko
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pl
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pt-BR
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ru
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── tr
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── zh-Hans
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ └── zh-Hant
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── netstandard1.0
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.dll
│ ├── cs
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── de
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── es
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── fr
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── it
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ja
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ko
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pl
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pt-BR
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ru
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── tr
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── zh-Hans
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ └── zh-Hant
│ │ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ │ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ └── uap10.0
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.XML
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.dll
│ ├── cs
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── de
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── es
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── fr
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── it
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ja
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ko
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pl
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── pt-BR
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── ru
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── tr
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ ├── zh-Hans
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
│ └── zh-Hant
│ ├── Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
│ └── Microsoft.VisualStudio.TestPlatform.TestFramework.xml
├── Microsoft.CodeCoverage.17.10.0
├── .signature.p7s
├── Icon.png
├── Microsoft.CodeCoverage.17.10.0.nupkg
├── ThirdPartyNotices.txt
└── lib
│ ├── net462
│ └── Microsoft.VisualStudio.CodeCoverage.Shim.dll
│ └── netcoreapp3.1
│ └── Microsoft.VisualStudio.CodeCoverage.Shim.dll
└── Microsoft.NET.Test.Sdk.17.10.0
├── .signature.p7s
├── Icon.png
├── Microsoft.NET.Test.Sdk.17.10.0.nupkg
├── buildMultiTargeting
└── Microsoft.NET.Test.Sdk.props
└── lib
├── net462
└── _._
└── netcoreapp3.1
└── _._
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Normalize EOL for all files that Git considers text files.
2 | * text=auto eol=lf
3 |
--------------------------------------------------------------------------------
/.github/workflows/dotnet.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a .NET project
2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3 |
4 | name: .NET
5 |
6 | on:
7 | push:
8 | branches: [ "master" ]
9 | paths-ignore:
10 | - 'EppNet-Unity/**'
11 | pull_request:
12 | branches: [ "master" ]
13 | paths-ignore:
14 | - 'EppNet-Unity/**'
15 |
16 | jobs:
17 | build:
18 |
19 | runs-on: ubuntu-latest
20 |
21 | steps:
22 | - uses: actions/checkout@v3
23 | - name: Setup .NET
24 | uses: actions/setup-dotnet@v3
25 | with:
26 | dotnet-version: 6.0.x
27 | - name: Restore dependencies
28 | run: dotnet restore
29 | - name: Build
30 | run: dotnet build --no-restore
31 | - name: Test
32 | run: dotnet test --no-build --verbosity normal
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | bin/
3 | obj/
4 | BenchmarkDotNet.Artifacts/
5 | build/
--------------------------------------------------------------------------------
/Epp Net.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | EppNet
4 | 0.1.0-alpha
5 | Maverick Liberty
6 | A high-performance networking library powered by ENet.
7 | Networking, UDP, ENet, Multiplayer, GameDev
8 | MIT
9 | https://github.com/EppNet-Networking/EppNet
10 | https://github.com/EppNet-Networking/EppNet
11 | git
12 | netstandard2.1
13 | true
14 | EppNet
15 | 9.0
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | true
50 | $(BaseIntermediateOutputPath)Generated
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Epp Net.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34024.191
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epp Net", "Epp Net.csproj", "{1B9B3170-A225-4890-A7E2-E4F331DBC673}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FC780FD9-C774-4C76-AEAD-A8742F8DAAC9}"
9 | ProjectSection(SolutionItems) = preProject
10 | .editorconfig = .editorconfig
11 | EndProjectSection
12 | EndProject
13 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Source\Tests\Tests.csproj", "{596BBBF5-0810-4692-8A0C-30C6A847294A}"
14 | EndProject
15 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EppNet-Unity", "EppNet-Unity\EppNet-Unity.csproj", "{63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}"
16 | EndProject
17 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EppNet-SourceGen", "EppNet-SourceGen\EppNet-SourceGen.csproj", "{BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}"
18 | EndProject
19 | Global
20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 | Debug|Any CPU = Debug|Any CPU
22 | ExportDebug|Any CPU = ExportDebug|Any CPU
23 | ExportRelease|Any CPU = ExportRelease|Any CPU
24 | Release|Any CPU = Release|Any CPU
25 | EndGlobalSection
26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
27 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.Debug|Any CPU.ActiveCfg = Release|Any CPU
28 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.Debug|Any CPU.Build.0 = Release|Any CPU
29 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
30 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
31 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
32 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
33 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.Release|Any CPU.ActiveCfg = Release|Any CPU
34 | {1B9B3170-A225-4890-A7E2-E4F331DBC673}.Release|Any CPU.Build.0 = Release|Any CPU
35 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.Debug|Any CPU.Build.0 = Debug|Any CPU
37 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
38 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
39 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
40 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
41 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 | {596BBBF5-0810-4692-8A0C-30C6A847294A}.Release|Any CPU.Build.0 = Release|Any CPU
43 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
46 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
47 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
48 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
49 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
50 | {63EDD7D0-1FB9-477F-B84E-31BED44C3C8A}.Release|Any CPU.Build.0 = Release|Any CPU
51 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
53 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
54 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
55 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
56 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
57 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
58 | {BAF4D6EB-847B-479E-BC00-1344DCD1ED6F}.Release|Any CPU.Build.0 = Release|Any CPU
59 | EndGlobalSection
60 | GlobalSection(SolutionProperties) = preSolution
61 | HideSolutionNode = FALSE
62 | EndGlobalSection
63 | GlobalSection(ExtensibilityGlobals) = postSolution
64 | SolutionGuid = {031E31B1-95F4-498E-8819-32E845731277}
65 | EndGlobalSection
66 | EndGlobal
67 |
--------------------------------------------------------------------------------
/EppNet-SourceGen/.roslynatorconfig:
--------------------------------------------------------------------------------
1 | roslynator_blank_line_between_closing_brace_and_switch_section = false
--------------------------------------------------------------------------------
/EppNet-SourceGen/AnalyzerReleases.Shipped.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EppNet-Networking/EppNet/13a4393491254500bec059b572cf30baf59dc63c/EppNet-SourceGen/AnalyzerReleases.Shipped.md
--------------------------------------------------------------------------------
/EppNet-SourceGen/AnalyzerReleases.Unshipped.md:
--------------------------------------------------------------------------------
1 | ### New Rules
2 |
3 | Rule ID | Category | Severity | Notes
4 | --------|----------|----------|--------------------
5 | EPN001 | SourceGenerator | Warning | Debug message
6 | EPN002 | SourceGenerator | Error | Unspecified analysis error
7 | EPN003 | SourceGenerator | Error | Network Type Resolver related error
8 | EPN004 | SourceGenerator | Error | Network Object related error
9 | EPN005 | SourceGenerator | Error | Network Method related error
--------------------------------------------------------------------------------
/EppNet-SourceGen/EppNet-SourceGen.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | EppNet.SourceGen
6 | Latest
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/EppNet-SourceGen/Source/Analysis/AnalysisDiagnostic.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////
2 | /// Filename: AnalysisErrorBase.cs
3 | /// Date: March 11, 2025
4 | /// Authors: Maverick Liberty
5 | //////////////////////////////////////////////
6 |
7 | using Microsoft.CodeAnalysis;
8 | using Microsoft.CodeAnalysis.CSharp;
9 | using Microsoft.CodeAnalysis.CSharp.Syntax;
10 |
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | namespace EppNet.SourceGen.Analysis
15 | {
16 |
17 | public class AnalysisDiagnostic
18 | {
19 |
20 | ///
21 | /// The descriptor to use for the message.
22 | ///
23 | public readonly DiagnosticDescriptor DiagnosticDescriptor;
24 |
25 | ///
26 | /// The context of what caused the error
27 | ///
28 | public readonly CSharpSyntaxNode Context;
29 |
30 | ///
31 | /// The message to send
32 | ///
33 | public readonly string Message;
34 |
35 | ///
36 | /// Where this error is occurring
37 | ///
38 | public readonly Location[] Locations;
39 |
40 | public AnalysisDiagnostic(DiagnosticDescriptor descriptor, CSharpSyntaxNode context, string message, params Location[] locations)
41 | {
42 | this.DiagnosticDescriptor = descriptor;
43 | this.Context = context;
44 | this.Message = message;
45 | this.Locations = locations;
46 | }
47 |
48 | public AnalysisDiagnostic(DiagnosticDescriptor descriptor, CSharpSyntaxNode context, string message, IEnumerable locations)
49 | {
50 | this.DiagnosticDescriptor = descriptor;
51 | this.Context = context;
52 | this.Message = message;
53 | this.Locations = locations.ToArray();
54 | }
55 |
56 | ///
57 | /// Creates the diagnostic for the analyzer
58 | ///
59 | ///
60 | public Diagnostic CreateDiagnostic()
61 | {
62 | Location mainLocation = Location.None;
63 | Location[] extLocations = Locations;
64 | string message = Message;
65 |
66 | if (Context != null)
67 | {
68 | if (Context is BaseTypeDeclarationSyntax btds)
69 | message = $"{btds.Identifier.Text}: {Message}";
70 |
71 | mainLocation = Context.GetLocation();
72 | }
73 |
74 | if (mainLocation == Location.None && Locations.Length > 0)
75 | mainLocation = Locations[0];
76 |
77 | if (extLocations == null || extLocations.Length == 0)
78 | return Diagnostic.Create(DiagnosticDescriptor, mainLocation, message);
79 |
80 | return Diagnostic.Create(DiagnosticDescriptor, mainLocation, extLocations, message);
81 | }
82 |
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/EppNet-SourceGen/Source/Analysis/DiagnosticList.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////
2 | /// Filename: DiagnosticList.cs
3 | /// Date: March 13, 2025
4 | /// Authors: Maverick Liberty
5 | //////////////////////////////////////////////
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | namespace EppNet.SourceGen.Analysis
11 | {
12 |
13 | ///
14 | /// Wrapper around a lazily created list of
15 | ///
16 | public class DiagnosticList
17 | {
18 | public bool AnalysisMode { get; }
19 |
20 | public bool IsValueCreated { get => _diagnostics.IsValueCreated; }
21 |
22 | private readonly Lazy> _diagnostics;
23 |
24 | public DiagnosticList(ExecutionContext context)
25 | {
26 | this.AnalysisMode = context.IsAnalysis;
27 | this._diagnostics = new(() => []);
28 | }
29 |
30 | public DiagnosticList(bool analysisMode)
31 | {
32 | this.AnalysisMode = analysisMode;
33 | this._diagnostics = new(() => []);
34 | }
35 |
36 | public bool Add(AnalysisDiagnostic diagnostic)
37 | {
38 | if (!AnalysisMode)
39 | return false;
40 |
41 | _diagnostics.Value.Add(diagnostic);
42 | return true;
43 | }
44 |
45 | public bool AddRange(IEnumerable diagnostics)
46 | {
47 | if (!AnalysisMode)
48 | return false;
49 |
50 | _diagnostics.Value.AddRange(diagnostics);
51 | return true;
52 | }
53 |
54 | public List AddAndGet(AnalysisDiagnostic diagnostic)
55 | {
56 | Add(diagnostic);
57 | return Get();
58 | }
59 |
60 | public List Get() =>
61 | _diagnostics.IsValueCreated ?
62 | _diagnostics.Value :
63 | Globals.EmptyDiagnostics;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/EppNet-SourceGen/Source/ExecutionContext.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////
2 | /// Filename: ExecutionContext.cs
3 | /// Date: March 12, 2025
4 | /// Authors: Maverick Liberty
5 | //////////////////////////////////////////////
6 | using Microsoft.CodeAnalysis;
7 | using Microsoft.CodeAnalysis.CSharp.Syntax;
8 |
9 | using System.Collections.Concurrent;
10 |
11 | namespace EppNet.SourceGen
12 | {
13 | public class ExecutionContext
14 | {
15 |
16 | ///
17 | /// Whether or not this is running in the analysis mode
18 | ///
19 | public bool IsAnalysis;
20 |
21 | public ConcurrentDictionary Resolvers;
22 |
23 | private ConcurrentDictionary _stringPool;
24 |
25 | // Can store TypeSyntax or strings
26 | private ConcurrentDictionary