예제 #1
0
        public SendRequest(Send send, long?fileLength)
        {
            Type           = send.Type;
            FileLength     = fileLength;
            Name           = send.Name?.EncryptedString;
            Notes          = send.Notes?.EncryptedString;
            MaxAccessCount = send.MaxAccessCount;
            ExpirationDate = send.ExpirationDate;
            DeletionDate   = send.DeletionDate;
            Key            = send.Key?.EncryptedString;
            Password       = send.Password;
            Disabled       = send.Disabled;

            switch (Type)
            {
            case SendType.Text:
                Text = new SendTextApi
                {
                    Text   = send.Text?.Text?.EncryptedString,
                    Hidden = send.Text.Hidden
                };
                break;

            case SendType.File:
                File = new SendFileApi
                {
                    FileName = send.File?.FileName?.EncryptedString
                };
                break;

            default:
                break;
            }
        }
예제 #2
0
 public SendTextData(SendTextApi data)
 {
     Text   = data.Text;
     Hidden = data.Hidden;
 }