Skip to content

Commit

Permalink
Update Reference Sources to .NET Framework 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Apr 16, 2019
1 parent f82e13c commit 74eb159
Show file tree
Hide file tree
Showing 1,359 changed files with 339,094 additions and 1,685 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ internal void TraceEvent(TraceEventType type, int code, string msdnTraceCode, st
static internal string GenerateMsdnTraceCode(string traceSource, string traceCodeString)
{
return string.Format(CultureInfo.InvariantCulture,
"http://msdn.microsoft.com/{0}/library/{1}.{2}.aspx",
CultureInfo.CurrentCulture.Name,
traceSource, traceCodeString);
"https://docs.microsoft.com/dotnet/framework/wcf/diagnostics/tracing/{0}-{1}",
traceSource.Replace('.', '-'), traceCodeString);
}

#pragma warning disable 56500
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ string LookupPrefix(string ns, ElementNode node)
}
}

if (string.IsNullOrEmpty(retval) && node.parent != null)
if (retval == null && node.parent != null)
{
retval = LookupPrefix(ns, node.parent);
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,19 @@ void OnDesignerViewLoaded(object sender, RoutedEventArgs e)
this.scrollViewerPanner.DraggingHand = (Cursor)this.Resources["PanningCursor"];
}

if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures && this.zoomPicker != null && this.zoomPicker.Template != null)
if (this.zoomPicker != null && this.zoomPicker.Template != null)
{
var zoomPickerTextBox = this.zoomPicker.Template.FindName("PART_EditableTextBox", this.zoomPicker) as TextBox;
if (zoomPickerTextBox != null)
{
zoomPickerTextBox.SetValue(AutomationProperties.NameProperty, SR.ZoomPickerEditorAutomationName);
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures)
{
zoomPickerTextBox.SetValue(AutomationProperties.NameProperty, SR.ZoomPickerEditorAutomationName);
}
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures3 && WorkflowDesignerColors.IsHighContrastEnabled)
{
zoomPickerTextBox.SetValue(TextBox.SelectionOpacityProperty, 0.0);
}
}
}
}
Expand Down Expand Up @@ -798,6 +805,27 @@ private void OnRootDesignerPreviewMouseLeftButtonDown(object sender, MouseButton
this.ShouldStillAllowRubberBandEvenIfMouseLeftButtonDownIsHandled = false;
}

private void OnExpandAllCollapseAllButtonLoaded(object sender, RoutedEventArgs e)
{
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures3)
{
ToggleButton toggleButton = sender as ToggleButton;
if (toggleButton != null && toggleButton.Template != null)
{
TextBlock toggleButtonTextBlock = toggleButton.Template.FindName("collapseAllText", toggleButton) as TextBlock;
if (toggleButtonTextBlock != null)
{
Binding toggleButtonHelpTextBinding = new Binding("Text");
toggleButtonHelpTextBinding.Source = toggleButtonTextBlock;
toggleButtonHelpTextBinding.Mode = BindingMode.OneWay;
toggleButtonHelpTextBinding.Converter = new TextFormattingConverter();
toggleButtonHelpTextBinding.ConverterParameter = SR.ExpandAllCollapseAllHelpTextFormat;
BindingOperations.SetBinding(toggleButton, AutomationProperties.HelpTextProperty, toggleButtonHelpTextBinding);
}
}
}
}

void OnDesignerSurfaceMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
//user clicked on designer surface, somwhere around actual designer - try to select root designer
Expand Down Expand Up @@ -1189,6 +1217,30 @@ void OnArgumentsCollectionChanged(object sender, RoutedEventArgs e)
{
CheckButtonArguments();
}

void OnZoompickerGotFocus(object sender, RoutedEventArgs e)
{
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures3 && this.zoomPicker != null && this.zoomPicker.Template != null)
{
var zoomPickerTextBox = this.zoomPicker.Template.FindName("PART_EditableTextBox", zoomPicker) as TextBox;
if (zoomPickerTextBox != null)
{
zoomPickerTextBox.SetValue(TextBlock.ForegroundProperty, this.Resources["ShellBarForegroundActiveColor"] as SolidColorBrush);
}
}
}

void OnZoompickerLostFocus(object sender, RoutedEventArgs e)
{
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures3 && this.zoomPicker != null && this.zoomPicker.Template != null)
{
var zoomPickerTextBox = this.zoomPicker.Template.FindName("PART_EditableTextBox", zoomPicker) as TextBox;
if (zoomPickerTextBox != null)
{
zoomPickerTextBox.SetValue(TextBlock.ForegroundProperty, this.Resources["ShellBarForegroundInactiveColor"] as SolidColorBrush);
}
}
}

void ApplyShellBarItemVisibility(ShellBarItemVisibility visibility)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ internal static ResourceDictionary FontAndColorResources
// applications in generatel ( e.g. VS) unfortunately handle high contrast color scheme as well, so we are forced to do it
// This is code is dervied from the way VS does this.

static bool IsHighContrastEnabled
internal static bool IsHighContrastEnabled
{
get
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ namespace System.Activities.Debugger.Symbol

internal static class SymbolHelper
{
// These Guid values come from the VS source - VSCodeDebugAdpapterHost - src\product\VSCodeDebuggerHost\AD7\Definition\AD7Guids.cs
static readonly Guid Md5IdentifierGuid = new Guid("406ea660-64cf-4c82-b6f0-42d48172a799");
static readonly int Md5HashLength = 16;
static readonly Guid Sha1IdentifierGuid = new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460");
static readonly int Sha1HashLength = 20;
static readonly Guid Sha256IdentifierGuid = new Guid("8829d00f-11b8-4213-878b-770e8597ac16");
static readonly int Sha256HashLength = 32;

public static Guid ChecksumProviderId
{
Expand All @@ -25,10 +30,14 @@ public static Guid ChecksumProviderId
{
return Md5IdentifierGuid;
}
else
else if (LocalAppContextSwitches.UseSHA1HashForDebuggerSymbols)
{
return Sha1IdentifierGuid;
}
else
{
return Sha256IdentifierGuid;
}
}
}

Expand Down Expand Up @@ -128,26 +137,36 @@ internal static bool ValidateChecksum(byte[] checksumToValidate)
// We are using MD5.ComputeHash, which will return a 16 byte array.
if (LocalAppContextSwitches.UseMD5ForWFDebugger)
{
return checksumToValidate.Length == 16;
return checksumToValidate.Length == Md5HashLength;
}
else if (LocalAppContextSwitches.UseSHA1HashForDebuggerSymbols)
{
return checksumToValidate.Length == Sha1HashLength;
}
else
{
return checksumToValidate.Length == 20;
return checksumToValidate.Length == Sha256HashLength;
}
}

[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5350:MD5CannotBeUsed",
Justification = "Design has been approved. We are not using MD5 for any security or cryptography purposes but rather as a hash.")]
[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5354:SHA1CannotBeUsed",
Justification = "Design has been approved. We are not using SHA1 for any security or cryptography purposes but rather as a hash.")]
static HashAlgorithm CreateHashProvider()
{
if (LocalAppContextSwitches.UseMD5ForWFDebugger)
{
return new MD5CryptoServiceProvider();
}
else
else if (LocalAppContextSwitches.UseSHA1HashForDebuggerSymbols)
{
return new SHA1CryptoServiceProvider();
}
else
{
return new SHA256CryptoServiceProvider();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace System.Configuration {
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text;

Expand Down Expand Up @@ -98,6 +99,7 @@ protected internal override string SerializeSection(ConfigurationElement parentE
return base.SerializeSection(parentElement, name, saveMode);
}

[SuppressMessage("Microsoft.Security.Xml", "CA3074:ReviewClassesDerivedFromXmlTextReader", Justification="Reading trusted input")]
protected internal override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) {
string ElementName = reader.Name;

Expand Down
Loading

0 comments on commit 74eb159

Please sign in to comment.