You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql_clr_ics/clr_send_ics_invite.cs
+40-6Lines changed: 40 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,7 @@ INNER JOIN [msdb].[dbo].[sysmail_server] AS s
193
193
194
194
#region validations
195
195
196
-
currentPhase="Parameter validations";
196
+
currentPhase="Validating parameters";
197
197
198
198
StringBuildersb_Errors=newStringBuilder();
199
199
@@ -205,10 +205,10 @@ INNER JOIN [msdb].[dbo].[sysmail_server] AS s
205
205
)
206
206
sb_Errors.AppendLine("Missing recipients: Please specify either @recipients, @copy_recipients or @blind_copy_recipients");
207
207
208
-
if(body_format.Value!="HTML"&&body_format.Value!="TEXT")sb_Errors.AppendLine(string.Format("@body_format {0} is invalid. Valid values: TEXT, HTML",body_format.Value));
209
-
if(!Enum.TryParse(method.Value,true,outiCalMethodsmethod_enumvalue))sb_Errors.AppendLine(string.Format("@method {0} is invalid. Valid values: {1}",method.Value,Enum.GetNames(typeof(iCalMethods)).ToString().ToUpper()));
210
-
if(!Enum.TryParse(sensitivity.Value,true,outiCalClasssensitivity_enumvalue))sb_Errors.AppendLine(string.Format("sensitivity {0} is invalid. Valid values: {1}",sensitivity.Value,Enum.GetNames(typeof(iCalClass)).ToString().ToUpper()));
211
-
if(!Enum.TryParse(importance.Value,true,outmailPriority))sb_Errors.AppendLine(string.Format("@importance {0} is invalid. Valid values: {1}",importance.Value,Enum.GetNames(typeof(MailPriority)).ToString().ToUpper()));
208
+
if(body_format.Value!="HTML"&&body_format.Value!="TEXT")sb_Errors.AppendLine(string.Format("@body_format {0} is invalid. Valid values: TEXT | HTML",body_format.Value));
209
+
if(!TryParseEnum(typeof(iCalMethods),method.Value.ToUpper()))sb_Errors.AppendLine(string.Format("@method {0} is invalid. Valid values: {1}",method.Value,String.Join(" | ",Enum.GetNames(typeof(iCalMethods)))));
210
+
if(!TryParseEnum(typeof(iCalClass),sensitivity.Value.ToUpper()))sb_Errors.AppendLine(string.Format("sensitivity {0} is invalid. Valid values: {1}",sensitivity.Value,String.Join(" | ",Enum.GetNames(typeof(iCalClass)))));
211
+
if(!TryParseEnum(typeof(MailPriority),importance.Value,outmailPriority))sb_Errors.AppendLine(string.Format("@importance {0} is invalid. Valid values: {1}",importance.Value,String.Join(" | ",Enum.GetNames(typeof(MailPriority)))));
212
212
213
213
boolrecipient_role_found=false;
214
214
boolcopy_recipient_role_found=false;
@@ -276,7 +276,7 @@ INNER JOIN [msdb].[dbo].[sysmail_server] AS s
0 commit comments