mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
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
51 lines
1.2 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|