aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher.CLI/App.config
blob: 23efc27ea25833ba1c6d57fd4412b4d04e2039e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
lass="p">{ internal Brush Foreground; internal Brush Background; internal FontFamily Family; internal FontWeight? Weight; internal FontStyle? Style; public HighlightingState Clone() { return new HighlightingState { Foreground = this.Foreground, Background = this.Background, Family = this.Family, Weight = this.Weight, Style = this.Style }; } } readonly string text; List<int> stateChangeOffsets = new List<int>(); List<HighlightingState> stateChanges = new List<HighlightingState>(); int GetIndexForOffset(int offset) { if (offset < 0 || offset > text.Length) throw new ArgumentOutOfRangeException("offset"); int index = stateChangeOffsets.BinarySearch(offset); if (index < 0) { index = ~index; if (offset < text.Length) { stateChanges.Insert(index, stateChanges[index - 1].Clone()); stateChangeOffsets.Insert(index, offset); } } return index; } /// <summary> /// Creates a new HighlightedInlineBuilder instance. /// </summary> public HighlightedInlineBuilder(string text) { if (text == null) throw new ArgumentNullException("text"); this.text = text; stateChangeOffsets.Add(0); stateChanges.Add(new HighlightingState()); } HighlightedInlineBuilder(string text, int[] offsets, HighlightingState[] states) { this.text = text; stateChangeOffsets.AddRange(offsets); stateChanges.AddRange(states); } /// <summary> /// Gets the text. /// </summary> public string Text { get { return text; } } /// <summary> /// Applies the properties from the HighlightingColor to the specified text segment. /// </summary> public void SetHighlighting(int offset, int length, HighlightingColor color) { if (color == null) throw new ArgumentNullException("color"); if (color.Foreground == null && color.FontStyle == null && color.FontWeight == null) { // Optimization: don't split the HighlightingState when we're not changing // any property. For example, the "Punctuation" color in C# is // empty by default. return; } int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { HighlightingState state = stateChanges[i]; if (color.Foreground != null) state.Foreground = color.Foreground.GetBrush(null); if (color.Background != null) state.Background = color.Background.GetBrush(null); if (color.FontStyle != null) state.Style = color.FontStyle; if (color.FontWeight != null) state.Weight = color.FontWeight; } } /// <summary> /// Sets the foreground brush on the specified text segment. /// </summary> public void SetForeground(int offset, int length, Brush brush) { int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { stateChanges[i].Foreground = brush; } } /// <summary> /// Sets the background brush on the specified text segment. /// </summary> public void SetBackground(int offset, int length, Brush brush) { int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { stateChanges[i].Background = brush; } } /// <summary> /// Sets the font weight on the specified text segment. /// </summary> public void SetFontWeight(int offset, int length, FontWeight weight) { int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { stateChanges[i].Weight = weight; } } /// <summary> /// Sets the font style on the specified text segment. /// </summary> public void SetFontStyle(int offset, int length, FontStyle style) { int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { stateChanges[i].Style = style; } } /// <summary> /// Sets the font family on the specified text segment. /// </summary> public void SetFontFamily(int offset, int length, FontFamily family) { int startIndex = GetIndexForOffset(offset); int endIndex = GetIndexForOffset(offset + length); for (int i = startIndex; i < endIndex; i++) { stateChanges[i].Family = family; } } /// <summary> /// Creates WPF Run instances that can be used for TextBlock.Inlines. /// </summary> public Run[] CreateRuns() { Run[] runs = new Run[stateChanges.Count]; for (int i = 0; i < runs.Length; i++) { int startOffset = stateChangeOffsets[i]; int endOffset = i + 1 < stateChangeOffsets.Count ? stateChangeOffsets[i + 1] : text.Length; Run r = new Run(text.Substring(startOffset, endOffset - startOffset)); HighlightingState state = stateChanges[i]; if (state.Foreground != null) r.Foreground = state.Foreground; if (state.Background != null) r.Background = state.Background; if (state.Weight != null) r.FontWeight = state.Weight.Value; if (state.Family != null) r.FontFamily = state.Family; if (state.Style != null) r.FontStyle = state.Style.Value; runs[i] = r; } return runs; } /// <summary> /// Clones this HighlightedInlineBuilder. /// </summary> public HighlightedInlineBuilder Clone() { return new HighlightedInlineBuilder(this.text, stateChangeOffsets.ToArray(), stateChanges.Select(sc => sc.Clone()).ToArray()); } } }