Skip to content

Commit b97e62d

Browse files
committed
[修改]1. 整合程序集
1 parent 9c3bb96 commit b97e62d

24 files changed

+402
-465
lines changed

GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
</PackageReference>
2424
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
2525
</ItemGroup>
26+
2627
<ItemGroup>
27-
<ProjectReference Include="..\GameFrameX.Core.Abstractions\GameFrameX.Core.Abstractions.csproj" />
28+
<ProjectReference Include="..\GameFrameX.Core\GameFrameX.Core.csproj" />
2829
</ItemGroup>
2930

3031
</Project>

GameFrameX.Core.Abstractions/GameFrameX.Core.Abstractions.csproj

Lines changed: 0 additions & 56 deletions
This file was deleted.
File renamed without changes.

GameFrameX.Core.Abstractions/Attribute/ComponentTypeAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/ComponentTypeAttribute.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
using GameFrameX.Utility.Setting;
2-
3-
namespace GameFrameX.Core.Abstractions.Attribute;
4-
5-
/// <summary>
6-
/// 组件类型标记
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.Class)]
9-
public class ComponentTypeAttribute : System.Attribute
10-
{
11-
/// <summary>
12-
/// 组件类型
13-
/// </summary>
14-
/// <param name="type">组件类型,值应大于0且小于ActorType.Max并且不为ActorType.Separator</param>
15-
public ComponentTypeAttribute(ushort type)
16-
{
17-
if (type is 0 or GlobalConst.ActorTypeSeparator || type >= GlobalConst.ActorTypeMax)
18-
{
19-
throw new InvalidDataException($"无效的组件类型 {type},值应大于{GlobalConst.ActorTypeNone}且小于{GlobalConst.ActorTypeMax}和不为{GlobalConst.ActorTypeSeparator}");
20-
}
21-
22-
Type = type;
23-
}
24-
25-
/// <summary>
26-
/// 组件类型
27-
/// </summary>
28-
public ushort Type { get; }
1+
using GameFrameX.Utility.Setting;
2+
3+
namespace GameFrameX.Core.Abstractions.Attribute;
4+
5+
/// <summary>
6+
/// 组件类型标记
7+
/// </summary>
8+
[AttributeUsage(AttributeTargets.Class)]
9+
public class ComponentTypeAttribute : System.Attribute
10+
{
11+
/// <summary>
12+
/// 组件类型
13+
/// </summary>
14+
/// <param name="type">组件类型,值应大于0且小于ActorType.Max并且不为ActorType.Separator</param>
15+
public ComponentTypeAttribute(ushort type)
16+
{
17+
if (type is 0 or GlobalConst.ActorTypeSeparator || type >= GlobalConst.ActorTypeMax)
18+
{
19+
throw new InvalidDataException($"无效的组件类型 {type},值应大于{GlobalConst.ActorTypeNone}且小于{GlobalConst.ActorTypeMax}和不为{GlobalConst.ActorTypeSeparator}");
20+
}
21+
22+
Type = type;
23+
}
24+
25+
/// <summary>
26+
/// 组件类型
27+
/// </summary>
28+
public ushort Type { get; }
2929
}

GameFrameX.Core.Abstractions/Attribute/DiscardAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/DiscardAttribute.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
namespace GameFrameX.Core.Abstractions.Attribute;
2-
3-
/// <summary>
4-
/// 此方法使用了弃元运算符,不会等待执行(将强制追加到队列末端执行)
5-
/// </summary>
6-
[AttributeUsage(AttributeTargets.Method)]
7-
public sealed class DiscardAttribute : System.Attribute
8-
{
1+
namespace GameFrameX.Core.Abstractions.Attribute;
2+
3+
/// <summary>
4+
/// 此方法使用了弃元运算符,不会等待执行(将强制追加到队列末端执行)
5+
/// </summary>
6+
[AttributeUsage(AttributeTargets.Method)]
7+
public sealed class DiscardAttribute : System.Attribute
8+
{
99
}

GameFrameX.Core.Abstractions/Attribute/FuncAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/FuncAttribute.cs

File renamed without changes.

GameFrameX.Core.Abstractions/Attribute/ServiceAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/ServiceAttribute.cs

File renamed without changes.

GameFrameX.Core.Abstractions/Attribute/ThreadSafeAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/ThreadSafeAttribute.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
namespace GameFrameX.Core.Abstractions.Attribute;
2-
3-
/// <summary>
4-
/// 此方法线程安全
5-
/// </summary>
6-
[AttributeUsage(AttributeTargets.Method)]
7-
public sealed class ThreadSafeAttribute : System.Attribute
8-
{
1+
namespace GameFrameX.Core.Abstractions.Attribute;
2+
3+
/// <summary>
4+
/// 此方法线程安全
5+
/// </summary>
6+
[AttributeUsage(AttributeTargets.Method)]
7+
public sealed class ThreadSafeAttribute : System.Attribute
8+
{
99
}

GameFrameX.Core.Abstractions/Attribute/TimeOutAttribute.cs renamed to GameFrameX.Core/Abstractions/Attribute/TimeOutAttribute.cs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
namespace GameFrameX.Core.Abstractions.Attribute;
2-
3-
/// <summary>
4-
/// 超时时间(毫秒)
5-
/// </summary>
6-
[AttributeUsage(AttributeTargets.Method)]
7-
public sealed class TimeOutAttribute : System.Attribute
8-
{
9-
/// <summary>
10-
/// 超时时间
11-
/// </summary>
12-
/// <param name="timeOut">时间.单位毫秒</param>
13-
public TimeOutAttribute(int timeOut)
14-
{
15-
TimeOut = timeOut;
16-
}
17-
18-
/// <summary>
19-
/// 超时时间
20-
/// </summary>
21-
/// <param name="timeOut"></param>
22-
public TimeOutAttribute(TimeSpan timeOut) : this(timeOut.Milliseconds)
23-
{
24-
}
25-
26-
/// <summary>
27-
/// 超时时间
28-
/// </summary>
29-
public int TimeOut { get; }
1+
namespace GameFrameX.Core.Abstractions.Attribute;
2+
3+
/// <summary>
4+
/// 超时时间(毫秒)
5+
/// </summary>
6+
[AttributeUsage(AttributeTargets.Method)]
7+
public sealed class TimeOutAttribute : System.Attribute
8+
{
9+
/// <summary>
10+
/// 超时时间
11+
/// </summary>
12+
/// <param name="timeOut">时间.单位毫秒</param>
13+
public TimeOutAttribute(int timeOut)
14+
{
15+
TimeOut = timeOut;
16+
}
17+
18+
/// <summary>
19+
/// 超时时间
20+
/// </summary>
21+
/// <param name="timeOut"></param>
22+
public TimeOutAttribute(TimeSpan timeOut) : this(timeOut.Milliseconds)
23+
{
24+
}
25+
26+
/// <summary>
27+
/// 超时时间
28+
/// </summary>
29+
public int TimeOut { get; }
3030
}
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
using GameFrameX.Utility;
2-
3-
namespace GameFrameX.Core.Abstractions.Events;
4-
5-
/// <summary>
6-
/// 事件参数
7-
/// </summary>
8-
public struct Event
9-
{
10-
/// <summary>
11-
/// 空
12-
/// </summary>
13-
public static Event Null = new();
14-
15-
/// <summary>
16-
/// 事件id
17-
/// </summary>
18-
public int EventId;
19-
20-
/// <summary>
21-
/// 事件参数
22-
/// </summary>
23-
public Param Data;
1+
using GameFrameX.Utility;
2+
3+
namespace GameFrameX.Core.Abstractions.Events;
4+
5+
/// <summary>
6+
/// 事件参数
7+
/// </summary>
8+
public struct Event
9+
{
10+
/// <summary>
11+
/// 空
12+
/// </summary>
13+
public static Event Null = new();
14+
15+
/// <summary>
16+
/// 事件id
17+
/// </summary>
18+
public int EventId;
19+
20+
/// <summary>
21+
/// 事件参数
22+
/// </summary>
23+
public Param Data;
2424
}

0 commit comments

Comments
 (0)