public static void BuildAssets()
    {
        //VarParse varParse = new VarParse();
        //varParse.UpdateValues(new RoomSettings(), "RoomSettings");
        //Debug.Log(varParse.jsonData.ToJson());

        ExitGames.Client.Photon.Hashtable d = new ExitGames.Client.Photon.Hashtable();
        var s1 = new StringBuilder();
        var s2 = new StringBuilder();
        s1.Append("/");
        s2.Append("/");
        d.Add(s1, null);
        Debug.Log(s1.GetHashCode() == s2.GetHashCode());
    }
Example #2
0
		/// <summary>
		/// Returns the hash code for this identity. <see cref="EntityBase{T}"/> hash codes 
		/// are equal to <see cref="IdentityBase"/> hash codes.
		/// </summary>
		/// <returns>The hash code.</returns>
		public override int GetHashCode()
		{
			DictionaryEntry[] entries = this.GetIdentityEntries();
			if (entries.Length == 0)
				return base.GetHashCode();
			if (entries.Length == 1)
				return entries[0].GetHashCode();

			StringBuilder hashstring = new StringBuilder();
			for (int idx = 0; idx < entries.Length; idx++)
			{
				hashstring.Append(entries[idx].GetHashCode().ToString(CultureInfo.InvariantCulture));
			}

			return hashstring.GetHashCode();
		}
Example #3
0
        public override int GetHashCode()
        {
            var builder = new StringBuilder();
            foreach (var message in _errorsToAdd)
                builder.Append(message.GetHashCode().ToString() + "|");
            foreach (var message in _errorsToRemove)
                builder.Append(message.GetHashCode().ToString() + "|");

            foreach (var message in _warningsToAdd)
                builder.Append(message.GetHashCode().ToString() + "|");
            foreach (var message in _warningsToRemove)
                builder.Append(message.GetHashCode().ToString() + "|");

            foreach (var message in _failedToAdd)
                builder.Append(message.GetHashCode().ToString() + "|");
            foreach (var message in _ignoredToAdd)
                builder.Append(message.GetHashCode().ToString() + "|");

            foreach (var message in _testsToRemove)
                builder.Append(message.GetHashCode().ToString() + "|");
            return builder.GetHashCode();
        }
Example #4
0
 public MyProfilerBlock(string name)
 {
     Name = new StringBuilder(name);
     BlockHash = Name.GetHashCode();
     ThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId;
 }