/// <summary> /// Creates a signed entity from a <see cref="MimeEntity"/>, which must be multipart and have a content and signed part. /// </summary> /// <param name="source">The source entity.</param> /// <returns>The newly initialized signed entity.</returns> public static SignedEntity Load(MimeEntity source) { if (source == null) { throw new ArgumentNullException("source"); } if (!source.IsMultiPart) { throw new SignatureException(SignatureError.InvalidMultipartSigned); } return(new SignedEntity(source.ParsedContentType, source.GetParts())); }