/// <summary>
        /// Builds an attachment with binary suitable for using in <see cref="Crashes.GetErrorAttachment"/>.
        /// </summary>
        /// <returns>Error attachment or <c>null</c> if null data is passed.</returns>
        /// <param name="data">Binary data.</param>
        /// <param name="filename">Filename to use on reports.</param>
        /// <param name="contentType">Data MIME type.</param>
        public static ErrorAttachment AttachmentWithBinary(byte[] data, string filename, string contentType)
        {
            NSData            nsdata        = NSData.FromArray(data);
            MSErrorAttachment iosAttachment = MSErrorAttachment.AttachmentWithBinaryData(nsdata, filename, contentType);

            return(new ErrorAttachment(iosAttachment));
        }
        /// <summary>
        /// Builds an attachment with text suitable for using in <see cref="Crashes.GetErrorAttachment"/>.
        /// </summary>
        /// <returns>Error attachment or <c>null</c> if null text is passed.</returns>
        /// <param name="text">Text to attach to the error report.</param>
        public static ErrorAttachment AttachmentWithText(string text)
        {
            MSErrorAttachment iosAttachment = MSErrorAttachment.AttachmentWithText(text);

            return(new ErrorAttachment(iosAttachment));
        }
 private ErrorAttachment(MSErrorAttachment iosAttachment)
 {
     internalAttachment = iosAttachment;
 }