protected override void OnItemObjectValidate() { DescriptionProperty.CheckValueSet(""); FromProperty.CheckValueSet(""); ToProperty.CheckValueSet(""); OnValidate(); }
override protected void Append(LoggingEvent loggingEvent) { StringWriter writer = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); string t = Layout.Header; if (t != null) { writer.Write(t); } // Render the event and append the text to the buffer RenderLoggingEvent(writer, loggingEvent); t = Layout.Footer; if (t != null) { writer.Write(t); } string mailMessageBody = writer.ToString(); //MailMessage mailMessage = new MailMessage(); //mailMessage.Body = writer.ToString(); //mailMessage.From = From; //mailMessage.To = m_to; string mailMessageSubject; if (subjectProperty == null) { mailMessageSubject = Subject; } else { var subjectWriter = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); subjectProperty.Format(subjectWriter, loggingEvent); mailMessageSubject = subjectWriter.ToString(); } if (mailMessageSubject.Contains("null")) { mailMessageSubject = Subject; } string mailMessageTo; if (ToProperty == null) { mailMessageTo = To; } else { var subjectWriter = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); ToProperty.Format(subjectWriter, loggingEvent); mailMessageTo = subjectWriter.ToString(); } if (mailMessageTo.Contains("null")) { mailMessageTo = To; } string mailMessageCC; if (CcProperty == null) { mailMessageCC = Cc; } else { StringWriter subjectWriter = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); CcProperty.Format(subjectWriter, loggingEvent); mailMessageCC = subjectWriter.ToString(); } if (mailMessageCC.Contains("null")) { mailMessageCC = Cc; } string mailMessageBcc; if (BccProperty == null) { mailMessageBcc = BCc; } else { StringWriter subjectWriter = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); BccProperty.Format(subjectWriter, loggingEvent); mailMessageBcc = subjectWriter.ToString(); } if (mailMessageBcc.Contains("null")) { mailMessageBcc = BCc; } Send(From, mailMessageTo, mailMessageCC, mailMessageBcc, mailMessageSubject, mailMessageBody); }
static FadeInThemeAnimation() { ToProperty.OverrideMetadata(typeof(FadeInThemeAnimation), new FrameworkPropertyMetadata(1.0)); DurationProperty.OverrideMetadata(typeof(FadeInThemeAnimation), new FrameworkPropertyMetadata(DefaultDuration)); Storyboard.TargetPropertyProperty.OverrideMetadata(typeof(FadeInThemeAnimation), new FrameworkPropertyMetadata(new PropertyPath(UIElement.OpacityProperty))); }
this.SetValue(ToProperty, value);
set => SetValue(ToProperty, value);