/// <summary> /// Apply the patterns specified in the telemetry configuration on the message data fields. /// </summary> public new void ApplyPatterns(EndpointTelemetryConfigurationModel telemetryConfiguration) { base.ApplyPatterns(telemetryConfiguration); if (telemetryConfiguration.Value.Value.Publish == true) { Value = telemetryConfiguration.Value.Value.PatternMatch(Value); } if (telemetryConfiguration.Value.SourceTimestamp.Publish == true) { SourceTimestamp = telemetryConfiguration.Value.SourceTimestamp.PatternMatch(SourceTimestamp); } if (telemetryConfiguration.Value.ReceiveTimestamp.Publish == true) { ReceiveTimestamp = telemetryConfiguration.Value.ReceiveTimestamp.PatternMatch(ReceiveTimestamp); } if (telemetryConfiguration.Value.StatusCode.Publish == true && StatusCode != null) { if (!string.IsNullOrEmpty(telemetryConfiguration.Value.StatusCode.Pattern)) { Logger.Information($"'Pattern' settngs for StatusCode are ignored."); } } if (telemetryConfiguration.Value.Status.Publish == true) { Status = telemetryConfiguration.Value.Status.PatternMatch(Status); } }
/// <summary> /// Apply the patterns specified in the telemetry configuration on the message data fields. /// </summary> public new void ApplyPatterns(EndpointTelemetryConfigurationModel telemetryConfiguration) { base.ApplyPatterns(telemetryConfiguration); if (telemetryConfiguration.Value.PublishTime.Publish == true) { PublishTime = telemetryConfiguration.Value.PublishTime.PatternMatch(PublishTime); } }
/// <summary> /// Apply the patterns specified in the telemetry configuration on the message data fields. /// </summary> public void ApplyPatterns(EndpointTelemetryConfigurationModel telemetryConfiguration) { if (telemetryConfiguration.EndpointUrl.Publish == true) { EndpointUrl = telemetryConfiguration.EndpointUrl.PatternMatch(EndpointUrl); } if (telemetryConfiguration.NodeId.Publish == true) { NodeId = telemetryConfiguration.NodeId.PatternMatch(NodeId); } if (telemetryConfiguration.MonitoredItem.ApplicationUri.Publish == true) { ApplicationUri = telemetryConfiguration.MonitoredItem.ApplicationUri.PatternMatch(ApplicationUri); } if (telemetryConfiguration.MonitoredItem.DisplayName.Publish == true) { DisplayName = telemetryConfiguration.MonitoredItem.DisplayName.PatternMatch(DisplayName); } if (telemetryConfiguration.Value.Value.Publish == true) { Value = telemetryConfiguration.Value.Value.PatternMatch(Value); } if (telemetryConfiguration.Value.SourceTimestamp.Publish == true) { SourceTimestamp = telemetryConfiguration.Value.SourceTimestamp.PatternMatch(SourceTimestamp); } if (telemetryConfiguration.Value.StatusCode.Publish == true && StatusCode != null) { if (!string.IsNullOrEmpty(telemetryConfiguration.Value.StatusCode.Pattern)) { Logger.Information($"'Pattern' settngs for StatusCode are ignored."); } } if (telemetryConfiguration.Value.Status.Publish == true) { Status = telemetryConfiguration.Value.Status.PatternMatch(Status); } }
/// <summary> /// Apply the patterns specified in the telemetry configuration on the message data fields. /// </summary> public void ApplyPatterns(EndpointTelemetryConfigurationModel telemetryConfiguration) { if (telemetryConfiguration.EndpointId.Publish == true) { EndpointId = telemetryConfiguration.EndpointId.PatternMatch(EndpointId); } if (telemetryConfiguration.EndpointUrl.Publish == true) { EndpointUrl = telemetryConfiguration.EndpointUrl.PatternMatch(EndpointUrl); } if (telemetryConfiguration.NodeId.Publish == true) { NodeId = telemetryConfiguration.NodeId.PatternMatch(NodeId); } if (telemetryConfiguration.MonitoredItem.ApplicationUri.Publish == true) { ApplicationUri = telemetryConfiguration.MonitoredItem.ApplicationUri.PatternMatch(ApplicationUri); } if (telemetryConfiguration.MonitoredItem.DisplayName.Publish == true) { DisplayName = telemetryConfiguration.MonitoredItem.DisplayName.PatternMatch(DisplayName); } }