CentralMine.NET.Client.ToJSON C# (CSharp) Méthode

ToJSON() public méthode

public ToJSON ( ) : string
Résultat string
        public string ToJSON()
        {
            string json = "{";

            IPEndPoint remoteIP = mClient.Client.RemoteEndPoint as IPEndPoint;
            json += "\"ipaddress\": \"" + remoteIP.ToString() + "\",";

            json += "\"state\": \"" + mState.ToString() +  "\",";
            json += "\"type\": \"" + mType.ToString() + "\",";
            json += "\"hashrate\": \"" + mHashrate + "\",";
            json += "\"currency\": \"" + "unknown" + "\",";
            json += "\"agent\": \"" + mAgent + "\",";
            json += "\"platform\": \"" + mPlatform + "\",";
            json += "\"location\": \"" + mLocation + "\"";

            json += "}";
            return json;
        }