mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-15 17:06:59 +02:00
Server: Maintain connection last send time
This commit is contained in:
parent
765443591f
commit
bb8cadee93
4 changed files with 62 additions and 0 deletions
36
Utilities/Generics/Reference.cs
Normal file
36
Utilities/Generics/Reference.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Utilities
|
||||
{
|
||||
public class Reference<T> where T : struct
|
||||
{
|
||||
T m_value;
|
||||
|
||||
public Reference(T value)
|
||||
{
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
public T Value
|
||||
{
|
||||
get { return m_value; }
|
||||
set { m_value = value; }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return m_value.ToString();
|
||||
}
|
||||
|
||||
public static implicit operator T(Reference<T> wrapper)
|
||||
{
|
||||
return wrapper.Value;
|
||||
}
|
||||
|
||||
public static implicit operator Reference<T>(T value)
|
||||
{
|
||||
return new Reference<T>(value);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue