Files
RobustToolbox/Robust.Shared/Network/NetSessionId.cs
T
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00

51 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Robust.Shared.Serialization;
namespace Robust.Shared.Network
{
[Serializable, NetSerializable]
public struct NetSessionId : IEquatable<NetSessionId>
{
public readonly string Username;
public NetSessionId(string name)
{
Username = name;
}
public override bool Equals(object obj)
{
return obj is NetSessionId && Equals((NetSessionId)obj);
}
public bool Equals(NetSessionId other)
{
return Username == other.Username;
}
public override int GetHashCode()
{
return -182246463 + EqualityComparer<string>.Default.GetHashCode(Username);
}
public override string ToString()
{
return Username;
}
public static bool operator ==(NetSessionId id1, NetSessionId id2)
{
return id1.Equals(id2);
}
public static bool operator !=(NetSessionId id1, NetSessionId id2)
{
return !(id1 == id2);
}
}
}