Skip to content

Commit

Permalink
Fix XML docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jefim committed Nov 3, 2023
1 parent ae349d7 commit a8da381
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
33 changes: 29 additions & 4 deletions Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,63 @@ public class Input
/// <summary>
/// Recipient addresses separated by ',' or ';'
/// </summary>
[DefaultValue("\"jane.doe@somedomain.com\"")]
/// <example>jane.doe@example.org</example>
[DefaultValue("\"jane.doe@example.org\"")]
public string To { get; set; }

/// <summary>
/// Cc recipient addresses separated by ',' or ';'
/// </summary>
[DefaultValue("\"jane.doe@somedomain.com\"")]
/// <example>jane.doe@example.org</example>
[DefaultValue("\"jane.doe@example.org\"")]
public string Cc { get; set; }

/// <summary>
/// Bcc recipient addresses separated by ',' or ';'
/// </summary>
[DefaultValue("\"jane.doe@somedomain.com\"")]
/// <example>jane.doe@example.org</example>
[DefaultValue("\"jane.doe@example.org\"")]
public string Bcc { get; set; }

/// <summary>
/// Sender address.
/// </summary>
[DefaultValue("\"john.doe@somedomain.com\"")]
/// <example>john.doe@example.org</example>
[DefaultValue("\"john.doe@example.org\"")]
public string From { get; set; }

/// <summary>
/// Name of the sender.
/// </summary>
/// <example>Frends</example>
[DefaultValue("\"\"")]
public string SenderName { get; set; }

/// <summary>
/// Email message's subject.
/// </summary>
/// <example>Hello Jane</example>
[DefaultValue("\"Hello Jane\"")]
public string Subject { get; set; }

/// <summary>
/// Body of the message.
/// </summary>
/// <example>You've got mail!</example>
[DefaultValue("\"You've got mail!\"")]
public string Message { get; set; }

/// <summary>
/// Set this true if the message is HTML.
/// </summary>
/// <example>true</example>
[DefaultValue("false")]
public bool IsMessageHtml { get; set; }

/// <summary>
/// Encoding of message body and subject. Use following table's name column for other options. https://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx#Anchor_5
/// </summary>
/// <example>utf-8</example>
[DefaultValue("\"utf-8\"")]
public string MessageEncoding { get; set; }

Expand All @@ -66,37 +75,43 @@ public class Options
/// <summary>
/// SMTP server address.
/// </summary>
/// <example>smtp.somedomain.com</example>
[DefaultValue("\"smtp.somedomain.com\"")]
public string SMTPServer { get; set; }

/// <summary>
/// SMTP server port.
/// </summary>
/// <example>25</example>
[DefaultValue("25")]
public int Port { get; set; }

/// <summary>
/// Set this true if SMTP expects to be connected using SSL.
/// </summary>
/// <example>true</example>
[DefaultValue("false")]
public bool UseSsl { get; set; }

/// <summary>
/// Set this true if you want to use windows authentication to authenticate to SMTP server.
/// </summary>
/// <example>true</example>
[DefaultValue("true")]
public bool UseWindowsAuthentication { get; set; }

/// <summary>
/// Use this username to log in to the SMTP server
/// </summary>
/// <example>username</example>
[DefaultValue("\"\"")]
[UIHint(nameof(UseWindowsAuthentication), "", false)]
public string UserName { get; set; }

/// <summary>
/// Use this password to log in to the SMTP server
/// </summary>
/// <example>Password123</example>
[PasswordPropertyText(true)]
[DefaultValue("\"\"")]
[UIHint(nameof(UseWindowsAuthentication), "", false)]
Expand All @@ -108,10 +123,12 @@ public class Output
/// <summary>
/// Value is true if email was sent.
/// </summary>
/// <example>true</example>
public bool EmailSent { get; set; }
/// <summary>
/// Contains information about the task's result.
/// </summary>
/// <example>No attachments found matching path \"C:\\temp\\*.csv\". No email sent.</example>
public string StatusString { get; set; }
}

Expand All @@ -120,6 +137,7 @@ public class Attachment
/// <summary>
/// Chooses if the attachment file is created from a string or copied from disk.
/// </summary>
/// <example>FileAttachment</example>
public AttachmentType AttachmentType { get; set; }

[UIHint(nameof(AttachmentType), "", AttachmentType.AttachmentFromString)]
Expand All @@ -129,19 +147,22 @@ public class Attachment
/// Attachment file's path. Uses Directory.GetFiles(string, string) as a pattern matching technique. See https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx.
/// Exception: If the path ends in a directory, all files in that folder are added as attachments.
/// </summary>
/// <example>/my/attachment/dir</example>
[DefaultValue("\"\"")]
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)]
public string FilePath { get; set; }

/// <summary>
/// If set true and no files match the given path, an exception is thrown.
/// </summary>
/// <example>true</example>
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)]
public bool ThrowExceptionIfAttachmentNotFound { get; set; }

/// <summary>
/// If set true and no files match the given path, email will be sent nevertheless.
/// </summary>
/// <example>true</example>
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)]
public bool SendIfNoAttachmentsFound { get; set; }
}
Expand All @@ -163,13 +184,17 @@ public class AttachmentFromString
/// <summary>
/// Content of the attachment file
/// </summary>
/// <example>My attachment content</example>
[DefaultValue("\"\"")]
[DisplayFormat(DataFormatString = "Text")]
public string FileContent { get; set; }

/// <summary>
/// Name of the attachment file
/// </summary>
/// <example>MyAttachment.txt</example>
[DefaultValue("\"\"")]
[DisplayFormat(DataFormatString = "Text")]
public string FileName { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
<Authors>Frends</Authors>
<Company>Frends</Company>
<Product>Frends</Product>
<Copyright>Frends</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/FrendsPlatform/Frends.SMTP</PackageProjectUrl>
<IncludeSource>true</IncludeSource>
<PackageTags>Frends</PackageTags>
<Description>Task for sending emails using SMTP protocol.</Description>
<PackageProjectUrl>https://frends.com/</PackageProjectUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit a8da381

Please sign in to comment.