IDictionary <string, string> IConfigurationSection.ToDictionary() { return(new Dictionary <string, string> { { "AccountName", AccountName }, { "AccountPassword", AccountPassword }, { "SmtpHost", SmtpHost }, { "PortNumber", PortNumber.ToString() }, { "UseSSL", UseSsl.ToString(CultureInfo.InvariantCulture) } }); }
public override int GetHashCode() { var hashCode = 651983754; hashCode = hashCode * -1521134295 + UseVNodes.GetHashCode(); hashCode = hashCode * -1521134295 + UseSsl.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(CassandraYaml); hashCode = hashCode * -1521134295 + Dc2NodeLength.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(JvmArgs); return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = Servidor?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ Porta.GetHashCode(); hashCode = (hashCode * 397) ^ Usuario?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ Senha?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ UseSsl.GetHashCode(); hashCode = (hashCode * 397) ^ RequerAutenticacao.GetHashCode(); hashCode = (hashCode * 397) ^ Encoding?.GetHashCode() ?? 0; return(hashCode); } }
/// <summary> /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// </summary> /// <param name="context">The NativeActivityContext for the currently running activity.</param> /// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns> /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks> protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if (NoEncryption.Expression != null) { targetCommand.AddParameter("NoEncryption", NoEncryption.Get(context)); } if (CertificateCACheck.Expression != null) { targetCommand.AddParameter("CertificateCACheck", CertificateCACheck.Get(context)); } if (CertificateCNCheck.Expression != null) { targetCommand.AddParameter("CertificateCNCheck", CertificateCNCheck.Get(context)); } if (CertRevocationCheck.Expression != null) { targetCommand.AddParameter("CertRevocationCheck", CertRevocationCheck.Get(context)); } if (EncodePortInServicePrincipalName.Expression != null) { targetCommand.AddParameter("EncodePortInServicePrincipalName", EncodePortInServicePrincipalName.Get(context)); } if (Encoding.Expression != null) { targetCommand.AddParameter("Encoding", Encoding.Get(context)); } if (HttpPrefix.Expression != null) { targetCommand.AddParameter("HttpPrefix", HttpPrefix.Get(context)); } if (MaxEnvelopeSizeKB.Expression != null) { targetCommand.AddParameter("MaxEnvelopeSizeKB", MaxEnvelopeSizeKB.Get(context)); } if (ProxyAuthentication.Expression != null) { targetCommand.AddParameter("ProxyAuthentication", ProxyAuthentication.Get(context)); } if (ProxyCertificateThumbprint.Expression != null) { targetCommand.AddParameter("ProxyCertificateThumbprint", ProxyCertificateThumbprint.Get(context)); } if (ProxyCredential.Expression != null) { targetCommand.AddParameter("ProxyCredential", ProxyCredential.Get(context)); } if (ProxyType.Expression != null) { targetCommand.AddParameter("ProxyType", ProxyType.Get(context)); } if (UseSsl.Expression != null) { targetCommand.AddParameter("UseSsl", UseSsl.Get(context)); } if (Impersonation.Expression != null) { targetCommand.AddParameter("Impersonation", Impersonation.Get(context)); } if (PacketIntegrity.Expression != null) { targetCommand.AddParameter("PacketIntegrity", PacketIntegrity.Get(context)); } if (PacketPrivacy.Expression != null) { targetCommand.AddParameter("PacketPrivacy", PacketPrivacy.Get(context)); } if (Protocol.Expression != null) { targetCommand.AddParameter("Protocol", Protocol.Get(context)); } if (UICulture.Expression != null) { targetCommand.AddParameter("UICulture", UICulture.Get(context)); } if (Culture.Expression != null) { targetCommand.AddParameter("Culture", Culture.Get(context)); } return(new ActivityImplementationContext() { PowerShellInstance = invoker }); }
// Module defining this command // Optional custom code for this activity /// <summary> /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// </summary> /// <param name="context">The NativeActivityContext for the currently running activity.</param> /// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns> /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks> protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if (Attachments.Expression != null) { targetCommand.AddParameter("Attachments", Attachments.Get(context)); } if (Bcc.Expression != null) { targetCommand.AddParameter("Bcc", Bcc.Get(context)); } if (Body.Expression != null) { targetCommand.AddParameter("Body", Body.Get(context)); } if (BodyAsHtml.Expression != null) { targetCommand.AddParameter("BodyAsHtml", BodyAsHtml.Get(context)); } if (Encoding.Expression != null) { targetCommand.AddParameter("Encoding", Encoding.Get(context)); } if (Cc.Expression != null) { targetCommand.AddParameter("Cc", Cc.Get(context)); } if (DeliveryNotificationOption.Expression != null) { targetCommand.AddParameter("DeliveryNotificationOption", DeliveryNotificationOption.Get(context)); } if (From.Expression != null) { targetCommand.AddParameter("From", From.Get(context)); } if (SmtpServer.Expression != null) { targetCommand.AddParameter("SmtpServer", SmtpServer.Get(context)); } if (Priority.Expression != null) { targetCommand.AddParameter("Priority", Priority.Get(context)); } if (Subject.Expression != null) { targetCommand.AddParameter("Subject", Subject.Get(context)); } if (To.Expression != null) { targetCommand.AddParameter("To", To.Get(context)); } if (Credential.Expression != null) { targetCommand.AddParameter("Credential", Credential.Get(context)); } if (UseSsl.Expression != null) { targetCommand.AddParameter("UseSsl", UseSsl.Get(context)); } if (Port.Expression != null) { targetCommand.AddParameter("Port", Port.Get(context)); } return(new ActivityImplementationContext() { PowerShellInstance = invoker }); }