mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
Created S# .sln and moved project to src folder
This commit is contained in:
13
ICD.Common/EventArguments/BoolEventArgs.cs
Normal file
13
ICD.Common/EventArguments/BoolEventArgs.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class BoolEventArgs : GenericEventArgs<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public BoolEventArgs(bool data) : base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
12
ICD.Common/EventArguments/CharEventArgs.cs
Normal file
12
ICD.Common/EventArguments/CharEventArgs.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using ICD.Common.Properties;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
[PublicAPI]
|
||||
public sealed class CharEventArgs : GenericEventArgs<char>
|
||||
{
|
||||
public CharEventArgs(char value) : base(value)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
16
ICD.Common/EventArguments/DateTimeEventArgs.cs
Normal file
16
ICD.Common/EventArguments/DateTimeEventArgs.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class DateTimeEventArgs : GenericEventArgs<DateTime>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public DateTimeEventArgs(DateTime data)
|
||||
: base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
14
ICD.Common/EventArguments/FloatEventArgs.cs
Normal file
14
ICD.Common/EventArguments/FloatEventArgs.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class FloatEventArgs : GenericEventArgs<float>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public FloatEventArgs(float data)
|
||||
: base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
18
ICD.Common/EventArguments/GenericEventArgs.cs
Normal file
18
ICD.Common/EventArguments/GenericEventArgs.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public abstract class GenericEventArgs<T> : EventArgs
|
||||
{
|
||||
public T Data { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
protected GenericEventArgs(T data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
13
ICD.Common/EventArguments/IntEventArgs.cs
Normal file
13
ICD.Common/EventArguments/IntEventArgs.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class IntEventArgs : GenericEventArgs<int>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public IntEventArgs(int data) : base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
13
ICD.Common/EventArguments/StringEventArgs.cs
Normal file
13
ICD.Common/EventArguments/StringEventArgs.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class StringEventArgs : GenericEventArgs<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public StringEventArgs(string data) : base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
39
ICD.Common/EventArguments/TcpReceiveEventArgs.cs
Normal file
39
ICD.Common/EventArguments/TcpReceiveEventArgs.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ICD.Common.Utils;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class TcpReceiveEventArgs : EventArgs
|
||||
{
|
||||
private readonly uint m_ClientId;
|
||||
private readonly string m_Data;
|
||||
|
||||
public uint ClientId { get { return m_ClientId; } }
|
||||
|
||||
public string Data { get { return m_Data; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="clientId"></param>
|
||||
/// <param name="data"></param>
|
||||
public TcpReceiveEventArgs(uint clientId, IEnumerable<byte> data)
|
||||
{
|
||||
m_ClientId = clientId;
|
||||
m_Data = StringUtils.ToString(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="clientId"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="length"></param>
|
||||
public TcpReceiveEventArgs(uint clientId, IEnumerable<byte> data, int length)
|
||||
{
|
||||
m_ClientId = clientId;
|
||||
m_Data = StringUtils.ToString(data, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
16
ICD.Common/EventArguments/UShortEventArgs.cs
Normal file
16
ICD.Common/EventArguments/UShortEventArgs.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using ICD.Common.Properties;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
[PublicAPI]
|
||||
public sealed class UShortEventArgs : GenericEventArgs<ushort>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public UShortEventArgs(ushort data) : base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
29
ICD.Common/EventArguments/XmlRecursionEventArgs.cs
Normal file
29
ICD.Common/EventArguments/XmlRecursionEventArgs.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using ICD.Common.Properties;
|
||||
|
||||
namespace ICD.Common.EventArguments
|
||||
{
|
||||
public sealed class XmlRecursionEventArgs : EventArgs
|
||||
{
|
||||
[PublicAPI]
|
||||
public string Outer { get; private set; }
|
||||
|
||||
[PublicAPI]
|
||||
public string[] Path { get; private set; }
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="outer"></param>
|
||||
/// <param name="path"></param>
|
||||
public XmlRecursionEventArgs(string outer, string[] path)
|
||||
{
|
||||
Outer = outer;
|
||||
Path = path;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user