-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
102 additions
and
8 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
19 changes: 19 additions & 0 deletions
19
src/common/Edelstein.Common.Gameplay.Login/Contexts/LoginContextPipelines.cs
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 Edelstein.Protocol.Gameplay.Contracts; | ||
using Edelstein.Protocol.Gameplay.Login; | ||
using Edelstein.Protocol.Gameplay.Login.Contexts; | ||
using Edelstein.Protocol.Utilities.Pipelines; | ||
using Injectio.Attributes; | ||
|
||
namespace Edelstein.Common.Gameplay.Login.Contexts; | ||
|
||
[RegisterScoped] | ||
public class LoginContextPipelines( | ||
IPipeline<UserOnPacket<ILoginStageUser, ILoginStageSystem>> userOnPacketPipeline, | ||
IPipeline<UserOnException<ILoginStageUser, ILoginStageSystem>> userOnExceptionPipeline, | ||
IPipeline<UserOnDisconnect<ILoginStageUser, ILoginStageSystem>> userOnDisconnectPipeline | ||
) : ILoginContextPipelines | ||
{ | ||
public IPipeline<UserOnPacket<ILoginStageUser, ILoginStageSystem>> UserOnPacketPipeline { get; } = userOnPacketPipeline; | ||
public IPipeline<UserOnException<ILoginStageUser, ILoginStageSystem>> UserOnExceptionPipeline { get; } = userOnExceptionPipeline; | ||
public IPipeline<UserOnDisconnect<ILoginStageUser, ILoginStageSystem>> UserOnDisconnectPipeline { get; } = userOnDisconnectPipeline; | ||
} |
14 changes: 12 additions & 2 deletions
14
src/common/Edelstein.Common.Gameplay.Login/LoginStageSystem.cs
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
7 changes: 7 additions & 0 deletions
7
src/protocol/Edelstein.Protocol.Gameplay.Login/Contexts/ILoginContextPipelines.cs
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,7 @@ | ||
using Edelstein.Protocol.Gameplay.Contexts; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login.Contexts; | ||
|
||
public interface ILoginContextPipelines : IStageContextPipelines<ILoginStageUser, ILoginStageSystem> | ||
{ | ||
} |
5 changes: 4 additions & 1 deletion
5
src/protocol/Edelstein.Protocol.Gameplay.Login/ILoginStageSystem.cs
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
namespace Edelstein.Protocol.Gameplay.Login; | ||
using Edelstein.Protocol.Gameplay.Login.Contexts; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login; | ||
|
||
public interface ILoginStageSystem : IStageSystem<ILoginStageUser, ILoginStageSystem> | ||
{ | ||
ILoginStageSystemOptions Options { get; } | ||
ILoginContextPipelines Pipelines { get; } | ||
} |
13 changes: 13 additions & 0 deletions
13
src/protocol/Edelstein.Protocol.Gameplay/Contexts/IStageContextPipelines.cs
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,13 @@ | ||
using Edelstein.Protocol.Gameplay.Contracts; | ||
using Edelstein.Protocol.Utilities.Pipelines; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Contexts; | ||
|
||
public interface IStageContextPipelines<TStageUser, TStageSystem> | ||
where TStageUser : IStageUser<TStageUser, TStageSystem> | ||
where TStageSystem : IStageSystem<TStageUser, TStageSystem> | ||
{ | ||
IPipeline<UserOnPacket<TStageUser, TStageSystem>> UserOnPacketPipeline { get; } | ||
IPipeline<UserOnException<TStageUser, TStageSystem>> UserOnExceptionPipeline { get; } | ||
IPipeline<UserOnDisconnect<TStageUser, TStageSystem>> UserOnDisconnectPipeline { get; } | ||
} |
7 changes: 7 additions & 0 deletions
7
src/protocol/Edelstein.Protocol.Gameplay/Contracts/UserOnDisconnect.cs
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,7 @@ | ||
namespace Edelstein.Protocol.Gameplay.Contracts; | ||
|
||
public record UserOnDisconnect<TStageUser, TStageSystem>( | ||
TStageUser User | ||
) | ||
where TStageUser : IStageUser<TStageUser, TStageSystem> | ||
where TStageSystem : IStageSystem<TStageUser, TStageSystem>; |
10 changes: 10 additions & 0 deletions
10
src/protocol/Edelstein.Protocol.Gameplay/Contracts/UserOnException.cs
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,10 @@ | ||
using System; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Contracts; | ||
|
||
public record UserOnException<TStageUser, TStageSystem>( | ||
TStageUser User, | ||
Exception Exception | ||
) | ||
where TStageUser : IStageUser<TStageUser, TStageSystem> | ||
where TStageSystem : IStageSystem<TStageUser, TStageSystem>; |
10 changes: 10 additions & 0 deletions
10
src/protocol/Edelstein.Protocol.Gameplay/Contracts/UserOnPacket.cs
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,10 @@ | ||
using Edelstein.Protocol.Utilities.Buffers; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Contracts; | ||
|
||
public record UserOnPacket<TStageUser, TStageSystem>( | ||
TStageUser User, | ||
IPacket Packet | ||
) | ||
where TStageUser : IStageUser<TStageUser, TStageSystem> | ||
where TStageSystem : IStageSystem<TStageUser, TStageSystem>; |
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