Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
#47 - Move classes out of files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruffo324 committed Mar 15, 2018
1 parent 06aa748 commit dc6eb73
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server\ColShapeEvent.cs" />
<Compile Include="Server\ColShapeHandler.cs" />
<Compile Include="Server\IColShapeHandler.cs" />
</ItemGroup>
Expand All @@ -89,5 +90,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Server\Enums\" />
<Folder Include="Server\Models\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions EvoMp/EvoMp.Module.ColShapeHandler/Server/ColShapeEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using GrandTheftMultiplayer.Server.Managers;
using GrandTheftMultiplayer.Shared;

namespace EvoMp.Module.ColShapeHandler.Server
{
/// <summary>
/// Wrapper for GT-MP OnEntityEnterColShape, OnEntityExitColShape
/// </summary>
public class ColShapeEvent
{
/// <inheritdoc />
public delegate void Callback(ColShape shape, NetHandle entity);

/// <summary>
/// Gets called when the event is triggered
/// </summary>
public Callback Cab;

/// <inheritdoc />
public ColShapeEvent(Callback cab)
{
Cab = cab;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace EvoMp.Module.ColShapeHandler.Server
{
/// <inheritdoc />
/// <inheritdoc cref="IColShapeHandler" />
public class ColShapeHandler : BaseModule, IColShapeHandler
{
private readonly API _api;
Expand Down
22 changes: 0 additions & 22 deletions EvoMp/EvoMp.Module.ColShapeHandler/Server/IColShapeHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using EvoMp.Core.Module.Server;
using GrandTheftMultiplayer.Server.Managers;
using GrandTheftMultiplayer.Shared;
using GrandTheftMultiplayer.Shared.Math;

namespace EvoMp.Module.ColShapeHandler.Server
Expand Down Expand Up @@ -93,24 +91,4 @@ public interface IColShapeHandler

#endregion
}

/// <summary>
/// Wrapper for GT-MP OnEntityEnterColShape, OnEntityExitColShape
/// </summary>
public class ColShapeEvent
{
/// <inheritdoc />
public delegate void Callback(ColShape shape, NetHandle entity);

/// <summary>
/// Gets called when the event is triggered
/// </summary>
public Callback Cab;

/// <inheritdoc />
public ColShapeEvent(Callback cab)
{
Cab = cab;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand All @@ -12,7 +12,6 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Windows-Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
Expand Down Expand Up @@ -50,7 +49,6 @@
<DefineConstants>__MonoCS__</DefineConstants>
<DocumentationFile>bin\EvoMp.Module.EventHandler.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<Reference Include="BCrypt.Net, Version=0.1.5073.29922, Culture=neutral, PublicKeyToken=6bcd409ee6bc9292, processorArchitecture=MSIL">
<HintPath>..\packages\BCrypt-Official.0.1.109\lib\BCrypt.Net.dll</HintPath>
Expand Down Expand Up @@ -83,6 +81,7 @@
<Compile Include="Server\EventHandler.cs" />
<Compile Include="Server\IEventHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server\ServerEventHandle.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EvoMp.Core.ConsoleHandler\EvoMp.Core.ConsoleHandler.csproj">
Expand All @@ -103,4 +102,4 @@
<TypeScriptCompile Include="Client\EventListener.ts" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
12 changes: 0 additions & 12 deletions EvoMp/EvoMp.Module.EventHandler/Server/EventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,4 @@ private void InvokeServerEvent(Client client, string eventName, object[] args)
serverEventHandle.Cab.Invoke(client, eventName, args);
}
}

public class ServerEventHandle
{
public delegate void Callback(Client user, string eventName, params object[] args);

public Callback Cab;

public ServerEventHandle(Callback cab)
{
Cab = cab;
}
}
}
16 changes: 16 additions & 0 deletions EvoMp/EvoMp.Module.EventHandler/Server/ServerEventHandle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using GrandTheftMultiplayer.Server.Elements;

namespace EvoMp.Module.EventHandler.Server
{
public class ServerEventHandle
{
public delegate void Callback(Client user, string eventName, params object[] args);

public Callback Cab;

public ServerEventHandle(Callback cab)
{
Cab = cab;
}
}
}

0 comments on commit dc6eb73

Please sign in to comment.