Пример #1
0
 internal static Deleted FromNative(deleted native)
 {
     return(new Deleted
     {
         Id = native.idSpecified ? (int?)native.id : null
     });
 }
Пример #2
0
    public void clicked()
    {
        Debug.Log("in clicked");
        deleted user = new deleted("deleteAccount", Global.getToken(), Global.getID());
        string  json = JsonConvert.SerializeObject(user);

        Byte[] data = System.Text.Encoding.ASCII.GetBytes(json);
        Global.stream.Write(data, 0, data.Length);
        data = new Byte[256];
        string responseData = string.Empty;
        Int32  bytes        = Global.stream.Read(data, 0, data.Length);

        responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);
        Debug.Log(responseData);
        SceneManager.LoadScene("MainScene");
        Global.username = "";
        Global.userID   = 0;
        Global.userCards.Clear();
        Global.usercredits  = 0;
        Global.selectedDeck = new eldritch.cards.Deck();
        Global.userDecks.Clear();
        Global.avatar = 0;
        Global.bio    = "";
    }