Added four simple network classes (args/exception)

This commit is contained in:
SND\AstrorEnales_cp 2011-11-16 08:57:20 +00:00
parent 7774dd69a6
commit 71025d72b5
5 changed files with 60 additions and 0 deletions

View File

@ -335,6 +335,10 @@
<Compile Include="Media\MediaSourceType.cs" />
<Compile Include="Media\MediaState.cs" />
<Compile Include="Media\VideoSoundtrackType.cs" />
<Compile Include="Net\GameEndedEventArgs.cs" />
<Compile Include="Net\GameStartedEventArgs.cs" />
<Compile Include="Net\NetworkException.cs" />
<Compile Include="Net\NetworkSessionEndedEventArgs.cs" />
<Compile Include="Net\NetworkSessionEndReason.cs" />
<Compile Include="Net\NetworkSessionJoinError.cs" />
<Compile Include="Net\NetworkSessionState.cs" />

View File

@ -0,0 +1,8 @@
using System;
namespace ANX.Framework.Net
{
public class GameEndedEventArgs : EventArgs
{
}
}

View File

@ -0,0 +1,8 @@
using System;
namespace ANX.Framework.Net
{
public class GameStartedEventArgs : EventArgs
{
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Runtime.Serialization;
namespace ANX.Framework.Net
{
public class NetworkException : Exception
{
public NetworkException()
{
}
public NetworkException(string message)
: base(message)
{
}
public NetworkException(string message, Exception innerException)
: base(message, innerException)
{
}
}
}

View File

@ -0,0 +1,18 @@
using System;
namespace ANX.Framework.Net
{
public class NetworkSessionEndedEventArgs : EventArgs
{
public NetworkSessionEndReason EndReason
{
get;
private set;
}
public NetworkSessionEndedEventArgs(NetworkSessionEndReason endReason)
{
EndReason = endReason;
}
}
}