public override void Write(System.Text.StringBuilder sb)
        {
            ++IndentCount;
            Indent(sb); sb.AppendFormat("export interface {0}", TypeDefinition.ToTypeScriptItemName());

            if (TypeDefinition.HasGenericParameters)
            {
                sb.Append("<");
                TypeDefinition.GenericParameters.For((genericParam, i, isLastItem) =>
                {
                    sb.AppendFormat("{0}{1}", genericParam.ToTypeScriptType(), (isLastItem ? "" : ", "));
                });
                sb.Append(">");
            }

            sb.AppendLine(" {");
            IndentCount++;

            // 'ctor' is at index 0
            // 'invoke' is at index 1
            var invokeMethod = TypeDefinition.Methods[1];
            if (invokeMethod.Parameters.Any())
            {
                var target = invokeMethod.Parameters[0];
                Indent(sb); sb.AppendFormatLine("target: {0};", target.ParameterType.ToTypeScriptType());
            }
            else
            {
                Indent(sb); sb.AppendFormatLine("target: any;");
            }
            Indent(sb); sb.AppendFormatLine("detail: any[];");

            Indent(sb); sb.AppendLine("type: string;");
            IndentCount--;
            Indent(sb); sb.AppendLine("}");

        }
 public override void ToString(System.Text.StringBuilder builder)
 {
     builder.AppendLine("Connection token: " + this.Token);
     builder.AppendFormatLine("Unknown uint64: {0} 0x{0:X16}", this.UnknownULong);
     builder.AppendLine("Connection index: " + this.ConnectionIndex);
     builder.AppendFormatLine("Connection server: {0}:{1}", this.IP, this.Port);
     builder.AppendLine("Computed Hash: " + this.ComputedHash.ToHexString());
     builder.AppendLine("Server's Hash: " + this.ServerHash.ToHexString());
 }