/// <summary>
 /// Creates a new <see cref="FileInfoCard"/> instance and initializes it from a <see cref="FileUploadInfo"/> object.
 /// </summary>
 /// <param name="fileUploadInfo">File upload info</param>
 /// <returns>A new instance of the <see cref="FileInfoCard"/> class</returns>
 public static FileInfoCard FromFileUploadInfo(FileUploadInfo fileUploadInfo)
 {
     return(new FileInfoCard
     {
         Name = fileUploadInfo.Name,
         ContentUrl = fileUploadInfo.ContentUrl,
         FileType = fileUploadInfo.FileType,
         UniqueId = fileUploadInfo.UniqueId,
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the FileConsentCardResponse class.
 /// </summary>
 /// <param name="action">User action on the file consent card.
 /// Possible values include: 'accept', 'decline'</param>
 /// <param name="context">Context sent with the file consent
 /// card.</param>
 /// <param name="uploadInfo">Context sent back to the Bot if user
 /// declined. This is free flow schema and is sent back in Value
 /// field of Activity.</param>
 public FileConsentCardResponse(string action = default(string), object context = default(object), FileUploadInfo uploadInfo = default(FileUploadInfo))
 {
     Action     = action;
     Context    = context;
     UploadInfo = uploadInfo;
 }