public void MessageRaised(object sender, BuildMessageEventArgs args) { try { lock (syncLock) { if (args is TargetSkippedEventArgs2 targetSkipped) { TargetSkipped(targetSkipped); return; } if (!sawCulture && args.SenderName == "BinaryLogger" && args.Message is string message && message.StartsWith("CurrentUICulture", StringComparison.Ordinal)) { sawCulture = true; var kvp = TextUtilities.ParseNameValue(message); string culture = kvp.Value; if (!string.IsNullOrEmpty(culture)) { Strings.Initialize(culture); } } messageProcessor.Process(args); } } catch (Exception ex) { HandleException(ex); } }
public void MessageRaised(object sender, BuildMessageEventArgs args) { try { lock (syncLock) { if (args.GetType().Name == "TargetSkippedEventArgs") { if (args is TargetSkippedEventArgs targetSkipped) { TargetSkipped(targetSkipped); } else { targetSkipped = new TargetSkippedEventArgs(); targetSkipped.BuildEventContext = args.BuildEventContext; targetSkipped.TargetName = Reflector.GetTargetNameFromTargetSkipped(args); targetSkipped.TargetFile = Reflector.GetTargetFileFromTargetSkipped(args); targetSkipped.ParentTarget = Reflector.GetParentTargetFromTargetSkipped(args); targetSkipped.BuildReason = Reflector.GetBuildReasonFromTargetSkipped(args); TargetSkipped(targetSkipped); } return; } messageProcessor.Process(args); } } catch (Exception ex) { HandleException(ex); } }
public void MessageRaised(object sender, BuildMessageEventArgs args) { try { lock (syncLock) { messageProcessor.Process(args); } } catch (Exception ex) { HandleException(ex); } }
public void MessageRaised(object sender, BuildMessageEventArgs args) { try { lock (syncLock) { if (args is TargetSkippedEventArgs targetSkipped) { TargetSkipped(targetSkipped); return; } messageProcessor.Process(args); } } catch (Exception ex) { HandleException(ex); } }
public void MessageRaised(object sender, BuildMessageEventArgs args) { try { lock (syncLock) { if (args is TargetSkippedEventArgs targetSkipped) { TargetSkipped(targetSkipped); return; } if (!sawCulture && args.SenderName == "BinaryLogger" && args.Message.StartsWith("CurrentUICulture")) { sawCulture = true; int equalsIndex = args.Message.IndexOf("="); if (equalsIndex > 0 && equalsIndex < args.Message.Length - 1) { string culture = args.Message.Substring(equalsIndex + 1, args.Message.Length - 1 - equalsIndex); // read language from log and initialize resource strings if (!String.IsNullOrEmpty(culture)) { Strings.Initialize(culture, force: true); } } } messageProcessor.Process(args); } } catch (Exception ex) { HandleException(ex); } }