diff --git a/Directory.Build.props b/Directory.Build.props index 3b3c53502e5..e186a4b28c7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,8 +2,8 @@ wpf true - net9.0 - 9.0 + net10.0 + 10.0 diff --git a/Microsoft.Dotnet.Wpf.sln b/Microsoft.Dotnet.Wpf.sln index c3d86130ea5..8e9ef4410f3 100644 --- a/Microsoft.Dotnet.Wpf.sln +++ b/Microsoft.Dotnet.Wpf.sln @@ -381,6 +381,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Windows.Primitives-r EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PresentationFramework.Fluent.Tests", "src\Microsoft.DotNet.Wpf\tests\UnitTests\PresentationFramework.Fluent.Tests\PresentationFramework.Fluent.Tests.csproj", "{56833D74-2D0B-5516-C1D6-B93D4FFF7612}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Printing.Tests", "src\Microsoft.DotNet.Wpf\tests\UnitTests\System.Printing.Tests\System.Printing.Tests.csproj", "{762F6671-44CA-672D-B9C5-CFB69999F152}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|arm64 = Debug|arm64 @@ -1653,6 +1655,18 @@ Global {56833D74-2D0B-5516-C1D6-B93D4FFF7612}.Release|x64.Build.0 = Release|x64 {56833D74-2D0B-5516-C1D6-B93D4FFF7612}.Release|x86.ActiveCfg = Release|x86 {56833D74-2D0B-5516-C1D6-B93D4FFF7612}.Release|x86.Build.0 = Release|x86 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|arm64.ActiveCfg = Debug|arm64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|arm64.Build.0 = Debug|arm64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|x64.ActiveCfg = Debug|x64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|x64.Build.0 = Debug|x64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|x86.ActiveCfg = Debug|x86 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Debug|x86.Build.0 = Debug|x86 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|arm64.ActiveCfg = Release|arm64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|arm64.Build.0 = Release|arm64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x64.ActiveCfg = Release|x64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x64.Build.0 = Release|x64 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x86.ActiveCfg = Release|x86 + {762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1780,6 +1794,7 @@ Global {5306FA93-178C-4535-ADEE-86B1DE1B68CB} = {2EE4A2DA-70B3-4767-9D18-618DA0FE3105} {0EFFC7C4-B486-4852-8CED-EDEB46E02C42} = {D0AED517-9972-41CB-8751-983E4EB8F511} {56833D74-2D0B-5516-C1D6-B93D4FFF7612} = {A48B585E-6AB0-4F8D-8484-77F37CB44437} + {762F6671-44CA-672D-B9C5-CFB69999F152} = {A48B585E-6AB0-4F8D-8484-77F37CB44437} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B4340004-DAC0-497D-B69D-CFA7CD93F567} diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f19af284d60..238ba5fa9e5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,189 +1,189 @@ - + https://github.com/dotnet/winforms - 15ad0c1c6c9211af46f10f5f28501957e95c0bb3 + 3b08ae7aa57fd1c9b8405a3d86620cb856e433dd - + https://github.com/dotnet/winforms - 15ad0c1c6c9211af46f10f5f28501957e95c0bb3 + 3b08ae7aa57fd1c9b8405a3d86620cb856e433dd - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int 726c62718af03d61fba006a54ad8d87c8abc64de - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/runtime - 354ec46a63440608bda18e2203bb5538e2f8eae6 + 670db5c71851946b9ec3f669f4a67d4339836a0e - + https://github.com/dotnet/winforms - 15ad0c1c6c9211af46f10f5f28501957e95c0bb3 + 3b08ae7aa57fd1c9b8405a3d86620cb856e433dd - + https://github.com/dotnet/arcade - 2a3bf4e3a4c473135d058adcd7193a5a4bcd38a7 + ae8d2a08f1021624ae37cdd5b65f6c05e58a051b - + https://github.com/dotnet/arcade - 2a3bf4e3a4c473135d058adcd7193a5a4bcd38a7 + ae8d2a08f1021624ae37cdd5b65f6c05e58a051b - + https://github.com/dotnet/arcade - 2a3bf4e3a4c473135d058adcd7193a5a4bcd38a7 + ae8d2a08f1021624ae37cdd5b65f6c05e58a051b https://github.com/dotnet/arcade f4e11a15c7b8a949d4a366e792a9843ff6e88cd5 - + https://github.com/dotnet/arcade - 2a3bf4e3a4c473135d058adcd7193a5a4bcd38a7 + ae8d2a08f1021624ae37cdd5b65f6c05e58a051b https://github.com/dotnet/sourcelink diff --git a/eng/Versions.props b/eng/Versions.props index e324c2736e2..50901ba70ef 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -21,28 +21,28 @@ - 10.0.0-alpha.1.24576.6 + 10.0.0-alpha.1.24628.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.6 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 4.6.0-preview4.19176.11 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 - 10.0.0-alpha.1.24576.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 + 10.0.0-alpha.1.24628.1 6.0.0 diff --git a/eng/WpfArcadeSdk/tools/SdkReferences.targets b/eng/WpfArcadeSdk/tools/SdkReferences.targets index 6bbded2bc68..8a8ef081d4b 100644 --- a/eng/WpfArcadeSdk/tools/SdkReferences.targets +++ b/eng/WpfArcadeSdk/tools/SdkReferences.targets @@ -125,6 +125,7 @@ And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0')) "> + <_WinFormsTargetFrameworkVersion Condition="'$(_WinFormsTargetFrameworkVersion)' == '' and '$(DotNetBuildOrchestrator)' == 'true'">$(NetCurrent) <_WinFormsTargetFrameworkVersion Condition="'$(_WinFormsTargetFrameworkVersion)' == ''">$(_targetFrameworkRoot) diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml index 9abe726e54b..2a6a529482b 100644 --- a/eng/common/core-templates/steps/install-microbuild.yml +++ b/eng/common/core-templates/steps/install-microbuild.yml @@ -1,19 +1,49 @@ parameters: - # Enable cleanup tasks for MicroBuild + # Enable install tasks for MicroBuild enableMicrobuild: false - # Enable cleanup tasks for MicroBuild on Mac and Linux + # Enable install tasks for MicroBuild on Mac and Linux # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT' enableMicrobuildForMacAndLinux: false + # Location of the MicroBuild output folder + microBuildOutputFolder: '$(Agent.TempDirectory)' continueOnError: false steps: - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - # Remove Python downgrade with https://github.com/dotnet/arcade/issues/15151 - - ${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}: + - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}: + # Install Python 3.12.x on when Python > 3.12.x is installed - https://github.com/dotnet/source-build/issues/4802 + - script: | + version=$(python3 --version | awk '{print $2}') + major=$(echo $version | cut -d. -f1) + minor=$(echo $version | cut -d. -f2) + + installPython=false + if [ "$major" -gt 3 ] || { [ "$major" -eq 3 ] && [ "$minor" -gt 12 ]; }; then + installPython=true + fi + + echo "Python version: $version." + echo "Install Python 3.12.x: $installPython." + echo "##vso[task.setvariable variable=installPython;isOutput=true]$installPython" + name: InstallPython + displayName: 'Determine Python installation' + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + - task: UsePythonVersion@0 - displayName: 'Use Python 3.11.x' inputs: - versionSpec: '3.11.x' + versionSpec: '3.12.x' + displayName: 'Use Python 3.12.x' + condition: and(succeeded(), eq(variables['InstallPython.installPython'], 'true'), ne(variables['Agent.Os'], 'Windows_NT')) + + # Needed to download the MicroBuild plugin nupkgs on Mac and Linux when nuget.exe is unavailable + - task: UseDotNet@2 + displayName: Install .NET 8.0 SDK for MicroBuild Plugin + inputs: + packageType: sdk + version: 8.0.x + installationPath: ${{ parameters.microBuildOutputFolder }}/dotnet + workingDirectory: ${{ parameters.microBuildOutputFolder }} + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) - task: MicroBuildSigningPlugin@4 displayName: Install MicroBuild plugin @@ -25,7 +55,7 @@ steps: azureSubscription: 'MicroBuild Signing Task (DevDiv)' env: TeamName: $(_TeamName) - MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' + MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) continueOnError: ${{ parameters.continueOnError }} condition: and( diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 4da05afe054..f9ba1625c20 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -78,7 +78,7 @@ steps: portableBuildArgs= if [ '${{ parameters.platform.portableBuild }}' != '' ]; then - portableBuildArgs='/p:PortabelBuild=${{ parameters.platform.portableBuild }}' + portableBuildArgs='/p:PortableBuild=${{ parameters.platform.portableBuild }}' fi ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh index 7e9ba2b75ed..fbd8d80848a 100755 --- a/eng/common/cross/build-android-rootfs.sh +++ b/eng/common/cross/build-android-rootfs.sh @@ -6,10 +6,11 @@ usage() { echo "Creates a toolchain and sysroot used for cross-compiling for Android." echo - echo "Usage: $0 [BuildArch] [ApiLevel]" + echo "Usage: $0 [BuildArch] [ApiLevel] [--ndk NDKVersion]" echo echo "BuildArch is the target architecture of Android. Currently only arm64 is supported." echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html" + echo "NDKVersion is the version of Android NDK. The default is r21. See https://developer.android.com/ndk/downloads/revision_history" echo echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior" echo "by setting the TOOLCHAIN_DIR environment variable" @@ -25,10 +26,15 @@ __BuildArch=arm64 __AndroidArch=aarch64 __AndroidToolchain=aarch64-linux-android -for i in "$@" - do - lowerI="$(echo $i | tr "[:upper:]" "[:lower:]")" - case $lowerI in +while :; do + if [[ "$#" -le 0 ]]; then + break + fi + + i=$1 + + lowerI="$(echo $i | tr "[:upper:]" "[:lower:]")" + case $lowerI in -?|-h|--help) usage exit 1 @@ -43,6 +49,10 @@ for i in "$@" __AndroidArch=arm __AndroidToolchain=arm-linux-androideabi ;; + --ndk) + shift + __NDK_Version=$1 + ;; *[0-9]) __ApiLevel=$i ;; @@ -50,8 +60,17 @@ for i in "$@" __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i" ;; esac + shift done +if [[ "$__NDK_Version" == "r21" ]] || [[ "$__NDK_Version" == "r22" ]]; then + __NDK_File_Arch_Spec=-x86_64 + __SysRoot=sysroot +else + __NDK_File_Arch_Spec= + __SysRoot=toolchains/llvm/prebuilt/linux-x86_64/sysroot +fi + # Obtain the location of the bash script to figure out where the root of the repo is. __ScriptBaseDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -78,6 +97,7 @@ fi echo "Target API level: $__ApiLevel" echo "Target architecture: $__BuildArch" +echo "NDK version: $__NDK_Version" echo "NDK location: $__NDK_Dir" echo "Target Toolchain location: $__ToolchainDir" @@ -85,8 +105,8 @@ echo "Target Toolchain location: $__ToolchainDir" if [ ! -d $__NDK_Dir ]; then echo Downloading the NDK into $__NDK_Dir mkdir -p $__NDK_Dir - wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip - unzip -q $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__CrossDir + wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux$__NDK_File_Arch_Spec.zip -O $__CrossDir/android-ndk-$__NDK_Version-linux.zip + unzip -q $__CrossDir/android-ndk-$__NDK_Version-linux.zip -d $__CrossDir fi if [ ! -d $__lldb_Dir ]; then @@ -116,16 +136,11 @@ for path in $(wget -qO- https://packages.termux.dev/termux-main-21/dists/stable/ fi done -cp -R "$__TmpDir/data/data/com.termux/files/usr/"* "$__ToolchainDir/sysroot/usr/" +cp -R "$__TmpDir/data/data/com.termux/files/usr/"* "$__ToolchainDir/$__SysRoot/usr/" # Generate platform file for build.sh script to assign to __DistroRid echo "Generating platform file..." -echo "RID=android.${__ApiLevel}-${__BuildArch}" > $__ToolchainDir/sysroot/android_platform - -echo "Now to build coreclr, libraries and installers; run:" -echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ - --subsetCategory coreclr -echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ - --subsetCategory libraries -echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ - --subsetCategory installer +echo "RID=android.${__ApiLevel}-${__BuildArch}" > $__ToolchainDir/$__SysRoot/android_platform + +echo "Now to build coreclr, libraries and host; run:" +echo ROOTFS_DIR=$(realpath $__ToolchainDir/$__SysRoot) ./build.sh clr+libs+host --cross --arch $__BuildArch diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 20ae8c28687..464040aaaea 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -52,14 +52,12 @@ __UbuntuPackages+=" symlinks" __UbuntuPackages+=" libicu-dev" __UbuntuPackages+=" liblttng-ust-dev" __UbuntuPackages+=" libunwind8-dev" -__UbuntuPackages+=" libnuma-dev" __AlpinePackages+=" gettext-dev" __AlpinePackages+=" icu-dev" __AlpinePackages+=" libunwind-dev" __AlpinePackages+=" lttng-ust-dev" __AlpinePackages+=" compiler-rt" -__AlpinePackages+=" numactl-dev" # runtime libraries' dependencies __UbuntuPackages+=" libcurl4-openssl-dev" @@ -73,8 +71,8 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="13.3-RELEASE" -__FreeBSDPkg="1.17.0" +__FreeBSDBase="13.4-RELEASE" +__FreeBSDPkg="1.21.3" __FreeBSDABI="13" __FreeBSDPackages="libunwind" __FreeBSDPackages+=" icu" @@ -371,7 +369,7 @@ while :; do ;; freebsd14) __CodeName=freebsd - __FreeBSDBase="14.0-RELEASE" + __FreeBSDBase="14.2-RELEASE" __FreeBSDABI="14" __SkipUnmount=1 ;; @@ -424,13 +422,12 @@ case "$__AlpineVersion" in elif [[ "$__AlpineArch" == "riscv64" ]]; then __AlpineLlvmLibsLookup=1 __AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive) + elif [[ -n "$__AlpineMajorVersion" ]]; then + # use whichever alpine version is provided and select the latest toolchain libs + __AlpineLlvmLibsLookup=1 else __AlpineVersion=3.13 # 3.13 to maximize compatibility __AlpinePackages+=" llvm10-libs" - - if [[ "$__AlpineArch" == "armv7" ]]; then - __AlpinePackages="${__AlpinePackages//numactl-dev/}" - fi fi esac @@ -444,11 +441,6 @@ if [[ "$__BuildArch" == "armel" ]]; then __LLDB_Package="lldb-3.5-dev" fi -if [[ "$__CodeName" == "xenial" && "$__UbuntuArch" == "armhf" ]]; then - # libnuma-dev is not available on armhf for xenial - __UbuntuPackages="${__UbuntuPackages//libnuma-dev/}" -fi - __UbuntuPackages+=" ${__LLDB_Package:-}" if [[ -z "$__UbuntuRepo" ]]; then @@ -574,7 +566,7 @@ elif [[ "$__CodeName" == "freebsd" ]]; then curl -SL "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version fi echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf - echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf + echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf mkdir -p "$__RootfsDir"/tmp # get and build package manager if [[ "$__hasWget" == 1 ]]; then diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae..0ff85cf0367 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -67,6 +67,13 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6") else() set(TOOLCHAIN "arm-linux-gnueabihf") endif() +elseif(TARGET_ARCH_NAME STREQUAL "loongarch64") + set(CMAKE_SYSTEM_PROCESSOR "loongarch64") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/loongarch64-alpine-linux-musl) + set(TOOLCHAIN "loongarch64-alpine-linux-musl") + else() + set(TOOLCHAIN "loongarch64-linux-gnu") + endif() elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") set(CMAKE_SYSTEM_PROCESSOR ppc64le) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl) @@ -81,7 +88,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +105,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,10 +122,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() - message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") + message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, loongarch64, ppc64le, riscv64, s390x, x64 and x86 are supported!") endif() if(DEFINED ENV{TOOLCHAIN}) @@ -127,32 +134,46 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() +function(locate_toolchain_exec exec var) + set(TOOLSET_PREFIX ${TOOLCHAIN}-) + string(TOUPPER ${exec} EXEC_UPPERCASE) + if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") + set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) + return() + endif() + + find_program(EXEC_LOCATION_${exec} + NAMES + "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" + "${TOOLSET_PREFIX}${exec}") + + if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") + message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") + endif() + set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) +endfunction() + if(ANDROID) if(TARGET_ARCH_NAME STREQUAL "arm") set(ANDROID_ABI armeabi-v7a) @@ -183,66 +204,24 @@ elseif(FREEBSD) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld") elseif(ILLUMOS) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") + set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") + set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") include_directories(SYSTEM ${CROSS_ROOTFS}/include) - set(TOOLSET_PREFIX ${TOOLCHAIN}-) - function(locate_toolchain_exec exec var) - string(TOUPPER ${exec} EXEC_UPPERCASE) - if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") - set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) - return() - endif() - - find_program(EXEC_LOCATION_${exec} - NAMES - "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" - "${TOOLSET_PREFIX}${exec}") - - if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") - message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") - endif() - set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) - endfunction() - - set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") - locate_toolchain_exec(gcc CMAKE_C_COMPILER) locate_toolchain_exec(g++ CMAKE_CXX_COMPILER) - - set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") elseif(HAIKU) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin") - - set(TOOLSET_PREFIX ${TOOLCHAIN}-) - function(locate_toolchain_exec exec var) - string(TOUPPER ${exec} EXEC_UPPERCASE) - if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") - set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) - return() - endif() - - find_program(EXEC_LOCATION_${exec} - NAMES - "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" - "${TOOLSET_PREFIX}${exec}") - - if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") - message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") - endif() - set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) - endfunction() - set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") + set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") + set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") locate_toolchain_exec(gcc CMAKE_C_COMPILER) locate_toolchain_exec(g++ CMAKE_CXX_COMPILER) - set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") - # let CMake set up the correct search paths include(Platform/Haiku) else() @@ -272,21 +251,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +276,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") @@ -312,7 +291,7 @@ endif() # Specify compile options -if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) +if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|loongarch64|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) diff --git a/eng/common/native/install-dependencies.sh b/eng/common/native/install-dependencies.sh index dc396a95560..71bde0e4573 100644 --- a/eng/common/native/install-dependencies.sh +++ b/eng/common/native/install-dependencies.sh @@ -27,7 +27,7 @@ case "$os" in libssl-dev libkrb5-dev zlib1g-dev pigz cpio localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 - elif [ "$ID" = "fedora" ]; then + elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ]; then dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel zlib-devel lttng-ust-devel pigz cpio elif [ "$ID" = "alpine" ]; then apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev pigz cpio @@ -44,15 +44,11 @@ case "$os" in export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 # Skip brew update for now, see https://github.com/actions/setup-python/issues/577 # brew update --preinstall - - # Temporarily uninstall pkg-config@0.29.2 to work around https://github.com/actions/runner-images/issues/10984 - brew uninstall --ignore-dependencies --force pkg-config@0.29.2 - brew bundle --no-upgrade --no-lock --file=- < diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/IncrementalCompileAnalyzer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/IncrementalCompileAnalyzer.cs index 4a8cd3c5c45..db039c3fff4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/IncrementalCompileAnalyzer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/IncrementalCompileAnalyzer.cs @@ -12,16 +12,12 @@ using System; using System.IO; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Reflection; using Microsoft.Build.Tasks.Windows; using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using MS.Utility; namespace MS.Internal.Tasks { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/Shared.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/Shared.cs index b81ea87e707..e4e5421a745 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/Shared.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/Shared.cs @@ -10,10 +10,6 @@ // //------------------------------------------------------------------------------ -using System; -using System.IO; -using System.Collections; - namespace MS.Internal.Tasks { #region SharedStrings class diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs index b0ccdc55dcb..87ba0a58fb8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs @@ -24,7 +24,6 @@ using System.IO; using Microsoft.Build.Utilities; using Microsoft.Build.Tasks.Windows; -using System.Diagnostics; using System.Text; using System.Security.Cryptography; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskHelper.cs index 0ca5ca94057..ef917618a7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskHelper.cs @@ -12,21 +12,14 @@ using System; using System.IO; -using System.Collections; -using System.Text; -using System.Runtime.InteropServices; using System.Globalization; using System.Diagnostics; using System.Reflection; -using System.Resources; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; - -using Microsoft.Build.Tasks; using MS.Utility; -using System.Collections.Generic; namespace MS.Internal.Tasks diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets index 52e6026b206..c6923bce5d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets @@ -1,7 +1,7 @@ - <_PresentationBuildTasksTfm Condition="'$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_PresentationBuildTasksTfm Condition="'$(MSBuildRuntimeType)' == 'Core'">net10.0 <_PresentationBuildTasksTfm Condition="'$(MSBuildRuntimeType)' != 'Core'">net472 <_PresentationBuildTasksAssembly Condition="'$(_PresentationBuildTasksAssembly)'==''">$([MSBuild]::Unescape($([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\$(_PresentationBuildTasksTfm)\PresentationBuildTasks.dll')))) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/FileClassifier.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/FileClassifier.cs index 71f779eca95..a9509fa0300 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/FileClassifier.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/FileClassifier.cs @@ -10,13 +10,9 @@ //--------------------------------------------------------------------------- using System; -using System.IO; using System.Collections.Generic; using System.Globalization; -using System.Diagnostics; -using System.Reflection; -using System.Resources; using System.Runtime.InteropServices; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/GenerateTemporaryTargetAssembly.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/GenerateTemporaryTargetAssembly.cs index 0fd4fa34342..02e05847c27 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/GenerateTemporaryTargetAssembly.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/GenerateTemporaryTargetAssembly.cs @@ -21,18 +21,13 @@ using System.Collections; using System.Collections.Generic; using System.Linq; - -using System.Globalization; using System.Diagnostics; -using System.Reflection; -using System.Resources; using System.Xml; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using MS.Utility; -using MS.Internal.Tasks; // Since we disable PreSharp warnings in this file, PreSharp warning is unknown to C# compiler. // We first need to disable warnings about unknown message numbers and unknown pragmas. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs index d3b96aa0482..1c202e20f7c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs @@ -13,16 +13,8 @@ using System; using System.IO; using System.Collections; -using System.Security; using System.Globalization; -using System.Diagnostics; -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; - -using System.CodeDom; -using System.CodeDom.Compiler; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -30,7 +22,6 @@ using MS.Utility; using MS.Internal; using MS.Internal.Tasks; -using MS.Internal.Markup; // Since we disable PreSharp warnings in this file, PreSharp warning is unknown to C# compiler. // We first need to disable warnings about unknown message numbers and unknown pragmas. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass2.cs index c58021432dd..1bea9221d80 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass2.cs @@ -12,14 +12,9 @@ using System; using System.IO; using System.Collections; -using System.Security; using System.Text; using System.Globalization; -using System.Diagnostics; -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -27,7 +22,6 @@ using MS.Utility; using MS.Internal; using MS.Internal.Tasks; -using MS.Internal.Markup; // Since we disable PreSharp warnings in this file, PreSharp warning is unknown to C# compiler. // We first need to disable warnings about unknown message numbers and unknown pragmas. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MergeLocalizationDirectives.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MergeLocalizationDirectives.cs index 4c52de9a8ca..e2083c08c61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MergeLocalizationDirectives.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MergeLocalizationDirectives.cs @@ -12,7 +12,6 @@ using System; using System.IO; using System.Text; -using System.Xml; using System.Runtime.InteropServices; using Microsoft.Build.Framework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/ResourcesGenerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/ResourcesGenerator.cs index 17bd2c0a374..a65fe079808 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/ResourcesGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/ResourcesGenerator.cs @@ -11,11 +11,6 @@ using System; using System.IO; -using System.Collections; - -using System.Globalization; -using System.Diagnostics; -using System.Reflection; using System.Resources; using System.Runtime.InteropServices; @@ -23,7 +18,6 @@ using Microsoft.Build.Utilities; using MS.Utility; -using Microsoft.Build.Tasks.Windows; using MS.Internal; using MS.Internal.Tasks; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UidManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UidManager.cs index 1df5ea917cd..b0081434b08 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UidManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UidManager.cs @@ -17,11 +17,8 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Reflection; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Runtime.InteropServices; using MS.Internal.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UpdateManifestForBrowserApplication.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UpdateManifestForBrowserApplication.cs index 758487632f9..e19ce88010a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UpdateManifestForBrowserApplication.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UpdateManifestForBrowserApplication.cs @@ -9,16 +9,10 @@ /////////////////////////////////////////////////////////////////////////////// using System; -using System.IO; -using System.Diagnostics; using System.Runtime.InteropServices; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; -using Microsoft.Build.Tasks; using System.Xml; -using System.Xml.XPath; -using Microsoft.Build.Tasks.Windows; -using System.Collections; using MS.Utility; using MS.Internal.Tasks; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj index feb1f48042d..8627c32bddd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj @@ -1,6 +1,6 @@  - net472;net9.0 + net472;net10.0 false true diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/GlobalUsings.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/GlobalUsings.cs new file mode 100644 index 00000000000..3659731bae6 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/GlobalUsings.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +global using System; +global using System.Collections.Generic; +global using System.Diagnostics; + +global using SR = MS.Internal.PresentationCore.SR; + +global using DllImport = MS.Internal.PresentationCore.DllImport; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs index f394f085831..e5c1385bcb6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs @@ -4,16 +4,10 @@ //#define OLD_ISF -using System; -using System.Security; -using System.Threading; using System.Runtime.InteropServices; -using System.Runtime.ConstrainedExecution; -using System.Windows; using System.Windows.Interop; using MS.Internal; using MS.Internal.PresentationCore; -using MS.Win32; namespace MS.Win32.Penimc { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPointer.cs index db84e81217e..5b85e2c68cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPointer.cs @@ -3,13 +3,7 @@ // See the LICENSE file in the project root for more information. -using MS.Internal.PresentationCore; -using MS.Win32; -using System; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; -using System.Text; namespace MS.Win32.Pointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsTablet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsTablet.cs index ecd3d791eff..937f03fefb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsTablet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsTablet.cs @@ -3,14 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Text; -using System.Security; using System.Runtime.InteropServices; -using System.Runtime.ConstrainedExecution; using System.Windows.Ink; -using System.Diagnostics; -using MS.Win32; namespace MS.Win32.Recognizer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AnimatedTypeHelpers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AnimatedTypeHelpers.cs index 7e7abfb455c..4c7f53ca8f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AnimatedTypeHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AnimatedTypeHelpers.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CookieHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CookieHandler.cs index b02c48be409..59b01b71b75 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CookieHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CookieHandler.cs @@ -14,22 +14,16 @@ // // -using System; using System.Net; -using System.Security; -using System.Diagnostics; using System.ComponentModel; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; - -using System.Windows; -using System.Windows.Interop; using MS.Win32; using MS.Internal.PresentationCore; namespace MS.Internal.AppModel { -static class CookieHandler + static class CookieHandler { internal static void HandleWebRequest(WebRequest request) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CustomCredentialPolicy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CustomCredentialPolicy.cs index 5706c2fd105..ab0cf9fc3a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CustomCredentialPolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/CustomCredentialPolicy.cs @@ -27,11 +27,8 @@ // and that does not prompt the user. // -using System; -using System.Collections.Generic; using System.Net; using System.Runtime.InteropServices; -using System.Security; using MS.Internal.PresentationCore; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginContainer.cs index 99a55992f45..0bb82080aeb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginContainer.cs @@ -12,17 +12,9 @@ // the NotSupportedException. // -using System; using System.IO.Packaging; using System.IO; -using System.Collections.Generic; -using System.Windows.Resources; -using System.Resources; -using System.Reflection; -using System.Globalization; -using System.Windows; using System.Windows.Navigation; -using System.Security; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginPart.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginPart.cs index 1e1cd2edf45..ce9d5072428 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginPart.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginPart.cs @@ -9,15 +9,9 @@ // -using System; using System.Net; using System.IO.Packaging; -using System.Windows; -using System.Windows.Navigation; -using System.Windows.Resources; using System.IO; -using System.Resources; -using System.Globalization; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPatternInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPatternInfo.cs index 93984a9c7b0..4e004aab9ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPatternInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPatternInfo.cs @@ -7,10 +7,6 @@ // // Description: class containing information about an automation property -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPropertyInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPropertyInfo.cs index 8b3e6193400..e74989a3cb7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPropertyInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/AutomationPropertyInfo.cs @@ -9,7 +9,6 @@ // // -using System; using System.Windows; using System.Windows.Automation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/DockProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/DockProviderWrapper.cs index c736257ca45..9fa684dc8ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/DockProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/DockProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs index 011a97eb0a8..8ce499eab6b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs @@ -9,27 +9,13 @@ // // -using System; -using System.Collections; -using System.Reflection; -using System.Runtime.InteropServices; - using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; -using System.Diagnostics; using System.Windows.Input; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using System.Security; - -using MS.Internal.PresentationCore; -using MS.Win32; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.Automation { // Automation Proxy for WCP elements - exposes WCP tree diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs index d7c8664c5e5..97cb39b03c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs @@ -2,32 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: -// -// - -using System; using System.Windows.Threading; -using System.Threading; using System.Windows; -using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; -using System.Security; using MS.Win32; using MS.Internal.Media; using System.Runtime.InteropServices; -using System.Globalization; -using MS.Internal.PresentationCore; // SafeSecurityHelper - -using SR=MS.Internal.PresentationCore.SR; +using MS.Internal.PresentationCore; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs index 6681b08e52a..50a0d11d73c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs @@ -2,24 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: -// Accessibility event map classes are used to determine if, and how many -// listeners there are for events and property changes. -// -// - -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Threading; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.Automation { // Manages the event map that is used to determine if there are Automation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventPropertyMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventPropertyMap.cs index a137b56b508..5ec5524c4c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventPropertyMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventPropertyMap.cs @@ -11,16 +11,14 @@ // // -using System; using System.Collections; using System.Windows; -using System.Diagnostics; namespace MS.Internal.Automation { // Manages the property map that is used to determine if there are // Automation clients interested in properties. - internal class EventPropertyMap + internal class EventPropertyMap { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ExpandCollapseProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ExpandCollapseProviderWrapper.cs index f3e3ac48421..b2ac41ddbb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ExpandCollapseProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ExpandCollapseProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridItemProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridItemProviderWrapper.cs index 12d0f6848f2..30d6577c126 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridItemProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridItemProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridProviderWrapper.cs index 445972cb381..0b6cbad0e9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/GridProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InteropAutomationProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InteropAutomationProvider.cs index be842c6b857..a7e7132eee4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InteropAutomationProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InteropAutomationProvider.cs @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Automation.Provider; -using System.Security; - namespace MS.Internal.Automation { internal class InteropAutomationProvider: IRawElementProviderFragmentRoot diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InvokeProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InvokeProviderWrapper.cs index d9dd9a9ae9d..b706ec006c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InvokeProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/InvokeProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ItemContainerProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ItemContainerProviderWrapper.cs index 3c70c34c87b..431a9e1a6d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ItemContainerProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ItemContainerProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/MultipleViewProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/MultipleViewProviderWrapper.cs index 1957a48a8ce..e1a2b29d5af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/MultipleViewProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/MultipleViewProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/RangeValueProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/RangeValueProviderWrapper.cs index c3b29d9dcf9..1968c22b058 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/RangeValueProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/RangeValueProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollItemProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollItemProviderWrapper.cs index 2521f39ed0d..a13a265dd5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollItemProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollItemProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollProviderWrapper.cs index d55d7e319ce..033a871eeec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ScrollProviderWrapper.cs @@ -9,15 +9,10 @@ // // -using System; using System.Windows.Threading; - -using System.Windows; -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; -using MS.Internal.Automation; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionItemProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionItemProviderWrapper.cs index 3b8768a68e6..c4c7fd5ef47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionItemProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionItemProviderWrapper.cs @@ -9,12 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Collections; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionProviderWrapper.cs index 5dbe58f7b28..656a058913a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SelectionProviderWrapper.cs @@ -9,15 +9,9 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Collections; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; -using System.ComponentModel; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs index 8a05bf5e1cf..03fb2d2740b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs @@ -2,20 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: Synchronized Input pattern adaptor -// - -using System; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Provider; -using MS.Internal; -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Automation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputProviderWrapper.cs index e9accd74846..41dc3d416ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableItemProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableItemProviderWrapper.cs index a63039f69d2..cbccd846e08 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableItemProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableItemProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableProviderWrapper.cs index c6eeccaef7d..98b114c75e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TableProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs index 4f41a8ff316..3fad1169930 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs @@ -2,22 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: Text pattern provider wrapper for WCP -// -// -using System; using System.Windows.Threading; using System.Windows; -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; -using System.Windows.Automation.Text; using System.Windows.Automation.Peers; -using SR = MS.Internal.PresentationCore.SR; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs index 2bc4e04b7a9..5c3908fc82e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs @@ -2,23 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: TextRange provider wrapper for WCP -// -// -using System; -using System.Collections; using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Text; using System.Windows.Automation.Peers; -using SR = MS.Internal.PresentationCore.SR; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ToggleProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ToggleProviderWrapper.cs index 352941da064..147ac555395 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ToggleProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ToggleProviderWrapper.cs @@ -9,9 +9,7 @@ // // -using System; using System.Windows.Threading; -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TransformProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TransformProviderWrapper.cs index f0ea4a45bd6..5ffb02f645e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TransformProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TransformProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ValueProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ValueProviderWrapper.cs index 5748fae4278..deca181b3b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ValueProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ValueProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/VirtualizedItemProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/VirtualizedItemProviderWrapper.cs index 5e18a7e82b9..0f8f71f22ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/VirtualizedItemProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/VirtualizedItemProviderWrapper.cs @@ -9,11 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/WindowProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/WindowProviderWrapper.cs index b083f007f33..3090ddf435b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/WindowProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/WindowProviderWrapper.cs @@ -9,10 +9,7 @@ // // -using System; using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CheckedPointers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CheckedPointers.cs index ed5d6271053..ac2101bb4d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CheckedPointers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CheckedPointers.cs @@ -8,9 +8,6 @@ // // -using System; -using System.Security; -using MS.Internal.Shaping; using MS.Internal.FontCache; // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Classification.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Classification.cs index 1f0768e7dc3..88620b2e52b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Classification.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Classification.cs @@ -9,15 +9,8 @@ // // -using System; -using System.Diagnostics; -using MS.Internal; -using System.Windows; -using System.Security; -using System.Collections; using System.Runtime.InteropServices; using System.Windows.Media.TextFormatting; -using MS.Internal.PresentationCore; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs index cfb42327921..cb3910603a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs @@ -5,7 +5,6 @@ // // -using System; using System.ComponentModel; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DeferredElementTreeState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DeferredElementTreeState.cs index b243c33267d..221a9d5023f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DeferredElementTreeState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DeferredElementTreeState.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Windows; -using System.Collections.Generic; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiScale2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiScale2.cs index 2bb3c47a068..852712113de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiScale2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiScale2.cs @@ -3,11 +3,10 @@ // See the LICENSE file in the project root for more information. +using System.Windows; + namespace MS.Internal { - using System; - using System.Windows; - /// /// Wrapper for with supporting utility methods /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessContextHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessContextHelper.cs index c7c49fb4162..a08f5855329 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessContextHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessContextHelper.cs @@ -3,16 +3,13 @@ // See the LICENSE file in the project root for more information. -namespace MS.Internal -{ - using MS.Utility; - using MS.Win32; - using System; - using System.Collections.Generic; - using System.Security; +using MS.Utility; +using MS.Win32; - using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +namespace MS.Internal +{ /// /// Contains definition of /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessScope.cs index f20204297c7..e805e43c899 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+DpiAwarenessScope.cs @@ -3,13 +3,11 @@ // See the LICENSE file in the project root for more information. +using MS.Utility; +using MS.Win32; + namespace MS.Internal { - using MS.Utility; - using MS.Win32; - using System; - using System.Security; - /// /// Contains inner type /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+HwndDpiInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+HwndDpiInfo.cs index feacd9ba610..c94fc3c162e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+HwndDpiInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+HwndDpiInfo.cs @@ -3,15 +3,13 @@ // See the LICENSE file in the project root for more information. +using MS.Utility; +using MS.Win32; +using System.ComponentModel; +using System.Runtime.InteropServices; + namespace MS.Internal { - using MS.Utility; - using MS.Win32; - using System; - using System.ComponentModel; - using System.Runtime.InteropServices; - using System.Security; - internal static partial class DpiUtil { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+ProcessDpiAwarenessHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+ProcessDpiAwarenessHelper.cs index 22e9c6919d4..f2ca33ccf8d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+ProcessDpiAwarenessHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+ProcessDpiAwarenessHelper.cs @@ -3,17 +3,14 @@ // See the LICENSE file in the project root for more information. -namespace MS.Internal -{ - using Microsoft.Win32.SafeHandles; - using MS.Win32; - using System; - using System.Diagnostics; - using System.Runtime.InteropServices; - using System.Security; +using Microsoft.Win32.SafeHandles; +using MS.Win32; +using System.Runtime.InteropServices; - using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +namespace MS.Internal +{ /// /// Contains definition of /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+SystemDpiHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+SystemDpiHelper.cs index 6b8a90dee93..237fae7028d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+SystemDpiHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+SystemDpiHelper.cs @@ -3,17 +3,12 @@ // See the LICENSE file in the project root for more information. +using MS.Win32; +using System.Runtime.InteropServices; +using System.Windows; + namespace MS.Internal { - using MS.Win32; - using System; - using System.ComponentModel; - using System.Runtime.InteropServices; - using System.Windows; - using System.Security; - - using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; - /// /// Contains definition of /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+WindowDpiScaleHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+WindowDpiScaleHelper.cs index 8aba5bf9fb4..720882c527c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+WindowDpiScaleHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil+WindowDpiScaleHelper.cs @@ -3,15 +3,13 @@ // See the LICENSE file in the project root for more information. -namespace MS.Internal -{ - using MS.Win32; - using System; - using System.Runtime.InteropServices; - using System.Security; +using MS.Win32; +using System.Runtime.InteropServices; - using MONITOR_DPI_TYPE = MS.Win32.NativeMethods.MONITOR_DPI_TYPE; +using MONITOR_DPI_TYPE = MS.Win32.NativeMethods.MONITOR_DPI_TYPE; +namespace MS.Internal +{ /// /// Contains definition of /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil.cs index 35d363012a1..87a314d920a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/DpiUtil/DpiUtil.cs @@ -3,16 +3,13 @@ // See the LICENSE file in the project root for more information. -namespace MS.Internal -{ - using MS.Utility; - using System; - using System.Security; - using System.Windows; - using System.Windows.Interop; +using MS.Utility; +using System.Windows; - using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; +namespace MS.Internal +{ /// /// DPI related utilities /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/BufferCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/BufferCache.cs index b35290a9f8a..054fc140532 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/BufferCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/BufferCache.cs @@ -8,7 +8,6 @@ // Description: BufferCache class implementation. // -using System; using System.Threading; using MS.Internal.Text.TextInterface; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CachedTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CachedTypeface.cs index aba0dde26d6..ac968028cf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CachedTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CachedTypeface.cs @@ -8,9 +8,7 @@ // // -using System; using System.Windows; -using System.Windows.Media; using MS.Internal.FontFace; namespace MS.Internal.FontCache diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CanonicalFontFamilyReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CanonicalFontFamilyReference.cs index 0b90342aced..08fd10de0d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CanonicalFontFamilyReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/CanonicalFontFamilyReference.cs @@ -12,10 +12,6 @@ // // -using System; -using MS.Internal; -using System.Security; - namespace MS.Internal.FontCache { internal sealed class CanonicalFontFamilyReference diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs index 2abd579de1f..239df2b4455 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs @@ -9,12 +9,7 @@ // // -using System; -using System.Security; using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Diagnostics; using MS.Internal.PresentationCore; namespace MS.Internal.FontCache diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FamilyCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FamilyCollection.cs index da624f2ec48..a289215d26b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FamilyCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FamilyCollection.cs @@ -9,23 +9,14 @@ // // -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; using System.Windows; using System.Windows.Markup; // for XmlLanguage using System.Windows.Media; using MS.Win32; -using MS.Utility; -using MS.Internal; using MS.Internal.FontFace; using MS.Internal.Shaping; @@ -88,7 +79,7 @@ private IList UserCompositeFonts { if (_userCompositeFonts == null) { - _userCompositeFonts = GetCompositeFontList(new FontSourceCollection(_folderUri, false, true)); + _userCompositeFonts = GetCompositeFontList(new FontSourceCollection(_folderUri, true)); } return _userCompositeFonts; } @@ -249,7 +240,6 @@ internal static CompositeFontFamily GetCompositeFontFamilyAtIndex(int index) if (_systemCompositeFonts[index] == null) { FontSource fontSource = new FontSource(new Uri(Path.Combine(FamilyCollection.SxSFontsResourcePrefix, _systemCompositeFontsFileNames[index] + Util.CompositeFontExtension), UriKind.RelativeOrAbsolute), - skipDemand:true, isComposite:true, isInternalCompositeFont:true); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs index b19d4f88bb2..00b346c4733 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs @@ -7,32 +7,16 @@ // Description: Miscellaneous utility functions for font handling code. // -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.IO; using System.IO.Packaging; -using System.Reflection; -using System.Resources; using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Threading; -using System.Windows; using System.Windows.Markup; // for XmlLanguage -using System.Windows.Media; using System.Windows.Navigation; -using System.Windows.Threading; using MS.Win32; -using MS.Internal; -using MS.Internal.FontFace; using MS.Internal.PresentationCore; -using MS.Internal.Resources; -using MS.Utility; using Microsoft.Win32.SafeHandles; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs index 102a3c65cd0..20d28567cf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs @@ -8,21 +8,9 @@ // // -using System; -using System.Diagnostics; using System.Globalization; -using System.IO; -using System.Security; -using System.ComponentModel; using System.Collections; -using System.Collections.Generic; -using System.Windows; using System.Windows.Media; -using System.Runtime.InteropServices; - -using MS.Win32; -using MS.Utility; -using MS.Internal; using MS.Internal.FontFace; using MS.Internal.Shaping; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontResourceCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontResourceCache.cs index 8e87e644a57..bfb6051b23e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontResourceCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontResourceCache.cs @@ -10,10 +10,7 @@ // // -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.IO.Packaging; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSource.cs index 5e252bfffb3..795e3baa52e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSource.cs @@ -8,27 +8,13 @@ // // -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.IO; using System.IO.Packaging; using System.Net; using System.Reflection; using System.Resources; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Media; -using System.Windows.Threading; - -using MS.Win32; -using MS.Utility; -using MS.Internal; using MS.Internal.IO.Packaging; -using MS.Internal.PresentationCore; using MS.Internal.Text.TextInterface; namespace MS.Internal.FontCache @@ -39,7 +25,7 @@ public FontSourceFactory() { } public IFontSource Create(string uriString) { - return new FontSource(new Uri(uriString), false); + return new FontSource(new Uri(uriString)); } } @@ -57,31 +43,29 @@ internal class FontSource : IFontSource #region Constructors - public FontSource(Uri fontUri, bool skipDemand) + public FontSource(Uri fontUri) { - Initialize(fontUri, skipDemand, false, isInternalCompositeFont: false); + Initialize(fontUri, false, isInternalCompositeFont: false); } - public FontSource(Uri fontUri, bool skipDemand, bool isComposite) + public FontSource(Uri fontUri, bool isComposite) { - Initialize(fontUri, skipDemand, isComposite, isInternalCompositeFont: false); + Initialize(fontUri, isComposite, isInternalCompositeFont: false); } /// /// Allows WPF to construct its internal CompositeFonts from resource URIs. /// /// - /// /// - public FontSource(Uri fontUri, bool skipDemand, bool isComposite, bool isInternalCompositeFont) + public FontSource(Uri fontUri, bool isComposite, bool isInternalCompositeFont) { - Initialize(fontUri, skipDemand, isComposite, isInternalCompositeFont); + Initialize(fontUri, isComposite, isInternalCompositeFont); } - private void Initialize(Uri fontUri, bool skipDemand, bool isComposite, bool isInternalCompositeFont) + private void Initialize(Uri fontUri, bool isComposite, bool isInternalCompositeFont) { _fontUri = fontUri; - _skipDemand = skipDemand; _isComposite = isComposite; _isInternalCompositeFont = isInternalCompositeFont; Invariant.Assert(_isInternalCompositeFont || _fontUri.IsAbsoluteUri); @@ -101,7 +85,13 @@ private void Initialize(Uri fontUri, bool skipDemand, bool isComposite, bool isI /// /// Use this to ensure we don't call Uri.IsFile on a relative URI. /// - public bool IsFile { get { return !_isInternalCompositeFont && _fontUri.IsFile; } } + public bool IsFile + { + get + { + return !_isInternalCompositeFont && _fontUri.IsFile; + } + } public bool IsComposite { @@ -433,8 +423,6 @@ protected override void Dispose(bool disposing) private Uri _fontUri; - private bool _skipDemand; - private static SizeLimitedCache _resourceCache = new SizeLimitedCache(MaximumCacheItems); /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSourceCollection.cs index 42778aa0422..05449b5fe04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontSourceCollection.cs @@ -8,28 +8,9 @@ // // -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.IO.Packaging; -using System.Net; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Media; -using System.Windows.Threading; using Microsoft.Win32; - -using MS.Win32; -using MS.Utility; -using MS.Internal; -using MS.Internal.IO.Packaging; - -using MS.Internal.PresentationCore; using MS.Internal.Text.TextInterface; namespace MS.Internal.FontCache @@ -40,7 +21,7 @@ public FontSourceCollectionFactory() { } public IFontSourceCollection Create(string uriString) { - return new FontSourceCollection(new Uri(uriString), false); + return new FontSourceCollection(new Uri(uriString)); } } @@ -49,20 +30,19 @@ public IFontSourceCollection Create(string uriString) /// internal class FontSourceCollection : IFontSourceCollection { - public FontSourceCollection(Uri folderUri, bool isWindowsFonts) + public FontSourceCollection(Uri folderUri) { - Initialize(folderUri, isWindowsFonts, false); + Initialize(folderUri, false); } - public FontSourceCollection(Uri folderUri, bool isWindowsFonts, bool tryGetCompositeFontsOnly) + public FontSourceCollection(Uri folderUri, bool tryGetCompositeFontsOnly) { - Initialize(folderUri, isWindowsFonts, tryGetCompositeFontsOnly); + Initialize(folderUri, tryGetCompositeFontsOnly); } - private void Initialize(Uri folderUri, bool isWindowsFonts, bool tryGetCompositeFontsOnly) + private void Initialize(Uri folderUri, bool tryGetCompositeFontsOnly) { _uri = folderUri; - _isWindowsFonts = isWindowsFonts; _tryGetCompositeFontsOnly = tryGetCompositeFontsOnly; bool isComposite = false; @@ -74,7 +54,7 @@ private void Initialize(Uri folderUri, bool isWindowsFonts, bool tryGetComposite if (isSingleSupportedFile || !Util.IsEnumerableFontUriScheme(_uri)) { _fontSources = new List(1); - _fontSources.Add(new FontSource(_uri, false, isComposite)); + _fontSources.Add(new FontSource(_uri, isComposite)); } else { @@ -88,27 +68,11 @@ private void InitializeDirectoryProperties() if (_uri.IsFile) { - if (_isWindowsFonts) - { - if (object.ReferenceEquals(_uri, Util.WindowsFontsUriObject)) - { - // We know the local path and that it's a folder - _isFileSystemFolder = true; - } - else - { - // It's a file within the Windows Fonts folder - _isFileSystemFolder = false; - } - } - else - { - // Get the local path - string localPath = _uri.LocalPath; + // Get the local path + string localPath = _uri.LocalPath; - // Decide if it's a file or folder based on syntax, not contents of file system - _isFileSystemFolder = localPath[localPath.Length - 1] == Path.DirectorySeparatorChar; - } + // Decide if it's a file or folder based on syntax, not contents of file system + _isFileSystemFolder = localPath[localPath.Length - 1] == Path.DirectorySeparatorChar; } } @@ -126,55 +90,14 @@ private void SetFontSources() bool isOnlyCompositeFontFiles = false; if (_isFileSystemFolder) { - if (_isWindowsFonts) + if (_tryGetCompositeFontsOnly) { - if (_tryGetCompositeFontsOnly) - { - files = Directory.GetFiles(_uri.LocalPath, "*" + Util.CompositeFontExtension); - isOnlyCompositeFontFiles = true; - } - else - { - // fontPaths accumulates font file paths obtained from the registry and the file system - // This collection is a set, i.e. only keys matter, not values. - HashSet fontPaths = new HashSet(512, StringComparer.OrdinalIgnoreCase); - - using (RegistryKey fontsKey = Registry.LocalMachine.OpenSubKey(InstalledWindowsFontsRegistryKey)) - { - // The registry key should be present on a valid Windows installation. - Invariant.Assert(fontsKey != null); - - foreach (string fontValue in fontsKey.GetValueNames()) - { - string fileName = fontsKey.GetValue(fontValue) as string; - if (fileName != null) - { - // See if the path doesn't contain any directory information. - // Shell uses the same method to determine whether to prepend the path with %windir%\fonts. - if (Path.GetFileName(fileName) == fileName) - fileName = Path.Combine(Util.WindowsFontsLocalPath, fileName); - - fontPaths.Add(fileName); - } - } - } - - fontPaths.UnionWith(Directory.EnumerateFiles(_uri.LocalPath)); - - files = fontPaths; - } -} + files = Directory.GetFiles(_uri.LocalPath, "*" + Util.CompositeFontExtension); + isOnlyCompositeFontFiles = true; + } else { - if (_tryGetCompositeFontsOnly) - { - files = Directory.GetFiles(_uri.LocalPath, "*" + Util.CompositeFontExtension); - isOnlyCompositeFontFiles = true; - } - else - { - files = Directory.GetFiles(_uri.LocalPath); - } + files = Directory.GetFiles(_uri.LocalPath); } } else @@ -187,7 +110,7 @@ private void SetFontSources() { foreach (string file in files) { - fontSources.Add(new FontSource(new Uri(file, UriKind.Absolute), _isWindowsFonts, true)); + fontSources.Add(new FontSource(new Uri(file, UriKind.Absolute), true)); } } else @@ -196,7 +119,7 @@ private void SetFontSources() foreach (string file in files) { if (Util.IsSupportedFontExtension(Path.GetExtension(file), out isComposite)) - fontSources.Add(new FontSource(new Uri(file, UriKind.Absolute), _isWindowsFonts, isComposite)); + fontSources.Add(new FontSource(new Uri(file, UriKind.Absolute), isComposite)); } } } @@ -220,12 +143,12 @@ private void SetFontSources() if (String.IsNullOrEmpty(resourceName)) { isComposite = Util.IsCompositeFont(Path.GetExtension(_uri.AbsoluteUri)); - fontSources.Add(new FontSource(_uri, _isWindowsFonts, isComposite)); + fontSources.Add(new FontSource(_uri, isComposite)); } else { isComposite = Util.IsCompositeFont(Path.GetExtension(resourceName)); - fontSources.Add(new FontSource(new Uri(_uri, resourceName), _isWindowsFonts, isComposite)); + fontSources.Add(new FontSource(new Uri(_uri, resourceName), isComposite)); } } } @@ -259,17 +182,11 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() private Uri _uri; - private bool _isWindowsFonts; - // _isFileSystemFolder flag makes sense only when _uri.IsFile is set to true. private bool _isFileSystemFolder; private volatile IList _fontSources; // Flag to indicate that only composite fonts in the provided URI location should be retrieved. private bool _tryGetCompositeFontsOnly; - - private const string InstalledWindowsFontsRegistryKey = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"; - private const string InstalledWindowsFontsRegistryKeyFullPath = @"HKEY_LOCAL_MACHINE\" + InstalledWindowsFontsRegistryKey; -} + } } - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs index b1ba1f208ee..227b7dfd73e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs @@ -8,16 +8,7 @@ // // -using System; using System.Collections; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Threading; - -using MS.Internal.FontFace; -using MS.Internal.Shaping; namespace MS.Internal.FontCache { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/fontcacheconstants.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/fontcacheconstants.cs index 46fc7f3cabc..0a6f90ec0b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/fontcacheconstants.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/fontcacheconstants.cs @@ -5,8 +5,6 @@ // // -using System; - namespace MS.Internal.FontCache { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs index 95a922c6286..30c4790aced 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs @@ -2,25 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// // Contents: Composite font info parsed from composite font file -// -// - -using System; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; + using System.Windows.Markup; using System.Windows.Media; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.FontFace { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs index a287ffe9219..5c6c8019468 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs @@ -2,16 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Contents: The XML Composite font parsing -// -// -using System; using System.IO; -using System.Security; -using System.Text; using System.Windows; using System.Windows.Interop; using System.Windows.Media; @@ -19,14 +12,9 @@ using System.Xml; using System.Globalization; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using MS.Internal.TextFormatting; -using System.Reflection; - -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.FontFace { internal class CompositeFontParser diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDifferentiator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDifferentiator.cs index 256e6b2d8f0..55e5ec8d5bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDifferentiator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDifferentiator.cs @@ -8,8 +8,6 @@ // and adjusting stretch, weight and style values. // -using System; -using System.Collections.Generic; using System.Globalization; using System.Text; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs index f71f5ba5249..a1741ada777 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Markup; // for XmlLanguage -using System.Windows.Media; - -using MS.Internal; using MS.Internal.PresentationCore; -using MS.Utility; using MS.Internal.FontCache; // Since we disable PreSharp warnings in this file, we first need to disable warnings about unknown message numbers and unknown pragmas. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontFamilyIdentifier.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontFamilyIdentifier.cs index 01cb0438acd..2f94044971c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontFamilyIdentifier.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontFamilyIdentifier.cs @@ -8,19 +8,7 @@ // // -using System; -using System.Diagnostics; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.TextFormatting; - -using MS.Utility; -using MS.Internal; -using MS.Internal.Shaping; using MS.Internal.FontCache; -using MS.Internal.TextFormatting; namespace MS.Internal.FontFace { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IDeviceFont.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IDeviceFont.cs index 403c0cfe466..0d48a77d021 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IDeviceFont.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IDeviceFont.cs @@ -9,10 +9,6 @@ // // -using System; -using System.Security; - - namespace MS.Internal.FontFace { internal interface IDeviceFont diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IFontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IFontFamily.cs index 472623049e5..beaf84ed49f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IFontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/IFontFamily.cs @@ -9,11 +9,7 @@ // // -using System; -using System.Diagnostics; using System.Globalization; -using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Markup; // for XmlLanguage using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/ITypefaceMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/ITypefaceMetrics.cs index c34cfbe6461..2dc789da086 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/ITypefaceMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/ITypefaceMetrics.cs @@ -10,10 +10,6 @@ // -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; using System.Windows.Media; using System.Windows.Markup; // for XmlLanguage diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/MatchingStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/MatchingStyle.cs index 050fdb6f562..f972c7dad8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/MatchingStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/MatchingStyle.cs @@ -9,12 +9,7 @@ // -using System; -using System.Diagnostics; -using System.Security; -using System.Runtime.InteropServices; using System.Windows; -using System.Windows.Media; namespace MS.Internal.FontFace diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/PhysicalFontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/PhysicalFontFamily.cs index 4f15c5620ba..5523d98a09f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/PhysicalFontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/PhysicalFontFamily.cs @@ -9,20 +9,11 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Security; -using System.Text; using System.Windows; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.TextFormatting; - -using MS.Internal; -using MS.Internal.FontCache; using MS.Internal.TextFormatting; namespace MS.Internal.FontFace diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/Tags.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/Tags.cs index 5a66a247788..99871baee76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/Tags.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/Tags.cs @@ -10,14 +10,11 @@ // Generated on Mon Mar 19 09:23:40 2007 // -using MS.Internal; -using System.Windows; - namespace MS.Internal { -// Script tags + // Script tags internal enum ScriptTags { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs index 6b956c6bc4b..c427888ae4f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs @@ -2,24 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Contents: Collection of typefaces -// -// -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Media; -using MS.Internal.FontCache; -using System.Globalization; -using System.Security; - -using SR = MS.Internal.PresentationCore.SR; namespace MS.Internal.FontFace { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generated/AvTraceMessages.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generated/AvTraceMessages.cs index 34e5e6308a4..c763e06fede 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generated/AvTraceMessages.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generated/AvTraceMessages.cs @@ -5,9 +5,6 @@ // NOTE: This file was generated by $(WpfCodeGenDir)AvTrace\AvTraceMessages.tt. // Any manual updates to this file will overwritten. -using System; -using System.Diagnostics; - namespace MS.Internal { static internal partial class TraceRoutedEvent diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generic/Span.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generic/Span.cs index 2fb2f7c4c4f..c1a4252fe95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generic/Span.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Generic/Span.cs @@ -9,11 +9,7 @@ // -using System; using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Diagnostics; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs index 28216db3a6a..864a4bbf1ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs @@ -2,20 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: Converters for IList, IList, IList // IList and IList. - -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Text; -using System.Windows; using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Converters { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs index 3602bd4a9a6..e4a41f030c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs @@ -12,17 +12,13 @@ // web requests. This class is used by ByteWrapper (unmanaged code) to make additional // web requests other than through WININET -using System; using System.Collections; using System.ComponentModel; // For Win32Exception -using System.Diagnostics; using System.Globalization; using System.IO; -using System.IO.IsolatedStorage; // For IsolatedStorage temp file using System.Net; using System.Net.Cache; // For RequestCachePolicy using System.Runtime.InteropServices; // For Marshal -using System.Security; // SecurityCritical, SecurityTreatAsSafe using System.Threading; // For Mutex using Microsoft.Win32.SafeHandles; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs index b6928c2600e..fcb054f4887 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs @@ -18,9 +18,7 @@ // The stream is read only -using System; using System.IO; -using System.IO.Packaging; using MS.Internal.PresentationCore; // for ExceptionStringTable diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs index bf6074820ac..7e02d8cdc4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs @@ -37,16 +37,10 @@ #define TRACE #endif -using System; using System.IO; using System.Net; -using System.Runtime.InteropServices; using System.Threading; using System.Collections; // for IComparer -using System.Diagnostics; // for Debug.Assert -using System.Security; // SecurityCritical, SecurityTreatAsSafe -using System.IO.IsolatedStorage; // for IsolatedStorageFileStream -using MS.Internal.IO.Packaging; // ByteRangeDownloader using MS.Internal.PresentationCore; // for ExceptionStringTable namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs index cf926cc5c22..1d575317762 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs @@ -9,16 +9,8 @@ // PackWebRequest. // -using System; -using System.Security; -using System.Collections; using System.Collections.Specialized; -using System.Diagnostics; -using System.Globalization; -using System.IO; using System.IO.Packaging; - -using MS.Internal; using MS.Internal.PresentationCore; // for ExceptionStringTable namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs index 769993d11ae..23fe0316a14 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs @@ -14,17 +14,10 @@ #define TRACE #endif -using System; using System.IO; using System.IO.Packaging; using System.Net; using System.Net.Cache; // for RequestCachePolicy -using System.Runtime.Serialization; -using System.Diagnostics; // For Assert -using MS.Utility; // for EventTrace -using MS.Internal.IO.Packaging; // for PackageCacheEntry -using MS.Internal.PresentationCore; // for SR exception strings -using MS.Internal; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ResponseStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ResponseStream.cs index c09994eceed..37a7dc4ec76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ResponseStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ResponseStream.cs @@ -19,12 +19,9 @@ // 12/11/03 - brucemac - adapted from ResponseStream // 15/10/04 - brucemac - adapted from ContainerResponseStream -using System; -using System.Diagnostics; using System.IO; using System.IO.Packaging; // for PackWebResponse using MS.Utility; -using System.Windows; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IVisual3DContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IVisual3DContainer.cs index 481e97ebc81..02caf19839f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IVisual3DContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IVisual3DContainer.cs @@ -4,9 +4,6 @@ -using MS.Internal; -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Bezier.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Bezier.cs index 0906f8725af..a2d003a0c31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Bezier.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Bezier.cs @@ -3,18 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Media; -using System.Windows.Ink; using System.Windows.Input; -using System.Collections.Generic; using MS.Internal.Ink.InkSerializedFormat; namespace MS.Internal.Ink -{ +{ /// /// Bezier curve generation class /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ContourSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ContourSegment.cs index 8564f36f2ee..8b0f3ad6c8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ContourSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ContourSegment.cs @@ -3,9 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; -using System.Windows.Media; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/CuspData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/CuspData.cs index 02e4db7ecb6..9a22bfa0d69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/CuspData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/CuspData.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Media; -using System.Windows.Ink; using System.Windows.Input; -using System.Collections.Generic; using MS.Internal.Ink.InkSerializedFormat; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/DrawingFlags.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/DrawingFlags.cs index 08d4dde1565..1faa8a75e89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/DrawingFlags.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/DrawingFlags.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Ink { /// Flag values which can help the renderer decide how to diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/EllipticalNodeOperations.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/EllipticalNodeOperations.cs index 29e84a1d96e..8ea157da59f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/EllipticalNodeOperations.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/EllipticalNodeOperations.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Media; using System.Windows.Ink; -using System.Windows.Input; -using System.Diagnostics; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ErasingStroke.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ErasingStroke.cs index a1b7e99f11b..701f29260fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ErasingStroke.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ErasingStroke.cs @@ -4,11 +4,8 @@ //#define POINTS_FILTER_TRACE -using System; using System.Windows; using System.Windows.Ink; -using System.Windows.Media; -using System.Collections.Generic; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs index f7fa3c9c807..1fed771f814 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs @@ -2,19 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; -using System; -using System.IO; -using System.Collections; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; using MS.Internal.Ink.InkSerializedFormat; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs index 0711f1aca35..f5a5e033943 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using MS.Internal.Ink.InkSerializedFormat; -using System.Windows.Media; -using System.Reflection; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs index 5b73c71de48..fb0de6bcc17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs @@ -2,36 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: // A wrapper class which interoperates with the unmanaged recognition APIS // in mshwgst.dll -// -// Features: -// -// 01/14/2005 waynezen: Created -// -// using Microsoft.Win32; using MS.Win32; -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Runtime.ConstrainedExecution; using System.Text; using System.Windows.Media; using System.Windows.Ink; using System.Windows.Input; -using MS.Internal.PresentationCore; - -using MS.Utility; -using SR = MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs index a2ec23b29c3..787c62bbe79 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs @@ -2,20 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; -using System.Collections.Generic; -using System.Diagnostics; - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { internal class AlgoModule diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs index f12c595547b..f1ca48acef3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs @@ -2,19 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs index 040155d250f..d8a74ab0fd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs @@ -4,19 +4,6 @@ //#define OLD_ISF -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { internal class Compressor diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs index 552d1bc7946..6f2accb9703 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs @@ -4,23 +4,11 @@ //#define OLD_ISF -using MS.Utility; -using System; using System.IO; -using System.Security; -using System.Diagnostics; -using System.Collections; using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; -using MS.Internal.Ink.InkSerializedFormat; -using System.Windows; using System.Windows.Ink; using System.Windows.Media; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/DrawingAttributeSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/DrawingAttributeSerializer.cs index 7dba8b32199..6d536dd664e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/DrawingAttributeSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/DrawingAttributeSerializer.cs @@ -4,19 +4,9 @@ //#define OLD_ISF -using System; using System.IO; -using System.Security; -using System.Diagnostics; -using System.Collections; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; -using MS.Internal.Ink.InkSerializedFormat; using System.Windows.Media; using System.Windows.Ink; -using System.Windows; // // These are the V1 DrawingAttributes and their respective defaults: diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs index 3a1ef916208..03387551e82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; -using System.Collections.Generic; -using System.Diagnostics; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GuidTagList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GuidTagList.cs index b5c1c5b7222..21c0aa05433 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GuidTagList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GuidTagList.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.IO; -using System.Windows.Ink; -using MS.Internal.IO.Packaging; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs index 806cc772e1d..573885226bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Collections.Generic; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; -using System.Diagnostics; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs index fe4f4261a13..c2b2268b3ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs @@ -2,20 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; -using System.Collections.Generic; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/ISFTagAndGuidCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/ISFTagAndGuidCache.cs index fff3af8e989..8423bb19210 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/ISFTagAndGuidCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/ISFTagAndGuidCache.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.IO; -using System.Windows.Ink; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs index 0d480c0a228..89b3de39b89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs @@ -4,24 +4,11 @@ //#define OLD_ISF -using MS.Utility; -using System; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; -using System.Windows.Media.Imaging; using System.IO; -using System.ComponentModel; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; -using System.Collections; -using System.Collections.Generic; using System.Windows.Input; using System.Windows.Ink; -using MS.Internal.IO.Packaging; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs index 8a34fcae217..beade190f5b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs @@ -2,22 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using MS.Internal.Ink.InkSerializedFormat; -using MS.Internal.Ink; -using System.Collections.Generic; -using System.Diagnostics; - - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MetricEntry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MetricEntry.cs index 9b1f07b2f55..5617a6866f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MetricEntry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MetricEntry.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.Windows.Input; -using System.Windows.Ink; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs index d58fdb4b890..2b377e325c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs @@ -2,20 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using System.Windows.Ink; -using System.Collections.Generic; -using MS.Internal.Ink.InkSerializedFormat; -using System.Diagnostics; - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink.InkSerializedFormat { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs index 24c89d4cde4..d1fdf079911 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; using System.IO; using System.Runtime.InteropServices; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeDescriptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeDescriptor.cs index 5585c24271e..146a7a19111 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeDescriptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeDescriptor.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; - // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET namespace MS.Internal.Ink.InkSerializedFormat diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeSerializer.cs index a90461bf85d..8f404d8ecc9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/StrokeSerializer.cs @@ -4,18 +4,11 @@ //#define OLD_ISF -using System; using System.IO; -using System.Security; -using System.Diagnostics; -using System.Windows; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Media; using System.Windows.Input; using System.Windows.Ink; -using MS.Internal.Ink; -using MS.Internal.IO.Packaging; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Lasso.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Lasso.cs index 2075aa6de35..0f1dca4e8bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Lasso.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Lasso.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; using System.Windows.Ink; -using System.Windows.Media; -using System.Collections.Generic; -using System.Globalization; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs index f1bd973b4a7..7814e064256 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs @@ -3,15 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; -using System.Windows.Media; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using MS.Utility; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs index 52c7ae95be3..f2f92b63c9c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs @@ -3,16 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Windows; using System.Windows.Media; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; using MS.Internal.Ink; -using MS.Internal; using MS.Internal.PresentationCore; namespace System.Windows.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs index ce284adff90..c64e1877913 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Utility; -using MS.Internal; -using System; -using System.Windows; -using System.Collections.Generic; using System.Globalization; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink { #region StrokeFIndices diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeIntersection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeIntersection.cs index fb1efcb2e83..ec517b2cda8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeIntersection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeIntersection.cs @@ -3,13 +3,7 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.Ink; -using MS.Utility; -using System; -using System.Windows; -using System.Collections.Generic; -using System.Globalization; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNode.cs index 1552dc7978b..daf369a7a2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNode.cs @@ -4,13 +4,7 @@ //#define DEBUG_RENDERING_FEEDBACK -using System; -using System.Collections.Generic; using System.Windows; -using System.Windows.Ink; -using System.Windows.Media; -using System.Windows.Input; -using System.Diagnostics; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeData.cs index 6c9abcbc0d2..b894fe6d2a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeData.cs @@ -3,12 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Windows; -using System.Windows.Media; -using System.Windows.Input; -using System.Diagnostics; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs index 9e074011527..1ba12da8e7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs @@ -3,16 +3,9 @@ // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Ink; -using System.Windows.Media; using System.Windows.Input; -using MS.Internal.Ink; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations.cs index 06e3806e621..ebcd04c2fc9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Ink; -using System.Windows.Media; -using System.Windows.Input; -using System.Diagnostics; -using MS.Utility; -using MS.Internal; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations2.cs index 3ae8398eb95..ff3db5f8000 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeOperations2.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Windows; -using System.Windows.Media; -using System.Windows.Input; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs index 77518ee53f5..d1b566bcb5b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs @@ -4,16 +4,9 @@ //#define DEBUG_RENDERING_FEEDBACK -using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Ink; using System.Windows.Media; -using System.Windows.Input; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; -using MS.Internal; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs index 50b76c8614b..3b7af4f9c04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.IO; -using System.Windows; using System.Windows.Media; using MS.Internal; -using MS.Internal.Ink; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFactory.cs index 1c41dd285c2..77344394c76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFactory.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollection.cs index 9107e4e8f53..b69e04de764 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollection.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollectionLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollectionLoader.cs index 44fddcccd47..1d12d4e577b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollectionLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontCollectionLoader.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFace.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFace.cs index 4ca49c06a39..8913c42a2ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFace.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFace.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFile.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFile.cs index ddb46baae68..4399ff94242 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFile.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFile.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFileLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFileLoader.cs index 8841d32884a..9c3f730ab26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFileLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteFontFileLoader.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteTextAnalyzer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteTextAnalyzer.cs index 308d6b87c18..ced11f90f72 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteTextAnalyzer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/DWrite/IDWriteTextAnalyzer.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.CompilerServices; namespace MS.Internal.Interop.DWrite diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/IUnknown.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/IUnknown.cs index fcab94b4427..963658add3e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/IUnknown.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/IUnknown.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; - namespace MS.Internal.Interop { internal unsafe interface IUnknown diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/NativePointerCriticalHandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/NativePointerCriticalHandle.cs index 631330ba478..d9258e71741 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/NativePointerCriticalHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/NativePointerCriticalHandle.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.InteropServices; namespace MS.Internal.Interop diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/TipTsfHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/TipTsfHelper.cs index f9467bdf0a8..dfee204f7cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/TipTsfHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/TipTsfHelper.cs @@ -5,14 +5,10 @@ // // -using System; -using System.Security; using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Input; using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; using MS.Internal.WindowsRuntime.Windows.UI.ViewManagement; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/KnownBoxes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/KnownBoxes.cs index c8f76b386c7..6a502755549 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/KnownBoxes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/KnownBoxes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/LoadedOrUnloadedOperation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/LoadedOrUnloadedOperation.cs index 294d62b02f6..c39e6d8af4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/LoadedOrUnloadedOperation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/LoadedOrUnloadedOperation.cs @@ -8,9 +8,6 @@ // A pending loaded or unloaded operation, to be run by the MediaContext. // -using System; -using System.Diagnostics; // Debug.Assert - using System.Windows; // DependencyObject using System.Windows.Threading; // DispatcherOperationCallback diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/ParserStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/ParserStreamGeometryContext.cs index 471b4ce9a60..0fb13b9c98f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/ParserStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/ParserStreamGeometryContext.cs @@ -13,12 +13,8 @@ // and we reduce creation of temporary strings. // -using MS.Internal; - using System; -using System.Collections; using System.Collections.Generic; -using System.Security; using System.IO; using MS.Utility; @@ -37,10 +33,10 @@ namespace MS.Internal.Markup namespace MS.Internal.Media #endif { - /// - /// ParserStreamGeometryContext - /// - internal class ParserStreamGeometryContext : StreamGeometryContext + /// + /// ParserStreamGeometryContext + /// + internal class ParserStreamGeometryContext : StreamGeometryContext { enum ParserGeometryContextOpCodes : byte { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/TextOptionsInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/TextOptionsInternal.cs index 85b9e1458eb..c8ed3006b2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/TextOptionsInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/TextOptionsInternal.cs @@ -9,7 +9,6 @@ // and TextRenderingMode. // -using System; using System.Windows; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs index c4b807fd42b..00838c1e4ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Internal; -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs index 7c840b4a266..e48911c8f0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs @@ -7,33 +7,31 @@ // using System; -using System.IO; -using System.Collections; -using System.Globalization; // CultureInfo +using System.IO; #if PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK using MS.Internal.PresentationFramework; -#endif +#endif #if PBTCOMPILER -using System.Collections.Generic; +using System.Collections.Generic; using TypeConverterHelper = MS.Internal.Markup; namespace MS.Internal.Markup #else -using System.Windows; -using System.Windows.Media ; -using System.Windows.Media.Media3D; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Media3D; using TypeConverterHelper = System.Windows.Markup; namespace MS.Internal.Media #endif { -#if PBTCOMPILER +#if PBTCOMPILER + - // // Internal class used during serialization of Point3D, or Vectors. // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs index b0db0ae5fcd..24011ff32f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs @@ -2,27 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Internal; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; using System.Windows; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Media3D; -using MS.Internal.Media3D; -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform3DTo2DTo3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform3DTo2DTo3D.cs index ba3719d353c..6892009d14d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform3DTo2DTo3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform3DTo2DTo3D.cs @@ -8,20 +8,7 @@ // Description: Declaration of the GeneralTransform3DTo2DTo3D class. // -using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; using System.Windows.Media.Media3D; namespace MS.Internal.Media3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/LineUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/LineUtil.cs index 732ca46f8fb..c2dbff41dc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/LineUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/LineUtil.cs @@ -60,14 +60,9 @@ // // None of this code understands rays. This is all in terms of lines, lines, lines, lines! -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Media.Media3D; -using MS.Utility; - namespace MS.Internal.Media3D { [Flags] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/M3DUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/M3DUtil.cs index d46abff4662..19ab913b6c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/M3DUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/M3DUtil.cs @@ -8,9 +8,6 @@ // using MS.Utility; -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/MediaTrace.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/MediaTrace.cs index 44325b9a8b3..2803af84c3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/MediaTrace.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/MediaTrace.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; -using System.Reflection; -using System.Security; -using System; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper - namespace MS.Internal { #if DEBUG diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs index ae51e536dbb..afc260299db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: The PartialArray struct is used when the developer needs to pass a CLR array range to -// a function that takes generic IList interface. For cases when the whole array needs to be passed, -// CLR array already implements IList. -// -// -// - -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using SR = MS.Internal.PresentationCore.SR; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ContentFileHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ContentFileHelper.cs index 1bb227b76a2..29fbdb2541b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ContentFileHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ContentFileHelper.cs @@ -5,11 +5,9 @@ // // -using System; using System.Reflection; using System.Windows.Resources; using System.Windows.Navigation; -using System.Collections.Generic; namespace MS.Internal.Resources { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ResourceManagerWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ResourceManagerWrapper.cs index b461b8b035e..af85e23588f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ResourceManagerWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Resources/ResourceManagerWrapper.cs @@ -12,16 +12,12 @@ // B. Main assembly for non-localizable resource. // -using System; -using System.IO.Packaging; using System.IO; using System.Collections; -using System.Windows.Resources; using System.Resources; using System.Reflection; using System.Globalization; using MS.Internal.PresentationCore; // SafeSecurityHelper -using System.Windows; namespace MS.Internal.Resources { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs index 15c090346f0..87a0b91dfd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs @@ -9,22 +9,14 @@ // // -using System; using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Markup; // for XmlLanguage using System.Windows.Media; using System.Windows.Media.TextFormatting; - -using MS.Internal.FontCache; using MS.Internal.FontFace; using MS.Internal.TextFormatting; using FontFamily = System.Windows.Media.FontFamily; -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeTypefaceMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeTypefaceMetrics.cs index f5814870935..5e5e1940246 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeTypefaceMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeTypefaceMetrics.cs @@ -10,14 +10,10 @@ // -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Markup; // for XmlLanguage using MS.Internal.FontFace; -using System.Globalization; namespace MS.Internal.Shaping diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Context.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Context.cs index fcd9f2ba9b1..9601fae0416 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Context.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Context.cs @@ -13,10 +13,6 @@ // // -using System.Diagnostics; -using System.Security; -using System; - namespace MS.Internal.Shaping { internal struct ContextualLookupRecords diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphInfoList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphInfoList.cs index c90e5c6f91b..57116bd6d80 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphInfoList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphInfoList.cs @@ -7,14 +7,6 @@ // // Description: GlyphInfoList class - -using System; -using System.Diagnostics; -using System.Windows.Media.TextFormatting; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; - namespace MS.Internal.Shaping { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphingCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphingCache.cs index 4efbc4e6fd6..a3cbd9b1f9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphingCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/GlyphingCache.cs @@ -8,14 +8,9 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Windows.Media; using System.Windows.Media.TextFormatting; - -using MS.Internal; using MS.Internal.TextFormatting; namespace MS.Internal.Shaping diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/IShapeableTextCollector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/IShapeableTextCollector.cs index 7016a3b17b9..cb189d354a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/IShapeableTextCollector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/IShapeableTextCollector.cs @@ -10,11 +10,6 @@ // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; - using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Internal.Shaping; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeCommon.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeCommon.cs index 91550769c1d..aa6297f37cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeCommon.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeCommon.cs @@ -12,11 +12,7 @@ // // -using System.Diagnostics; -using System.Security; -using System; using System.IO; -using MS.Internal; namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayout.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayout.cs index 49813644fa9..df44f54dc0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayout.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayout.cs @@ -4,12 +4,7 @@ -using System; -using System.Security; using System.IO; -using System.Diagnostics; - -using MS.Internal.FontCache; namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayoutCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayoutCache.cs index 8e42596020f..d501a6954e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayoutCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/OpenTypeLayoutCache.cs @@ -10,15 +10,9 @@ // // -using System; -using System.Security; using System.IO; -using System.Diagnostics; using System.Collections; -using MS.Internal; -using MS.Internal.FontCache; - namespace MS.Internal.Shaping { // Cache is stroing for each glyph list of lookups where this glyph participate as diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Positioning.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Positioning.cs index a5b3d4f7ff4..6995898c417 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Positioning.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Positioning.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - -using System.Diagnostics; -using System.Security; -using System; -using System.IO; - namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapeTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapeTypeface.cs index 6ed6821e563..6fa88698f64 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapeTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapeTypeface.cs @@ -9,24 +9,9 @@ // // -using System; -using System.Runtime.InteropServices; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Diagnostics; -using System.Security; -using System.Windows; using System.Windows.Media; -using System.Windows.Media.TextFormatting; - -using MS.Utility; -using MS.Internal; using MS.Internal.FontCache; using MS.Internal.FontFace; -using MS.Internal.TextFormatting; - -using FontFace = MS.Internal.FontFace; namespace MS.Internal.Shaping diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShaperBuffers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShaperBuffers.cs index b1d96d5697a..4bfa82ef2ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShaperBuffers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShaperBuffers.cs @@ -9,20 +9,6 @@ // // -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using MS.Internal.FontCache; -using MS.Internal.FontFace; -using System.Windows.Media; -using System.Windows.Media.TextFormatting; -using MS.Internal.PresentationCore; -using MS.Utility; - - namespace MS.Internal.Shaping { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapingOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapingOptions.cs index aabe1d84ff0..5e2c4ca5921 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapingOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/ShapingOptions.cs @@ -9,8 +9,6 @@ // // -using System; - namespace MS.Internal.Shaping { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Substitution.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Substitution.cs index 6d789722c86..38ed67fa60e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Substitution.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/Substitution.cs @@ -7,9 +7,6 @@ // // Contents: OpentTypeLayout substitution classes -using System.Diagnostics; -using System.Security; -using System; using System.IO; namespace MS.Internal.Shaping diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/TypefaceMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/TypefaceMap.cs index 358b84d3f0f..f850633e82e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/TypefaceMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/TypefaceMap.cs @@ -8,25 +8,17 @@ // // -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Utility; -using MS.Internal; using MS.Internal.Generic; using MS.Internal.FontCache; using MS.Internal.FontFace; using MS.Internal.TextFormatting; using System.Runtime.InteropServices; -using FontFace = MS.Internal.FontFace; - namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/UshortList2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/UshortList2.cs index e221e1c7bfc..4357fe0a855 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/UshortList2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/UshortList2.cs @@ -7,13 +7,6 @@ // // Contents: Internal growable list with sublisting -using System.Windows; -using System; -using System.Collections; -using System.Diagnostics; -using MS.Internal; -using System.Security; - namespace MS.Internal.Shaping { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Span.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Span.cs index 55b82809146..77d89e136dc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Span.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Span.cs @@ -11,14 +11,11 @@ // [As of this creation, C# has no real generic type system] // -using System.Windows; -using System; using System.Collections; using MS.Utility; -using System.Diagnostics; namespace MS.Internal -{ +{ /// /// VECTOR: A series of spans /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SynchronizedInputHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SynchronizedInputHelper.cs index 28cfd0a05ef..c60740c0b42 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SynchronizedInputHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SynchronizedInputHelper.cs @@ -2,16 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; using System.Windows.Input; using System.Windows.Automation; using System.Windows.Automation.Peers; -using MS.Internal.PresentationCore; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs index 79419dcb291..abbd269b24f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs @@ -7,9 +7,7 @@ // Description: Helper methods for code that uses types from System.Drawing. // -using System; using System.IO; -using System.Security; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/DWriteLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/DWriteLoader.cs index e60312cbb69..a745123cc3c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/DWriteLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/DWriteLoader.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.ComponentModel; using System.Runtime.InteropServices; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/Factory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/Factory.cs index 0a3ee63147a..9c1014f0f56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/Factory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Text/TextInterface/Factory.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Runtime.InteropServices; using MS.Internal.Interop; using MS.Internal.Interop.DWrite; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/Bidi.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/Bidi.cs index c1db01cc37f..f111c3844ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/Bidi.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/Bidi.cs @@ -4,16 +4,8 @@ -using System.Windows; -using System; -using MS.Internal.TextFormatting; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Security; using System.Windows.Media.TextFormatting; -using MS.Internal; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/CultureMapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/CultureMapper.cs index 79b4369036f..a39dd8e6cb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/CultureMapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/CultureMapper.cs @@ -10,9 +10,7 @@ // // -using System; using System.Globalization; -using System.Diagnostics; using MS.Internal.PresentationCore; using System.Windows.Markup; @@ -60,7 +58,7 @@ public static CultureInfo GetSpecificCulture(CultureInfo runCulture) try { CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName); - specificCulture = SafeSecurityHelper.GetCultureInfoByIetfLanguageTag(culture.IetfLanguageTag); + specificCulture = CultureInfo.GetCultureInfoByIetfLanguageTag(culture.IetfLanguageTag); } catch (ArgumentException) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/DrawingState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/DrawingState.cs index ea0d62fadaa..43293f55180 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/DrawingState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/DrawingState.cs @@ -10,8 +10,6 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormatSettings.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormatSettings.cs index 73dd4800aa4..bba6d714d10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormatSettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormatSettings.cs @@ -10,11 +10,6 @@ // -using System; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Threading; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormattedTextSymbols.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormattedTextSymbols.cs index 38de7960e43..e7123039f54 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormattedTextSymbols.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FormattedTextSymbols.cs @@ -10,19 +10,11 @@ // // -using System; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using MS.Internal; using MS.Internal.Text.TextInterface; using MS.Internal.Shaping; -using System.Globalization; -using MS.Internal.FontCache; namespace MS.Internal.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs index b7951378d98..80e93d8eb58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs @@ -2,30 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Full text implementation of the specialized text line representing -// state of line up to the point where line break may occur -// -// Spec: Text Formatting API.doc -// -// - - -using System; -using System.Security; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.PresentationCore; -using SR = MS.Internal.PresentationCore.SR; - - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs index 0dc426f6ca2..652c874e001 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Contents: Complex implementation of TextLine -// -// -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Reflection; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal; -using MS.Internal.Shaping; - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextState.cs index 633dd8df7e3..790e80df3bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextState.cs @@ -5,15 +5,9 @@ -using System; -using System.Security; using System.Globalization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.Shaping; using MS.Internal.Generic; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/GenericTextProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/GenericTextProperties.cs index 35fae8e3595..c7fe16dd195 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/GenericTextProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/GenericTextProperties.cs @@ -10,8 +10,6 @@ // // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextMetrics.cs index 0ff7276da33..5f900acbfdf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextMetrics.cs @@ -12,11 +12,6 @@ // // - -using System; -using System.Windows.Media.TextFormatting; -using System.Runtime.InteropServices; - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextSymbols.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextSymbols.cs index b2b7bcd87ec..4db9daa325e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextSymbols.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ITextSymbols.cs @@ -12,11 +12,7 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LexicalChunk.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LexicalChunk.cs index 4e94c3f1e70..b09c0ac6ebc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LexicalChunk.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LexicalChunk.cs @@ -10,7 +10,6 @@ // -using System; using System.Windows.Media.TextFormatting; using MS.Internal.Generic; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServices.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServices.cs index c91c25df732..24a5e8c6dfa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServices.cs @@ -9,15 +9,10 @@ // // -using System; using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Security; using System.Runtime.InteropServices; -using MS.Internal.Shaping; using MS.Internal.Text.TextInterface; -using MS.Internal.PresentationCore; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs index 100be53606b..37f2f2ad947 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs @@ -2,30 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -/* SSS_DROP_BEGIN */ - -/************************************************************************* -* NOTICE: Code excluded from Developer Reference Sources. -* Don't remove the SSS_DROP_BEGIN directive on top of the file. -*******************************************************************/ - - -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Security; using System.Windows; using System.Globalization; using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.TextFormatting; -using MS.Internal; -using MS.Internal.Shaping; -using MS.Internal.FontCache; - -using SR=MS.Internal.PresentationCore.SR; using MS.Internal.Text.TextInterface; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs index 8240b40b61d..6ad5695e70c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs @@ -2,24 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; using System.Globalization; - -using System.Security; -using MS.Internal.Shaping; -using MS.Internal.FontCache; -using MS.Utility; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.Text.TextInterface; namespace MS.Internal.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/NumberSubstitution.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/NumberSubstitution.cs index 7f974fdff3e..080c1fbbd39 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/NumberSubstitution.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/NumberSubstitution.cs @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Runtime.InteropServices; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.FontCache; -using MS.Internal.FontFace; -using MS.Internal.Shaping; -using MS.Win32; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs index d786414d092..84e2ce2c896 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs @@ -9,19 +9,10 @@ // // -using System; -using System.Security; using System.Windows; using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.TextFormatting; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using MS.Internal.Shaping; -using MS.Internal.FontCache; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs index 5c67fea74e3..f02ef8d6aa2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs @@ -2,36 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// -// Contents: Text formatter implementation -// -// - - -using System; -using System.Security; -using System.Windows; using System.Windows.Media; -using System.Windows.Threading; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows.Media.TextFormatting; using MS.Utility; - -using SR=MS.Internal.PresentationCore.SR; using MS.Internal.Shaping; using MS.Internal.Text.TextInterface; using MS.Internal.FontCache; -#if !OPTIMALBREAK_API -using MS.Internal.PresentationCore; -#endif - - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs index 3704c0f3558..6ea970e7a1e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs @@ -10,18 +10,12 @@ // -using System; -using System.Diagnostics; -using System.Windows.Threading; using System.Text; using System.Globalization; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs index fa07f434e7a..955522d4859 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs @@ -2,23 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Full text implementation of ITextMetrics -// -// - -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Security; -using MS.Internal.FontCache; - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs index 0f651903097..815d4573c88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs @@ -2,25 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Critical handle wrapping unmanaged text penalty module for -// penalty calculation of optimal paragraph vis PTS direct access. -// -// Spec: Text Formatting API.doc -// -// - - -using System; -using System.Security; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Runtime.InteropServices; - -using SR = MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextProperties.cs index 5a38695904a..cb3ea4ec99b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextProperties.cs @@ -10,16 +10,10 @@ // -using System; -using System.Collections.Generic; using System.Globalization; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal; -using MS.Internal.Shaping; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs index 92e5155604c..ef2cf79f3fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Cache of text and text properties of run -// -// - - -using System; -using System.Collections.Generic; using System.Globalization; -using System.Windows; -using System.Diagnostics; using System.Windows.Media.TextFormatting; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableCharacters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableCharacters.cs index 97104b471fa..fad7f52ce11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableCharacters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableCharacters.cs @@ -12,15 +12,7 @@ // -using System; -using System.Diagnostics; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Security; -using System.Windows; using System.Windows.Markup; // for XmlLanguage -using System.Windows.Media; using MS.Internal; using MS.Internal.FontCache; using MS.Internal.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableSymbols.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableSymbols.cs index 2e32980a2e1..cbcb4ee2eb6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableSymbols.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextShapeableSymbols.cs @@ -12,14 +12,9 @@ // -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.Shaping; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs index 60062c0925c..d5764568f4a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: FullTextLine text store -// -// - - -using System; using System.Text; using System.Globalization; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using MS.Internal.Shaping; using MS.Internal.Generic; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs index 675decd50de..85424025e47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: ThousandthOfEmRealDoubles class -// -// - -using System; -using System.Diagnostics; -using System.Collections.Generic; - -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs index 6cb60c789cc..fb5088c0e47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: ThousandthOfEmRealPoints class -// -// - -using System; -using System.Diagnostics; -using System.Collections.Generic; - using System.Windows; -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/UIElementHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/UIElementHelper.cs index d49a796f78b..d1d95333e69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/UIElementHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/UIElementHelper.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPane.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPane.cs index 8fe542ee314..9fd06bee0ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPane.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPane.cs @@ -5,15 +5,9 @@ // // -using MS.Internal.PresentationCore.WindowsRuntime; -using System; using System.IO; -using System.Reflection; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; using System.Windows.Interop; -using System.Windows.Media; namespace MS.Internal.WindowsRuntime { @@ -137,7 +131,7 @@ private InputPane(IntPtr? hwnd) /// internal static InputPane GetForWindow(HwndSource source) { - return new InputPane(source?.CriticalHandle ?? null); + return new InputPane(source?.Handle ?? null); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPaneRcw.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPaneRcw.cs index f56adac294b..7371609888a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPaneRcw.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/InputPaneRcw.cs @@ -5,10 +5,8 @@ // // -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace MS.Internal.WindowsRuntime { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/NativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/NativeMethods.cs index 37a1c19ac88..01f800aa357 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/NativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/NativeMethods.cs @@ -5,11 +5,7 @@ // // -using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; -using MS.Internal.PresentationCore; namespace MS.Internal.WindowsRuntime { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettings.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettings.cs index 19ff835afe5..d0a46b4e354 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettings.cs @@ -1,12 +1,6 @@ -using System; using System.IO; -using System.Reflection; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Interop; using System.Windows.Media; -using MS.Internal.PresentationCore.WindowsRuntime; namespace MS.Internal.WindowsRuntime { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettingsRcw.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettingsRcw.cs index a0ceb04450a..8fee3022fb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettingsRcw.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WindowsRuntime/Windows/UI/ViewManagement/UISettingsRcw.cs @@ -1,8 +1,4 @@ -using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; -using System.Windows.Media; namespace MS.Internal.WindowsRuntime { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs index 264190acd95..a85f791b9b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs @@ -11,16 +11,13 @@ // type from filename. // -using System; using System.Net; using System.Net.Cache; -using System.Security; using System.IO; using System.Windows.Navigation; using System.IO.Packaging; using MS.Internal.AppModel; -using MS.Internal.Utility; using MS.Internal.PresentationCore; //From Presharp documentation: @@ -31,24 +28,24 @@ namespace MS.Internal { -/// -/// Helper class for handling all web requests/responses in the framework. Using it ensures consisent handling -/// and support for special features: cookies, NTLM authentication, caching, inferring MIME type from filename. -/// -/// Only two methods are mandatory: -/// - CreateRequest. (PackWebRequestFactory.CreateWebRequest is an allowed alternative. It delegates to -/// this CreateRequest for non-pack URIs.) -/// - HandleWebResponse. -/// The remaining methods just automate the entire request process, up to the point of getting the response -/// stream. Using the SecurityTreatAsSafe ones helps avoid making other code SecurityCritical. -/// -/// Related types: -/// - BaseUriHelper -/// - BindUriHelper (built into Framework, subset into Core) -/// - PackWebRequestFactory -/// - MimeObjectFactory -/// -static class WpfWebRequestHelper + /// + /// Helper class for handling all web requests/responses in the framework. Using it ensures consisent handling + /// and support for special features: cookies, NTLM authentication, caching, inferring MIME type from filename. + /// + /// Only two methods are mandatory: + /// - CreateRequest. (PackWebRequestFactory.CreateWebRequest is an allowed alternative. It delegates to + /// this CreateRequest for non-pack URIs.) + /// - HandleWebResponse. + /// The remaining methods just automate the entire request process, up to the point of getting the response + /// stream. Using the SecurityTreatAsSafe ones helps avoid making other code SecurityCritical. + /// + /// Related types: + /// - BaseUriHelper + /// - BindUriHelper (built into Framework, subset into Core) + /// - PackWebRequestFactory + /// - MimeObjectFactory + /// + static class WpfWebRequestHelper { internal static WebRequest CreateRequest(Uri uri) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/ModuleInitializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ModuleInitializer.cs index 732e4302df5..a70d792624d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/ModuleInitializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ModuleInitializer.cs @@ -1,4 +1,3 @@ -using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/OtherAssemblyAttrs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/OtherAssemblyAttrs.cs index b965544d04b..83f94f0a9f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/OtherAssemblyAttrs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/OtherAssemblyAttrs.cs @@ -7,63 +7,62 @@ // using MS.Internal.PresentationCore; -using System; using System.Runtime.CompilerServices; -[assembly:InternalsVisibleTo(BuildInfo.PresentationFramework)] -[assembly:InternalsVisibleTo(BuildInfo.ReachFramework)] -[assembly:InternalsVisibleTo(BuildInfo.SystemPrinting)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationUI)] -[assembly:InternalsVisibleTo(BuildInfo.SystemWindowsPresentation)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemDrawing)] -[assembly:InternalsVisibleTo(BuildInfo.SystemWindowsControlsRibbon)] -[assembly:InternalsVisibleTo(BuildInfo.WindowsFormsIntegration)] -[assembly:InternalsVisibleTo($"PresentationCore.Tests, PublicKey={BuildInfo.WCP_PUBLIC_KEY_STRING}")] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFramework)] +[assembly: InternalsVisibleTo(BuildInfo.ReachFramework)] +[assembly: InternalsVisibleTo(BuildInfo.SystemPrinting)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationUI)] +[assembly: InternalsVisibleTo(BuildInfo.SystemWindowsPresentation)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemDrawing)] +[assembly: InternalsVisibleTo(BuildInfo.SystemWindowsControlsRibbon)] +[assembly: InternalsVisibleTo(BuildInfo.WindowsFormsIntegration)] +[assembly: InternalsVisibleTo($"PresentationCore.Tests, PublicKey={BuildInfo.WCP_PUBLIC_KEY_STRING}")] [assembly: TypeForwardedTo(typeof(System.Windows.Markup.IUriContext))] [assembly: TypeForwardedTo(typeof(System.Windows.Media.TextFormattingMode))] [assembly: TypeForwardedTo(typeof(System.Windows.Input.ICommand))] // Namespace information for Xaml -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Media3D")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Imaging")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Effects")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Ink")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.TextFormatting")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Automation")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Media3D")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Imaging")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Effects")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Ink")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.TextFormatting")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Automation")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/composite-font", "System.Windows.Media")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/composite-font", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/winfx/2006/xaml", "x")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml", "x")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Media3D")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Imaging")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Effects")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.TextFormatting")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Automation")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/xps/2005/06", "xps")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Media3D")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Imaging")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Effects")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.TextFormatting")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Automation")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/xps/2005/06", "xps")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Media3D")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Imaging")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Effects")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Ink")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.TextFormatting")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Automation")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Media3D")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Imaging")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Effects")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Ink")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.TextFormatting")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Automation")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Media")] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj index 1d79f5d8588..4f1fcec9257 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj @@ -22,6 +22,7 @@ + @@ -47,10 +48,8 @@ - - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs index 2624fb9c4a3..248443c3dc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs @@ -12,16 +12,10 @@ #define TRACE #endif -using System; -using System.IO; using System.Net; using System.Net.Cache; // for RequestCachePolicy -using System.Runtime.Serialization; -using System.Diagnostics; // For Assert -using MS.Utility; // for EventTrace using MS.Internal.IO.Packaging; // for PackageCacheEntry using MS.Internal.PresentationCore; // for SR exception strings -using System.Security; // for SecurityCritical using MS.Internal; namespace System.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs index 473aaca96e6..f16179a9ff0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs @@ -13,12 +13,9 @@ #define TRACE #endif -using System; using System.Net; -using System.Diagnostics; // for Assert using MS.Internal.IO.Packaging; // for PackageCache using MS.Internal.PresentationCore; // for ExceptionStringTable -using System.Security; using MS.Internal; namespace System.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs index c811dbe5292..4c2233a0017 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs @@ -13,17 +13,10 @@ #define TRACE #endif -using System; -using System.IO; using System.Net; -using System.Runtime.Serialization; -using System.Diagnostics; // For Assert using System.Threading; // for ManualResetEvent -using System.Globalization; // for CultureInfo using MS.Internal.PresentationCore; // for ExceptionStringTable using MS.Internal.IO.Packaging; // for ResponseStream -using System.Security; -using System.Windows.Navigation; using MS.Utility; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs index 1f271066056..74ef34e359b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs @@ -8,14 +8,8 @@ // Description: Collection of packages to be used with PackWebRequest. // -using System; -using System.Collections; using System.Collections.Specialized; -using System.IO; -using System.IO.Packaging; -using System.Security; using System.Windows.Navigation; -using SecurityHelper=MS.Internal.SecurityHelper; using MS.Internal.PresentationCore; // for ExceptionStringTable namespace System.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/AutoResizedEvent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/AutoResizedEvent.cs index 6834a0da0e4..a6ec25f53b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/AutoResizedEvent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/AutoResizedEvent.cs @@ -2,14 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Windows.Threading; - -using System.Windows.Media; -using System.Runtime.InteropServices; -using MS.Win32; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/AutomationProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/AutomationProperties.cs index 341dd797f72..58f624f3b55 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/AutomationProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/AutomationProperties.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Automation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs index ebc4580f037..3dbc0bc6b97 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs @@ -4,24 +4,11 @@ //#define ENABLE_AUTOMATIONPEER_LOGGING // uncomment to include logging of various activities -using System; using System.Collections; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using System.Collections.Generic; -using System.Windows.Automation; using System.Windows.Automation.Provider; - using MS.Internal; using MS.Internal.Automation; -using MS.Internal.Media; -using MS.Win32; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs index 8348e79b3b9..583669f135c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs @@ -8,12 +8,8 @@ // Description: Automation element for ContentElements // -using System; // Object -using System.Collections.Generic; // List using System.Windows.Input; // AccessKeyManager using MS.Internal.PresentationCore; // SR -using System.Windows.Automation.Provider; -using System.Windows.Automation; using MS.Internal.Automation; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/GenericRootAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/GenericRootAutomationPeer.cs index 712f1169f83..953858912de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/GenericRootAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/GenericRootAutomationPeer.cs @@ -2,16 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; using System.Text; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; using System.ComponentModel; - -using MS.Internal; using MS.Win32; // Used to support the warnings disabled below diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs index 20f52f619ca..4d2eae5faf7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using System.Windows; using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; -using System.Collections.Generic; - using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using MS.Internal.Automation; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs index be64b8dec25..981cf699075 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs @@ -2,23 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using System.Windows; using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; -using System.Collections.Generic; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using MS.Internal.Automation; - using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Automation.Peers { - /// public class UIElementAutomationPeer: AutomationPeer { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArrayRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArrayRecord.cs index 782e5333eff..91b1184970d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArrayRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArrayRecord.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.Collections; -using System.Linq; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleObject.cs index ccb65ec4d24..c632d369223 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleObject.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySinglePrimitive.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySinglePrimitive.cs index ff997e8413d..4ba860ca395 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySinglePrimitive.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySinglePrimitive.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleString.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleString.cs index 51030de4f0d..eb54892e875 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleString.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ArraySingleString.cs @@ -1,9 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; -using System.Linq; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryFormatWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryFormatWriter.cs index b5e02f8d538..26ddd6d2756 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryFormatWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryFormatWriter.cs @@ -8,8 +8,6 @@ using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.IO; -using System.Collections.Generic; -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryLibrary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryLibrary.cs index e2c62229137..d0b7200961a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryLibrary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/BinaryLibrary.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassInfo.cs index 900e25f1825..bcaf1dedef6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassInfo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassRecord.cs index a1a9966c06e..88ce75a1b39 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassRecord.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithId.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithId.cs index 5c3853e1260..6eef16a1c5f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithId.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithId.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.Serialization; -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithMembersAndTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithMembersAndTypes.cs index 71c4df82e98..737ef6f08ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithMembersAndTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ClassWithMembersAndTypes.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/IRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/IRecord.cs index 9bd946977cb..6f17861d0d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/IRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/IRecord.cs @@ -1,7 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ListConverterHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ListConverterHelper.cs index eef755b7750..9e227f191f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ListConverterHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/ListConverterHelper.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. #nullable enable -using System.Collections.Generic; using System.Collections; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/MemberTypeInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/MemberTypeInfo.cs index 55d43cd9f27..792f7d8848f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/MemberTypeInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/MemberTypeInfo.cs @@ -5,8 +5,6 @@ using System.Collections; using System.Runtime.Serialization; using System.IO; -using System.Collections.Generic; -using System.Linq; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/Record.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/Record.cs index fe59b386a1b..033717f38db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/Record.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/Record.cs @@ -4,7 +4,6 @@ #nullable enable using System.Globalization; using System.IO; -using System.Collections.Generic; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/StringRecordsCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/StringRecordsCollection.cs index 6eb49204b53..f6efcd6c44e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/StringRecordsCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/StringRecordsCollection.cs @@ -3,8 +3,6 @@ #nullable enable -using System.Collections.Generic; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/SystemClassWithMembersAndTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/SystemClassWithMembersAndTypes.cs index 1f6003e8d65..80c77689c74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/SystemClassWithMembersAndTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/BinaryFormat/SystemClassWithMembersAndTypes.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.IO; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ClassHandlersStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ClassHandlersStore.cs index 27a1bafe061..238122fa46b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ClassHandlersStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ClassHandlersStore.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs index 4afd31dec35..89dfd8752d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs @@ -7,21 +7,10 @@ using MS.Internal.Interop; using MS.Internal.KnownBoxes; using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Input; -using System.Windows.Markup; using System.Windows.Media.Animation; -using System.Windows.Threading; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs index 8e083bbbc46..11c8f4ebe0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Specialized; // NameValueCollection using System.Configuration; // ConfigurationManager -using System.Runtime.Versioning; using MS.Internal.PresentationCore; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CultureInfoConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CultureInfoConverter.cs index 3640955d439..ac27d1b193d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CultureInfoConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CultureInfoConverter.cs @@ -9,13 +9,10 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs index 5ffca011d3c..b895c45aec3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs @@ -12,12 +12,8 @@ using MS.Win32; using System.Collections; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; using System.Text; using MS.Internal.PresentationCore; -using SecurityHelper=MS.Internal.SecurityHelper; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectCopyingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectCopyingEventArgs.cs index a2911ba29aa..ecf9a15c4b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectCopyingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectCopyingEventArgs.cs @@ -7,8 +7,6 @@ // Description: DataObject.Copying event arguments // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectEventArgs.cs index 67367667020..395c58918e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectEventArgs.cs @@ -7,8 +7,6 @@ // Description: Base class for DataObject events arguments // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs index fbc9b03289d..d73c7065e78 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs @@ -2,15 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: DataObject.Pasting event arguments -// - -using System; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectSettingDataEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectSettingDataEventArgs.cs index 7e474dd9b3d..0df32b6f300 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectSettingDataEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectSettingDataEventArgs.cs @@ -7,8 +7,6 @@ // Description: DataObjectSettingData event arguments // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs index ba00a439c7c..50952c9d45c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs @@ -2,19 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: // Visual tree diagnostic API. -// -using Microsoft.Win32; // Registry, RegistryKey -using MS.Internal; // CoreAppContextSwitches -using System.Security; -using System.Windows.Interop; // HwndSource +using Microsoft.Win32; +using MS.Internal; +using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Media3D; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Diagnostics { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualTreeChangeEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualTreeChangeEventArgs.cs index e6defb86a5f..17df479ba64 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualTreeChangeEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualTreeChangeEventArgs.cs @@ -8,10 +8,6 @@ // Visual tree change arguments // -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; - namespace System.Windows.Diagnostics { public enum VisualTreeChangeType { Add, Remove } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfo.cs index 6ed45ec351c..e82be9f0c0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfo.cs @@ -8,10 +8,6 @@ // Defines XAML source info. // -using System; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Diagnostics { [DebuggerDisplay("{line={LineNumber}, offset={LinePosition}, uri={SourceUri}}")] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs index f6bfc2faa88..99e2d733034 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs @@ -24,7 +24,6 @@ using System.Reflection; using System.Runtime.CompilerServices; // ConditionalWeakTable -using System.Security; using System.Xaml; namespace System.Windows.Diagnostics diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs index 53b88fdb51d..84275ce419c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs @@ -12,10 +12,9 @@ // using System.ComponentModel; // AsyncCompletedEventArgs -using System.Windows.Media; // Visual using MS.Internal.PresentationCore; // SR -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// This is the abstract base class for all paginating layouts. It diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs index b8c103a9a94..c7066fa5910 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs @@ -11,10 +11,9 @@ // // -using System.ComponentModel; // AsyncCompletedEventArgs using MS.Internal.PresentationCore; // SR -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// Defines advanced methods and properties for paginating layouts, such diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiChangedEventArgs.cs index 1db8ef4a616..ea645a4ef7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiChangedEventArgs.cs @@ -11,11 +11,8 @@ using System.ComponentModel; using System.Runtime.InteropServices; -using System.Security; -using System.Threading; using System.Windows.Interop; using MS.Internal; -using MS.Internal.PresentationCore; using MS.Win32; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiScale.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiScale.cs index b833fd75a48..ec4ea9923e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiScale.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DpiScale.cs @@ -6,7 +6,6 @@ // using MS.Internal; -using MS.Internal.PresentationCore; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragAction.cs index faf24986493..8b9c73d434b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragAction.cs @@ -10,8 +10,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs index 9fa52213a13..67dd9e3e5df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs @@ -12,19 +12,12 @@ // using MS.Win32; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Threading; -using System.Security; using MS.Internal; -using MS.Internal.PresentationCore; using System.Windows.Input; using System.Windows.Interop; -using System.Windows.Media; -using SR=MS.Internal.PresentationCore.SR; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropEffects.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropEffects.cs index 7fa41eca892..7b8e95b1fbd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropEffects.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropEffects.cs @@ -10,8 +10,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropKeyStates.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropKeyStates.cs index 99ea9bca2ee..2b46f1571cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropKeyStates.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDropKeyStates.cs @@ -9,8 +9,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs index 0ca08aa7df7..859881e16f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: DragEventArgs for drag-and-drop operation. -// -// -// - -using System; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Input; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventHandler.cs index 2f0d5ba1f0e..0a50c24405a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventHandler.cs @@ -9,8 +9,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs index f9bb9bc046c..ca652f780f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 using System.ComponentModel; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DurationConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DurationConverter.cs index 64dadf223bd..329f840ef8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DurationConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DurationConverter.cs @@ -4,13 +4,10 @@ // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs index 9162bb2f38e..d61a90895fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs @@ -2,15 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; - using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs index cb1ae901e70..528d8d05dd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventPrivateKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventPrivateKey.cs index d4b789cc3fa..da949fa6752 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventPrivateKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventPrivateKey.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs index 75b00be3175..50aa4789314 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using MS.Utility; - -using SR=MS.Internal.PresentationCore.SR; using MS.Internal; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs index 665a119b71d..873917c3e2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; - -using MS.Utility; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FocusWithinProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FocusWithinProperty.cs index 1cc0328cd98..9ec2ad6f146 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FocusWithinProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FocusWithinProperty.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Input; using MS.Internal.KnownBoxes; - + namespace System.Windows { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs index ba146b2e0f8..f04050046b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs @@ -7,15 +7,11 @@ // Description: FontStretch structure. // -using System; using System.ComponentModel; -using System.Diagnostics; using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows +namespace System.Windows { /// /// FontStretch structure describes relative change from the normal aspect ratio diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs index 0cf03004841..e83d7d4ce4a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: FontStretch type converter. - - -using System; -using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; -using MS.Internal; -using System.Windows.Media; -using System.Text; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows -{ +{ /// /// FontStretchConverter class parses a font stretch string. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretches.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretches.cs index 717d7c20233..6d6a35ff7b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretches.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretches.cs @@ -7,10 +7,9 @@ // Description: Predefined FontStretch structures that correspond to common font stretches. // -using System; using System.Globalization; -namespace System.Windows +namespace System.Windows { /// /// FontStretches contains predefined font stretch structures for common font stretches. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyle.cs index 2bfa6830e0a..f433ad41ee8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyle.cs @@ -7,9 +7,7 @@ // Description: FontStyle structure. -using System; using System.ComponentModel; -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs index 9b3a3979982..d02413d23b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: FontStyle type converter. -// - -using System; -using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; -using MS.Internal; -using System.Windows.Media; -using System.Text; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows -{ +{ /// /// FontStyleConverter class parses a font style string. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyles.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyles.cs index 82e73ebc0d0..5691491c69d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyles.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyles.cs @@ -7,11 +7,7 @@ // Description: Predefined FontStyle structures that correspond to common font styles. // - -using System; -using System.Globalization; - -namespace System.Windows +namespace System.Windows { /// /// FontStyles contains predefined font style structures for common font styles. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs index a59ccd14e8c..08db2a322ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs @@ -8,13 +8,9 @@ // -using System; using System.ComponentModel; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows +namespace System.Windows { /// /// FontWeight structure describes the degree of blackness or thickness of strokes of characters in a font. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs index 4aeb36215ec..688716bd24e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: FontWeight type converter. - - -using System; -using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; -using MS.Internal; -using System.Windows.Media; -using System.Text; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows -{ +{ /// /// FontWeightConverter class parses a font weight string. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeights.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeights.cs index ca3a96e1de6..7774b06bdcf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeights.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeights.cs @@ -6,10 +6,9 @@ // // Description: Predefined FontWeight structures that correspond to common font weights. // -using System; using System.Globalization; -namespace System.Windows +namespace System.Windows { /// /// FontWeights contains predefined font weight structures for common font weights. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs index 3d8a38a601d..a85dc7e7fea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs @@ -2,45 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: This file contains the implementation of FreezableCollection. // FreezableCollection is an IList implementation which implements // the requisite infrastructure for collections of DependencyObjects, // Freezables, and Animatables and which is itself an Animatable and a Freezable. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs index 6c53d4ee140..726d7a0d30b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs @@ -13,11 +13,7 @@ using MS.Internal.KnownBoxes; using MS.Internal.PresentationCore; using MS.Utility; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Input; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs index 39bd0722435..e204b00778f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs @@ -9,28 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Converters; -using MS.Internal.Collections; -using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs index 3918d06a4b4..8a2a39dd034 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs @@ -2,35 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. // // Please see MilCodeGen.html for more information. -// -using MS.Internal.PresentationCore; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Converters; -using MS.Internal.Collections; using MS.Utility; -using SR = MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs index d22be2d038b..c5bd200dfac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs index bcaea933dad..9c33440c45d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs index cf4d0054250..89799d67868 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs @@ -13,11 +13,7 @@ using MS.Internal.KnownBoxes; using MS.Internal.PresentationCore; using MS.Utility; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Input; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs index afac6817b98..86d78b0010d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs @@ -10,16 +10,10 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; using MS.Internal.PresentationCore; using MS.Utility; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Input; -using System.Windows.Media.Animation; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventArgs.cs index b8461415ecd..27a7542dfd3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventArgs.cs @@ -9,9 +9,6 @@ // // -using System; -using System.Diagnostics; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventHandler.cs index 6de6b3c3ad2..b2b0edb0ee5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GiveFeedbackEventHandler.cs @@ -9,8 +9,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs index b81b067b173..bd6d2e2c3b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Diagnostics; using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { internal static class GlobalEventManager diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IContentHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IContentHost.cs index 117f590f594..fce4d119cf8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IContentHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IContentHost.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IDataObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IDataObject.cs index 36ce2ff1d44..2366a0e28f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IDataObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IDataObject.cs @@ -10,8 +10,6 @@ // // -using System.Security; - namespace System.Windows { #region IDataObject interface diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IInputElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IInputElement.cs index 989478bb205..f4bf9b335d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IInputElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/IInputElement.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Input; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/ApplicationGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/ApplicationGesture.cs index 27c03e38f76..ccf1acba421 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/ApplicationGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/ApplicationGesture.cs @@ -8,8 +8,6 @@ // The definition of ApplicationGesture enum type // -using System; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs index 770ed1fefbe..76dc11a9902 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; -using System; using System.ComponentModel; -using System.Windows; using System.Windows.Media; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.Collections; -using System.Diagnostics; using MS.Internal; -using MS.Internal.Ink; using MS.Internal.Ink.InkSerializedFormat; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs index 163fd435c42..0803c7e7941 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Input; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognitionResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognitionResult.cs index bdaf20a4745..003d10f9e98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognitionResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognitionResult.cs @@ -7,9 +7,6 @@ // Description: // The implementation of GestureRecognitionResult class - -using System; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs index 24cdbe652c7..90982cbd29c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// The implementation of GestureRecognizer class -// - -using MS.Utility; using MS.Internal.Ink.GestureRecognition; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Runtime.InteropServices; -using System; -using System.Security; -using SecurityHelper=MS.Internal.SecurityHelper; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs index d67a95bf42b..9e01c8f03d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs @@ -2,20 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; using System.Windows; using System.Windows.Input; using System.Windows.Ink; -using System.Windows.Media; -using System.Collections.Generic; -using System.Collections.ObjectModel; using MS.Internal.Ink; -using MS.Utility; using MS.Internal; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/RecognitionConfidence.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/RecognitionConfidence.cs index ab28997948e..73651ecab2c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/RecognitionConfidence.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/RecognitionConfidence.cs @@ -8,9 +8,6 @@ // The definition of RecognitionConfidence enum type // - -using System; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs index 5413cbab392..cdf2e6231ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.IO; -using System.Runtime.Serialization; using MS.Internal.Ink.InkSerializedFormat; using MS.Internal; using MS.Internal.Ink; -using System.Reflection; using System.Windows.Input; -using SR=MS.Internal.PresentationCore.SR; - // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET namespace System.Windows.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs index f914a8a6447..6e4ad779151 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs @@ -4,21 +4,12 @@ //#define DEBUG_RENDERING_FEEDBACK -using MS.Utility; -using System; using System.ComponentModel; -using System.Windows; using System.Windows.Input; using System.Windows.Media; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using MS.Internal; using MS.Internal.Ink; -using SR=MS.Internal.PresentationCore.SR; -using MS.Internal.PresentationCore; - // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET namespace System.Windows.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs index 2ebe4aad575..46686b6b6d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs @@ -2,25 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; -using System; using System.ComponentModel; using System.Collections; using System.Collections.Specialized; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows.Media; -using System.Windows.Ink; -using System.Windows.Input; -using System.Runtime.Serialization; using System.IO; -using System.Reflection; using MS.Internal.Ink.InkSerializedFormat; -using MS.Internal.Ink; - -using SR = MS.Internal.PresentationCore.SR; // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs index c830dd1c173..af321245a6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs @@ -2,21 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; -using System; using System.ComponentModel; -using System.Collections; using System.Collections.Specialized; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Media; using System.Windows.Input; using MS.Internal; using MS.Internal.Ink; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs index 45b4dff29a1..4a2f31021a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs @@ -3,23 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.Windows.Ink; -using System.Runtime.Serialization.Formatters; -using System.Runtime.InteropServices; -using System.Diagnostics; -using Microsoft.Win32; -using System.Collections; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; -using System.Threading; -using System.Security; -using MS.Utility; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StylusTip.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StylusTip.cs index 7262a869a04..186f99cafae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StylusTip.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StylusTip.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs index c367da0aca4..1c598b8485d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs @@ -2,22 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Threading; -using System.Windows.Media; using System.Windows.Interop; using MS.Internal; -using System.Diagnostics; -using System.Windows; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AngleUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AngleUtil.cs index ee7a70c0ff5..fd17c2c3eaf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AngleUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AngleUtil.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { internal static class AngleUtil { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CaptureMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CaptureMode.cs index d9b92964dbe..d5fb3ec1d07 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CaptureMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CaptureMode.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs index 16d47de0688..9d1d0d037f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs @@ -2,26 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The ApplicationCommands class defines a standard set of commands that are required in most applications. // The goal of these commands is to unify input, programming model and UI for the most common actions in // Windows applications thus providing a standard interface for such common commands. // // See spec at : http://avalon/CoreUI/Specs%20%20Eventing%20and%20Commanding/CommandLibrarySpec.mht -// -// -// -using System; -using System.Windows; -using System.Windows.Input; -using System.Collections; -using System.ComponentModel; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using MS.Internal; // CommandHelper +using MS.Internal; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteChangedEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteChangedEventManager.cs index 4d9884003cc..52c33ce85d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteChangedEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteChangedEventManager.cs @@ -8,11 +8,7 @@ // pattern. See WeakEventTable.cs for an overview. // -using System; -using System.Collections; -using System.Collections.Generic; using System.Runtime.CompilerServices; // ConditionalWeakTable -using System.Windows; // WeakEventManager using MS.Internal; // NamedObject namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteRoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteRoutedEventArgs.cs index 6b92ffcfe3d..a41459bb2b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteRoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CanExecuteRoutedEventArgs.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBinding.cs index d6cb56063ea..275d3836feb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBinding.cs @@ -5,15 +5,7 @@ // // -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Markup; -using MS.Internal; -using System.Security; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// CommandBinding - Command-EventHandlers map diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs index 6da362d2198..50d62b0044d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs @@ -2,25 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The CommandBindingCollection class serves the purpose of Storing/Retrieving // CommandBindings. // // See spec at : http://avalon/coreUI/Specs/Commanding%20--%20design.htm -// -// -// -using System; using System.Collections; -using System.Diagnostics; -using System.Collections.Specialized; -using System.Windows; -using System.Windows.Input; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandDevice.cs index 2c34bc821a4..87eb798a510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandDevice.cs @@ -5,13 +5,6 @@ // // -using System; -using System.Collections; -using System.Windows; -using System.Windows.Media; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32; // VK translation. namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs index 0e5c6dbb7f8..3e5bba2084c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs @@ -5,19 +5,8 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.Diagnostics; -using System.Security; -using System.Threading; -using System.Windows; -using System.Windows.Input; using System.Windows.Threading; -using MS.Internal; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs index ed8dab6d742..614f92089a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The ComponentCommands class defines a standard set of commands that are required in Controls. // // See spec at : http://avalon/CoreUI/Specs%20%20Eventing%20and%20Commanding/CommandLibrarySpec.mht -// -// -// - -using System; -using System.Windows; -using System.Windows.Input; -using System.Collections; -using System.ComponentModel; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ExecutedRoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ExecutedRoutedEventArgs.cs index 8f6096a2f66..b4d2bddbaf1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ExecutedRoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ExecutedRoutedEventArgs.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ICommandSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ICommandSource.cs index 7aa16bb7299..75888357cfa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ICommandSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ICommandSource.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Windows.Input; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ISecureCommand.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ISecureCommand.cs index 4a2a9b3b164..b29e4dc692a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ISecureCommand.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ISecureCommand.cs @@ -12,9 +12,7 @@ // // -using System; using System.ComponentModel; -using System.Security; using MS.Internal.PresentationCore; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBinding.cs index e96c4984692..131c334033f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBinding.cs @@ -5,17 +5,13 @@ // // -using System; -using System.Security; // SecurityCritical, TreatAsSafe -using System.Windows; -using System.Windows.Markup; using System.ComponentModel; using MS.Internal; using MS.Internal.PresentationCore; -namespace System.Windows.Input +namespace System.Windows.Input { /// /// InputBinding - InputGesture and ICommand combination diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs index 0619a2565f3..92106aae29b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: InputBindingCollection serves the purpose of Storing/Retrieving InputBindings // // See spec at : http://avalon/coreui/Specs/Commanding(new).mht -// -// -// -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Collections.Specialized; -using System.Windows; -using System.Windows.Input; - using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGesture.cs index 9b91b5a19df..b5c5e6a1033 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGesture.cs @@ -12,10 +12,7 @@ // // -using System; -using System.Windows; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// InputGesture - abstract base class for individual input device gestures. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs index 22bad368b49..2ee4eff4e94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: InputGestureCollection serves the purpose of Storing/Retrieving InputGestures // // See spec at : http://avalon/coreui/Specs/Commanding(new).mht -// -// -using System; using System.Collections; -using System.Diagnostics; -using System.Collections.Generic; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs index 62244f9a004..e1aba20cb0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs @@ -2,23 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The KeyBinding class is used by the developer to create Keyboard Input Bindings // // See spec at : http://avalon/coreui/Specs/Commanding(new).mht // //* KeyBinding class serves the purpose of Input Bindings for Keyboard Device. -using System; -using System.Windows.Input; -using System.Windows; using System.ComponentModel; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// KeyBinding - Implements InputBinding (generic InputGesture-Command map) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs index 70dde2f929c..f3a4bf70072 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs @@ -14,10 +14,7 @@ // // -using System; using System.Globalization; -using System.Windows.Input; -using System.Windows; using System.Windows.Markup; using System.ComponentModel; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureConverter.cs index 69f91893d1c..a092fbb637a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureConverter.cs @@ -8,14 +8,8 @@ // Description: KeyGestureConverter - Converts a KeyGesture string // to the *Type* that the string represents // -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo -using System.Reflection; -using MS.Internal; -using System.Windows; -using System.Windows.Input; -using MS.Utility; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureValueSerializer.cs index 4b31698fb29..bc9fba007d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGestureValueSerializer.cs @@ -10,11 +10,7 @@ // // -using System; using System.ComponentModel; // for TypeConverter -using System.Globalization; // for CultureInfo -using System.Windows; -using System.Windows.Input; using System.Windows.Markup; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs index c381b4a5cc7..4f709c4c537 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The MediaCommands class defines a standard set of commands that act on Media. // // See spec at : http://avalon/CoreUI/Specs%20%20Eventing%20and%20Commanding/CommandLibrarySpec.mht -// -// -// - -using System; -using System.Windows; -using System.Windows.Input; -using System.Collections; -using System.ComponentModel; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseAction.cs index 7692b9eead2..28e9ca52600 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseAction.cs @@ -12,7 +12,6 @@ // // -using System; using System.ComponentModel; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs index a6612b9724d..62f3ad65dc8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs @@ -2,17 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: MouseActionConverter - Converts a MouseAction string -// to the *Type* that the string represents -// - -using System.ComponentModel; // for TypeConverter -using System.Globalization; // for CultureInfo - -using SR = MS.Internal.PresentationCore.SR; +using System.ComponentModel; +using System.Globalization; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionValueSerializer.cs index d78d43c2312..bb5df253e9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionValueSerializer.cs @@ -7,13 +7,8 @@ // Description: MouseActionConverter - Serializes a MouseAction -using System; using System.ComponentModel; // for TypeConverter -using System.Globalization; // for CultureInfo -using System.Reflection; -using System.Windows; using System.Windows.Markup; -using System.Windows.Input; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs index 2fca5af77ca..855f2ac2f78 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs @@ -2,24 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The MouseBinding class is used by the developer to create Mouse Input Bindings // // See spec at : http://avalon/coreui/Specs/Commanding(new).mht // //* MouseBinding class serves the purpose of Input Bindings for Mouse Device. -// -using System; -using System.Windows.Input; -using System.Windows; using System.Windows.Markup; using System.ComponentModel; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGesture.cs index b92f92b9b7d..9320b104a99 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGesture.cs @@ -13,9 +13,6 @@ // // -using System; -using System.Windows.Input; -using System.Windows; using System.Windows.Markup; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureConverter.cs index f3cada1b257..a864915b898 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureConverter.cs @@ -10,14 +10,8 @@ // // -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo -using System.Reflection; -using MS.Internal; -using System.Windows; -using System.Windows.Input; -using MS.Utility; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureValueSerializer.cs index 5146921c26b..22021c0bdd7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseGestureValueSerializer.cs @@ -7,12 +7,7 @@ // Description: MouseGestureValueSerializer - Serializes a MouseGesture // -using System; using System.ComponentModel; // for TypeConverter -using System.Globalization; // for CultureInfo -using System.Reflection; -using System.Windows; -using System.Windows.Input; using System.Windows.Markup; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs index fbc597e986b..cc721c4a68f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs @@ -2,25 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: The NavigationCommands class defines a standard set of commands that act on Content Navigation // // See spec at : http://avalon/CoreUI/Specs%20%20Eventing%20and%20Commanding/CommandLibrarySpec.mht -// -// -// -using System; -using System.Windows; -using System.Windows.Input; -using System.Collections; -using System.ComponentModel; -using System.Security; using MS.Internal; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs index 4be6c5092f7..e341cf3199e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs @@ -2,21 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Security; using System.ComponentModel; -using System.Collections; -using System.Windows; -using System.Windows.Input; using System.Windows.Markup; - using MS.Internal.PresentationCore; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedUICommand.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedUICommand.cs index 47330bb51d5..37de27289ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedUICommand.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedUICommand.cs @@ -5,15 +5,11 @@ // // -using System; using System.ComponentModel; // for TypeConverter -using System.Windows; -using System.Windows.Markup; -using System.Windows.Media; using MS.Internal.PresentationCore; -namespace System.Windows.Input +namespace System.Windows.Input { /// /// RoutedCommand with added UI Information. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/SecureUICommand.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/SecureUICommand.cs index 153bc7dbe8d..8b3f210b055 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/SecureUICommand.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/SecureUICommand.cs @@ -10,15 +10,10 @@ // InputBindings and CommandBindings // -using System; -using System.Security; -using System.Windows; using System.ComponentModel; -using System.Collections; -using System.Windows.Input; using MS.Internal.PresentationCore; -namespace System.Windows.Input +namespace System.Windows.Input { /// /// Command diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs index 764fd6756ec..916f81a90a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs @@ -2,17 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Text; -using System.Globalization; using MS.Win32; using System.Runtime.InteropServices; -using System.Resources; using System.IO; -using System.Security; -using SecurityHelper=MS.Internal.SecurityHelper; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorConverter.cs index 7d2277d57d3..4a0a474ef01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorConverter.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; using System.Windows.Media; // TypeConverterHelper, UriHolder -using System; -using System.IO; // Stream -using MS.Internal.IO.Packaging; // ResourceUriHelper using MS.Internal.PresentationCore; using MS.Internal; // BindUriHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorType.cs index a03ea6d1d83..7655eabb78b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/CursorType.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// An enumeration of the supported cursor types. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursors.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursors.cs index 4d63a9b2101..6c9fda862cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursors.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursors.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Text; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// Cursors class to support stock cursors diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DeadCharTextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DeadCharTextComposition.cs index 8847e1c102c..8037a885427 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DeadCharTextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DeadCharTextComposition.cs @@ -8,15 +8,6 @@ // // -using System; -using System.Diagnostics; -using System.Text; -using System.Windows.Threading; -using System.Windows; -using System.Security; -using MS.Win32; -using Microsoft.Win32; // for RegistryKey class - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStore.cs index a1b8cf7897d..f7da6b8751a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStore.cs @@ -8,15 +8,8 @@ // // -using System; using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Threading; -using System.Threading; -using System.Diagnostics; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStoreTextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStoreTextComposition.cs index ec8fa350a29..555d738e5b8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStoreTextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/DefaultTextStoreTextComposition.cs @@ -13,12 +13,7 @@ // // -using System; using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Threading; -using System.Windows; -using System.Security; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs index 3cf72b89397..1c32acd9dfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The KeyboardFocusChangedEventArgs class contains information about key states. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventHandler.cs index 26a152ec55a..fc42dd2386c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventHandler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive KeyboardFocusChangedEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusManager.cs index 2cb9e5d311a..52f4c062632 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusManager.cs @@ -5,19 +5,9 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Threading; -using System.Windows; -using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Security; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IAvalonAdapter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IAvalonAdapter.cs index 835475a3041..b806af424a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IAvalonAdapter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IAvalonAdapter.cs @@ -9,9 +9,6 @@ // with information to determine how to process a Keytab coming from ElementHost. // -using MS.Internal.PresentationCore; -using System.Runtime.CompilerServices; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputLanguageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputLanguageSource.cs index 937b9af781c..747552068e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputLanguageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputLanguageSource.cs @@ -12,9 +12,7 @@ using System.Collections; using System.Globalization; -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// An interface for controlling the input language source. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputProvider.cs index 514c49ad261..e3123eae0e8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IInputProvider.cs @@ -4,9 +4,7 @@ using System.Windows.Media; -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// An interface implemented by all input providers. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IKeyboardInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IKeyboardInputProvider.cs index 7142f102974..c9d65f6a3ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IKeyboardInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IKeyboardInputProvider.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Media; - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// An interface for controlling the keyboard input provider. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IManipulator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IManipulator.cs index ff7ce3bacae..020a7300582 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IManipulator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IManipulator.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Security; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IMouseInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IMouseInputProvider.cs index b5c95ebff81..a791c67a3ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IMouseInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/IMouseInputProvider.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Media; - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// An interface for controlling the mouse input provider. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaExpansionBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaExpansionBehavior.cs index 5d2e8471243..6af653f95d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaExpansionBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaExpansionBehavior.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Input.Manipulations; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaRotationBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaRotationBehavior.cs index 63a2bea76c7..04c88afe038 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaRotationBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaRotationBehavior.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Input.Manipulations; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaTranslationBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaTranslationBehavior.cs index b53ed3356a8..563a1136cf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaTranslationBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InertiaTranslationBehavior.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Input.Manipulations; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputDevice.cs index 04ba85e0924..ebef1ec6260 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputDevice.cs @@ -5,8 +5,6 @@ using System.Windows.Threading; -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputElement.cs index 80b780a9016..541c601796c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputElement.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Windows.Media; -using MS.Win32; using MS.Internal; -using System.Security; -using System.Runtime.InteropServices; using System.Windows.Interop; using System.Windows.Media.Media3D; -using System; namespace System.Windows.Input { @@ -276,8 +272,8 @@ internal static Point TranslatePoint(Point pt, DependencyObject from, Dependency HwndSource sourceTo = PresentationSource.CriticalFromVisual(rootTo) as HwndSource; - if(sourceFrom != null && sourceFrom.CriticalHandle != IntPtr.Zero && sourceFrom.CompositionTarget != null && - sourceTo != null && sourceTo.CriticalHandle != IntPtr.Zero && sourceTo.CompositionTarget != null) + if(sourceFrom != null && sourceFrom.Handle != IntPtr.Zero && sourceFrom.CompositionTarget != null && + sourceTo != null && sourceTo.Handle != IntPtr.Zero && sourceTo.CompositionTarget != null) { // Translate the point into client coordinates. ptTranslated = PointUtil.RootToClient(ptTranslated, sourceFrom); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventArgs.cs index 66c8d3144c5..add6500d479 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; - -using System; -using System.Security; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventHandler.cs index 3e425f914b9..20e6346c7c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageEventArgs.cs index 07f1ea6995b..887e8d8cb9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageEventArgs.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Windows.Threading; -using System.Windows; using System.Globalization; -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The InputLanguageEventArgs class represents a type of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs index 7210fd80d07..47f42bba8e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs @@ -2,26 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: InputLanguageManager class and InputLanguage APIs. -// -// - using System.Collections; using System.Windows.Threading; -using System.Windows; using System.Globalization; using MS.Win32; -using System; -using System.Security; -using System.Runtime.InteropServices; using System.ComponentModel; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The InputLanguageManager class is responsible for mmanaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageProfileNotifySink.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageProfileNotifySink.cs index 36967bfa85b..6e244a3a55b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageProfileNotifySink.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageProfileNotifySink.cs @@ -10,14 +10,6 @@ // using MS.Win32; -using System.Collections; -using System.Globalization; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Interop; -using System.Runtime.InteropServices; - -using System; namespace System.Windows.Input { @@ -26,7 +18,7 @@ namespace System.Windows.Input // InputLanguageProfileNotifySink // //------------------------------------------------------ - + /// /// This is an internal. This is an implementation of ITfLanguageProfileNotifySink. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageSource.cs index fb1fb6a4e0a..6fe02a4deab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageSource.cs @@ -9,17 +9,10 @@ // // -using System.Security; using System.Collections; using System.Globalization; -using System.Windows.Threading; -using System.Windows.Input; -using System.Windows.Media; -using System.Runtime.InteropServices; -using System.Diagnostics; using MS.Win32; -using MS.Utility; namespace System.Windows.Input { @@ -28,7 +21,7 @@ namespace System.Windows.Input // InputLanguageSource class // //------------------------------------------------------ - + /// /// This is an internal. The source for input languages. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs index 414bc6dd2e2..7404141b4b8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs @@ -3,19 +3,11 @@ // See the LICENSE file in the project root for more information. using System.Collections; -using System.Collections.Generic; using System.Windows.Threading; using System.Threading; -using System.Windows; -using System.Security; -using MS.Win32; using MS.Internal; -using System; -using System.Diagnostics; using System.Windows.Automation; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs index f0707b0c3a8..5fecd80ac86 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs @@ -2,31 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: Manage Input Methods (EA-IME, TextServicesFramework). -// -// using System.Runtime.InteropServices; -using System.Collections; -using System.Diagnostics; using System.Globalization; using System.Threading; using System.Windows.Threading; using System.Windows.Interop; -using System.Windows.Media; -using System.Security; -using MS.Utility; using MS.Win32; using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using System; - -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateChangeEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateChangeEventArgs.cs index 9bcea6a6a70..5318fdaa502 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateChangeEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateChangeEventArgs.cs @@ -8,25 +8,14 @@ // // -using System; -using System.Runtime.InteropServices; -using System.Collections; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; -using System.Windows; -using MS.Internal; //TextServicesInterop -using MS.Utility; -using MS.Win32; - -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // // InputMethodStateChjangedEventArgs class // //------------------------------------------------------ - + /// /// This InputMethodStateChangedEventArgs class is /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateTypeInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateTypeInfo.cs index 127d29c4ada..fa78fde3fed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateTypeInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethodStateTypeInfo.cs @@ -8,19 +8,9 @@ // // -using System.Runtime.InteropServices; -using System.Collections; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; -using System.Windows; -using MS.Internal; //TextServicesInterop -using MS.Utility; using MS.Win32; -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMode.cs index e13a3bca1ff..cdd3bd1d148 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMode.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The mode of input processing when the input was provided. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfiles.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfiles.cs index 7c3dafa71cb..5ae493a775a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfiles.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfiles.cs @@ -9,13 +9,9 @@ // // -using System; using System.Runtime.InteropServices; using System.Threading; -using System.Security; using MS.Win32; -using MS.Internal; -using System.Diagnostics; using System.Globalization; using System.Collections; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfilesLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfilesLoader.cs index bab99c80ed0..d161dffe3b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfilesLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProcessorProfilesLoader.cs @@ -13,13 +13,7 @@ // PRESHARP: In order to avoid generating warnings about unkown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 -using System; -using System.Runtime.InteropServices; -using System.Security; using System.Threading; - -using Microsoft.Win32; -using System.Diagnostics; using MS.Win32; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs index 1dbd1c83cc1..b9ba414bef3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs @@ -2,15 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Win32; -using System.Windows.Threading; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReport.cs index bddb8f6fb4d..fb51ab0c524 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReport.cs @@ -2,14 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Security; -using MS.Internal; -using MS.Win32; -using System.Windows; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The InputReport is an abstract base class for all input that is diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventArgs.cs index de42b89da70..90515f0fac7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventArgs.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The InputReportEventArgs class contains information about an input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventHandler.cs index ee493b71647..589b26e7d90 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputReportEventHandler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive PointerMoveEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs index 40b337bc16b..4efe8dd7e7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs @@ -2,24 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: class for input scope definition // // Please refer to the design specfication http://avalon/Cicero/Specifications/Stylable%20InputScope.mht -// -// -using System; -using System.Collections.Generic; -using System.Windows.Input; using System.Windows.Markup; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using MS.Internal.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeConverter.cs index 055403f5855..93c2842ba6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeConverter.cs @@ -10,12 +10,8 @@ // // -using System; -using System.Collections.Generic; -using System.Windows.Input; using System.ComponentModel; using System.Globalization; -using System.ComponentModel.Design.Serialization; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameConverter.cs index 308b72cf7de..c2f98228f53 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameConverter.cs @@ -10,12 +10,8 @@ // // -using System; -using System.Collections.Generic; -using System.Windows.Input; using System.ComponentModel; using System.Globalization; -using System.ComponentModel.Design.Serialization; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameValue.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameValue.cs index b1b15c1bdce..69154d36d7c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameValue.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeNameValue.cs @@ -8,8 +8,6 @@ // // -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputType.cs index ac44ebfdf67..00a2a2ec286 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputType.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The type of input being reported. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventArgs.cs index e154a20cee9..665383e5d7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventArgs.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The KeyEventArgs class contains information about key states. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventHandler.cs index 2f2de07cdee..397ffda3e21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyEventHandler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive KeyEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyStates.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyStates.cs index cc7e89c458b..2c34999a110 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyStates.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyStates.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The KeyStates enumeration describes the state that keyboard keys diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Keyboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Keyboard.cs index 771799a594f..9411d97aa72 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Keyboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Keyboard.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - -using System; -using System.Windows; -using MS.Win32; -using System.Security; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs index ecf3fe126ca..b59ac383148 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs @@ -2,19 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Security; -using System.Windows; -using System.Windows.Media; using System.Windows.Threading; using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Win32; // VK translation. using System.Windows.Automation.Peers; -using SR=MS.Internal.PresentationCore.SR; - #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventArgs.cs index 1ae205675ba..fc04679eeae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventArgs.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The KeyboardEventArgs class provides access to the logical diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventHandler.cs index 9ebaa7b7cc1..01c8b517629 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardEventHandler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive KeyboardEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventArgs.cs index aebd0ac26e6..f5bd656d193 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventArgs.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The KeyboardInputProviderAcquireFocusEventArgs class is used to diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventHandler.cs index ceff375123d..c629668cb7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardInputProviderAcquireFocusEventHandler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive KeyboardInputProviderAcquireFocusEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs index ba757e8e59f..0653663e1e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs @@ -5,10 +5,7 @@ // // -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; using System.Windows.Input.Manipulations; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationBoundaryFeedbackEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationBoundaryFeedbackEventArgs.cs index 99b4e7d943b..61faef9f232 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationBoundaryFeedbackEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationBoundaryFeedbackEventArgs.cs @@ -5,13 +5,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationCompletedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationCompletedEventArgs.cs index b78101e4b44..dab7fff4c43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationCompletedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationCompletedEventArgs.cs @@ -5,13 +5,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDelta.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDelta.cs index 1fb6308ba8f..06ff56cb3c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDelta.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDelta.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Windows; - namespace System.Windows.Input { public class ManipulationDelta diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDeltaEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDeltaEventArgs.cs index 4089d9725c5..f92e04537ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDeltaEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDeltaEventArgs.cs @@ -5,13 +5,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDevice.cs index d83fdd9aa71..c540572fbc9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationDevice.cs @@ -5,18 +5,9 @@ // // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Input; using System.Windows.Input.Manipulations; using System.Windows.Media; -using System.Windows.Threading; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationInertiaStartingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationInertiaStartingEventArgs.cs index 2f4389ccc43..ed82b043b21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationInertiaStartingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationInertiaStartingEventArgs.cs @@ -5,15 +5,8 @@ // // -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Input.Manipulations; -using System.Windows.Media; - -using MS.Internal; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationLogic.cs index 95ff7995d57..a40f8ee8e15 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationLogic.cs @@ -5,18 +5,11 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Interop; using System.Windows.Input.Manipulations; using System.Windows.Media; using System.Windows.Threading; using MS.Win32; using MS.Internal; -using MS.Internal.PresentationCore; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationModes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationModes.cs index 39cb650744b..28b1e073801 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationModes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationModes.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationPivot.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationPivot.cs index 8124bdee6e4..e249858dd6a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationPivot.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationPivot.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartedEventArgs.cs index 55746b11792..2a15974566b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartedEventArgs.cs @@ -5,13 +5,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs index 15c55b6577f..c36dcf4e0ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs @@ -5,14 +5,8 @@ // // -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Security; -using System.Windows; using System.Windows.Input.Manipulations; -using System.Windows.Media; using MS.Internal.PresentationCore; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationVelocities.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationVelocities.cs index e1a105a0151..d817e8e3129 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationVelocities.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationVelocities.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Mouse.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Mouse.cs index 749043517f9..a482b25f800 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Mouse.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Mouse.cs @@ -2,14 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - -using System; -using System.Windows; -using System.Security; -using MS.Win32; -using MS.Internal; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButton.cs index 005c5cf9d12..7b992600fc5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButton.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventArgs.cs index 845addad03e..8e96ed32fc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventHandler.cs index 97d83eaa51a..987a96167c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonState.cs index 4845ee138ed..56d26948f60 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseButtonState.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs index 1cb4cbfc9e9..f1945486638 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs @@ -2,21 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.Collections; -using System.Windows; -using System.Windows.Media; -using System.Windows.Input; using System.Windows.Input.StylusPointer; using System.Windows.Interop; using System.Windows.Threading; -using System.Security; using MS.Internal; -using MS.Win32; // *NativeMethods +using MS.Win32; using System.Runtime.InteropServices; -using System; - -using SR = MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -26,7 +18,6 @@ // scrolling and still use the wheel. To get this effect, uncomment this line. //#define SEND_WHEEL_EVENTS_TO_FOCUS - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventArgs.cs index 43cc1ecfa93..8811cc8d9a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventHandler.cs index 5d4d8b7c19f..224a6606648 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventArgs.cs index c8545d70bde..6dfc7dc1567 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventHandler.cs index b522f8425a9..58021dc4557 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseWheelEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/NotifyInputEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/NotifyInputEventArgs.cs index 9e37d2f09fe..1c09975cf4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/NotifyInputEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/NotifyInputEventArgs.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Security ; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// Provides information about an input event being processed by the diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/PreProcessInputEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/PreProcessInputEventArgs.cs index 5a8b4300998..781abbe3982 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/PreProcessInputEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/PreProcessInputEventArgs.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Security; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// Allows the handler to cancel the processing of an input event. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs index ce4c7bd6e98..e85b1c1485b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// Provides access to the input manager's staging area. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventArgs.cs index cf6113f5f2f..80118953638 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventHandler.cs index f6a085a506f..58ba74e76d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/QueryCursorEventHandler.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawAppCommandInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawAppCommandInputReport.cs index d9456496e2a..1c5eeadfe5f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawAppCommandInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawAppCommandInputReport.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; -using MS.Win32; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardActions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardActions.cs index 5137c51d690..82c9b9c1222 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardActions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardActions.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The raw actions being reported from the keyboard. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardInputReport.cs index 951248f36c3..0c0abc155f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawKeyboardInputReport.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; -using MS.Win32; -using System.Windows; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The RawKeyboardInputReport class encapsulates the raw input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseActions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseActions.cs index af3a6078aa6..84c6994be69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseActions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseActions.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The raw actions being reported from the mouse. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseInputReport.cs index 91dbb84b35b..d31b83e94be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawMouseInputReport.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Media; -using System.Security; -using MS.Internal; -using MS.Win32; -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The RawMouseInputReport class encapsulates the raw input provided diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawTextInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawTextInputReport.cs index 7a72c91d19b..2f7c085b043 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawTextInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawTextInputReport.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The RawTextInputReport class encapsulates the raw text input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateActions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateActions.cs index 82eb49d47c6..5e9930e56ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateActions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateActions.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateInputReport.cs index 82510f78416..3673f48656f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateInputReport.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; -using MS.Win32; -using System.Windows; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateTargets.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateTargets.cs index ddd67caef33..1297eb933b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateTargets.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RawUIStateTargets.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RestoreFocusMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RestoreFocusMode.cs index 3ec63878934..5b4933afeca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RestoreFocusMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/RestoreFocusMode.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/StagingAreaInputItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/StagingAreaInputItem.cs index 294367d7acb..709066ff3ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/StagingAreaInputItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/StagingAreaInputItem.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Security; -namespace System.Windows.Input +namespace System.Windows.Input { /// /// This class encapsulates an input event while it is being diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs index 4447d971aae..adc7db49a73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs @@ -3,29 +3,15 @@ // See the LICENSE file in the project root for more information. //#define DEBUG_RENDERING_FEEDBACK -// -// + // Description: // DynamicRenderer PlugIn - Provides off (and on) app Dispatcher Inking support. -// -// - -using System; -using System.Diagnostics; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Input; + using System.Windows.Media; -using System.Threading; using System.Windows.Threading; -using MS.Utility; using System.Windows.Ink; using MS.Internal.Ink; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input.StylusPlugIns { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRendererThreadManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRendererThreadManager.cs index 888e588e0ca..02fc79e0f9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRendererThreadManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRendererThreadManager.cs @@ -10,18 +10,8 @@ // // -using System; -using System.Diagnostics; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; using System.Threading; using System.Windows.Threading; -using MS.Utility; -using System.Security; -using MS.Internal; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/MultiTouchSystemGestureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/MultiTouchSystemGestureLogic.cs index 65c62c576c6..42924c7acf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/MultiTouchSystemGestureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/MultiTouchSystemGestureLogic.cs @@ -5,9 +5,6 @@ // // -using System; -using System.Diagnostics; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusActions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusActions.cs index 44015aefaf5..3ce7b553091 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusActions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusActions.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs index 172559b64db..cae11c047e8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs @@ -2,14 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Windows.Media; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs index 6f1b10a57a9..6d4e1df7764 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input.StylusPlugIns { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs index 7b40ee5cf77..865cdc20b7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs @@ -3,14 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows.Threading; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs index d515d8f5508..9beab1424bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs @@ -2,18 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Windows; -using System.Windows.Threading; -using System.Windows.Media; using System.Windows.Input.StylusPlugIns; -using System.Security; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Internal; - -using SR = MS.Internal.PresentationCore.SR; -using System.Windows.Input.StylusWisp; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs index f044d9b324c..0d59090fe33 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Security; -using System.Windows.Input.StylusWisp; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Stylus.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Stylus.cs index 03346c301b0..df7c3f15f22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Stylus.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Stylus.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Security; -using System.Windows.Input.StylusWisp; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButton.cs index 61a408e535f..74b40cfcb21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButton.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs index 2cec3d4de10..c99e44a1546 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs @@ -3,16 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows.Media; - -using MS.Utility; -using MS.Internal; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonEventArgs.cs index ef7b7b82bc1..066930459d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.ComponentModel; -using System.Windows.Media; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonState.cs index 1163befc538..c0f7c56d8c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonState.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs index f2acbc8e905..d22d73ada58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs @@ -2,22 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Win32; -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; using System.Globalization; -using System.Security; -using System.Windows; -using System.Windows.Input.StylusPlugIns; -using System.Windows.Input.StylusWisp; -using System.Windows.Interop; using System.Windows.Media; -using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs index c88a7fb307a..4653b0480de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs @@ -3,22 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; -using MS.Internal.PresentationCore; -using MS.Win32; -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; -using System.Globalization; -using System.Security; -using System.Windows; using System.Windows.Input.StylusPlugIns; -using System.Windows.Input.StylusWisp; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs index 6cf8c6ccdbb..008a2b9140c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs @@ -3,15 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Security; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows.Media; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceInfo.cs index e1174e4417a..8553ed61acd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceInfo.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using MS.Internal; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDownEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDownEventArgs.cs index a12db19c8f1..7923a238005 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDownEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDownEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.ComponentModel; -using System.Windows.Media; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusEventArgs.cs index 560c2aa6d01..19ebbccf030 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Windows.Media; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs index 1e5c4c7fb6f..3d6abd836dc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs @@ -6,24 +6,14 @@ using Microsoft.Win32; // for RegistryKey class using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Utility; using MS.Win32; // for *NativeMethods -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input.StylusPlugIns; using System.Windows.Input.StylusPointer; using System.Windows.Input.StylusWisp; using System.Windows.Input.Tracing; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs index b41ce07d571..3dd02f1d8a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs @@ -2,17 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Collections; using System.Collections.ObjectModel; using System.Windows.Media; -using System.Windows.Threading; -using System.Windows.Interop; -using System.Security; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs index 6a79cb442f1..dfbfccfa69b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs @@ -3,18 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Collections; -using System.Collections.ObjectModel; -using System.Windows.Media; -using System.Windows.Threading; -using System.Windows.Interop; using System.Windows.Input.StylusWisp; using System.Windows.Input.StylusPointer; -using System.Security; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugin.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugin.cs index 9ee29be7bd2..3ad0147e154 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugin.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugin.cs @@ -4,18 +4,6 @@ // #define TRACE -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Specialized; -using System.Windows.Threading; - -using System.Windows; -using System.Windows.Input; - -using System.Windows.Media; -using MS.Win32; // for *NativeMethods - namespace System.Windows.Input.StylusPlugIns { ///////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs index bf29e708101..1d6315a248b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs @@ -2,17 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Diagnostics; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; using System.Collections.ObjectModel; -using MS.Utility; -using MS.Internal; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs index 6aeb97d13c5..0af13035643 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; using System.ComponentModel; -using System.Windows.Ink; using MS.Internal.Ink.InkSerializedFormat; using System.Windows.Media; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using MS.Utility; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs index 3b7c7e493eb..aa5a5df7c22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs @@ -2,15 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using SR = MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs index 42acf22348a..3f05027bbd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs @@ -2,14 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs index 36c9be83ade..f86e709868f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs @@ -2,14 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; using System.Globalization; -using System.Windows.Media; -using System.Collections.Generic; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyId.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyId.cs index feafe757623..74f2823dea4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyId.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyId.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs index d567a7bce21..86b174fe5f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs @@ -2,16 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; -using System.Diagnostics; using System.ComponentModel; -using MS.Utility; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfoDefaults.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfoDefaults.cs index 8100dbe4418..b4637068bfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfoDefaults.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfoDefaults.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; - namespace System.Windows.Input { internal static class StylusPointPropertyInfoDefaults diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyUnit.cs index 703499b036c..c18991acfc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyUnit.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGesture.cs index 206d0ab0516..58ee438198c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGesture.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs index 9aa9dd89d0e..b5aa507fce5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Windows.Media; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTouchDeviceBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTouchDeviceBase.cs index 881deafe913..59851be31cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTouchDeviceBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTouchDeviceBase.cs @@ -5,8 +5,6 @@ // // -using MS.Internal; -using System.Security; using System.Windows.Media; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTraceLogger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTraceLogger.cs index 18705220697..6fa6187bcce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTraceLogger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusTraceLogger.cs @@ -5,15 +5,8 @@ // // -using System; -using System.Diagnostics.Contracts; using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; -using System.Text; -using System.Windows; -using System.Windows.Input; -using MS.Internal; -using MS.Internal.Telemetry; using MS.Internal.Telemetry.PresentationCore; namespace System.Windows.Input.Tracing diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Tablet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Tablet.cs index 00fc3e9df20..fad63e0b34a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Tablet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/Tablet.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Threading; -using System.Security; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDevice.cs index 7b59e49ef9c..98431d7958a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDevice.cs @@ -2,16 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Internal; -using MS.Win32; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Globalization; -using System.Security; -using System.Windows.Input.StylusWisp; -using System.Windows.Input.Tracing; -using System.Windows.Media; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceBase.cs index 4e110653464..b290f8792cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceBase.cs @@ -2,15 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Internal; -using MS.Win32; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Globalization; -using System.Security; -using System.Windows.Input.StylusWisp; -using System.Windows.Input.Tracing; using System.Windows.Media; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs index da56cb55698..62d581b0a5a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - using System.Collections; -using System.Collections.Generic; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceInfo.cs index 7f61d71318b..2c911f4ecc7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceInfo.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.ObjectModel; -using System.Security; -using MS.Internal; using MS.Win32.Penimc; -using System.Windows.Media; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceType.cs index fad9c641a2f..2a46cae133f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceType.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletHardwareCapabilities.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletHardwareCapabilities.cs index d28e53e5d7b..76bd8be82b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletHardwareCapabilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletHardwareCapabilities.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerData.cs index f840575dff0..40e3969895c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerData.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; -using System.Security; -using System.Windows.Input; -using System.Windows.Interop; using static MS.Win32.Pointer.UnsafeNativeMethods; namespace System.Windows.Input.StylusPointer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs index 79234574dfc..a14b8404a61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs @@ -2,26 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Win32.Pointer; -using MS.Internal; -using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Utility; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; -using System.Windows.Interop; -using System.Windows.Media; -using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Input.StylusPointer { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs index d270bda3264..87804698ca5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs @@ -4,23 +4,7 @@ using MS.Win32.Pointer; -using MS.Internal; -using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Utility; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; -using System.Windows.Interop; using System.Windows.Media; -using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs index d164fbb813a..bfeaff90fa1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs @@ -2,27 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using Microsoft.Win32; // for RegistryKey class using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Utility; -using MS.Win32; // for *NativeMethods -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; using System.Windows.Input.Tracing; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs index 908241f2a6b..05ce0910000 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs @@ -2,19 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - using MS.Internal; -using MS.Internal.Interop; -using MS.Internal.PresentationCore; using MS.Win32.Pointer; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows.Input; using System.Windows.Input.StylusPlugIns; using System.Windows.Interop; using System.Windows.Media; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs index b56ca08daca..67dc1ea80d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs @@ -3,17 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.ObjectModel; -using System.Security; -using System.Windows; -using System.Windows.Input; using System.Windows.Input.StylusPlugIns; -using System.Windows.Interop; using System.Windows.Media; -using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs index 9703b2258ef..639689727ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs @@ -3,22 +3,10 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Utility; -using MS.Win32; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input; using System.Windows.Input.StylusPlugIns; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs index 897a8ba602e..61e0198e0ff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs @@ -3,16 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections.Generic; -using System.Diagnostics; -using System.ComponentModel; -using MS.Utility; using MS.Win32.Pointer; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDevice.cs index 1a72a293563..5148d169622 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDevice.cs @@ -4,13 +4,9 @@ using MS.Win32.Pointer; -using System.Collections.Generic; -using System.ComponentModel; -using System.Security; -using System.Windows.Input; namespace System.Windows.Input.StylusPointer -{ +{ /// /// A WM_POINTER based implementation of the TabletDeviceBase class. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceCollection.cs index c85ea3e2012..61eb0cd1dd8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceCollection.cs @@ -4,12 +4,7 @@ using MS.Win32.Pointer; -using System.Collections.Generic; using System.ComponentModel; -using System.Windows.Input; -using System.Security; -using System.Windows.Threading; -using System.Threading; using System.Windows.Input.Tracing; namespace System.Windows.Input.StylusPointer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceInfo.cs index 7723187b478..6e91747cd41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTabletDeviceInfo.cs @@ -4,11 +4,7 @@ using MS.Win32.Pointer; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Security; -using System.Windows.Input; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTouchDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTouchDevice.cs index 2b996551d04..48e5941d08d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTouchDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerTouchDevice.cs @@ -4,10 +4,6 @@ using MS.Internal; -using MS.Internal.PresentationCore; -using System.Security; -using System.Windows.Input; -using System.Windows.Interop; using System.Windows.Media; namespace System.Windows.Input.StylusPointer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs index 648410051ef..847fc8dcbc8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Collections.Specialized; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Collections; -using System.Collections.Generic; -using System.Security; -using MS.Internal; using MS.Win32.Penimc; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContextInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContextInfo.cs index e64e3b73141..51f609c6af9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContextInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContextInfo.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using MS.Internal; using MS.Win32.Penimc; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs index 6686a76ec2a..96312159a4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs @@ -2,41 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; - -using System.Windows.Threading; -using System.Windows; -using System.Windows.Input; using System.Windows.Input.StylusWisp; using System.Windows.Media; -using System.Security; -using MS.Internal; - -using MS.Win32; -using MS.Utility; -using System.Runtime.InteropServices; - using System.Windows.Input.StylusPlugIns; using System.Windows.Interop; -using SR=MS.Internal.PresentationCore.SR; - -using MS.Internal.PresentationCore; // SecurityHelper - namespace System.Windows.Input { - ///////////////////////////////////////////////////////////////////////// - internal sealed class PenContexts { - ///////////////////////////////////////////////////////////////////////// - internal PenContexts(WispLogic stylusLogic, PresentationSource inputSource) { HwndSource hwndSource = inputSource as HwndSource; - if(hwndSource == null || IntPtr.Zero == (hwndSource).CriticalHandle) + if(hwndSource == null || IntPtr.Zero == (hwndSource).Handle) { throw new InvalidOperationException(SR.Stylus_PenContextFailure); } @@ -52,7 +30,7 @@ internal void Enable() if (_contexts == null) { // create contexts - _contexts = _stylusLogic.WispTabletDevices.CreateContexts(_inputSource.CriticalHandle, this); + _contexts = _stylusLogic.WispTabletDevices.CreateContexts(_inputSource.Handle, this); foreach(PenContext context in _contexts) { @@ -224,14 +202,14 @@ internal void AddContext(uint index) { // We only tear down the old context when PenContexts are enabled without being // dispose and we have a valid index. Otherwise, no-op here. - if (_contexts is not null && index <= _contexts.Length && _inputSource.CriticalHandle != 0) + if (_contexts is not null && index <= _contexts.Length && _inputSource.Handle != 0) { PenContext[] ctxs = new PenContext[_contexts.Length + 1]; uint preCopyCount = index; uint postCopyCount = (uint)_contexts.Length - index; Array.Copy(_contexts, 0, ctxs, 0, preCopyCount); - PenContext newContext = _stylusLogic.TabletDevices[(int)index].As().CreateContext(_inputSource.CriticalHandle, this); + PenContext newContext = _stylusLogic.TabletDevices[(int)index].As().CreateContext(_inputSource.Handle, this); ctxs[index] = newContext; Array.Copy(_contexts, index, ctxs, index+1, postCopyCount); _contexts = ctxs; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenImcRcw.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenImcRcw.cs index 5f483059fc4..97b0067ed85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenImcRcw.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenImcRcw.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace MS.Win32.Penimc { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs index e8e91a64500..b05f60eb30e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs @@ -4,20 +4,8 @@ //#define TRACE -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.ObjectModel; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Threading; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32.Penimc; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadPool.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadPool.cs index a942b8cfda3..d44edcb91f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadPool.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadPool.cs @@ -2,15 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; using System.Windows.Input.Tracing; -using System.Windows.Threading; -using System.Security; -using MS.Utility; -using MS.Win32.Penimc; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs index 7e10a2dc450..32ef60cdb04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs @@ -4,23 +4,11 @@ //#define TRACEPTW -using System; -using System.Diagnostics; -using System.Collections; using System.Runtime.InteropServices; -using System.Windows.Interop; -using System.Windows.Threading; -using System.Windows.Media; using System.Threading; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using System.Collections.Generic; using System.Collections.ObjectModel; using MS.Win32.Penimc; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs index 76732958f01..36ed19372e4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs @@ -2,25 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; // for RegistryKey class using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Utility; -using MS.Win32; // for *NativeMethods -using System; -using System.Collections.Generic; -using System.Diagnostics; +using MS.Win32; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Input; using System.Windows.Input.StylusPlugIns; using System.Windows.Input.Tracing; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusWisp { @@ -645,7 +636,7 @@ private void PreProcessInput(object sender, PreProcessInputEventArgs e) // We can only Activate the window without flashing the tray icon for it when // we are processing an Input message. So we defer it till we see the mouse down. HwndSource hwndSource = mouseInputReport.InputSource as HwndSource; - IntPtr hwnd = hwndSource != null ? hwndSource.CriticalHandle : IntPtr.Zero; + IntPtr hwnd = hwndSource != null ? hwndSource.Handle : IntPtr.Zero; // If we see a stylusdown and we are not the foreground window // and there's no capture then make sure we get activated. @@ -3163,7 +3154,7 @@ internal void RegisterHwndForInput(InputManager inputManager, PresentationSource } // Detect if this window is disabled. If so then let the pencontexts know. - int style = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndSource.CriticalHandle), NativeMethods.GWL_STYLE); + int style = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndSource.Handle), NativeMethods.GWL_STYLE); if ((style & NativeMethods.WS_DISABLED) != 0) { penContexts.IsWindowDisabled = true; @@ -3201,7 +3192,7 @@ internal void UnRegisterHwndForInput(HwndSource hwndSource) penContexts.Disable(shutdownWorkThread); // Make sure we remember the last location of this window for mapping stylus input later. - if (UnsafeNativeMethods.IsWindow(new HandleRef(hwndSource, hwndSource.CriticalHandle))) + if (UnsafeNativeMethods.IsWindow(new HandleRef(hwndSource, hwndSource.Handle))) { penContexts.DestroyedLocation = PointUtil.ClientToScreen(new Point(0, 0), hwndSource); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs index 3f5ba53d26b..c038972f610 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs @@ -4,14 +4,11 @@ using MS.Internal; using MS.Win32; -using System.Diagnostics; using System.Globalization; -using System.Security; using System.Windows.Input.StylusPlugIns; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs index 68448b0538b..05807bbfd69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs @@ -3,17 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Collections; -using System.Collections.ObjectModel; using System.Windows.Media; -using System.Windows.Threading; -using System.Windows.Interop; using System.Windows.Input.StylusPlugIns; -using System.Security; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusTouchDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusTouchDevice.cs index d373c9d4612..4d88a6de666 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusTouchDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusTouchDevice.cs @@ -5,15 +5,7 @@ // // -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Security; - using MS.Internal; -using MS.Internal.PresentationCore; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDevice.cs index 76c1dbc5909..3c9e40fe00e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDevice.cs @@ -2,19 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Input.StylusWisp; using System.Windows.Input.Tracing; -using System.Windows.Media; using System.Globalization; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.InteropServices; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32.Penimc; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs index d76a736a92b..7d6dcd13f33 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs @@ -5,14 +5,8 @@ using Microsoft.Win32; using MS.Win32; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; -using System.Windows.Input.StylusWisp; using System.Windows.Input.Tracing; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs index b335e6a9ecd..188532db0c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs @@ -2,26 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: TextComposition class is the object that contains // the input text. The text from keyboard input // is packed in this class when TextInput event is generated. // And this class also packs the state of the composition text when // the input text is being composed (for EA input, Speech). -// -// -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Text; using System.Windows.Threading; -using System.Windows; -using System.Security; -using MS.Win32; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventArgs.cs index 33583658440..c80e0782f6b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventArgs.cs @@ -8,9 +8,7 @@ // // -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The TextCompositionEventArgs class contains a text representation of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventHandler.cs index 5b3fc2ea1e0..576892c1cbf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionEventHandler.cs @@ -8,9 +8,7 @@ // // -using System; - -namespace System.Windows.Input +namespace System.Windows.Input { /// /// The delegate to use for handlers that receive TextCompositionEventArgs. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs index 03513d3ee7a..bcdc12fcccc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs @@ -2,27 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: the CompositionManager class -// -// - -using System; -using System.Diagnostics; -using System.Globalization; -using System.Security; using System.Text; using System.Windows.Threading; -using System.Windows; using System.Runtime.InteropServices; - using MS.Win32; -using Microsoft.Win32; // for RegistryKey class -using MS.Internal ; -using MS.Internal.PresentationCore; // SecurityHelper - -using SR=MS.Internal.PresentationCore.SR; +using Microsoft.Win32; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartment.cs index bbf8161882a..8001fe803e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartment.cs @@ -8,25 +8,17 @@ // // -using System; using System.Runtime.InteropServices; -using System.Windows.Threading; - -using System.Security; -using System.Diagnostics; -using System.Collections; -using MS.Utility; using MS.Win32; -using MS.Internal; -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // // TextServicesCompartment class // //------------------------------------------------------ - + internal class TextServicesCompartment { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentContext.cs index 689b52aa600..1e736afbcbf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentContext.cs @@ -8,25 +8,18 @@ // // -using System; -using System.Runtime.InteropServices; -using System.Windows.Threading; - -using System.Security; -using System.Diagnostics; using System.Collections; using MS.Internal; -using MS.Utility; using MS.Win32; -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // // TextServicesCompartmentContext class // //------------------------------------------------------ - + internal class TextServicesCompartmentContext { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentEventSink.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentEventSink.cs index 4e0de199aa6..eccfdce589f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentEventSink.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesCompartmentEventSink.cs @@ -8,23 +8,16 @@ // // -using System; -using System.Runtime.InteropServices; -using System.Windows.Threading; - -using System.Diagnostics; -using System.Collections; -using MS.Utility; using MS.Win32; -namespace System.Windows.Input +namespace System.Windows.Input { //------------------------------------------------------ // // TextServicesCompartmentManager class // //------------------------------------------------------ - + /// /// This is a class to have a real implement of ITfCompartmentEventSink. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesContext.cs index 2ee5fef43a7..b814f4dea41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesContext.cs @@ -8,17 +8,11 @@ // // -using System; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Threading; -using System.Security; -using System.Diagnostics; -using System.Collections; -using MS.Utility; using MS.Win32; using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesManager.cs index e84df29f5a1..a7b2c4825f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextServicesManager.cs @@ -15,9 +15,6 @@ using MS.Internal; using MS.Win32; -using System; -using System.Security; - namespace System.Windows.Input { internal class TextServicesManager : DispatcherObject diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Touch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Touch.cs index ea7d631427e..c47a88bf559 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Touch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Touch.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { public static class Touch diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchAction.cs index c5d3773cda1..e00c6300d3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchAction.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs index 30a48fff777..cf7fdd99e84 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs @@ -2,24 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Input; -using System.Windows.Input.StylusWisp; using System.Windows.Media; using System.Windows.Media.Media3D; using System.Windows.Threading; -using System.Security; using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; using MS.Utility; -using SR = MS.Internal.PresentationCore.SR; using System.Windows.Input.Tracing; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchEventArgs.cs index f907d30d1f4..196f025d173 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchEventArgs.cs @@ -5,11 +5,6 @@ // // -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { public class TouchEventArgs : InputEventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventArgs.cs index e6b83e62bfd..5cc6c3af475 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventArgs.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventHandler.cs index d20c6180f7f..0a2068c35fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchFrameEventHandler.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPoint.cs index b4e4a8a539e..e1710d5d0a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPoint.cs @@ -5,10 +5,6 @@ // // -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPointCollection.cs index 5960f1a7b8c..6368fdd95d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchPointCollection.cs @@ -5,7 +5,6 @@ // // -using System; using System.Collections.ObjectModel; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesCapturedWithinProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesCapturedWithinProperty.cs index ef612fbfed8..3e227d9acf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesCapturedWithinProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesCapturedWithinProperty.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Input; -using MS.Internal.KnownBoxes; - namespace System.Windows.Input { internal class TouchesCapturedWithinProperty : ReverseInheritProperty diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesOverProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesOverProperty.cs index 8915dcb729c..21b9d3be14f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesOverProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchesOverProperty.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Input; -using MS.Internal.KnownBoxes; - namespace System.Windows.Input { internal class TouchesOverProperty : ReverseInheritProperty diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs index 7bf1008d67f..20aa91a9d0f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs @@ -2,18 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; -using System.Windows; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using System.Windows.Media; using MS.Win32; // VK translation. -using System; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Input { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs index 36a3e4013d9..e81dfc33012 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs @@ -2,20 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; -using System.Collections; -using System.Windows; -using System.Windows.Media; -using System.Windows.Interop; -using System.Windows.Threading; -using System.Security; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32; // *NativeMethods -using System.Runtime.InteropServices; -using System; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/CursorInteropHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/CursorInteropHelper.cs index 63acad2fb35..694d2a68ad7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/CursorInteropHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/CursorInteropHelper.cs @@ -10,11 +10,8 @@ // // 06/30/05 jdmack Created -using System; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Input; -using SecurityHelper=MS.Internal.SecurityHelper; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs index 445bdbcdd4b..ec7e89c3131 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs @@ -2,31 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: D3DImage class // An ImageSource that displays a user created D3D surface -// using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; using MS.Win32.PresentationCore; -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.Imaging; using System.Windows.Threading; -using System.Security; using System.Threading; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Interop { /// @@ -747,14 +735,10 @@ private void SendPresent(object sender, EventArgs args) /// private object SetIsFrontBufferAvailable(object isAvailableVersionPair) { - Pair pair = (Pair)isAvailableVersionPair; - uint version = (uint)pair.Second; + (bool isFrontBufferAvailable, uint version) = (Tuple)isAvailableVersionPair; - if (version == _version) - { - bool isFrontBufferAvailable = (bool)pair.First; + if (_version == version) SetValue(IsFrontBufferAvailablePropertyKey, isFrontBufferAvailable); - } // ...just because DispatcherOperationCallback requires returning an object return null; @@ -771,11 +755,9 @@ private object SetIsFrontBufferAvailable(object isAvailableVersionPair) // NOTE: Called from the render thread!We must execute the reaction on the UI thread. private void Callback(bool isFrontBufferAvailable, uint version) { - Dispatcher.BeginInvoke( - DispatcherPriority.Normal, - new DispatcherOperationCallback(SetIsFrontBufferAvailable), - new Pair(BooleanBoxes.Box(isFrontBufferAvailable), version) - ); + Tuple parameters = new(isFrontBufferAvailable, version); + + Dispatcher.BeginInvoke(DispatcherPriority.Normal, new DispatcherOperationCallback(SetIsFrontBufferAvailable), parameters); } internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCheck) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndAppCommandInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndAppCommandInputProvider.cs index 471007720d7..18c3a0f870e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndAppCommandInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndAppCommandInputProvider.cs @@ -5,11 +5,6 @@ using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using MS.Utility; -using MS.Internal; using MS.Internal.Interop; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs index e726b9111c4..0f50ec60bda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs @@ -5,16 +5,10 @@ using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; using MS.Utility; -using MS.Internal; using MS.Internal.Interop; using MS.Win32; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Interop { @@ -68,7 +62,7 @@ bool IKeyboardInputProvider.AcquireFocus(bool checkOnly) _restoreFocus = null; } - HandleRef thisWindow = new HandleRef(this, _source.CriticalHandle); + HandleRef thisWindow = new HandleRef(this, _source.Handle); IntPtr focus = UnsafeNativeMethods.GetFocus(); int windowStyle = UnsafeNativeMethods.GetWindowLong(thisWindow, NativeMethods.GWL_EXSTYLE); @@ -129,7 +123,7 @@ bool IKeyboardInputProvider.AcquireFocus(bool checkOnly) // deactivated. Now we detect that we already have // Win32 focus but are not activated and treat it the // same as getting focus. - if (!_active && focus == _source.CriticalHandle) + if (!_active && focus == _source.Handle) { OnSetFocus(focus); } @@ -143,7 +137,7 @@ bool IKeyboardInputProvider.AcquireFocus(bool checkOnly) } } - result = (focus == _source.CriticalHandle); + result = (focus == _source.Handle); } } catch(System.ComponentModel.Win32Exception) @@ -331,7 +325,7 @@ internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, // This is our clue that the keyboard is inactive. case WindowMessage.WM_KILLFOCUS: { - if(_active && wParam != _source.CriticalHandle ) + if(_active && wParam != _source.Handle ) { // Console.WriteLine("WM_KILLFOCUS"); @@ -340,7 +334,7 @@ internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, // when the window that's acquiring focus (wParam) is // a descendant of our window, remember the immediate // child so that we can restore focus to it. - _restoreFocusWindow = GetImmediateChildFor((IntPtr)wParam, _source.CriticalHandle); + _restoreFocusWindow = GetImmediateChildFor((IntPtr)wParam, _source.Handle); _restoreFocus = null; @@ -497,7 +491,7 @@ private void OnSetFocus(IntPtr hwnd) // this window, we do not allow the focused element to be in // a different window. IntPtr focus = UnsafeNativeMethods.GetFocus(); - if (focus == thisSource.CriticalHandle) + if (focus == thisSource.Handle) { restoreFocusDO = (DependencyObject)Keyboard.FocusedElement; if (restoreFocusDO != null) @@ -721,7 +715,7 @@ private void PossiblyDeactivate(IntPtr hwndFocus) // Only deactivate the keyboard input stream if needed. if(deactivate) { - ReportInput(_source.CriticalHandle, + ReportInput(_source.Handle, InputMode.Foreground, _msgTime, RawKeyboardActions.Deactivate, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs index f27373c1966..17399deeb80 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs @@ -6,17 +6,13 @@ using System.Windows.Input; using System.Windows.Media; using System.Runtime.InteropServices; -using System.Diagnostics; using System.Reflection; -using System.Security; using MS.Internal; using MS.Internal.Interop; using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32; using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Interop { internal sealed class HwndMouseInputProvider : DispatcherObject, IMouseInputProvider, IDisposable @@ -39,7 +35,7 @@ public void Dispose() //Console.WriteLine("Disposing"); // Cleanup the mouse tracking. - StopTracking(_source.CriticalHandle); + StopTracking(_source.Handle); // If we have capture, release it. try @@ -80,7 +76,7 @@ void IInputProvider.NotifyDeactivate() { if(_active) { - StopTracking(_source.CriticalHandle); + StopTracking(_source.Handle); _active = false; } @@ -125,9 +121,9 @@ bool IMouseInputProvider.CaptureMouse() try { - SafeNativeMethods.SetCapture(new HandleRef(this, _source.CriticalHandle)); + SafeNativeMethods.SetCapture(new HandleRef(this, _source.Handle)); IntPtr capture = SafeNativeMethods.GetCapture(); - if (capture != _source.CriticalHandle) + if (capture != _source.Handle) { success = false; } @@ -155,7 +151,7 @@ bool IMouseInputProvider.CaptureMouse() { try { - SafeNativeMethods.ScreenToClient(new HandleRef(this, _source.CriticalHandle), ref ptCursor); + SafeNativeMethods.ScreenToClient(new HandleRef(this, _source.Handle), ref ptCursor); } catch(System.ComponentModel.Win32Exception) { @@ -166,7 +162,7 @@ bool IMouseInputProvider.CaptureMouse() if(success) { - ReportInput(_source.CriticalHandle, + ReportInput(_source.Handle, InputMode.Foreground, _msgTime, RawMouseActions.AbsoluteMove, @@ -674,7 +670,7 @@ internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, Int try { IntPtr hwndCapture = SafeNativeMethods.GetCapture(); - IntPtr hwndCurrent = _source.CriticalHandle; + IntPtr hwndCurrent = _source.Handle; if (hwndCapture != hwndCurrent) { PossiblyDeactivate(hwndCapture, false); @@ -728,7 +724,7 @@ internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, Int // If someone else is taking capture, we may need // to deactivate the mouse input stream too. - if(lParam != _source.CriticalHandle) // Ignore odd messages that claim we are losing capture to ourselves. + if(lParam != _source.Handle) // Ignore odd messages that claim we are losing capture to ourselves. { // MITIGATION_SETCURSOR _haveCapture = false; @@ -939,7 +935,7 @@ private void PossiblyDeactivate(IntPtr hwndCapture, bool stillActiveIfOverSelf) System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: WindowFromPoint failed!"); } - if (!stillActiveIfOverSelf && hwndToCheck == _source.CriticalHandle) + if (!stillActiveIfOverSelf && hwndToCheck == _source.Handle) { hwndToCheck = IntPtr.Zero; } @@ -981,7 +977,7 @@ private void PossiblyDeactivate(IntPtr hwndCapture, bool stillActiveIfOverSelf) // Only deactivate the mouse input stream if needed. if(deactivate) { - ReportInput(_source.CriticalHandle, + ReportInput(_source.Handle, InputMode.Foreground, _msgTime, RawMouseActions.Deactivate, @@ -1389,8 +1385,8 @@ private bool ReportInput( { try { - //This has a SUC on it and accesses CriticalHandle - int windowStyle = SafeNativeMethods.GetWindowStyle(new HandleRef(this, _source.CriticalHandle), true); + //This has a SUC on it and accesses Handle + int windowStyle = SafeNativeMethods.GetWindowStyle(new HandleRef(this, _source.Handle), true); if((windowStyle & NativeMethods.WS_EX_LAYOUTRTL) == NativeMethods.WS_EX_LAYOUTRTL) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPanningFeedback.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPanningFeedback.cs index a6441f60652..a4b2723b8f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPanningFeedback.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPanningFeedback.cs @@ -5,12 +5,7 @@ // // -using System; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; using MS.Win32; @@ -49,7 +44,7 @@ private HandleRef Handle { if (_hwndSource != null) { - IntPtr handle = _hwndSource.CriticalHandle; + IntPtr handle = _hwndSource.Handle; if (handle != IntPtr.Zero) { return new HandleRef(_hwndSource, handle); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPointerInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPointerInputProvider.cs index f86498a71eb..89450c19737 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPointerInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndPointerInputProvider.cs @@ -3,15 +3,10 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.Interop; using MS.Win32.Pointer; -using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; using System.Windows.Input.StylusPointer; using System.Windows.Media; using System.Windows.Threading; @@ -80,7 +75,7 @@ internal HwndPointerInputProvider(HwndSource source) _pointerLogic.PlugInManagers[_source] = new PointerStylusPlugInManager(_source); // Store if this window is enabled or disabled - int style = MS.Win32.UnsafeNativeMethods.GetWindowLong(new HandleRef(this, source.CriticalHandle), MS.Win32.NativeMethods.GWL_STYLE); + int style = MS.Win32.UnsafeNativeMethods.GetWindowLong(new HandleRef(this, source.Handle), MS.Win32.NativeMethods.GWL_STYLE); IsWindowEnabled = (style & MS.Win32.NativeMethods.WS_DISABLED) == 0; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs index 647fafee77f..6c18a0aaadd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs @@ -2,28 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System.Collections; -using System.Collections.Generic; using System.Threading; using System.Windows.Threading; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Interop; using System.Runtime.InteropServices; using MS.Win32; using MS.Utility; using MS.Internal; using MS.Internal.Interop; -using Microsoft.Win32; -using System.Diagnostics; using System.ComponentModel; -using System; -using System.Security; -using System.IO; - -using SR = MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -683,7 +671,7 @@ internal static HwndSource CriticalFromHwnd(IntPtr hwnd) foreach (PresentationSource source in PresentationSource.CriticalCurrentSources) { HwndSource test = source as HwndSource; - if (test != null && test.CriticalHandle == hwnd) + if (test != null && test.Handle == hwnd) { // Don't hand out a disposed source. if (!test.IsDisposed) @@ -860,7 +848,7 @@ internal void ShowSystemMenu() { // Find the topmost window. This will handle the case where the HwndSource // is a child window. - IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); + IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, Handle), NativeMethods.GA_ROOT); // Open the system menu. UnsafeNativeMethods.PostMessage(new HandleRef(this, hwndRoot), MS.Internal.Interop.WindowMessage.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), new IntPtr(NativeMethods.VK_SPACE)); @@ -921,18 +909,7 @@ private void RoundDeviceSize(ref Point size) /// /// Returns the hwnd handle to the window. /// - /// - /// Callers must have UIPermission(UIPermissionWindow.AllWindows) to call this API. - /// public IntPtr Handle - { - get - { - return CriticalHandle; - } - } - - internal IntPtr CriticalHandle { get { @@ -954,7 +931,7 @@ internal bool HasCapture { IntPtr capture = SafeNativeMethods.GetCapture(); - return ( capture == CriticalHandle ); + return ( capture == Handle ); } } @@ -1544,11 +1521,11 @@ private void GetNonClientRect(ref NativeMethods.RECT rc) if(_treatAncestorsAsNonClientArea) { - hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); + hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, Handle), NativeMethods.GA_ROOT); } else { - hwndRoot = CriticalHandle; + hwndRoot = Handle; } SafeNativeMethods.GetWindowRect(new HandleRef(this, hwndRoot), ref rc); @@ -2662,7 +2639,7 @@ private bool HasFocus { get { - return UnsafeNativeMethods.GetFocus() == CriticalHandle; + return UnsafeNativeMethods.GetFocus() == Handle; } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceHook.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceHook.cs index 300b9b30aa2..316d930bfa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceHook.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceHook.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Interop { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs index 664648339b7..c23e4b935d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs @@ -2,16 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Input; -using System.Collections; -using MS.Win32; -using System.Windows.Media; -using System.Windows.Threading; - -using SR=MS.Internal.PresentationCore.SR; -using System.Security ; -using MS.Internal.PresentationCore; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs index 91c2c1350fc..fb2aa4183e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs @@ -2,14 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - using MS.Win32; -using System.Windows.Media; using System.Windows.Input; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Interop { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs index 92516bb4d83..939139370c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs @@ -7,16 +7,9 @@ using System.Windows.Input.StylusWisp; using System.Windows.Media; using System.Windows.Threading; -using System.Diagnostics; using MS.Win32; -using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Utility; -using System.Security; - - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs index 800cb572e61..7e0190fada4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs @@ -2,33 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Diagnostics; using System.Windows.Threading; -using System.Reflection; -using System.Threading; -using System.Windows; -using System.Collections.Generic; using System.ComponentModel; using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Automation.Provider; using System.Windows.Automation.Peers; using System.Windows.Media.Composition; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; using MS.Internal; using MS.Internal.Automation; using MS.Internal.Interop; using MS.Utility; using MS.Win32; -using MS.Internal.PresentationCore; // SecurityHelper +using MS.Internal.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; using HRESULT = MS.Internal.HRESULT; using NativeMethodsSetLastError = MS.Internal.WindowsBase.NativeMethodsSetLastError; using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IStylusInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IStylusInputProvider.cs index f813e4edbce..50293bfd67e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IStylusInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IStylusInputProvider.cs @@ -3,19 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationCore; -using MS.Win32.Pointer; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; -using System.Windows.Input.StylusPointer; -using System.Windows.Media; -using System.Windows.Threading; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IWin32Window.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IWin32Window.cs index 3ef4e1b1068..8bd5535e958 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IWin32Window.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/IWin32Window.cs @@ -2,15 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Windows.Threading; -using System.Security; - -using System.Windows.Media; -using System.Runtime.InteropServices; -using MS.Win32; - namespace System.Windows.Interop { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/Imaging.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/Imaging.cs index 83b048c9002..650df332feb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/Imaging.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/Imaging.cs @@ -5,15 +5,8 @@ // // -using System; -using System.Security; using MS.Internal; -using System.Diagnostics; -using System.Windows; using System.Windows.Media.Imaging; -using Microsoft.Win32.SafeHandles; -using MS.Internal.PresentationCore; // SecurityHelper -using System.Windows.Interop; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/OperatingSystemVersionCheck.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/OperatingSystemVersionCheck.cs index bfd9e8e495c..de71baa4697 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/OperatingSystemVersionCheck.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/OperatingSystemVersionCheck.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Interop { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs index 7e5e1747a04..d6e29362957 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs @@ -2,27 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -/***************************************************************************\ -* -* -* Defines a top-level ContextLayoutManager - a layout dirtiness tracking/clearing system. -* -* -\***************************************************************************/ - -using System; using System.Windows.Threading; -using System.Collections; - using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Automation.Peers; - -using MS.Internal; using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LocalizabilityAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LocalizabilityAttribute.cs index af44efedbba..d90ac3cc100 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LocalizabilityAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LocalizabilityAttribute.cs @@ -8,11 +8,10 @@ // Contents: Localizability attributes // -using System; using System.ComponentModel; namespace System.Windows -{ +{ /// /// Specifies the localization preferences for a class or property in Baml /// The attribute can be specified on Class, Property and Method diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IAddChild.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IAddChild.cs index 419ac738eb0..2a37f975d8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IAddChild.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IAddChild.cs @@ -10,12 +10,7 @@ * \***************************************************************************/ -using System.ComponentModel; -using System.Windows.Markup; -using System; -using MS.Internal; - -namespace System.Windows.Markup +namespace System.Windows.Markup { /// /// The IAddChild interface is used for parsing objects that diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IProvidePropertyFallback.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IProvidePropertyFallback.cs index 6f91a947f7a..99c457c6c26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IProvidePropertyFallback.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/IProvidePropertyFallback.cs @@ -3,9 +3,10 @@ // See the LICENSE file in the project root for more information. +using System.Runtime.CompilerServices; + namespace System.Windows.Markup { - using System.Runtime.CompilerServices; /// /// This is an interface that should be implemented by classes that wish to provide /// fallback values for one or more of their properties. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs index 78ddce02144..f4f9153c10f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs @@ -9,7 +9,6 @@ // // -using System; using MS.Internal.PresentationCore; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs index 283a6f3f603..786462186e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs @@ -11,14 +11,10 @@ // // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; -using System.Text; using System.IO; -using System.Windows; using MS.Internal.PresentationCore; namespace System.Windows.Markup @@ -197,7 +193,7 @@ public CultureInfo GetEquivalentCulture() { // Even if we previously failed to find an EquivalentCulture, we retry, if only to // capture inner exception. - _equivalentCulture = SafeSecurityHelper.GetCultureInfoByIetfLanguageTag(lowerCaseTag); + _equivalentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag(lowerCaseTag); } catch (ArgumentException e) { @@ -251,7 +247,7 @@ public CultureInfo GetSpecificCulture() { // note that it's important that we use culture.Name, not culture.IetfLanguageTag, here culture = CultureInfo.CreateSpecificCulture(culture.Name); - _specificCulture = SafeSecurityHelper.GetCultureInfoByIetfLanguageTag(culture.IetfLanguageTag); + _specificCulture = CultureInfo.GetCultureInfoByIetfLanguageTag(culture.IetfLanguageTag); } catch (ArgumentException e) { @@ -272,9 +268,7 @@ internal CultureInfo GetCompatibleCulture() { if (_compatibleCulture == null) { - CultureInfo culture = null; - - if (!TryGetEquivalentCulture(out culture)) + if (!TryGetEquivalentCulture(out CultureInfo culture)) { string languageTag = IetfLanguageTag; @@ -291,7 +285,7 @@ internal CultureInfo GetCompatibleCulture() { try { - culture = SafeSecurityHelper.GetCultureInfoByIetfLanguageTag(languageTag); + culture = CultureInfo.GetCultureInfoByIetfLanguageTag(languageTag); } catch (ArgumentException) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguageConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguageConverter.cs index b2e8ffd25bb..2add288a457 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguageConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguageConverter.cs @@ -9,13 +9,10 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Security; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MeasureData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MeasureData.cs index 227a4afb758..e36dec82346 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MeasureData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MeasureData.cs @@ -10,8 +10,6 @@ // using MS.Internal; -using System; -using System.Windows.Media; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/AncestorChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/AncestorChangedEventArgs.cs index e20706f5741..36e116b7f01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/AncestorChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/AncestorChangedEventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Media { internal class AncestorChangedEventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs index 3fd0a6b1576..36f021cefcd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs @@ -9,15 +9,8 @@ using MS.Internal; using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media.Composition; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationClockResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationClockResource.cs index 0a3dc936063..1035622ef56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationClockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationClockResource.cs @@ -12,12 +12,7 @@ // // -using System; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs index 8f6fd88544a..206aa15a37e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs @@ -5,11 +5,7 @@ // // -using System; using System.Runtime.Serialization; -using System.Windows.Media.Animation; - -using MS.Internal.PresentationCore; // SR namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationLayer.cs index ce8480335b1..fd22165531e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationLayer.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Media.Animation { internal class AnimationLayer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs index c8871d05ccb..5cf683661ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs @@ -5,9 +5,6 @@ using MS.Internal; using MS.Utility; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs index 853767f2532..87d7cd6afcb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationType.cs index 1fa47f7a750..917f4462e4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationType.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -using System; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs index 8ce9b4a0097..8c15840bb31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs @@ -2,25 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - #if DEBUG #define TRACE #endif // DEBUG -using MS.Internal; -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media.Composition; -using System.Windows.Markup; using System.Windows.Threading; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs index b87441cd91f..9397a041c8a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs @@ -2,22 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - using MS.Internal; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Windows.Threading; -using System.Windows; -using System.Windows.Media.Composition; -using System.Windows.Markup; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs index 41647f7fd74..fe9656999f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Diagnostics; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs index 58db0dc2539..24b0da5ff54 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs @@ -4,15 +4,6 @@ // -using MS.Internal; -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/EasingQuaternionKeyFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/EasingQuaternionKeyFrame.cs index b7be49a8a66..e3c206d6c00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/EasingQuaternionKeyFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/EasingQuaternionKeyFrame.cs @@ -5,8 +5,6 @@ // // -using System; -using System.Windows; using MS.Internal.KnownBoxes; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Enums.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Enums.cs index fce4251dc43..dad9ee5e97c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Enums.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Enums.cs @@ -4,10 +4,6 @@ // -using System; -using MS.Internal; -using System.Runtime.InteropServices; - namespace System.Windows.Media.Animation { // IMPORTANT: If you change public Enums, TimeEnumHelper.cs must be updated diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs index de165a745ee..d317f765f21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs @@ -2,32 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. // // This file was generated from the codegen template located at: // wpf\src\Graphics\codegen\mcg\generators\AnimatableTemplate.cs // // Please see MilCodeGen.html for more information. -// // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using MS.Internal; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs index 461bc7cc2a0..4922e7786b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs index 09a49ad2dc4..d70840fc440 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs @@ -2,27 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs index df1e3b009ba..d7c6b5f6b10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs index 68ff1910ea8..db5c57e86b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Byte property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs index fdbbe8c7fbf..b84b982ccc3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs index dee26cc5a32..0a3de5ce990 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs index a8c1dc7e7f9..073a51b3c49 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs index 4bc89a55669..d5fe31183f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs index c61fe7ca88a..d93941bc490 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs index 70b87b20d24..d72b0360043 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs index 524961efb88..176789c2234 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Color property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs index 695e9e319f4..474b7685d5b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs index d032ca7c6f6..0c5c5836a70 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorIndependentAnimationStorage.cs index 3d0334bd3b5..b853496697e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs index 3b8484904c0..88a05ca5e23 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs index 0be10fac957..2dea7bf2d4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Decimal property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs index 7c5faa2387e..1106a696e74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs index 16612840f78..4a40b81e8fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs index 98081ae5304..0fcbe541bec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs index ce9abb32b4a..bc7ffc06789 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs @@ -9,17 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs index d71c9087f0e..80f2edd1534 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Double property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs index e8e2726acaa..921d9edbeda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationClockResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationClockResource.cs index 2653870135b..e610f4c7d98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationClockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationClockResource.cs @@ -9,13 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs index f9e156dcfc7..d20661adbf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleIndependentAnimationStorage.cs index f7670d03e25..7f7adeb679f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs index c9843e4eba2..b480dc459f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs index f3afb56b8ec..5d420b9423e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs @@ -9,13 +9,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs index b1edf1fc8d4..3b21d943d2a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Int16 property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs index 7233a94c4ce..1314523ec42 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs index 18dc3dee42d..008f8e92e46 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs index 308e0dd5210..8ffbc156445 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs index 78dea8d501e..d0bbbe12ceb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Int32 property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs index 02bd7570107..65a39cc0415 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs index 97d605e265a..d12ba49ee20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs index c3803e3e0cb..58612c6991a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs index 0851b78f9ef..5b80fffe4d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Int64 property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs index 7734c1ad218..d3f8892b397 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs index c6c4dbb7955..f2d3d7804b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs index 4bde1db7c26..b80c049a0e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs index 2c020afc257..03a75a4d28d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs @@ -9,17 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs index edee1a9a070..07d26283311 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs @@ -9,13 +9,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs index 63ffd87f530..177d8a52a72 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs index 64c5fdc3bb8..133a001a7c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixIndependentAnimationStorage.cs index 5f2a776bb41..8ca0aaf8a6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs index d87cb356351..08d518b328d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs index 045a2313312..b9382224054 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs index e73a08fa3a8..4496d3ae1bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs index 3fedf09ad3b..2d654789035 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs index 539dbf25c7a..6b11f0cba52 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs @@ -9,36 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Animation { partial class ParallelTimeline : TimelineGroup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs index 92b0a19b962..6c1a56c1c1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs @@ -9,24 +9,14 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Point3D property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs index ae25e67e2d8..17f8d335544 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs @@ -12,21 +12,10 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs index 47bccea44b9..e41b5f4d73b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs @@ -2,28 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - +using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DIndependentAnimationStorage.cs index 389d1c17fd8..6729152cf24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DIndependentAnimationStorage.cs @@ -12,16 +12,8 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs index 95456ec16e0..a6634400605 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs index 2ea9bcc0efc..c3d8f2c08d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Point property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs index 3c5faf3966b..579a505c7e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationClockResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationClockResource.cs index c3ae50448dc..8c096e9773e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationClockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationClockResource.cs @@ -9,13 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs index f9e80d6459b..fd815a37fac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointIndependentAnimationStorage.cs index a98239f01ec..ac8c3671f9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs index 4bedf00e238..4ba83907fd3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs index aa91de1c33f..eefa3abaa0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs @@ -9,24 +9,14 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Quaternion property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs index ee581e46784..ba0714fa19f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs @@ -12,21 +12,10 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs index 8068c18ac4e..23cad6d0ac5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs @@ -2,28 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - +using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionIndependentAnimationStorage.cs index 513ca454828..9be8ab663e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionIndependentAnimationStorage.cs @@ -12,16 +12,8 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs index 63538d29f03..67f6e48eda0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs index 98b9af76ff2..ee341621696 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Rect property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs index 4496a5af4e6..12c153ff0a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationClockResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationClockResource.cs index f78f9ce8935..a835df3694d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationClockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationClockResource.cs @@ -9,13 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs index 77fd98c23eb..77d10daa950 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectIndependentAnimationStorage.cs index 715912da516..c051984cc59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs index 9a303e251bc..21ba329ff33 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs index 27e3bda1be0..bd11cf07cf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs @@ -9,24 +9,14 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Rotation3D property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs index 71be2389605..1c1ee47ed36 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs @@ -12,21 +12,10 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs index 182cc1eb5ce..99880a5948c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs @@ -2,28 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - +using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs index a1de53379e6..b41f5b6d1d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs index 883a6383b3d..cc514870c91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Single property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs index bf553f9f7a2..b2ddfa8e160 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs index f08428afc16..ff06e9aa4d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs index c522ce6a4cb..a5e92cf962d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs index 110ef965bcc..78a2ec56d44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Size property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs index 256a7fc7da6..c3004cb68f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationClockResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationClockResource.cs index 181b9eb7685..ac68ccbe793 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationClockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationClockResource.cs @@ -9,13 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs index c6103be9faa..e308e9fb2a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeIndependentAnimationStorage.cs index dd6020b839f..42f7bd2aa2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeIndependentAnimationStorage.cs @@ -12,16 +12,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs index bd4621602f7..812ba27f76e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs index 9fb4347ab0a..1163587a5ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs @@ -9,13 +9,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs index b0a754f79d0..a325405e94b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs index e48b7d54adf..293b260cbd7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs index 7eb880adb4b..422f7667037 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs index 5de798b8942..b077097253a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs @@ -9,36 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Animation { abstract partial class Timeline : Animatable diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs index 7883663be4e..9319d003c3f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs @@ -2,50 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -//--------------------------------------------------------------------------- -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Animation { /// /// A collection of Timeline objects. /// - - public sealed partial class TimelineCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs index a81c79da680..5adc30167df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs @@ -10,34 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs index e5587b4b419..e5e3bcfd7eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs @@ -9,24 +9,14 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Vector3D property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs index 7edfd80f299..1d7cacaf5d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs @@ -12,21 +12,10 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs index e1a794d73fc..beff2073b49 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs @@ -2,28 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - +using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DIndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DIndependentAnimationStorage.cs index a719b2f8332..0810741c61e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DIndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DIndependentAnimationStorage.cs @@ -12,16 +12,8 @@ // Please see MilCodeGen.html for more information. // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs index 7643ab9111c..35c47fe8753 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs index 3eaaec0cdb7..5cfa056aa65 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs @@ -9,24 +9,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Vector property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs index c4b4543a417..96721c612e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs @@ -12,21 +12,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs index a62ec0450ca..b162cbb08d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=MS.Internal.PresentationCore.SR; - using MS.Internal.PresentationCore; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs index d8f8ebeb0d4..07d0b98d41f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs @@ -9,16 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IAnimation.cs index ddb30026d59..541d078b633 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IAnimation.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IClock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IClock.cs index 9be26bd6c20..2599d57adf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IClock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IClock.cs @@ -4,10 +4,6 @@ // -using System; -using MS.Internal; -using System.Runtime.InteropServices; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentAnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentAnimationStorage.cs index 312af28f1c7..0e0427c8676 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentAnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentAnimationStorage.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media.Composition; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentlyAnimatedPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentlyAnimatedPropertyMetadata.cs index 891db900196..d9f3af2e77c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentlyAnimatedPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/IndependentlyAnimatedPropertyMetadata.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs index e3e0fa64294..5aa4d26399a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs index 4f48bdcc0cd..3cd5d660999 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs @@ -2,21 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 using MS.Internal; -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; using System.Windows.Media.Animation; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs index 52e63ff281c..9adb22b3207 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTimeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTimeConverter.cs index 7b1d87f101d..ae1584cb0fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTimeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTimeConverter.cs @@ -4,13 +4,11 @@ // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; using System.Windows.Media.Animation; -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/LinearQuaternionKeyFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/LinearQuaternionKeyFrame.cs index b3bb204f6b1..4db00a6bb76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/LinearQuaternionKeyFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/LinearQuaternionKeyFrame.cs @@ -5,8 +5,6 @@ // // -using System; -using System.Windows; using MS.Internal.KnownBoxes; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/MatrixAnimationUsingPath.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/MatrixAnimationUsingPath.cs index 359ba58330d..356fca3e164 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/MatrixAnimationUsingPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/MatrixAnimationUsingPath.cs @@ -4,20 +4,6 @@ // -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ParallelTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ParallelTimeline.cs index 04927362bdf..178e623b765 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ParallelTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ParallelTimeline.cs @@ -4,11 +4,6 @@ using MS.Internal; - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.ComponentModel; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/PointAnimationUsingPath.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/PointAnimationUsingPath.cs index c9ebd0942fa..f5c181e82f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/PointAnimationUsingPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/PointAnimationUsingPath.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/QuaternionAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/QuaternionAnimation.cs index 3430a41f8e0..dc62b390fdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/QuaternionAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/QuaternionAnimation.cs @@ -5,8 +5,6 @@ // // -using System; -using System.Windows; using MS.Internal.KnownBoxes; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs index 79b0efc44af..580c21fc9c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs @@ -2,19 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using MS.Internal; - using System.ComponentModel; -using System.Diagnostics; using System.Text; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehaviorConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehaviorConverter.cs index 0588b21887a..1d4ff7625b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehaviorConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehaviorConverter.cs @@ -4,13 +4,10 @@ // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Security; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/SplineQuaternionKeyFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/SplineQuaternionKeyFrame.cs index b0614d52074..a5de85f0d9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/SplineQuaternionKeyFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/SplineQuaternionKeyFrame.cs @@ -5,8 +5,6 @@ // // -using System; -using System.Windows; using MS.Internal.KnownBoxes; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Subtree.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Subtree.cs index c1d948ef54d..797eafbe8bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Subtree.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Subtree.cs @@ -4,11 +4,6 @@ // -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; - namespace System.Windows.Media.Animation { [System.Flags] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeEnumHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeEnumHelper.cs index a7954bc3171..98e7f273565 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeEnumHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeEnumHelper.cs @@ -4,7 +4,6 @@ // -using System; using System.Windows.Media.Animation; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeIntervalCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeIntervalCollection.cs index eb81e10c51c..f8a8365b27a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeIntervalCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeIntervalCollection.cs @@ -87,11 +87,6 @@ #define TRACE #endif // DEBUG -using System; -using System.Collections; -using System.Diagnostics; -using MS.Internal; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs index b99a86e7188..5d6da5e629e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs @@ -2,27 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - #if DEBUG #define TRACE #endif // DEBUG -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using MS.Internal; -using MS.Win32; using MS.Utility; using System.Windows.Threading; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.Runtime.InteropServices; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs index a3370569573..3629831da69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs @@ -2,25 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - #if DEBUG #define TRACE #endif // DEBUG using MS.Internal; -using MS.Utility; -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs index e755d927fc2..820d9079a42 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs @@ -2,14 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// ClockCollection.cs - -using System; -using System.Collections.Generic; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; - #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs index e06e4e7d1a7..731c17c27b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/WeakRefEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/WeakRefEnumerator.cs index 50d630f0d8d..7876fd15e11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/WeakRefEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/WeakRefEnumerator.cs @@ -4,10 +4,6 @@ // -using System; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs index 5847a49da26..523222a1d20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs @@ -9,23 +9,7 @@ // using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Text; -using System.Security; -using System.Text.RegularExpressions; -using System.Windows.Media; -using System.Windows; using System.Windows.Media.Composition; -using System.Windows.Media.Animation; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs index 27d849a1c9e..1c8f8b11e8d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Composition; -using System.Windows.Media.Animation; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs index 49175383b01..0aec82adb5f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// Microsoft Windows Presentation Foudnation -// - -using System.Diagnostics; -using System.Windows; using System.Windows.Threading; using System.Windows.Media.Media3D; using System.Windows.Media.Composition; using System.Windows.Media.Animation; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BoundsDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BoundsDrawingContextWalker.cs index 2f33e2a211b..2d2b0e6aae3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BoundsDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BoundsDrawingContextWalker.cs @@ -12,21 +12,7 @@ // using MS.Internal; -using System; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs index 8fea4548e87..e45cd979781 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs @@ -12,22 +12,10 @@ // using MS.Internal; -using System; -using System.IO; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// Brush - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs index 004a66349e1..292f8eeecef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs @@ -2,30 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This class is used by the StreamGeometry class to generate an inlined, // flattened geometry stream. -// using MS.Utility; using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs index 4cadf785b06..b82a0651305 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System.ComponentModel; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { public abstract partial class CacheMode diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs index 5063d564ddf..ef8a51a4d01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs @@ -8,24 +8,6 @@ // flattened geometry stream. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs index 362d94a3424..af7338394e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs @@ -9,30 +9,11 @@ // that abstracts out channel creation, storage and destruction. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; using MS.Internal; -using MS.Utility; -using MS.Win32; -using Microsoft.Win32.SafeHandles; - -using SR=MS.Internal.PresentationCore.SR; - -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs index 6ad7a1719c7..d4f02f25edf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs @@ -2,19 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: CharacterMetrics -// -// - -using System; using System.Globalization; using StringBuilder = System.Text.StringBuilder; using CompositeFontParser = MS.Internal.FontFace.CompositeFontParser; using Constants = MS.Internal.TextFormatting.Constants; -using SR = MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs index f78b7c47bf6..82306df2896 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: CharacterMetricsDictionary -// -// - -using System; -using SC=System.Collections; -using System.Collections.Generic; - -using SR=MS.Internal.PresentationCore.SR; +using SC = System.Collections; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs index e9f39258468..5322c8b00bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; using System.ComponentModel; -using System.IO; using System.Runtime.InteropServices; using System.Text; -using System.Windows.Media.Imaging; using MS.Internal; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs index 64c2510d28e..1132c55c573 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs @@ -2,32 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; using MS.Internal; -using MS.Internal.PresentationCore; using MS.Win32; using System.IO; using System.Runtime.InteropServices; -using System.Windows.Media; using System.Resources; -using System.Security; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using System.Reflection; -using System.Diagnostics; using System.Globalization; -using Microsoft.Win32.SafeHandles; using System.Net; -using System.IO.Packaging; -using System.Windows.Navigation; -using System.Diagnostics.CodeAnalysis; using System.Text; -using SR = MS.Internal.PresentationCore.SR; using UnsafeNativeMethodsMilCoreApi = MS.Win32.PresentationCore.UnsafeNativeMethods; using IWICCC = MS.Win32.PresentationCore.UnsafeNativeMethods.IWICColorContext; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs index 5eb333a216e..5d5762e92a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs @@ -2,25 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Imaging; using MS.Internal; using MS.Win32; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Diagnostics; -using System.Globalization; using Microsoft.Win32.SafeHandles; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethodsMilCoreApi=MS.Win32.PresentationCore.UnsafeNativeMethods; + +using UnsafeNativeMethodsMilCoreApi = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs index c77c5bd1280..50524110413 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs @@ -2,25 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using MS.Internal; -using System.Windows.Media; -using System.Text; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media -{ +{ /// /// ColorConverter Parses a color. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransform.cs index 42e423e632e..0841f9ec05a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransform.cs @@ -2,30 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using MS.Internal; -using MS.Win32; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Diagnostics; -using System.Globalization; -using Microsoft.Win32.SafeHandles; - -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; - namespace System.Windows.Media { - /// - /// internal class ColorTransform { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs index 76daf1b25f5..07975f176b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs @@ -2,25 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Imaging; using MS.Internal; -using MS.Win32; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Diagnostics; -using System.Globalization; using Microsoft.Win32.SafeHandles; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; + +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs index 35200e1e46f..b8a5a850533 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs @@ -10,25 +10,6 @@ // Created it // -using System; -using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Windows.Media.Composition; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Markup; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Composition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Composition.cs index bf27c38a4d6..9aa79767051 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Composition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Composition.cs @@ -2,24 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// - -using System; -using System.ComponentModel; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Media3D; using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using MS.Internal.PresentationCore; -using MS.Win32; -using System.Diagnostics; -using System.Windows.Media.Composition; -using System.Security; - -using DllImport=MS.Internal.PresentationCore.DllImport; namespace System.Windows.Media.Composition { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs index 88261e5ae6b..7828a62c888 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs @@ -2,35 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// -// - -using System; -using System.Collections; -using System.Diagnostics; -using System.Threading; using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Automation.Provider; using System.Windows.Media.Composition; -using System.Runtime.InteropServices; -using System.Security; using MS.Internal; -using MS.Win32; using MS.Utility; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { - /// - /// - /// public abstract class CompositionTarget : DispatcherObject, IDisposable, ICompositionTarget { // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs index 9aaa8f3f2ac..5589de8a672 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs @@ -6,17 +6,8 @@ // // Created it. -using System; using System.ComponentModel; -using System.Windows.Threading; -using System.Windows.Media; using System.Windows.Media.Effects; -using System.Diagnostics; -using System.Collections; -using MS.Internal; -using System.Resources; -using System.Runtime.InteropServices; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs index 54346b4631e..fed36e95cb6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs index 68ee9822f08..e01460dc2ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs index d600a3668ed..50b15a9c61f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs index 49cfc387aea..e6da570e5a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs index 39003db4bf8..271c0277c41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs index ec04f688ee2..74234ea2374 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs index 304629fac8a..3ea8766ddf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs index a861ca7bf7a..fcf38d59396 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs index 025c1350fb8..9d04079f928 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs @@ -9,32 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs index 0b1786149da..d8edacda33f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs @@ -2,22 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: LanguageSpecificStringDictionary -// -// - -using System; -using System.ComponentModel; // for TypeConverter -using System.Globalization; -using SC=System.Collections; -using System.Collections.Generic; -using System.Windows.Markup; // for XmlLanguage and XmlLanguageConverter - -using MS.Internal.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; +using SC = System.Collections; +using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs index e54abd465cb..231da13e897 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs @@ -8,26 +8,10 @@ // // -using System; -using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; using System.Windows.Media.Animation; -using System.Runtime.InteropServices; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Media +namespace System.Windows.Media { #region DashStyle /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyles.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyles.cs index c7a6b6bfb03..ee29b354374 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyles.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyles.cs @@ -9,10 +9,7 @@ // // -using System; -using System.Windows; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// DashStyles - The DashStyles class is static, and contains properties for well known diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Drawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Drawing.cs index 31ed572245d..ea28f25f080 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Drawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Drawing.cs @@ -7,20 +7,11 @@ // Description: Drawing is the base Drawing class that defines the standard // interface which Drawing's must implement. -using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Resources; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Markup; -using System.Windows.Threading; -namespace System.Windows.Media -{ +namespace System.Windows.Media +{ /// /// Base class for the enumerable and modifiable Drawing subclasses. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingBrush.cs index a55f7ea6db9..d72c9698bac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingBrush.cs @@ -9,18 +9,7 @@ // The DrawingBrush is a TileBrush which defines its tile content // by use of a Drawing. - -using MS.Internal; -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// DrawingBrush - This TileBrush defines its content as a Drawing diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingCollection.cs index 5171f3b5afa..3ee27a741bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingCollection.cs @@ -9,9 +9,7 @@ // using System.Collections; -using System.Collections.Generic; using System.Windows.Media.Animation; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContext.cs index 00222d7100f..c8d6bbd4d8d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContext.cs @@ -5,15 +5,8 @@ // // -using System; -using System.Windows; using System.Windows.Threading; - -using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Diagnostics; using MS.Internal; -using System.Runtime.InteropServices; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextDrawingContextWalker.cs index 25f58c8f0dc..ddd517f461f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextDrawingContextWalker.cs @@ -8,16 +8,6 @@ // that forwards all of it's calls to a DrawingContext. // -using MS.Internal; -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextWalker.cs index 0a50bae750f..4e1718c3115 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingContextWalker.cs @@ -7,18 +7,6 @@ // Description: Contains base class for DrawingContext iterators // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; - -using MS.Internal; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs index 64a83bef677..3fbb67463dc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs @@ -2,27 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -// -// -// Description: Creates a Drawing representation of the Draw calls made -// to this DrawingContext. -// - using MS.Internal; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Threading; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs index c7bffe1d7c7..9d7a524a718 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs @@ -2,40 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: DrawingGroup represents a collection of Drawing objects, and -// can apply group-operations such as clip and opacity to it's -// collections -// - -using System; -using System.Windows.Threading; - -using MS.Win32; -using System.Security; using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Effects; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using MS.Internal.Media; -using System.Resources; -using MS.Utility; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; -using System.ComponentModel.Design.Serialization; -using System.ComponentModel; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media -{ +{ /// /// DrawingGroup represents a collection of Drawing objects, and /// can apply group-operations such as clip and opacity to it's diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroupDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroupDrawingContext.cs index 4456d7e04eb..41274d7eb1e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroupDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroupDrawingContext.cs @@ -7,8 +7,6 @@ // Description: DrawingGroupDrawingContext populates a DrawingGroup // from Draw commands that are called on it. // -using System.Diagnostics; - namespace System.Windows.Media { internal class DrawingGroupDrawingContext : DrawingDrawingContext diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingImage.cs index 0ea9462fd8c..2bbb381ef01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingImage.cs @@ -11,17 +11,6 @@ // // -using MS.Internal; -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingServices.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingServices.cs index 271a63677f2..f75633318da 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingServices.cs @@ -8,9 +8,6 @@ // and hit-testing. // -using System.Diagnostics; -using System.Windows.Media.Animation; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisual.cs index 55f852ed808..6fee311c133 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisual.cs @@ -4,17 +4,7 @@ // -using System; -using System.Windows.Threading; - -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Collections.Generic; -using MS.Internal; -using MS.Win32; -using System.Resources; -using System.Runtime.InteropServices; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisualDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisualDrawingContext.cs index 68782404e86..b443cb49336 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisualDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingVisualDrawingContext.cs @@ -2,18 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - -using System; -using System.Windows; -using System.Windows.Threading; - -using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.Diagnostics; -using MS.Internal; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BevelBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BevelBitmapEffect.cs index b8caf9e3b3a..670bc958f17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BevelBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BevelBitmapEffect.cs @@ -4,21 +4,7 @@ // -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal.PresentationCore; -using System.Security; namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs index fb01826a6f6..c0901b36b41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; using System.Threading; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Imaging; -using System.Security; -using MS.Internal.PresentationCore; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs index 8efb40011b9..745b5b1ddf1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs @@ -4,25 +4,8 @@ // -using System; -using System.Windows; -using System.Windows.Media; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; using System.Runtime.InteropServices; using System.Windows.Markup; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInput.cs index c375716d102..73a0de15f7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInput.cs @@ -4,21 +4,8 @@ // -using MS.Internal; -using System; -using System.IO; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Imaging; -using System.Collections.Generic; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInputData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInputData.cs index e955caabe97..3669f9aa936 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInputData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectInputData.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Media.Effects { internal struct BitmapEffectInputData diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs index 60c77e78305..b8a8c6cd7c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs @@ -10,28 +10,8 @@ // // -using System; -using System.Windows.Threading; - -using MS.Win32; -using System.Security; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Resources; -using MS.Utility; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; - -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Effects -{ +{ /// /// This class is used to store the user provided bitmap effect data on Visual. /// It is necessary to implement the emulation layer for some legacy effects on top diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurBitmapEffect.cs index a2874528f15..ef55700d7c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurBitmapEffect.cs @@ -4,21 +4,7 @@ // -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal.PresentationCore; -using System.Security; namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurEffect.cs index 36fbd222ed6..e0ca60eebcf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BlurEffect.cs @@ -4,11 +4,6 @@ // -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Media.Effects { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowBitmapEffect.cs index ebfc2cab7a8..c0e1d0becf1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowBitmapEffect.cs @@ -6,12 +6,7 @@ #region Using directives -using System; -using System.Collections.Generic; -using System.Text; using System.Runtime.InteropServices; -using System.Security; -using SecurityHelper=MS.Internal.SecurityHelper; #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowEffect.cs index e8448c8ebe2..cd279f42919 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/DropShadowEffect.cs @@ -4,11 +4,6 @@ // -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Media.Effects { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Effect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Effect.cs index 0c04245adc0..cb6fcd7af3c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Effect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Effect.cs @@ -4,13 +4,6 @@ // -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; -using System.Security; -using SecurityHelper=MS.Internal.SecurityHelper; - namespace System.Windows.Media.Effects { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs index 91f1018f278..d110bc82d47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs @@ -9,35 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Effects { sealed partial class BevelBitmapEffect : BitmapEffect diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs index 0bec745ff01..ad943ca5116 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs @@ -9,34 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs index 9d122483dfb..26111e76b82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs @@ -2,41 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs index 0e3ca64909e..3aa93766e44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs @@ -10,33 +10,7 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs index 9476a977314..550a94c9092 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs @@ -9,34 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs index f716733f476..f2502ae80c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs @@ -9,35 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Effects { sealed partial class BlurBitmapEffect : BitmapEffect diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs index 0afc677fb01..6376044a486 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs @@ -9,34 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR = MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs index e538857fba2..2d7378af99a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs @@ -9,35 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Effects { sealed partial class DropShadowBitmapEffect : BitmapEffect diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs index f54d6cb7dfe..00c4d22f50e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs @@ -9,34 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs index d681837d868..96d6742bb41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs @@ -10,7 +10,6 @@ // #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs index 3e3c26dbd76..a8e93adb0b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs @@ -9,34 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs index 8f16410a529..dc7496c1345 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs @@ -9,35 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Effects { sealed partial class EmbossBitmapEffect : BitmapEffect diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs index cce31af46d1..6d913cf6c85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs @@ -9,34 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs index e35ee734aa5..eb71edede05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs @@ -10,7 +10,6 @@ // #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs index d8d65c4fefa..503b7b23a99 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs @@ -9,35 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Effects { sealed partial class OuterGlowBitmapEffect : BitmapEffect diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs index 4dfed16d554..952bf19293c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs @@ -9,34 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs index d752cf3e926..54304eb15e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs @@ -10,7 +10,6 @@ // #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs index 9ab27b0e199..6e403a6157d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs @@ -9,34 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.KnownBoxes; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs index cfb507eaf8b..4aaa0cfcc58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs @@ -10,7 +10,6 @@ // #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ImplicitInputBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ImplicitInputBrush.cs index 9bde60e7c19..14e75913353 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ImplicitInputBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ImplicitInputBrush.cs @@ -5,9 +5,6 @@ // Microsoft Windows Presentation Foundation // - -using System.Windows.Media; - namespace System.Windows.Media.Effects { internal partial class ImplicitInputBrush : Brush diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/OuterGlowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/OuterGlowBitmapEffect.cs index 2f4af4b6457..371ef039e22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/OuterGlowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/OuterGlowBitmapEffect.cs @@ -4,21 +4,7 @@ // -using MS.Internal; -using System; -using System.IO; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal.PresentationCore; -using System.Security; namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs index ff2ef91c9e8..e8160d96afe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs @@ -2,33 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// Microsoft Windows Presentation Foundation -// - -using System; using System.IO; using MS.Internal; -using MS.Win32.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Globalization; -using System.Security; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; -using System.Runtime.InteropServices; -using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; using System.Windows.Navigation; -using System.IO.Packaging; -using MS.Internal.PresentationCore; - -using PackUriHelper = System.IO.Packaging.PackUriHelper; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs index 1dcf4305f3a..9aa10b75c8a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// Microsoft Windows Presentation Foundation -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; -using System.IO; -using System.Windows.Markup; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; -using System.Security; -using System.Runtime.InteropServices; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/embossbitmapeffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/embossbitmapeffect.cs index 4b2824b6430..c3f6cb94b6a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/embossbitmapeffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/embossbitmapeffect.cs @@ -6,12 +6,7 @@ #region Using directives -using System; -using System.Collections.Generic; -using System.Text; using System.Runtime.InteropServices; -using System.Security; -using SecurityHelper=MS.Internal.SecurityHelper; #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs index b67934e4b30..9fdb8c26ba5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs @@ -2,27 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Media + +namespace System.Windows.Media { /// /// This is the Geometry class for Circles and Ellipses diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EventProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EventProxy.cs index f4954c849a9..1211eea8a75 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EventProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EventProxy.cs @@ -5,16 +5,9 @@ // #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System.Windows.Media; -using System; using MS.Internal; using MS.Win32; -using System.Reflection; -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs index 55eb5e861b7..547656c256b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs @@ -5,15 +5,8 @@ // // -using System; -using System.Security; -using System.Diagnostics; using MS.Internal; -using MS.Win32; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs index 0111f3f1250..8c29cb09bc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs @@ -2,28 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// -// Contents: FontFamilyMap implementation -// -// Spec: Fonts.htm -// -// - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; using System.Globalization; -using System.ComponentModel; using System.Windows.Markup; using MS.Internal.FontFace; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs index bb2587d7fbb..aab1cc8ac4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs @@ -2,21 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: FontFamilyMapCollection -// -// - -using System; -using System.Globalization; -using SC=System.Collections; -using System.Collections.Generic; +using SC = System.Collections; using MS.Internal.FontFace; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs index 7e07194e43e..77830d916d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs @@ -2,25 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// -// Contents: FamilyTypeface implementation -// -// Spec: Fonts.htm -// -// - -using System; -using System.Collections.Generic; -using System.Globalization; using System.ComponentModel; -using System.Windows.Markup; // for XmlLanguage +using System.Windows.Markup; using MS.Internal.FontFace; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs index cc1ef3e7b4f..a243886cafa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs @@ -2,20 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: FamilyTypefaceCollection -// -// - -using System; -using System.Globalization; -using SC=System.Collections; -using System.Collections.Generic; -using MS.Internal.FontFace; - -using SR=MS.Internal.PresentationCore.SR; +using SC = System.Collections; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs index e032921f88a..4e713b04b2f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs @@ -2,32 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: The FontEmbeddingManager class handles physical and composite font embedding. -// -// See spec at http://avalon/text/DesignDocsAndSpecs/Font%20embedding%20APIs.htm -// -// -// - -using System; -using System.Text; -using System.IO; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; - -using MS.Internal.FontCache; -using MS.Internal.FontFace; -using MS.Internal.Shaping; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs index 230333e0c78..c004756c111 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs @@ -2,32 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: FontFamily -// - -using System; -using System.Text; using System.IO; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Markup; // for XmlLanguage +using System.Windows.Markup; using System.ComponentModel; -using System.ComponentModel.Design; - -using MS.Utility; using MS.Internal; using MS.Internal.FontCache; using MS.Internal.FontFace; using MS.Internal.Shaping; -using System.Security; - -using SR = MS.Internal.PresentationCore.SR; // Since we disable PreSharp warnings in this file, we first need to disable warnings about unknown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs index f77df1a829b..1ce12089f7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs @@ -2,26 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// -// Contents: FontFamilyConverter implementation -// -// Spec: Fonts.htm -// -// - -using System; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Windows.Navigation; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyValueSerializer.cs index 9c25984d951..34e64386ef6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyValueSerializer.cs @@ -10,8 +10,6 @@ // // -using System.ComponentModel; -using System.Globalization; using System.Windows.Markup; // Allow suppression of presharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs index fd96c1b4477..2950802b853 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs @@ -10,21 +10,8 @@ // // -using System; -using System.Text; -using System.IO; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; - -using MS.Internal; using MS.Internal.FontCache; -using MS.Internal.FontFace; using MS.Internal.PresentationCore; -using MS.Internal.Shaping; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs index 3bb8ea768d0..53ae8f0a493 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: Implementation of FormattedText class. The FormattedText class is targeted at programmers -// needing to add some simple text to a MIL visual. -// -// - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Runtime.InteropServices; using MS.Internal; using MS.Internal.TextFormatting; -using MS.Internal.FontFace; - -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 //Allow suppression of Presharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs index 3fa8cbf302c..1842021b0a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs @@ -8,20 +8,7 @@ // Description: Declaration of the GeneralTransform class. // -using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; using MS.Internal.PresentationCore; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs index f173e2e716c..588f29975a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs @@ -4,24 +4,7 @@ // -using System; -using System.Windows; -using System.Windows.Media; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; using System.Windows.Markup; -using System.Windows.Media.Composition; -using System.Diagnostics; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs index 1bb9e573c31..c519cd4d5cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs index 6d7a2fd9d56..72d67271ff8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs index f78ef97d915..1dfaab1baf1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs index 6fb2d145d20..21c9db73285 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs @@ -9,37 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media { sealed partial class BezierSegment : PathSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs index 3097f36b190..519491fe957 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs index 625843e94dd..6745d75cea1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs index 1973965165a..1cd6b1f0418 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs index 3cf3c162dfb..dbd7388f2d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs @@ -9,36 +9,12 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs index c1c8467686c..e9765eb54c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs @@ -2,39 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// - -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs index cdd3d6ffb84..4591a4a4b7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs index 3fa6d05b681..2a8cbe94169 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs @@ -9,36 +9,12 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs index b3ab8d62994..e4c0b4944fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs @@ -2,39 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// - -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs index 67c899e0190..bba1222a30f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs index 38133b41768..f466bf0924a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs index d8810c5ca7b..9dd201cbb5d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs index 79962674e84..7dc8cedc0cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs index a76d44b34e9..264f663b824 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs @@ -10,35 +10,9 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs index eb789bb0e41..00ed4afa61d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs @@ -2,43 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs index 4ad0eb6f65b..75b2fe1862a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs index b0c2d6c582c..65d4e74c9de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs index f0ce48262e7..6561a9dd068 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs index 32096ea4bb8..f12ce84e5ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs @@ -2,51 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of Drawing objects. /// - - public sealed partial class DrawingCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs index 17eae6ba493..471b3e3e915 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs @@ -9,23 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs index 72ff841c658..a62064faaaf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs @@ -9,23 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs index 2ad288dbbda..ea4e7e9d25f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs @@ -9,23 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs index a881e9fc157..cc25b3c9732 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs @@ -10,35 +10,9 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs index ec3363200fc..b09ba4d25c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs index 493b8834e1d..fa91b74de25 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs index 9c0e5fc8ffe..786c53c9599 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs index 273d7b91507..71b724154a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs index d45f59b286e..7a30ebcacd5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs index 89e1716ea2d..336f0f859a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs @@ -2,51 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of GeneralTransform objects. /// - - public sealed partial class GeneralTransformCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs index f63a82dd16a..edfb98ab2a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs @@ -10,35 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs index 80ca94c2980..e35cdd8b4f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs @@ -9,36 +9,12 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs index 64708d0427c..af893d344e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs @@ -2,51 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of Geometry objects. /// - - public sealed partial class GeometryCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs index a7a78063a06..e8951fc9b77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs index 8a7584b5605..aa0b0db874e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs @@ -2,39 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// - -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs index 03424309e09..5812bc773c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs index d592fcd7e61..632bf429e87 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs @@ -11,34 +11,8 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs index 6a4d940074b..1cc67f37582 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs index 6fc5c45aa92..c5c9d81ff58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs @@ -10,35 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs index b444c96ebdd..1843b2671af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs index bcbe31dd325..6195cd8de1e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs index d8f512eb3dc..01c608eebc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs @@ -2,51 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of GradientStop objects. /// - - public sealed partial class GradientStopCollection : Animatable, IFormattable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs index 3b37beb7301..dc904a6b93f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs @@ -11,34 +11,9 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs index 59648556177..4ba293fdd6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs index 281871c998e..8f7fa3a4eab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs index de5238ee81b..9888a541ba7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs index 1e15aaab176..821c02279f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs @@ -2,50 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of ints. /// - [TypeConverter(typeof(Int32CollectionConverter))] [ValueSerializer(typeof(Int32CollectionValueSerializer))] // Used by MarkupWriter public sealed partial class Int32Collection : Freezable, IFormattable, IList, IList diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs index a9974bf4ecc..dc6986cf5b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs index 040d5f81cc2..155d4b14adf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs index ea9289c4169..c06ceb8fd1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs @@ -9,37 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media { sealed partial class LineSegment : PathSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs index 9484c774ab0..c3cd0391d73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs index 8285ee224b1..8f8137b8590 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs index b44d8ad9037..599742a39c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs index 23609974f23..89527ccfcaa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs @@ -11,34 +11,8 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs index 0ef8e4e1ad4..60698998a3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs @@ -2,50 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of PathFigure objects. /// - [TypeConverter(typeof(PathFigureCollectionConverter))] [ValueSerializer(typeof(PathFigureCollectionValueSerializer))] // Used by MarkupWriter public sealed partial class PathFigureCollection : Animatable, IFormattable, IList, IList diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs index 015265d17bd..a769fb7474c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs @@ -2,39 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// - -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs index 7641e462546..d5372443158 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs @@ -11,34 +11,8 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs index 9f5cff69920..e5aaebeb006 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs index 138f07ab41e..957af0692bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs @@ -2,51 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of PathSegment objects. /// - - public sealed partial class PathSegmentCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs index 9ef339b0029..84c5b4773ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenDashCap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenDashCap.cs index 0c2705b16a2..88a9f2351d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenDashCap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenDashCap.cs @@ -7,10 +7,6 @@ // This file was generated, please do not edit it directly. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs index 36d3a538979..e9a5a48d2e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs index da35ca5d8bd..438c931f600 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs index 15e59695543..83db4df2921 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs @@ -2,50 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of Points. /// - [TypeConverter(typeof(PointCollectionConverter))] [ValueSerializer(typeof(PointCollectionValueSerializer))] // Used by MarkupWriter public sealed partial class PointCollection : Freezable, IFormattable, IList, IList diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs index b223b0b7216..84f71936210 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs index 727cb200ade..cc842a8a290 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs @@ -10,35 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs index cb2fda2d31a..cb7fca1ec41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs @@ -12,21 +12,6 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.ComponentModel.Design.Serialization; -using System.Windows.Media.Composition; -using System.Reflection; -using MS.Internal; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { #region PolyBezierSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs index a69b28b3269..8d0cefe51fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs @@ -10,35 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs index e890d439016..6f6d9872a15 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs @@ -12,21 +12,6 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.ComponentModel.Design.Serialization; -using System.Windows.Media.Composition; -using System.Reflection; -using MS.Internal; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { #region PolyLineSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs index 2e4ac382a52..dee7ba0d893 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs @@ -10,35 +10,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs index d808408efd0..1fb2d7e2cb5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs @@ -12,21 +12,6 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.ComponentModel.Design.Serialization; -using System.Windows.Media.Composition; -using System.Reflection; -using MS.Internal; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { #region PolyQuadraticBezierSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs index a2d58d593e9..c7d0f93a7fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs @@ -9,37 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media { sealed partial class QuadraticBezierSegment : PathSegment diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs index 7fac94096a4..69e8d9d0299 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs index 612bb4e35fa..6809766e4af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs index 16cf4d67b0e..76b770f447e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs @@ -9,23 +9,10 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs index 53f082da0de..35b76963d00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs @@ -2,30 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs index 17b89b0bf11..14f63615e06 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs index ee17ea0774a..2a21a069d40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs index 4ac5d17741a..555e6eb0a43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs index b90e90c1a2d..1c92424ebe1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs index b5f774453e3..6a87a4d602c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs index d660147fce1..afc2d791928 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs index bbacfe349d6..04bd9f23bed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs index daaafbca4da..6371dc7249e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs index 0f64e4ece3e..2f8e648666c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs index 9c3252de274..1c7bebe1334 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs @@ -2,51 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of TextEffect objects. /// - - public sealed partial class TextEffectCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs index f8925f1ec0f..f8c353742cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs index 4276fea5358..05ea684665b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs index 5cb0e4d1a55..506203a1dae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs @@ -9,37 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media { abstract partial class TileBrush : Brush diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs index 817b8bd2b0e..9998a15129d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs index da4b3a4712c..f7090c5d55a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs @@ -9,12 +9,7 @@ // Please see MilCodeGen.html for more information. // -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs index 4338eb7dc38..19bec01e268 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs @@ -9,36 +9,11 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs index 83072f655d4..615f1af218a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs @@ -2,51 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.KnownBoxes; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of Transform objects. /// - - public sealed partial class TransformCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs index 1db7c545e7b..637e07a7dad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs @@ -2,39 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// - -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs index 5bd76397aa5..c532ff43c0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs @@ -10,35 +10,8 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs index c970a29a282..158b486f4f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs index 95fc56bfcba..58d183f8cd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs @@ -2,50 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { /// /// A collection of Vectors. /// - [TypeConverter(typeof(VectorCollectionConverter))] [ValueSerializer(typeof(VectorCollectionValueSerializer))] // Used by MarkupWriter public sealed partial class VectorCollection : Freezable, IFormattable, IList, IList diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs index 4277cbee238..7913810b30e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs index 79a7ac5027a..9d359fe3579 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs @@ -9,36 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs index 1491a2e28fd..8129e403d0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs @@ -9,36 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Effects; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Media.Converters; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs index 53051b902a6..1a1e8ad9597 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs @@ -8,26 +8,14 @@ // // -using System; using MS.Internal; using MS.Win32.PresentationCore; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Globalization; -using System.Security; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; using System.Windows.Media.Animation; using System.Runtime.InteropServices; -using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; -namespace System.Windows.Media +namespace System.Windows.Media { #region Geometry /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryCollection.cs index 0bb318cebd1..878a7d3086c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryCollection.cs @@ -7,23 +7,8 @@ // Description: Implementation of GeometryCollection // -using System; -using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Windows.Media.Composition; -using System.Text.RegularExpressions; using System.Windows.Media.Animation; -using System.Windows.Markup; -using System.Runtime.InteropServices; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryDrawing.cs index c5b5f10c67d..8f0ec191f65 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryDrawing.cs @@ -9,8 +9,6 @@ // content. // -using System.Diagnostics; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs index a186e2c4fd6..0f3d1c4d058 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs @@ -7,24 +7,7 @@ // Description: Implementation of GeometryGroup // -using System; -using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Windows.Media.Composition; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; using System.Windows.Markup; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestParameters.cs index c3fe89417e6..688bf4b273f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestParameters.cs @@ -4,17 +4,9 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; -using System.Security; - -using System.Collections; -using System.Diagnostics; using MS.Internal; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This is the class for specifying parameters hit testing with a geometry. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestResult.cs index 6b11c27d671..59d1ee4ded9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryHitTestResult.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This class returns the point and visual hit during a hit test pass. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs index f953acf4dc7..07bd1f1015c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs @@ -17,29 +17,16 @@ // Enable presharp pragma warning suppress directives. #pragma warning disable 1634, 1691 -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Text; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Converters; using System.Windows.Media.Composition; using System.Windows.Media.TextFormatting; using System.Windows.Markup; -using System.Runtime.InteropServices; using MS.Internal; using MS.Internal.FontCache; -using MS.Internal.FontFace; using MS.Internal.TextFormatting; using MS.Internal.Text.TextInterface; -using MS.Utility; -using System.Security; -using System.Windows.Interop; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRunDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRunDrawing.cs index 1dfae3fa367..4861cc92e38 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRunDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRunDrawing.cs @@ -8,8 +8,6 @@ // a GlyphRun. // -using System.Diagnostics; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs index 7275f7c7214..47298399015 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs @@ -8,18 +8,11 @@ // Description: GlyphTypeface implementation // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Runtime.InteropServices; -using System.Security; - -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.TextFormatting; using System.Windows.Markup; @@ -29,7 +22,7 @@ using MS.Internal.FontCache; using MS.Internal.FontFace; using MS.Internal.PresentationCore; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media @@ -104,8 +97,7 @@ internal GlyphTypeface(MS.Internal.Text.TextInterface.Font font) Uri typefaceSource = new Uri(uriPath); _fontFace = new FontFaceLayoutInfo(font); - // We skip permission demands for FontSource because the above line already demands them for the right callers. - _fontSource = new FontSource(typefaceSource, true); + _fontSource = new FontSource(typefaceSource); Invariant.Assert( styleSimulations == StyleSimulations.None || styleSimulations == StyleSimulations.ItalicSimulation @@ -158,8 +150,7 @@ private void Initialize(Uri typefaceSource, StyleSimulations styleSimulations) _fontFace = new FontFaceLayoutInfo(_font); - // We skip permission demands for FontSource because the above line already demands them for the right callers. - _fontSource = new FontSource(fontSourceUri, true); + _fontSource = new FontSource(fontSourceUri); _initializationState = InitializationState.IsInitialized; // fully initialized diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphsSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphsSerializer.cs index a16b65b982d..72b4622cceb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphsSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphsSerializer.cs @@ -5,24 +5,8 @@ // // -using System; -using System.Windows.Threading; -using System.Diagnostics; -using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; using System.Globalization; using System.Text; -using System.IO; -using System.Runtime.InteropServices; - -using MS.Internal; -using MS.Win32; -using Microsoft.Win32.SafeHandles; - -using System.Windows; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientBrush.cs index 78998c75592..b304dcb1299 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientBrush.cs @@ -11,19 +11,10 @@ // ways of interpreting gradient stops. // // - -using System; -using System.Diagnostics; -using System.ComponentModel; -using System.Windows; + using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using MS.Internal; -using System.Runtime.InteropServices; -using System.Windows.Media.Composition; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// GradientBrush diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientStop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientStop.cs index d87578cb306..9444318a926 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientStop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GradientStop.cs @@ -11,19 +11,9 @@ // // -using MS.Internal; -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// GradientStop - The gradient stop is a tuple consisting of an offset and a color. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GuidelineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GuidelineCollection.cs index abde802c578..31b407ac04b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GuidelineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GuidelineCollection.cs @@ -9,16 +9,8 @@ // used in rendering for better adjusting rendered figures to device pixel grid. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestDrawingContextWalker.cs index 5179a29159a..05a86e6f366 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestDrawingContextWalker.cs @@ -10,20 +10,6 @@ // // -using MS.Internal; -using System; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestFilterBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestFilterBehavior.cs index 0e9b9dbf12c..7dd6b62743e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestFilterBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestFilterBehavior.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// Behavior for filtering visuals while hit tesitng diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestParameters.cs index cf1b609d19e..08d297feb05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestParameters.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This is the base class for packing together parameters for a hit test pass. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResult.cs index d627cd88784..058ff2c7db5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResult.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This base returns the visual that was hit during a hit test pass. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResultBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResultBehavior.cs index 5b1bdda3465..ed4960884c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResultBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestResultBehavior.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// Enum controls behavior when a positive hit occurs during hit testing. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithGeometryDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithGeometryDrawingContextWalker.cs index 0097ebc845a..681dac8ba77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithGeometryDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithGeometryDrawingContextWalker.cs @@ -10,20 +10,7 @@ // // -using MS.Internal; -using System; -using System.ComponentModel; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithPointDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithPointDrawingContextWalker.cs index 884e61bc1ef..474e0edfcb0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithPointDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HitTestWithPointDrawingContextWalker.cs @@ -10,19 +10,7 @@ // // -using MS.Internal; -using System; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs index 283e33b893e..c092bb8c479 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs @@ -2,29 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// Host visual. -// +using System.Windows.Threading; +using System.Windows.Media.Composition; +using System.Collections; +using System.Threading; namespace System.Windows.Media { - using System; - using System.Windows.Threading; - using System.Windows.Media; - using System.Windows.Media.Composition; - using System.Diagnostics; - using System.Collections; - using System.Collections.Generic; - using MS.Internal; - using System.Resources; - using System.Runtime.InteropServices; - using MS.Win32; - using System.Threading; - - using SR=MS.Internal.PresentationCore.SR; - /// /// Host visual. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICompositionTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICompositionTarget.cs index 561e13c6052..d11a6354c22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICompositionTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICompositionTarget.cs @@ -9,8 +9,6 @@ // composition targets with the MediaContext. // -using System; -using System.Diagnostics; using System.Windows.Media.Composition; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICyclicBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICyclicBrush.cs index 6cade145c76..3e05821889e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICyclicBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ICyclicBrush.cs @@ -9,8 +9,6 @@ // objects whose content can point back into the Visual tree. // -using System; -using System.Windows.Media; using System.Windows.Media.Composition; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IDrawingContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IDrawingContent.cs index d36da24fb59..eccbd39ede7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IDrawingContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IDrawingContent.cs @@ -10,10 +10,9 @@ // or DrawingGroups. // -using System.Windows.Media; using System.Windows.Media.Composition; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// IDrawingContent defines a common interface for representations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IFreezeFreezables.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IFreezeFreezables.cs index fa55d0d04a3..508d70f6e63 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IFreezeFreezables.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IFreezeFreezables.cs @@ -5,8 +5,6 @@ // // -using System.Windows; - namespace System.Windows.Media { internal interface IFreezeFreezables diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs index f9afb879802..2a7e979991a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs @@ -9,22 +9,6 @@ // by use of an ImageSource. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageDrawing.cs index 6c4c5335dbd..672ead7497b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageDrawing.cs @@ -8,11 +8,6 @@ // an image into a destination rectangle. // - -using System.Diagnostics; -using System.Windows.Media.Imaging; -using MS.Internal; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageMetadata.cs index eb9d15e08bd..a8900f26753 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageMetadata.cs @@ -5,25 +5,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; -using System.Windows.Threading; -using System.Text; -using MS.Internal.PresentationCore; // SecurityHelper - namespace System.Windows.Media { #region ImageMetadata diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSource.cs index 443a7fe74da..7057e067f05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSource.cs @@ -5,21 +5,10 @@ // // -using System; -using System.Collections; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; using System.Windows.Markup; -using MS.Win32; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs index 5a8a8ae74cd..49d540e56bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs @@ -2,25 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; using System.IO; -using System.Security; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; using System.Globalization; using System.Runtime.InteropServices; using System.Windows.Markup; -using MMCF = System.IO.Packaging; -using SR=MS.Internal.PresentationCore.SR; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -316,5 +303,3 @@ private struct OBJECTHEADER { #endregion // ImageSourceConverter } - - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceValueSerializer.cs index 1d14d980a16..924dbfe1846 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceValueSerializer.cs @@ -10,11 +10,6 @@ // #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Text; - using System.Windows.Markup; using System.Windows.Media.Imaging; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCacheOption.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCacheOption.cs index 30589f7fa89..09c0b68786d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCacheOption.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCacheOption.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Media.Imaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfo.cs index be666732c2a..2da17eb0970 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfo.cs @@ -5,23 +5,9 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; using System.Text; -using MS.Internal.PresentationCore; // SecurityHelper namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfoInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfoInternal.cs index 4896aea8ed6..9caa603f3bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfoInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCodecInfoInternal.cs @@ -5,22 +5,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using MS.Win32; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.IO; -using System.Windows.Media.Imaging; -using System.Text; - namespace System.Windows.Media.Imaging { #region BitmapCodecInfoInternal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCreateOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCreateOptions.cs index 966fd9977f6..347166a9ee1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCreateOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapCreateOptions.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Media.Imaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs index 3317723d168..ca0edcb0cfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs @@ -2,34 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; using System.IO; using System.IO.Packaging; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using System.Collections.ObjectModel; -using System.Reflection; -using System.Security; -using System.Text.RegularExpressions; using MS.Internal; -using MS.Internal.AppModel; using MS.Win32.PresentationCore; using Microsoft.Win32.SafeHandles; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Threading; using System.Windows.Threading; -using System.Windows.Media.Imaging; -using MS.Internal.PresentationCore; // SecurityHelper -using SR=MS.Internal.PresentationCore.SR; +using MS.Internal.PresentationCore; using System.Net; using System.Net.Cache; using System.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs index dc2a668f3d2..e2aadb1d9a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs @@ -2,32 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; using System.IO; -using System.Collections.Generic; using System.Collections; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using System.Threading; using System.Windows.Threading; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using MS.Win32.PresentationCore; -using MS.Internal.AppModel; -using MS.Internal.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; using System.Net; using System.Net.Cache; using System.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs index 4a0fc5fdd47..ebfb262c206 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs @@ -2,27 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.IO; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Threading; -using System.Globalization; using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; -using System.Security; using MS.Win32.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; -using System.Diagnostics.CodeAnalysis; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs index ebc18b3755b..fb9b679fdfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs @@ -2,29 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using MS.Win32; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; using System.Windows.Markup; using System.Net.Cache; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameDecode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameDecode.cs index d4288874e1d..1527655d7a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameDecode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameDecode.cs @@ -5,23 +5,8 @@ // // -using System; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using MS.Internal.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using MS.Win32.PresentationCore; #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameEncode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameEncode.cs index d8d5a630ad3..0eb490b9448 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameEncode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrameEncode.cs @@ -5,22 +5,7 @@ // // -using System; -using System.Collections; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using MS.Win32; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs index f3ad8e798f3..0fc131879ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs @@ -2,28 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Internal.PresentationCore; -using MS.Win32; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using SR=MS.Internal.PresentationCore.SR; using System.Windows.Markup; using System.Net.Cache; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs index 085bc4fe3d2..03e1dbb29ec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs @@ -2,27 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using MS.Win32; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs index 752e50f4050..ae8f0353562 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs @@ -5,23 +5,12 @@ // // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; -using System.Windows.Threading; using System.Text; using MS.Internal.PresentationCore; // SecurityHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataBlob.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataBlob.cs index 24c02140e69..de0e03f2773 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataBlob.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataBlob.cs @@ -5,25 +5,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; -using System.Windows.Threading; -using System.Text; -using MS.Internal.PresentationCore; // SecurityHelper - namespace System.Windows.Media.Imaging { #region BitmapMetadataBlob diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs index b2780bec519..345fb4831ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs @@ -2,23 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using System; using System.Collections; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Security; -using System.Diagnostics; using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper using MS.Win32.PresentationCore; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Imaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs index 1f051c4851f..b4e2659a081 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs @@ -2,28 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using MS.Internal.PresentationCore; //SecurityHelper -using System.Diagnostics; using System.Windows.Threading; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Globalization; using System.Runtime.InteropServices; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Imaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalettes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalettes.cs index 23cbdfbb90d..0db3dac1c00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalettes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalettes.cs @@ -5,16 +5,7 @@ // // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs index 667743a62c5..51bd639ce78 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs @@ -2,20 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs index 2d5b8bb8d79..99908947ab1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; using System.IO; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Net; using System.Runtime.InteropServices; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Win32; -using System.IO.Packaging; + using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSourceSafeMILHandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSourceSafeMILHandle.cs index 0f53e6288bb..197979e32ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSourceSafeMILHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSourceSafeMILHandle.cs @@ -9,13 +9,9 @@ // A sub-class of SafeMILHandle that can estimate size for bitmap // source objects. -using System; -using System.Diagnostics; -using System.Security; using MS.Internal; -using MS.Win32; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs index b03617340e3..8174bcfc9a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs @@ -2,22 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Windows; -using System.Threading; using System.Windows.Threading; -using System.Diagnostics; -using System.Collections; -using System.Runtime.InteropServices; -using System.IO; using MS.Internal; -using System.Security; -using System.Windows.Media; using System.Windows.Media.Composition; -using SR=MS.Internal.PresentationCore.SR; using MS.Win32.PresentationCore; namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapDecoder.cs index 02228c073ca..a0cced86a86 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using Microsoft.Win32.SafeHandles; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapEncoder.cs index 28f3db6ec07..4127350365b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BmpBitmapEncoder.cs @@ -5,18 +5,8 @@ // // -using System; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Windows.Media.Imaging; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs index cb57ef068f2..ed5519621ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs @@ -2,29 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs index cacface1df8..9960e5cfdf1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs index df53e4027ff..f7721e4775d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs index 1246e94c2fa..5a4670ff811 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs index 3c0122b2fd2..1eaebf2270a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs @@ -9,26 +9,10 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; using System.IO; -using System.Collections; using System.ComponentModel; using System.Net.Cache; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs index 817763939b6..337e9ac4442 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs @@ -9,26 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.IO; -using System.Collections; -using System.ComponentModel; -using System.Net.Cache; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs index fe044e4eff5..8966a32a253 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs @@ -9,26 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.IO; -using System.Collections; -using System.ComponentModel; -using System.Net.Cache; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs index aeac6fc9090..4c5a97dd56c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs @@ -9,26 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.IO; -using System.Collections; -using System.ComponentModel; -using System.Net.Cache; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs index 6a6bda2c61b..bd9b331725b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs @@ -9,26 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.IO; -using System.Collections; -using System.ComponentModel; -using System.Net.Cache; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapDecoder.cs index 04a9fd3d112..3ffc9094a73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using Microsoft.Win32.SafeHandles; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapEncoder.cs index fe2907cac83..56f4ccf34e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/GifBitmapEncoder.cs @@ -5,19 +5,8 @@ // // -using System; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/IconBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/IconBitmapDecoder.cs index c31af467997..f6be3aeeb4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/IconBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/IconBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs index 823fafefa5c..94cbebe226c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs @@ -5,23 +5,7 @@ // // -using System; -using System.IO; using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using MS.Win32; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs index 114ab99eeba..157e9dd4803 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs @@ -5,23 +5,8 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; -using System.Windows.Threading; -using System.Text; using MS.Internal.PresentationCore; // SecurityHelper namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs index 69a807928b5..3cb22a1aa29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs @@ -6,24 +6,10 @@ // -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using MS.Internal.PresentationCore; // SecurityHelper -using SR=MS.Internal.PresentationCore.SR; using System.Windows.Media.Imaging; namespace System.Windows.Interop diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapDecoder.cs index 47646c29177..822b4ba9e4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs index a01ba35a9e4..ba96c2fb7a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs @@ -5,21 +5,8 @@ // // -using System; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs index 63a2ff9718e..a66dfce3413 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs @@ -6,28 +6,8 @@ // #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; using System.IO; -using System.IO.Packaging; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using System.Collections.ObjectModel; -using System.Reflection; -using System.Security; -using MS.Internal; -using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Threading; -using System.Windows.Threading; -using System.Windows.Media.Imaging; -using MS.Internal.PresentationCore; // SecurityHelper -using SR=MS.Internal.PresentationCore.SR; -using System.Net; using System.Net.Cache; namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapDecoder.cs index 1cc709359f2..23f5fb6a348 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapEncoder.cs index e8272f17192..3aa2b327139 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PngBitmapEncoder.cs @@ -5,18 +5,8 @@ // // -using System; -using System.Security; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs index 3c5748ba293..4a5ac3bcd61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs @@ -5,25 +5,10 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Globalization; using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.Windows.Media.Imaging; -using System.Windows.Media.Composition; -using System.Text; using MS.Internal.PresentationCore; -using System.Diagnostics.CodeAnalysis; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs index 52d6c410d3b..cf87a573029 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs @@ -2,29 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Imaging { #region RenderTargetBitmap diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapDecoder.cs index 179e0e1d20d..0af4e977696 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapEncoder.cs index 30082564695..8f965626de9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TiffBitmapEncoder.cs @@ -5,19 +5,8 @@ // // -using System; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs index 29bf51f839d..0ecc22e5748 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapDecoder.cs index e74ffde2eba..5baaeb9e16f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapDecoder.cs @@ -5,19 +5,8 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; -using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapEncoder.cs index d4f953d3596..106ec00ce29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnknownBitmapEncoder.cs @@ -5,18 +5,8 @@ // // -using System; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Windows.Media.Imaging; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs index 1c24a767263..47cd8597f9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs @@ -5,28 +5,6 @@ // // -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using MS.Internal; -using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal.PresentationCore; - -using SR = MS.Internal.PresentationCore.SR; - - namespace System.Windows.Media.Imaging { internal sealed class UnmanagedBitmapWrapper : BitmapSource diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapDecoder.cs index 4f3fdddfcf9..2063deca011 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapDecoder.cs @@ -5,19 +5,9 @@ // // -using System; using System.IO; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using Microsoft.Win32.SafeHandles; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs index dd6eff0f41b..2478a4b8deb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs @@ -5,21 +5,8 @@ // // -using System; -using System.Collections; -using System.Security; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs index 27a50dd75eb..ab96f9e8919 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs @@ -2,28 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; using MS.Win32.PresentationCore; -using System.Security; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using SR=MS.Internal.PresentationCore.SR; -using MS.Internal.PresentationCore; // SecurityHelper using System.Threading; namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IntersectionDetail.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IntersectionDetail.cs index 521ed20cf65..99f269b0f31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IntersectionDetail.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/IntersectionDetail.cs @@ -9,11 +9,7 @@ // // -using System.Runtime.InteropServices; - -using System; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// IntersectionDetail - Indicates detailed information on the nature diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/InvalidWMPVersionException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/InvalidWMPVersionException.cs index 97f728a7002..13f0fa646ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/InvalidWMPVersionException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/InvalidWMPVersionException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.Serialization; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Invokable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Invokable.cs index 1840eabe84a..5d4b44065fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Invokable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Invokable.cs @@ -4,9 +4,6 @@ // -using System.Windows.Media; -using System; - namespace System.Windows.Media { #region IInvokable diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs index 93e1d68afe4..113f9d303fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs @@ -4,26 +4,9 @@ // -using System; -using MS.Internal; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This is the Geometry class for Lines. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs index f2e0c427f91..941fbdeb8e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs index a3e4d00da1f..f2204209af6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs @@ -10,20 +10,7 @@ // // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Runtime.InteropServices; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MILUtilities.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MILUtilities.cs index 63903b87783..a6ae8561157 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MILUtilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MILUtilities.cs @@ -5,16 +5,10 @@ // // -using System; -using System.Diagnostics; -using System.Security; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixStack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixStack.cs index b288a389a37..aa8cc316faa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixStack.cs @@ -4,11 +4,7 @@ // -using System; -using System.Diagnostics; -using System.Collections; using MS.Internal; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs index d0de643ddff..0847b9394fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs @@ -4,24 +4,7 @@ // -using System.Windows.Media; -using System; -using System.Windows; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Security; -using System.Collections; using MS.Internal; -using MS.Internal.PresentationCore; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; -using System.Windows.Media.Composition; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs index 44b35afb74b..00e222801f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs @@ -2,37 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// The MediaContext class controls the media layer. -// - -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Threading; using System.Windows.Threading; -using System.Windows; using System.Windows.Input; using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using System.Windows.Media.Effects; - using MS.Internal; using MS.Utility; using MS.Win32; -using Microsoft.Win32.SafeHandles; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs index 48734c3f5c9..ac1e3246ac7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs @@ -2,33 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: // A wrapper for a top-level hidden window that is used to process // messages broadcasted to top-level windows only (such as DWM's // WM_DWMCOMPOSITIONCHANGED). If the WPF application doesn't have // a top-level window (as it is the case for XBAP applications), // such messages would have been ignored. -// -using System; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using Microsoft.Win32; -using MS.Internal; -using MS.Internal.PresentationCore; using MS.Internal.Interop; using MS.Win32; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; -using DllImport=MS.Internal.PresentationCore.DllImport; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs index 167f17522ac..8cfa36faf00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs @@ -2,34 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Threading; -using System.Security; -using System.Diagnostics; -using System.ComponentModel; -using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper -using MS.Win32; using System.Windows.Media.Animation; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Threading; -using System.Windows.Navigation; -using System.Runtime.InteropServices; -using System.IO; -using System.Security.AccessControl;//for semaphore access permissions -using System.Net; -using Microsoft.Win32; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; - -// + // Disable the warnings that C# emmits when it finds pragmas it does not recognize, this is to // get rid of false positive PreSharp warning -// #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs index de7dcbde464..f7fbc3ed54e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs @@ -2,38 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Threading; -using System.Security; -using System.Diagnostics; -using System.ComponentModel; using MS.Internal; -using MS.Internal.PresentationCore; // SecurityHelper +using MS.Internal.PresentationCore; using MS.Win32; using System.IO.Packaging; -using System.Windows.Media.Animation; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; using System.Windows.Threading; using System.Windows.Navigation; -using System.Runtime.InteropServices; -using System.IO; -using System.Security.AccessControl;//for semaphore access permissions -using System.Net; -using Microsoft.Win32; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; -// -// Disable the warnings that C# emmits when it finds pragmas it does not recognize, this is to -// get rid of false positive PreSharp warning -// -#pragma warning disable 1634, 1691 +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; +#pragma warning disable 1634, 1691 namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs index 55e28ce421e..4e667e318ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs @@ -2,30 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+---------------------------------------------------------------------------- -// -// // Abstract: // Media system holds the relation between an application // domain and the underlying transport system. -// - -using System; -using System.Windows.Threading; using System.Collections; -using System.Diagnostics; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using Microsoft.Win32; +using System.Windows.Threading; using MS.Internal; -using MS.Internal.FontCache; -using MS.Win32; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; -using SafeNativeMethods=MS.Win32.PresentationCore.SafeNativeMethods; +using SafeNativeMethods = MS.Win32.PresentationCore.SafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs index 95934e40efe..a44cf137bc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs @@ -2,24 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Diagnostics; using System.ComponentModel; -using MS.Internal; using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Windows.Media.Composition; using System.Windows.Markup; -using System.Windows.Threading; -using System.Runtime.InteropServices; -using System.IO; -using System.Collections; -using System.Collections.Generic; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs index b5a68487689..cf278d012d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs @@ -2,24 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// // Synopsis: Implements class Parsers for internal use of type converters -// -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; -using MS.Internal; using System.ComponentModel; -using System.Globalization; using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ParsersCommon.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ParsersCommon.cs index 7f5fcfd9aa1..885aec823ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ParsersCommon.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ParsersCommon.cs @@ -2,23 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// // Synopsis: Implements class Parsers for internal use of type converters // // This file contains all the code that is shared between PresentationBuildTasks and PresentationCore -// -// Changes to this file will likely result in a compiler update. -// +// Changes to this file will likely result in a compiler update. using System; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics; -using MS.Internal; -using System.ComponentModel; -using System.Globalization; -using System.IO; - +using System.IO; #if PRESENTATION_CORE @@ -27,16 +17,14 @@ using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; -using MS.Internal.Media; +using MS.Internal.Media; using TypeConverterHelper = System.Windows.Markup.TypeConverterHelper; namespace MS.Internal #elif PBTCOMPILER -using MS.Utility ; +using MS.Utility; using MS.Internal.Markup; using TypeConverterHelper = MS.Internal.Markup.TypeConverterHelper; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs index 06b2596be8a..ae0d9340831 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs @@ -2,27 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; using System.Windows.Media.Animation; using System.Windows.Markup; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigureCollection.cs index f32703be6a5..14f825bdcde 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigureCollection.cs @@ -5,22 +5,8 @@ // // -using MS.Internal; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Text; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs index 12a800b80bf..8e6ec842f1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs @@ -2,35 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: Implementation of the class PathGeometry -// - -using System; using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Globalization; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; using System.Windows.Markup; -using System.Windows.Converters; -using System.Runtime.InteropServices; -using System.Security; -using MS.Win32; -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegment.cs index 6abb15d71f2..2cd80189876 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegment.cs @@ -4,22 +4,7 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegmentCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegmentCollection.cs index 8793913b810..03ba9b0ae85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegmentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathSegmentCollection.cs @@ -5,23 +5,9 @@ // // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; using System.Text; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs index 75f7f4e9d6e..d77e471d8cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs @@ -8,24 +8,7 @@ // flattened geometry stream. // -using MS.Internal; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Pen.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Pen.cs index c7aa3601dd4..3141dd7c848 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Pen.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Pen.cs @@ -12,16 +12,8 @@ // using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Markup; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs index c6cbd8c88df..3ad6804d24a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs @@ -2,26 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using MS.Win32; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; + +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; using System.Runtime.CompilerServices; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs index b78200fae04..c34a4a1ba9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs @@ -2,26 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; -using MS.Internal; -using System.Text; -using System.Collections; using System.Globalization; -using System.Windows; -using System.Windows.Media; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; -namespace System.Windows.Media +namespace System.Windows.Media { #region PixelFormatConverter //------------------------------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormats.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormats.cs index fc9b4f75b49..e74201e5ad9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormats.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormats.cs @@ -5,16 +5,7 @@ // // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using MS.Internal; -using System.Diagnostics; -using System.Windows.Media; -using System.Globalization; -using System.Runtime.InteropServices; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointCollection.cs index 24d954d41ff..bd84b1470c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointCollection.cs @@ -9,11 +9,8 @@ // // -using System.Windows; -using System.Windows.Media.Media3D; -using System; -using System.IO; -using MS.Internal.Media; +using System.IO; +using MS.Internal.Media; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestParameters.cs index d5b94b0ea40..c23e7d36c4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestParameters.cs @@ -5,16 +5,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This is the class for specifying parameters hit testing with a point. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestResult.cs index 689c6655096..dd8122e8eab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PointHitTestResult.cs @@ -4,16 +4,7 @@ // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using MS.Internal; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This class returns the point and visual hit during a hit test pass. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs index 8a4513c2b07..4000415913a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs index 4c4452d32b1..38113b0c84b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs index 2d85067649c..0da40cf4385 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs index 5e86d38dce9..81108742b95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs @@ -4,25 +4,6 @@ // -using System; -using MS.Internal; -using MS.Internal.PresentationCore; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Diagnostics; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs index abe3fa8bda6..fbca4c86456 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs @@ -10,20 +10,7 @@ // // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs index 5c6316dc425..0bdd6e876df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs @@ -4,25 +4,10 @@ // -using System; using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Text; -using System.Globalization; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// This is the Geometry class for Rectangles and RoundedRectangles. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderCapability.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderCapability.cs index c13e8def800..f180b41364b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderCapability.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderCapability.cs @@ -10,9 +10,6 @@ // notification on change. // -using System; -using System.Diagnostics; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderContext.cs index 434e38e71e2..4014b1570fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderContext.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media.Composition; + // // // Description: @@ -10,17 +12,6 @@ namespace System.Windows.Media { - using System; - using System.Windows.Threading; - - using System.Collections; - using System.Diagnostics; - using System.Windows.Media; - using System.Windows.Media.Animation; - using System.Windows.Media.Composition; - using System.Runtime.InteropServices; - using MS.Internal; - /// /// This class accumulates state during a render pass of the scene. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderData.cs index 9c52ca58d0f..3a0472c0c9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderData.cs @@ -14,21 +14,10 @@ using MS.Internal; using MS.Utility; -using System; using System.Buffers; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Media.Imaging; -using System.Windows.Media.Effects; -using System.Security; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderDataDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderDataDrawingContext.cs index 4df120abcd3..6273c76ed28 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderDataDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderDataDrawingContext.cs @@ -4,17 +4,6 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.Diagnostics; -using MS.Internal; -using System.Security; - //------------------------------------------------------------------------------ // This section lists various things that we could improve on the DrawingContext // class. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderOptions.cs index 80cd4925525..ba243cf838e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderOptions.cs @@ -10,10 +10,6 @@ // using MS.Win32.PresentationCore; - -using System; -using System.Diagnostics; -using System.Security; using System.Windows.Interop; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Renderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Renderer.cs index 75eb9e33ad3..1fb3454a820 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Renderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Renderer.cs @@ -9,20 +9,8 @@ // to a BitmapImage' case, and not when rendering to an HwndTarget. // -using System; -using System.Windows; -using System.Collections.Generic; -using System.Windows.Threading; - -using System.Diagnostics; - -using MS.Internal; -using System.Windows.Media; using System.Windows.Media.Composition; -using MS.Win32; -using System.Security; - namespace System.Windows.Media { static internal class Renderer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderingEventArgs.cs index 547670c2478..b599eed69aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RenderingEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs index 743bc40d780..5bdff2f53ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs @@ -2,26 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; -using MS.Internal; -using System.Windows.Media; -using System.Text; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; using System.Net.Cache; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media -{ +{ /// /// RequestCachePolicyConverter Parses a RequestCachePolicy. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs index f5530b96d92..456efadb23b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs @@ -4,24 +4,6 @@ // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandle.cs index a36ceeb364b..9df128f29d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandle.cs @@ -8,8 +8,6 @@ // Description: // A safe way to deal with unmanaged MIL interface pointers. -using System; -using System.Security; using Microsoft.Win32.SafeHandles; using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandleMemoryPressure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandleMemoryPressure.cs index ecfb22a7757..6ebe42e535a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandleMemoryPressure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeMILHandleMemoryPressure.cs @@ -8,9 +8,6 @@ // Description: // Tracks the amount of native memory used by SafeMILHandle objects. -using System; -using System.Security; -using MS.Internal; using System.Threading; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeNativeMethodsMilCoreApi.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeNativeMethodsMilCoreApi.cs index 1dba7fe41c9..0f59f1135c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeNativeMethodsMilCoreApi.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeNativeMethodsMilCoreApi.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; + // // ABOUT THIS FILE: // -- This file contains native methods which are deemed SAFE for partial trust callers @@ -13,19 +15,6 @@ namespace MS.Win32.PresentationCore { - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System; - using System.Security; - using System.Collections; - using System.IO; - using System.Text; - using System.Windows.Media.Composition; - using MS.Internal.PresentationCore; - - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - using DllImport=MS.Internal.PresentationCore.DllImport; - internal static partial class SafeNativeMethods { internal static int MilCompositionEngine_InitializePartitionManager(int nPriority) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeReversePInvokeHandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeReversePInvokeHandle.cs index 5cdefc1ce60..056de9ec34c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeReversePInvokeHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SafeReversePInvokeHandle.cs @@ -8,20 +8,10 @@ // Description: // A safe way to deal with unmanaged MIL interface pointers. -using System; -using System.IO; -using System.Security; -using System.Collections; -using System.Reflection; using MS.Internal; -using MS.Win32; -using System.Diagnostics; -using System.Windows.Media; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs index 830ad3abcbe..ba9de030d5d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs @@ -4,24 +4,7 @@ // -using System; -using System.Windows; -using System.Windows.Media; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Security; -using System.Collections; using MS.Internal; -using MS.Internal.PresentationCore; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; -using System.Windows.Media.Composition; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs index b68954c50a3..c32bacb9a70 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs @@ -4,24 +4,6 @@ // -using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs index 2ba9684a852..4fae385472e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs @@ -2,33 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: This file contains the implementation of SolidColorBrush. -// The SolidColorBrush is the simplest of the Brushes. consisting -// as it does of just a color. -// -// - using MS.Internal; -using System; using System.IO; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// SolidColorBrush diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs index bc77c468b4b..62fd460f39d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs @@ -2,24 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// #pragma warning disable 1634, 1691 // Allow suppression of certain presharp messages -using System.Windows.Media; -using System.Security; -using System; using MS.Internal; using MS.Win32; -using System.Buffers; -using System.Reflection; -using System.Collections; -using System.Diagnostics; using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs index 72efbe652be..313d03286ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs @@ -7,30 +7,9 @@ // Description: Implementation of the class StreamGeometry // -using System; using MS.Internal; -using MS.Internal.PresentationCore; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Globalization; -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Windows; -using System.Text.RegularExpressions; -using System.Windows.Media.Animation; -using System.Windows.Markup; -using System.Windows.Converters; -using System.Runtime.InteropServices; -using System.Security; -using MS.Win32; - -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs index e3f5fd66f89..a2a65f29543 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs @@ -2,18 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// // This class is used by the StreamGeometry class to generate an inlined, // flattened geometry stream. -// - -using MS.Internal; using System; -using System.Collections; using System.Collections.Generic; -using System.Security; - #if !PBTCOMPILER using System.Runtime.InteropServices; @@ -26,24 +19,22 @@ using System.Windows.Media.Imaging; using System.Windows.Media.Media3D; using System.Diagnostics; -using SR=MS.Internal.PresentationCore.SR; using MS.Internal.PresentationCore; namespace System.Windows.Media -#elif PBTCOMPILER - -using MS.Internal.Markup; +#elif PBTCOMPILER +using MS.Internal.Markup; namespace MS.Internal.Markup #endif { /// /// StreamGeometryContext - /// -#if ! PBTCOMPILER + /// +#if !PBTCOMPILER public abstract class StreamGeometryContext : DispatcherObject, IDisposable #else internal abstract class StreamGeometryContext : IDisposable diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StyleSimulations.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StyleSimulations.cs index d7c1476abe6..8eb7de6399f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StyleSimulations.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StyleSimulations.cs @@ -10,8 +10,6 @@ // // -using System; - namespace System.Windows.Media { // Compatibility warning: diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs index ae23738e0e3..aea416244db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs @@ -10,17 +10,7 @@ // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Collections; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Markup; -using System.ComponentModel; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffectCollection.cs index c1984a25ecf..5a1f182e486 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffectCollection.cs @@ -10,15 +10,8 @@ // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using System.Collections; -using System.Collections.Generic; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TileBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TileBrush.cs index 814688efb1c..26d3dd7d4fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TileBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TileBrush.cs @@ -11,19 +11,10 @@ // are described by classes derived from TileBrush. // // - -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; + using System.Windows.Media.Composition; -using MS.Internal; -using System.Runtime.InteropServices; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// TileBrush diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Transform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Transform.cs index 4adc95e5587..a6661882051 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Transform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Transform.cs @@ -11,19 +11,7 @@ \***************************************************************************/ using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Windows.Markup; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs index 411c8faf5af..9944d8e35b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs @@ -4,24 +4,7 @@ // -using System; -using System.Windows; -using System.Windows.Media; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; using System.Windows.Markup; -using System.Windows.Media.Composition; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs index 3f8cf0551c3..7cc76904518 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs @@ -5,23 +5,6 @@ // using MS.Internal; -using MS.Internal.PresentationCore; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Typeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Typeface.cs index 2e6bdae7db4..2333c6fcdd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Typeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Typeface.cs @@ -9,21 +9,12 @@ // // -using System; using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows; using System.Windows.Media.TextFormatting; -using System.Runtime.InteropServices; -using System.ComponentModel; using MS.Internal; using MS.Internal.FontFace; using MS.Internal.FontCache; -using MS.Internal.Shaping; using MS.Internal.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UniqueEventHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UniqueEventHelper.cs index 08e4b08cbea..8d36af20bd0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UniqueEventHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UniqueEventHelper.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UnsafeNativeMethodsMilCoreApi.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UnsafeNativeMethodsMilCoreApi.cs index c985cd93f84..40962845841 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UnsafeNativeMethodsMilCoreApi.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/UnsafeNativeMethodsMilCoreApi.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// // ABOUT THIS FILE: // -- This file contains native methods which are deemed NOT SAFE in the sense that any usage of them // must be carefully reviewed. FXCop will flag callers of these for review. @@ -11,23 +10,12 @@ // -- Put methods in here when a stack walk is innappropriate due to performance concerns using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using System.Runtime.ConstrainedExecution; -using System; using MS.Internal; -using MS.Internal.PresentationCore; -using System.Security; -using System.Collections; -using System.IO; using System.Text; using System.Windows.Media.Composition; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows; -using MS.Win32; -using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - -using DllImport = MS.Internal.PresentationCore.DllImport; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VideoDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VideoDrawing.cs index 83aaaffdc98..bc4b815af57 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VideoDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VideoDrawing.cs @@ -8,8 +8,6 @@ // video into a destination rectangle. // -using System.Diagnostics; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs index aecae3285aa..280aee3e258 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs @@ -2,34 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: // Defines a node in the composition scene graph. -// -using System; -using System.Security; using System.Windows.Threading; -using MS.Win32; using System.Windows.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Media.Effects; -using System.Diagnostics; -using System.Collections; using System.Windows.Interop; -using System.Collections.Generic; using MS.Internal; using MS.Internal.Media; using MS.Internal.Media3D; -using System.Resources; -using MS.Utility; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; //------------------------------------------------------------------------------ // This section lists various things that we could improve on the Visual class. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualBrush.cs index e7b3268afac..ea98a166d61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualBrush.cs @@ -11,20 +11,11 @@ // // -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Threading; -using MS.Internal; -namespace System.Windows.Media +namespace System.Windows.Media { /// /// VisualBrush - This TileBrush defines its content as a Visual diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs index ba16e620b96..34a759f487d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs @@ -2,26 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: // The VisualCollection implementation is based on the // CLR's Lightning ArrayList implementation. -// -using MS.Win32; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Threading; - -using System; -using System.Diagnostics; using System.Collections; using MS.Internal; -using System.Runtime.InteropServices; - -using SR=MS.Internal.PresentationCore.SR; //------------------------------------------------------------------------------ // - There is an exception thrown inside of ConnectChild which could render diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualProxy.cs index 17456dab43a..d6ee778f728 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualProxy.cs @@ -10,14 +10,6 @@ namespace System.Windows.Media.Composition { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows; - using System.Windows.Media; - - /// /// Mapping between a visual and its handles on different channels. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs index 7fd6cd2e87d..aff08d20909 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs @@ -8,12 +8,7 @@ // // -using System.Windows.Media; using System.Windows.Media.Composition; -using System.Security; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs index c7fd0e505d9..a59166ca899 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs @@ -4,20 +4,11 @@ // -using System; -using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; -using System.Windows.Threading; using System.Windows.Media.Effects; - -using System.Collections; -using System.Diagnostics; using MS.Internal; using MS.Internal.Media; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/brushes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/brushes.cs index a91dd4ec56a..21381c4d63b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/brushes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/brushes.cs @@ -9,12 +9,7 @@ // // -using System.Windows.Media; -using MS.Internal; - -using System; - -namespace System.Windows.Media +namespace System.Windows.Media { /// /// Brushes - A collection of well-known SolidColorBrushes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs index 1146c970713..ae946039eac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs @@ -5,24 +5,8 @@ // // -using System; -using System.Diagnostics; -using System.ComponentModel; -using MS.Internal; -using MS.Win32; using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Windows.Media.Composition; using System.Windows.Markup; -using System.Security; -using MS.Internal.PresentationCore; // SecurityHelper -using System.Windows.Threading; - -using System.Runtime.InteropServices; -using System.IO; - -using SR=MS.Internal.PresentationCore.SR; -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventargs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventargs.cs index cdb93f372d6..1cf0eff7a56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventargs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventargs.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Media { #region ExceptionEventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs index a783a8627d0..056cee85b76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs @@ -5,21 +5,10 @@ // // -using System; using System.Text; -using System.Diagnostics; -using System.ComponentModel; using MS.Internal; -using System.Windows.Media.Animation; -using System.Windows.Media; -using System.Windows.Media.Composition; using System.Windows.Threading; -using System.Runtime.InteropServices; using System.IO; -using System.Collections; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/safemediahandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/safemediahandle.cs index 3c3ad0691d6..3e486c425ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/safemediahandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/safemediahandle.cs @@ -5,20 +5,9 @@ // // -using System; -using System.IO; -using System.Security; -using System.Collections; -using System.Reflection; using MS.Internal; -using MS.Win32; -using System.Diagnostics; -using System.Windows.Media; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using Microsoft.Win32.SafeHandles; - -using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; + +using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs index 6c11e353d40..347f456d673 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs @@ -12,11 +12,7 @@ // -using System; -using System.Diagnostics; using MS.Internal; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterHit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterHit.cs index 39ceebb1748..d609778ea07 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterHit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterHit.cs @@ -16,8 +16,6 @@ #region Using directives -using System; - #endregion namespace System.Windows.Media.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs index d5cd47a4102..d24df1feeda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs @@ -12,11 +12,7 @@ // -using System; -using System.Diagnostics; -using System.Security; using MS.Internal; -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs index cde95d10861..4e2a1ebe723 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs @@ -7,11 +7,7 @@ // Description: CultureSpecificCharacterBufferRange class // -using System; using System.Globalization; -using System.Windows.Media.TextFormatting; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/IndexedGlyphRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/IndexedGlyphRun.cs index 4b7e055e9e8..386b93613e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/IndexedGlyphRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/IndexedGlyphRun.cs @@ -9,9 +9,6 @@ // // -using System; -using System.Windows.Media; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/MinMaxParagraphWidth.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/MinMaxParagraphWidth.cs index 9172dffa795..fc4c4f46577 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/MinMaxParagraphWidth.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/MinMaxParagraphWidth.cs @@ -12,12 +12,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs index 4c93802b423..dd0d8c2e3dc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Number substitution related types -// -// Spec: Cultural%20digit%20substitution.htm -// -// - - -using System; using System.Globalization; using System.ComponentModel; -using System.Windows; -using MS.Internal.FontCache; // for HashFn - -using SR = MS.Internal.PresentationCore.SR; +using MS.Internal.FontCache; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBounds.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBounds.cs index afb92798706..da7f78409b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBounds.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBounds.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections.Generic; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBreakpoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBreakpoint.cs index 9aaae8b2970..3ea33110d37 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBreakpoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextBreakpoint.cs @@ -13,10 +13,6 @@ // -using System; -using System.Security; - -using MS.Internal; using MS.Internal.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs index 90d19a3b39f..faa022b4acd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs @@ -12,19 +12,10 @@ // -using System; -using System.Diagnostics; using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Security; -using System.Windows; -using MS.Internal; using MS.Internal.Shaping; using MS.Internal.TextFormatting; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCollapsingProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCollapsingProperties.cs index 7194c78ca74..7cd3b912d89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCollapsingProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCollapsingProperties.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEmbeddedObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEmbeddedObject.cs index 774e12dc494..6f4a012f2e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEmbeddedObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEmbeddedObject.cs @@ -11,14 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; -using System.Windows.Media; -using MS.Internal.TextFormatting; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs index 828db4da5d6..e39bea591f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs @@ -11,13 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfParagraph.cs index 475196bcc74..8d8d5b93952 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfParagraph.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs index dc7ee9e86a5..9eba1c39447 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs index 909cd9b96a5..dede8b15851 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs @@ -12,9 +12,7 @@ // -using System; using System.Windows.Threading; -using System.Collections.Generic; using MS.Internal; using MS.Internal.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs index 40f18bd650e..4834fdc1641 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs @@ -2,33 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//+----------------------------------------------------------------------- -// -// -// -// Contents: Implementation of TextFormatter context -// -// - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Threading; -using System.Security; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; - using MS.Internal; using MS.Internal.TextFormatting; -using IndexedGlyphRun = System.Windows.Media.TextFormatting.IndexedGlyphRun; -using SR=MS.Internal.PresentationCore.SR; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs index 0a78596c37c..18b539da96c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs @@ -11,13 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalBreaks.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalBreaks.cs index 7664c064ac0..789fb37eee4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalBreaks.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalBreaks.cs @@ -10,9 +10,6 @@ // // -using System; -using System.Globalization; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalService.cs index 8500d09ab4a..e1b3b2f0d47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLexicalService.cs @@ -10,7 +10,6 @@ // // -using System; using System.Globalization; namespace System.Windows.Media.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLine.cs index 52161106ada..036b5803d74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLine.cs @@ -11,12 +11,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Media; using MS.Internal.TextFormatting; namespace System.Windows.Media.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs index a2ecbb8a65b..16c8796a066 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs @@ -2,28 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Contents: Text properties and state at the point where text is broken // by the line breaking process, which may need to be carried over // when formatting the next line. -// -// Spec: Text Formatting API.doc -// -// - -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; -using MS.Internal; -using MS.Internal.TextFormatting; - -using SR = MS.Internal.PresentationCore.SR; +using MS.Internal.TextFormatting; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextMarkerProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextMarkerProperties.cs index 941d7dd4b7c..9055ba6505d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextMarkerProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextMarkerProperties.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifier.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifier.cs index 833150f9b0e..446edd16809 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifier.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifier.cs @@ -11,13 +11,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifierScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifierScope.cs index f7a0d6e41cd..03369259ee2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifierScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextModifierScope.cs @@ -11,12 +11,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs index 9fda4dbab17..d04ab3b4316 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs @@ -2,28 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Contents: Cache object of paragraph content used to improve performance // of optimal paragraph formatting // // Spec: Text Formatting API.doc -// -// - -using System; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Collections.Generic; -using System.Security; -using System.Windows; -using System.Windows.Media; using MS.Internal; using MS.Internal.TextFormatting; -using SR = MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphProperties.cs index 51de4089a24..c2d236ab242 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphProperties.cs @@ -11,10 +11,6 @@ // // -using System; -using System.Collections.Generic; -using System.Windows; - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRun.cs index da8c900a6ff..f5981b2ccb6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRun.cs @@ -11,14 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; -using System.Windows.Media; -using MS.Internal.TextFormatting; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunCache.cs index 55ab8949b5b..5215be9a613 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunCache.cs @@ -12,9 +12,6 @@ // -using System; -using System.Collections.Generic; - using MS.Internal.TextFormatting; namespace System.Windows.Media.TextFormatting diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunProperties.cs index a421fc7a0de..98b6f009a89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunProperties.cs @@ -12,10 +12,7 @@ // -using System; using System.Globalization; -using System.Windows; -using MS.Internal; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunTypographyProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunTypographyProperties.cs index 3c4078bcf17..e9c95746bec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunTypographyProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextRunTypographyProperties.cs @@ -12,10 +12,7 @@ // -using System; -using System.Windows; using MS.Internal.Text.TextInterface; -using MS.Internal.Shaping; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs index 19efa3f1095..524aa79a00b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs @@ -2,23 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Contents: Generic implementation of text marker properties -// -// Spec: Text Formatting API.doc -// -// - - -using System; -using System.Collections; -using System.Windows; using MS.Internal.TextFormatting; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.TextFormatting { /// @@ -29,7 +14,6 @@ public class TextSimpleMarkerProperties : TextMarkerProperties private double _offset; private TextSource _textSource; - /// /// Construct a text marker object /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSource.cs index de9d484286e..d0bab1b331f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSource.cs @@ -11,10 +11,6 @@ // // - -using System; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSpan.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSpan.cs index 99b1f7cc035..78feaf150ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSpan.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSpan.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections.Generic; -using System.Diagnostics; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTabProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTabProperties.cs index 4fbb5f91333..37e2a69a316 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTabProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTabProperties.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingCharacterEllipsis.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingCharacterEllipsis.cs index a32a08c22fd..637d075dc8a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingCharacterEllipsis.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingCharacterEllipsis.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingWordEllipsis.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingWordEllipsis.cs index 683020d6199..4b4aca21863 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingWordEllipsis.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextTrailingWordEllipsis.cs @@ -11,12 +11,6 @@ // // - -using System; -using System.Collections; -using System.Windows; - - namespace System.Windows.Media.TextFormatting { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AffineTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AffineTransform3D.cs index 824ff3024fc..614e092423f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AffineTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AffineTransform3D.cs @@ -11,8 +11,6 @@ // // -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AmbientLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AmbientLight.cs index a329d838b8d..dcf21ff35c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AmbientLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AmbientLight.cs @@ -11,13 +11,6 @@ // // -using System; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AxisAngleRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AxisAngleRotation3D.cs index d8738ddac34..712f05623d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AxisAngleRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/AxisAngleRotation3D.cs @@ -5,7 +5,6 @@ // // -using System; using MS.Internal; namespace System.Windows.Media.Media3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Camera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Camera.cs index 39643acde46..f0ba82bca80 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Camera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Camera.cs @@ -5,11 +5,7 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs index ab4a564325c..9bac8df6047 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs @@ -8,18 +8,9 @@ // // -using MS.Internal; -using MS.Internal.Media; -using MS.Internal.Media3D; -using System; -using System.Diagnostics; -using System.Collections.Specialized; using System.ComponentModel; using System.Windows.Automation.Peers; -using System.Windows.Media.Composition; using System.Windows.Markup; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs index e617d9a51d5..8e36638c27c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs index 6bc37722190..1d23344d728 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs index 1464c5db770..0cd4d07afed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs index cd07c14c0fe..19fae559b4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs index 3abb25f5cc6..b9e6f68b9ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs index dc26bf24bdd..47f5627958d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs index 06f81d33f3d..4857164f5dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs index 28c61e01e25..c051f1604fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs index cb2d254586b..dfd84600ef9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs @@ -9,28 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DiffuseMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DiffuseMaterial.cs index 136d7bc603f..983a641872b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DiffuseMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DiffuseMaterial.cs @@ -8,16 +8,6 @@ // Description: 3D diffuse material // - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DirectionalLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DirectionalLight.cs index 1c63b25d94d..f2a74788be8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DirectionalLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/DirectionalLight.cs @@ -11,13 +11,6 @@ // // -using System; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/EmissiveMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/EmissiveMaterial.cs index 9995276743f..25969bdfefd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/EmissiveMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/EmissiveMaterial.cs @@ -10,15 +10,6 @@ // See spec at *** FILL IN LATER *** // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs index 1e764731467..55cdf3e3f9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: Declaration of the GeneralTransform2DTo3D class. -// - -using System.Diagnostics; - -using System.Windows.Media; -using System.Windows.Media.Animation; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs index 8b0c82d28b7..32d72d551b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs @@ -8,20 +8,7 @@ // Description: Declaration of the GeneralTransform3D class. // -using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Markup; -using System.Windows.Media.Media3D; using MS.Internal.PresentationCore; namespace System.Windows.Media.Media3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs index 3a095a6329a..926e1c7e5b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs @@ -4,24 +4,7 @@ // -using System; -using System.Windows; -using System.Windows.Media; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; using System.Windows.Markup; -using System.Windows.Media.Composition; -using System.Diagnostics; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs index 0aa41944241..f094f668603 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs @@ -2,16 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: Declaration of the GeneralTransform3DTo2D class. -// - -using System.Windows.Media; -using System.Windows.Media.Animation; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs index 6b8bb4a0f81..b84f3a86806 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs @@ -9,33 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Media3D { abstract partial class AffineTransform3D : Transform3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs index 660760932f8..cf67e5fff5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs index d7f7590d3ea..fbc545319ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs index 428348f22c6..59732bd5e7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs @@ -9,32 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs index ef9a21f3485..8ad3cdbba7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs index 69eff2f0f40..bc141416c90 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs index 4deb1aedc51..e73f8421e82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs index 87eeb1232d4..0ddd2fc0591 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs index d24bd87e1c9..68ae2a86a88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs @@ -2,47 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { /// /// A collection of GeneralTransform3D objects. /// - - public sealed partial class GeneralTransform3DCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs index 7a86707782f..8c0c00ab138 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs @@ -10,31 +10,7 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs index ff03d7c712a..721b4efffc5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs @@ -9,32 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs index 11126a64fcc..f335f5c8745 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs index ad36dc44eb1..4d684a39015 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs @@ -9,33 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Media3D { abstract partial class Light : Model3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs index cc4914ce303..7517c67fca0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs @@ -9,32 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs index fb21b82122d..2c1236fb2af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs @@ -2,47 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { /// /// A collection of Material objects. /// - - public sealed partial class MaterialCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs index d30e4777198..49e66c7b1f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs @@ -10,31 +10,8 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs index 4d9d24f127b..0ee4c29493a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs index 15870b19aeb..4431bb52837 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs index 8d76a9d820c..7e293e1fd94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs index e1c2d149960..1c46bdea358 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs index 713f37c5d82..6cdcdd2efab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs @@ -10,31 +10,8 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs index 6abee12c6d7..9a43339679b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs @@ -9,32 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs index 2a677e2f608..0df553fc146 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs @@ -2,47 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { /// /// A collection of Model3D objects. /// - - public sealed partial class Model3DCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs index 9b84f16db6c..b195fdb312f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs @@ -10,31 +10,8 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs index a0f75c8fa8e..797c6221d2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs index 28c61c0f07a..f761d65363f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs index 2467d386c27..6566a00084e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs index 9a7c56e29b9..f2eff13c443 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs @@ -2,39 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs index e995dba13da..0a62f28ef10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs index 644cc18e96a..5f2526131df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs index d7c178e923c..0a80374010e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs index 5d79c455f7f..9ba81adf824 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs index a992f59de52..6bd27edb363 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs index 2b53ed15629..20fd891db63 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs @@ -9,33 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Media3D { abstract partial class PointLightBase : Light diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs index ab8281573e6..5ee10e68d55 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs @@ -9,33 +9,7 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; - namespace System.Windows.Media.Media3D { abstract partial class ProjectionCamera : Camera diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs index e8b6d43b6d6..29eab1b7cec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs index 686d82ac2ac..c8c7d0d38b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs index 442c69ff0bb..44c826a60f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs index 8a48a23541e..5aa09ae8c58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs index eeddc9e5a69..7a7216e5843 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs index ec74fe258eb..e50b0a77a2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs index d1de334cb49..8959272393a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs @@ -9,32 +9,9 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs index 84f4a9c9f59..398caf18f9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs index 39f24cd0628..419a25e070e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs index 0d11e9c1738..f7494fe2a4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs index 5fe5b44d51a..bd5687871e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs index 383392b4a17..880b3e2bcff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs index 9d3d9b8c0e6..5288b5968f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs index 8949caa93c2..0a8491b8428 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs @@ -2,47 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// -using MS.Internal; using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { /// /// A collection of Transform3D objects. /// - - public sealed partial class Transform3DCollection : Animatable, IList, IList { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs index e6b2e004b18..70cecc24eae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs @@ -10,31 +10,8 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs index 062e54d136a..c56a1b49408 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs @@ -9,32 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs index ee60fd98a22..09c379db60f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs @@ -10,31 +10,10 @@ // using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs index d1dffa178db..402b2598f1e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs @@ -2,39 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. -// // Please see MilCodeGen.html for more information. -// using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; + // These types are aliased to match the unamanaged names used in interop -using BOOL = System.UInt32; -using WORD = System.UInt16; -using Float = System.Single; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs index 106f07de087..abf4906c9b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs index 3e5acae5cc9..09a6f811a0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs @@ -9,28 +9,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; -using MS.Internal.Collections; -using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Markup; -using System.Windows.Media.Media3D.Converters; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; -using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs index 8bcac4f0536..e08a3343394 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs @@ -2,31 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // This file was generated, please do not edit it directly. // // This file was generated from the codegen template located at: // wpf\src\Graphics\codegen\mcg\generators\AnimatableTemplate.cs // // Please see MilCodeGen.html for more information. -// // Allow suppression of certain presharp messages #pragma warning disable 1634, 1691 -using MS.Internal; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows.Threading; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; - -using SR = MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Geometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Geometry3D.cs index ec9d047846b..088b02760c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Geometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Geometry3D.cs @@ -7,8 +7,6 @@ // using MS.Internal.Media3D; -using System; -using System.Diagnostics; using System.Windows.Media.Animation; using System.Windows.Media.Composition; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeometryModel3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeometryModel3D.cs index 1193459bac9..11c81404b36 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeometryModel3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeometryModel3D.cs @@ -11,16 +11,7 @@ // // -using MS.Internal; using MS.Internal.Media3D; -using System; -using System.Collections; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.Windows.Media.Media3D; -using System.Windows.Markup; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/HitTestParameters3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/HitTestParameters3D.cs index 4e7682c4c32..fc2aa55e119 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/HitTestParameters3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/HitTestParameters3D.cs @@ -6,13 +6,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using MS.Internal.Media3D; -using CultureInfo = System.Globalization.CultureInfo; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Light.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Light.cs index 144dfc07670..0d9fc10ca76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Light.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Light.cs @@ -11,11 +11,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; -using MS.Internal.Media3D; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Material.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Material.cs index 1c149e37b49..492674e1a95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Material.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Material.cs @@ -11,11 +11,7 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs index 64e1a24c0af..ca18fa206d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs @@ -8,17 +8,7 @@ // Description: Material group // -using System; -using System.Collections; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Markup; -using MS.Internal; -using MS.Internal.Media3D; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs index 6b1c0c0d170..b1a4a451e82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: 3D matrix implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht @@ -20,20 +17,9 @@ // All methods that read the _mXX fields on the diagonal (_m11, _m22, _m33, _m44) need // to be use the IsDistinguishedIdentity property to special case this (which frequently // turns out to be a nice optimization). -// -// -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Windows; -using System.Windows.Markup; using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3DStack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3DStack.cs index 4f9810ab8f9..1376f473b98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3DStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3DStack.cs @@ -9,15 +9,6 @@ // of structs. This was written as a stop-gap to address // a - - - - - -using System; -using System.Collections; -using System.Collections.Generic; - namespace System.Windows.Media.Media3D { // Use Generics to port MatrixStack to Matrix3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs index 562f91390cc..3a574302cd0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - -using System; -using System.Diagnostics; -using System.Windows; using MS.Internal.Media3D; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; -using CultureInfo = System.Globalization.CultureInfo; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixTransform3D.cs index 8405a8ac361..ebf2e377d6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixTransform3D.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MeshGeometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MeshGeometry3D.cs index 1df0cac6b54..9f10ce3a31f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MeshGeometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MeshGeometry3D.cs @@ -11,14 +11,8 @@ // // -using MS.Internal; using MS.Internal.Media3D; -using MS.Internal.PresentationCore; using MS.Utility; -using System; -using System.Diagnostics; -using System.Windows.Markup; -using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3D.cs index 160ec84a490..98c33c8fba6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3D.cs @@ -11,12 +11,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.Animation; using MS.Internal.Media3D; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs index a7905da23ad..1c772a24b48 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs @@ -11,17 +11,7 @@ // // -using System; -using System.Collections; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; using System.Windows.Markup; -using MS.Internal; -using MS.Internal.Media3D; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs index acd41418e5c..f59b0edbdc0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs @@ -8,19 +8,9 @@ // // -using MS.Internal; -using MS.Internal.Media; -using MS.Internal.Media3D; -using System; -using System.Diagnostics; -using System.Collections.Specialized; -using System.ComponentModel; using System.Windows.Automation.Peers; -using System.Windows.Media.Composition; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs index 8afab0f285a..80469c929c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs @@ -2,25 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// -// - -using MS.Internal; -using MS.Internal.Media; -using MS.Internal.Media3D; -using System; -using System.Diagnostics; -using System.Collections.Specialized; using System.ComponentModel; -using System.Security; -using System.Windows.Media.Composition; using System.Windows.Markup; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/OrthographicCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/OrthographicCamera.cs index cb2ac987660..48e8218c8cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/OrthographicCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/OrthographicCamera.cs @@ -5,13 +5,7 @@ // // -using System; -using System.Diagnostics; -using System.Windows; using MS.Internal.Media3D; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; -using CultureInfo = System.Globalization.CultureInfo; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PerspectiveCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PerspectiveCamera.cs index a2bb51420f9..719e8e7b742 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PerspectiveCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PerspectiveCamera.cs @@ -5,13 +5,7 @@ // // -using System; -using System.Diagnostics; -using System.Windows; using MS.Internal.Media3D; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; -using CultureInfo = System.Globalization.CultureInfo; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3D.cs index 566dade90c6..481a882f327 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3D.cs @@ -11,11 +11,6 @@ // // -using System.Windows; -using System.Windows.Media.Media3D; - -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3DCollection.cs index 89d308c3e6b..ec6907367e8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point3DCollection.cs @@ -10,11 +10,8 @@ // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // -using System.Windows; -using System.Windows.Media.Media3D; -using System; -using System.IO; -using MS.Internal.Media; +using System.IO; +using MS.Internal.Media; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point4D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point4D.cs index 26ca8758fc0..00025e4671c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point4D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Point4D.cs @@ -11,11 +11,6 @@ // // -using System.Windows; -using System.Windows.Media.Media3D; - -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLight.cs index 8d952bacc4e..eb258da2ee5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLight.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLightBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLightBase.cs index bfc3cd76a7f..73391a3d121 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLightBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/PointLightBase.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ProjectionCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ProjectionCamera.cs index ab8155af602..3c7cd803503 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ProjectionCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ProjectionCamera.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs index dd0a2bc4d40..f87269faeb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: 3D quaternion implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht @@ -23,24 +20,8 @@ // Don't mess it up! using MS.Internal; -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -// These types are aliased to match the unamanaged names used in interop -using BOOL = System.Boolean; -using WORD = System.UInt16; -using Float = System.Single; -using SR=MS.Internal.PresentationCore.SR; +// These types are aliased to match the unamanaged names used in interop namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/QuaternionRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/QuaternionRotation3D.cs index 64976b51778..1051a0072e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/QuaternionRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/QuaternionRotation3D.cs @@ -8,8 +8,6 @@ // // -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Ray3DHitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Ray3DHitTestResult.cs index 4d0084684bd..6cbc795fec2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Ray3DHitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Ray3DHitTestResult.cs @@ -7,11 +7,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayHitTestParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayHitTestParameters.cs index ea7b13c45db..dd3abeb5fdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayHitTestParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayHitTestParameters.cs @@ -6,12 +6,7 @@ // // -using System; -using System.IO; -using System.Diagnostics; -using System.Collections.Generic; using MS.Internal.Media3D; -using CultureInfo = System.Globalization.CultureInfo; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayMeshGeometry3DHitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayMeshGeometry3DHitTestResult.cs index 59afff171ac..8b3a87c584d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayMeshGeometry3DHitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RayMeshGeometry3DHitTestResult.cs @@ -7,11 +7,6 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs index eba76596f22..c3caa2ca8d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs @@ -2,26 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: 3D rectangle implementation. -// -// -// -// - - -using System; -using System.Windows; -using System.Diagnostics; -using MS.Internal; -using MS.Internal.Media3D; -using System.Reflection; -using System.ComponentModel.Design.Serialization; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RotateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RotateTransform3D.cs index 1efa1d6d151..c25c805a48a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RotateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/RotateTransform3D.cs @@ -11,15 +11,6 @@ // // -using System; -using System.ComponentModel; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rotation3D.cs index 06f294a6c4a..05cc0b939ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rotation3D.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ScaleTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ScaleTransform3D.cs index fc6138844f0..38af0ad794f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ScaleTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ScaleTransform3D.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs index 722f4b46df8..4c6eff1bb79 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs @@ -2,22 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: 3D size implementation. -// -// -// -// - -using System.Windows; -using System.Windows.Media.Media3D; - -using System; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpecularMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpecularMaterial.cs index 40adfee10fc..620452b3309 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpecularMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpecularMaterial.cs @@ -10,15 +10,6 @@ // See spec at *** FILL IN LATER *** // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpotLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpotLight.cs index af79b80f291..f645fa87027 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpotLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/SpotLight.cs @@ -11,13 +11,6 @@ // // -using System; -using System.Windows.Media; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3D.cs index f153a41521b..962da867d7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3D.cs @@ -12,11 +12,6 @@ // using MS.Internal.Media3D; -using System; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs index d75c18c5f4d..e8c50de118c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs @@ -12,24 +12,7 @@ -using System; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Composition; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using MS.Internal; -using System.Windows.Media.Animation; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; using System.Windows.Markup; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/TranslateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/TranslateTransform3D.cs index c5d3ddfa949..80f611a1aed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/TranslateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/TranslateTransform3D.cs @@ -11,14 +11,6 @@ // // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using MS.Internal; -using System.ComponentModel.Design.Serialization; -using System.Windows.Markup; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3D.cs index 1f1dd29e723..8bec65a81a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3D.cs @@ -10,11 +10,7 @@ // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // -using MS.Internal; using MS.Internal.Media3D; -using System; -using System.Windows; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3dCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3dCollection.cs index 9eac0776029..db4526cbe2c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3dCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Vector3dCollection.cs @@ -10,11 +10,8 @@ // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht -using System.Windows; -using System.Windows.Media.Media3D; -using System; -using System.IO; -using MS.Internal.Media; +using System.IO; +using MS.Internal.Media; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs index 35780a10233..b6486544643 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs @@ -2,27 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Utility; using MS.Internal; -using MS.Internal.Media; using MS.Internal.Media3D; -using MS.Internal.PresentationCore; using MS.Internal.KnownBoxes; - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Windows; -using System.Windows.Media.Composition; using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Documents; -using System.Collections; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs index f770631a7bb..51ca2ee4653 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs @@ -2,25 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// - using MS.Internal; -using MS.Internal.Media; using MS.Internal.Media3D; -using System; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Windows; using System.Windows.Diagnostics; -using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Markup; using System.Windows.Media.Effects; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows.Media.Media3D { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs index 12118c81005..e6a0e9966f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs @@ -2,19 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - using MS.Internal; using MS.Internal.Media; using MS.Internal.Media3D; -using System; -using System.Diagnostics; -using System.Security; using System.Windows.Diagnostics; using System.Windows.Media.Composition; -using System.Windows.Media; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs index 4ea1abdd52a..e005f24b811 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs @@ -2,23 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// - #pragma warning disable 1634, 1691 // suppressing PreSharp warnings using MS.Utility; using MS.Internal; -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using MS.Internal.PresentationCore; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseCaptureWithinProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseCaptureWithinProperty.cs index fb046006277..8a151693509 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseCaptureWithinProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseCaptureWithinProperty.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Input; using MS.Internal.KnownBoxes; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseOverProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseOverProperty.cs index 4fc9c7fbacb..66aca09f565 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseOverProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/MouseOverProperty.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using MS.Internal.KnownBoxes; using System.Windows.Input; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs index 478e8dd7d99..12efc822af0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs @@ -6,17 +6,11 @@ // // -using System; -using System.Diagnostics; -using System.IO.Packaging; using System.Globalization; -using System.Net; using System.Text; -using System.Windows; using System.Windows.Markup; using System.Windows.Media; using System.Reflection; -using System.IO; using MS.Internal; using MS.Internal.AppModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs index 1f8ca58837a..3018587db1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs @@ -4,8 +4,6 @@ using System.Collections; using System.Drawing; -using System.Collections.Generic; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; #nullable enable @@ -178,22 +176,30 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? valu || !classInfo.HasMember("_items") || !classInfo.HasMember("_size") || classInfo.GetRawValue("_size") is not int size - || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord + || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord || size > arrayRecord.Length) { return false; } ArrayList arrayList = new(size); - object?[] array = arrayRecord.GetArray(); + SerializationRecord?[] array = arrayRecord.GetArray(); for (int i = 0; i < size; i++) { - if (array[i] is SerializationRecord) + SerializationRecord? elementRecord = array[i]; + if (elementRecord is null) { + arrayList.Add(null); + } + else if (elementRecord is PrimitiveTypeRecord primitiveTypeRecord) + { + arrayList.Add(primitiveTypeRecord.Value); + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) return false; } - - arrayList.Add(array[i]); } value = arrayList; @@ -259,27 +265,39 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hash || !classInfo.HasMember("Values") // Note that hashtables with custom comparers and/or hash code providers will have non null Comparer || classInfo.GetSerializationRecord("Comparer") is not null - || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord - || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord + || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord + || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord || keysRecord.Length != valuesRecord.Length) { return false; } Hashtable temp = new(keysRecord.Length); - object?[] keys = keysRecord.GetArray(); - object?[] values = valuesRecord.GetArray(); + SerializationRecord?[] keys = keysRecord.GetArray(); + SerializationRecord?[] values = valuesRecord.GetArray(); for (int i = 0; i < keys.Length; i++) { - object? key = keys[i]; - object? value = values[i]; + SerializationRecord? key = keys[i]; + SerializationRecord? value = values[i]; - if (key is null or SerializationRecord || value is SerializationRecord) + if (key is null || key is not PrimitiveTypeRecord primitiveKey) { return false; } - temp[key] = value; + if (value is null) + { + temp[primitiveKey.Value] = null; // null values are allowed + } + else if (value is PrimitiveTypeRecord primitiveValue) + { + temp[primitiveKey.Value] = primitiveValue.Value; + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) + return false; + } } hashtable = temp; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs index 134a0dde0a8..12c60ebf310 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs @@ -2,22 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: Ole Services for DragDrop and Clipboard. -// -// using MS.Win32; using MS.Internal; -using System.Security; -using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Threading; using System.Windows.Input; -using SR=MS.Internal.PresentationCore.SR; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs index 0d87aaa3c8d..df763b6cb19 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs @@ -2,23 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Diagnostics; -using System.ComponentModel; -using System.Runtime.InteropServices; using System.Windows.Threading; -using System.Security; using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Markup; using System.Windows.Input; -using MS.Win32; using MS.Utility; using MS.Internal; -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs index 5c70a1fa8fa..269e70dbab6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs @@ -2,18 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: QueryContinueDragEventArgs for drag-and-drop operation. -// -// - -using System; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventHandler.cs index 326dfdc7f1a..2b2563deeef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventHandler.cs @@ -9,8 +9,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReadOnlyPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReadOnlyPropertyMetadata.cs index 2c822e1a341..4e4ee34cc25 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReadOnlyPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReadOnlyPropertyMetadata.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { internal class ReadOnlyPropertyMetadata : PropertyMetadata diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Resources/AssemblyAssociatedContentFileAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Resources/AssemblyAssociatedContentFileAttribute.cs index b22944aed76..becd031b214 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Resources/AssemblyAssociatedContentFileAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Resources/AssemblyAssociatedContentFileAttribute.cs @@ -10,8 +10,6 @@ // // -using System; - namespace System.Windows.Resources { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReverseInheritProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReverseInheritProperty.cs index 2b15e1cc976..c433f2e51e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReverseInheritProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ReverseInheritProperty.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Input; using MS.Internal; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RouteItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RouteItem.cs index ee4f713513a..acdef31dac6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RouteItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RouteItem.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { // An item in the EventRoute diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEvent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEvent.cs index 85123b2219d..1fa66a9b465 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEvent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEvent.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; using System.Windows.Markup; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs index 62f82da66b5..d6ff6e3c6ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; -using System.Collections.Specialized ; -using System.Windows.Input; -using System.Diagnostics; +using System.Collections.Specialized; using MS.Internal; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventHandlerInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventHandlerInfo.cs index c8dc909ad32..d98bdc346b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventHandlerInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventHandlerInfo.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutingStrategy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutingStrategy.cs index 104a59e3bc6..463210bfadd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutingStrategy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutingStrategy.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SizeChangedInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SizeChangedInfo.cs index 30714d3cee4..3acfefc4afb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SizeChangedInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SizeChangedInfo.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceChangedEventHandler.cs index 7e67beee7c3..4a4e294fee5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceChangedEventHandler.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceItem.cs index 93611a1a106..804323f1e98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/SourceItem.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { // An item in the source context diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusCaptureWithinProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusCaptureWithinProperty.cs index 704e652a2dc..b21dab228a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusCaptureWithinProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusCaptureWithinProperty.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Input; using MS.Internal.KnownBoxes; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusOverProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusOverProperty.cs index 43ae2406493..f3f2dfd87d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusOverProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/StylusOverProperty.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Input; -using MS.Internal.KnownBoxes; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextAndFontProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextAndFontProperties.cs index 01d2e0d44fc..e9603865127 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextAndFontProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextAndFontProperties.cs @@ -7,8 +7,6 @@ //--------------------------------------------------------------------------- -using System; - namespace System.Windows { #region Text formatting properties diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecoration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecoration.cs index e57bb23b8d2..1450c7108b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecoration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecoration.cs @@ -9,10 +9,8 @@ // // -using System; using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Markup; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollection.cs index cd5de497f26..48e846ed7f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollection.cs @@ -9,14 +9,10 @@ // // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; using System.Windows.Media.Animation; -using System.Windows.Markup; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs index 3ae332c02b3..194f805bc17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs @@ -2,29 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: TextDecorationCollectionConverter class -// -// - -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; -using System.Security; - -using SR=MS.Internal.PresentationCore.SR; namespace System.Windows { /// /// TypeConverter for TextDecorationCollection - /// + /// public sealed class TextDecorationCollectionConverter : TypeConverter { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs index 8d069c701b3..c5737d7694c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs @@ -11,17 +11,12 @@ using MS.Internal.Media; using MS.Internal.PresentationCore; using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Input; using System.Windows.Input.StylusPlugIns; -using System.Windows.Interop; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement3D.cs index 53d7da8aa27..f4db8a5eca9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement3D.cs @@ -8,27 +8,12 @@ using MS.Internal; using MS.Internal.Interop; using MS.Internal.KnownBoxes; -using MS.Internal.Media; using MS.Internal.PresentationCore; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Security; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Input; -using System.Windows.Input.StylusPlugIns; -using System.Windows.Interop; -using System.Windows.Markup; using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Composition; -using System.Windows.Media.Effects; using System.Windows.Media.Media3D; -using System.Windows.Threading; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs index c0bf7c945e0..29c9b279757 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Collections.Generic; - -using SR=MS.Internal.PresentationCore.SR; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs index 7bc1983ec21..19b90b15ea1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs @@ -2,28 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: Clipboard implementation to provide methods to place/get data from/to the system // clipboard. // // See spec at http://avalon/uis/Data%20Transfer%20clipboard%20dragdrop/Avalon%20Clipboard.htm -// -// using MS.Win32; using MS.Internal; using System.Collections.Specialized; using System.IO; -using System.Security; using System.ComponentModel; using System.Runtime.InteropServices; -using System.Runtime.Serialization; using System.Threading; using System.Windows.Media.Imaging; -using System.Windows.Threading; -using SR = MS.Internal.PresentationCore.SR; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs index 62da9e0cf5e..ae5d79fad2b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs @@ -2,41 +2,32 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// +using MS.Win32; +using System.Collections; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Formats.Nrbf; +using System.IO; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using System.Windows.Interop; +using System.Windows.Media.Imaging; +using System.Text; +using MS.Internal; + +using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; + // Description: Top-level class for data transfer for drag-drop and clipboard. // // See spec at http://avalon/uis/Data%20Transfer%20clipboard%20dragdrop/Avalon%20Data%20Transfer%20Object.htm -// -// namespace System.Windows { - using System; - using MS.Win32; - using System.Collections; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Formats.Nrbf; - using System.IO; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Runtime.Serialization; - using System.Runtime.Serialization.Formatters.Binary; - using System.Security; - using System.Windows.Interop; - using System.Windows.Media.Imaging; - using System.Text; - using MS.Internal; - - using SR=MS.Internal.PresentationCore.SR; - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - -// PreSharp uses message numbers that the C# compiler doesn't know about. -// Disable the C# complaints, per the PreSharp documentation. + // PreSharp uses message numbers that the C# compiler doesn't know about. + // Disable the C# complaints, per the PreSharp documentation. #pragma warning disable 1634, 1691 #region DataObject Class @@ -1262,27 +1253,21 @@ private int OleGetDataUnrestricted(ref FORMATETC formatetc, ref STGMEDIUM medium /// /// Retrieves a list of distinct strings from the array. /// - private static string[] GetDistinctStrings(string[] formats) + private static string[] GetDistinctStrings(List formats) { - ArrayList distinct; - string[] distinctStrings; + List distinct = new(formats.Count); - distinct = new ArrayList(); - for (int i=0; i @@ -2479,41 +2464,29 @@ public void SetData(Object data) public string[] GetFormats(bool autoConvert) { + IEnumFORMATETC enumFORMATETC = EnumFormatEtcInner(DATADIR.DATADIR_GET); + List formats = []; - IEnumFORMATETC enumFORMATETC; - ArrayList formats; - string[] temp; - - enumFORMATETC = null; - formats = new ArrayList(); - - enumFORMATETC = EnumFormatEtcInner(DATADIR.DATADIR_GET); - - if (enumFORMATETC != null) + if (enumFORMATETC is not null) { - FORMATETC []formatetc; - int[] retrieved; + FORMATETC[] formatetc = [new FORMATETC()]; + int[] retrieved = [1]; enumFORMATETC.Reset(); - formatetc = new FORMATETC[] { new FORMATETC() }; - retrieved = new int[] {1}; - while (retrieved[0] > 0) { retrieved[0] = 0; if (enumFORMATETC.Next(1, formatetc, retrieved) == NativeMethods.S_OK && retrieved[0] > 0) { - string name; + string name = DataFormats.GetDataFormat(formatetc[0].cfFormat).Name; - name = DataFormats.GetDataFormat(formatetc[0].cfFormat).Name; if (autoConvert) { - string[] mappedFormats; + string[] mappedFormats = GetMappedFormats(name); - mappedFormats = GetMappedFormats(name); - for (int i=0; i formats = []; for (int baseFormatIndex = 0; baseFormatIndex < baseVar.Length; baseFormatIndex++) { @@ -3453,15 +3421,13 @@ public string[] GetFormats(bool autoConvert) else { if (!serializationCheckFailedForThisFunction) - { + { formats.Add(baseVar[baseFormatIndex]); - } + } } } - temp = new string[formats.Count]; - formats.CopyTo(temp, 0); - baseVar = GetDistinctStrings(temp); + baseVar = GetDistinctStrings(formats); } return baseVar; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/GlobalUsings.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/GlobalUsings.cs new file mode 100644 index 00000000000..f73ee7d808f --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/GlobalUsings.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +global using System; +global using System.Collections.Generic; +global using System.Diagnostics; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/HashHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/HashHelper.cs new file mode 100644 index 00000000000..3f3863bdc46 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/HashHelper.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; + +namespace MS.Internal.Hashing.PresentationFramework; + +internal static class HashHelper +{ + private static readonly Type[] s_unreliableTypes = + [ + // The first four are from PresentationCore + typeof(System.Windows.Media.CharacterMetrics), // bug 1612093 + typeof(System.Windows.Ink.ExtendedProperty), // bug 1612101 + typeof(System.Windows.Media.FamilyTypeface), // bug 1612103 + typeof(System.Windows.Media.NumberSubstitution), // bug 1612105 + + // Next two are PresentationFramework + typeof(System.Windows.Markup.Localizer.BamlLocalizableResource), // bug 1612118 + typeof(System.Windows.ComponentResourceKey) // bug 1612119 + ]; + + /// + /// Certain objects don't have reliable hashcodes, and cannot be used in a Hashtable, Dictionary, etc. + /// + internal static bool HasReliableHashCode(object item) => item is not null && !s_unreliableTypes.Contains(item.GetType()); +} diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AnimatedTypeHelpers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AnimatedTypeHelpers.cs index 897c5ccfb43..25bcb156120 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AnimatedTypeHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AnimatedTypeHelpers.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Media3D; namespace MS.Internal.PresentationFramework { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/AttachedAnnotation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/AttachedAnnotation.cs index d5ac91c089d..f134ed7487c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/AttachedAnnotation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/AttachedAnnotation.cs @@ -13,15 +13,9 @@ // Spec: Annotation Service Spec.doc // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Annotations; using System.Windows.Annotations.Storage; -using System.Windows.Media; -using System.Xml; -using System.Collections.Generic; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/DataIdProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/DataIdProcessor.cs index 9a14801ebee..14c3f7f924b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/DataIdProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/DataIdProcessor.cs @@ -13,20 +13,11 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Markup; -using System.Windows.Threading; using System.Xml; -using MS.Utility; - namespace MS.Internal.Annotations.Anchoring { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedPageProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedPageProcessor.cs index 6c2a016f1f9..fd14024f584 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedPageProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedPageProcessor.cs @@ -13,19 +13,12 @@ // // -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Xml; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Media; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedTextSelectionProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedTextSelectionProcessor.cs index ff9bba82f89..469eb118610 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedTextSelectionProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/FixedTextSelectionProcessor.cs @@ -14,24 +14,13 @@ // Spec: Anchoring to text in paginated docs.doc // -using System; -using System.IO; using System.Windows; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Globalization; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Media; using System.Xml; -using MS.Utility; -using MS.Internal.Documents; -using MS.Internal.PtsHost; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/LocatorManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/LocatorManager.cs index c480add7f71..d1c8628a0fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/LocatorManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/LocatorManager.cs @@ -13,25 +13,14 @@ // // -using System; -using System.IO; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; using System.Windows; using System.Windows.Annotations; using System.Windows.Annotations.Storage; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Markup; using System.Windows.Threading; using System.Xml; -using MS.Internal; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/PathNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/PathNode.cs index 8f2c116e88f..d5be1646d41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/PathNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/PathNode.cs @@ -12,15 +12,10 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Diagnostics; using System.Collections; -using System.ComponentModel; using System.Windows; using System.Windows.Annotations; using System.Windows.Media; -using System.Windows.Markup; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SelectionProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SelectionProcessor.cs index d2942fb60ed..d26d7fd2242 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SelectionProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SelectionProcessor.cs @@ -12,13 +12,8 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Annotations; -using System.Windows.Media; -using MS.Utility; using System.Xml; namespace MS.Internal.Annotations.Anchoring diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SubTreeProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SubTreeProcessor.cs index d4a1a0e1017..e832a03a6ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SubTreeProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/SubTreeProcessor.cs @@ -12,15 +12,8 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Media; -using MS.Utility; using System.Xml; namespace MS.Internal.Annotations.Anchoring diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionHelper.cs index bec53e8b85f..f40e5c67029 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionHelper.cs @@ -10,22 +10,13 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using MS.Internal.Annotations.Component; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Media; -using System.Xml; using MS.Internal.Documents; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionProcessor.cs index ab3a7d83aa7..98a3a5f8d0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextSelectionProcessor.cs @@ -12,22 +12,12 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Media; using System.Xml; -using MS.Utility; - -using MS.Internal.Documents; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextViewSelectionProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextViewSelectionProcessor.cs index d15ff899e3e..92f1f40892a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextViewSelectionProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TextViewSelectionProcessor.cs @@ -9,23 +9,11 @@ // all anchors that intersect with the text in an element's TextView. // -using System; using System.Windows; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; using System.Globalization; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Controls; using System.Windows.Documents; using System.Xml; -using MS.Utility; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using MS.Internal.Documents; -using MS.Internal.PtsHost; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TreeNodeSelectionProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TreeNodeSelectionProcessor.cs index 9a459f983d9..083eb8982fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TreeNodeSelectionProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Anchoring/TreeNodeSelectionProcessor.cs @@ -10,17 +10,10 @@ // Spec: Anchoring Namespace Spec.doc // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; using System.Windows; using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Documents; using System.Windows.Media; using System.Xml; -using MS.Utility; namespace MS.Internal.Annotations.Anchoring { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationMap.cs index 735da2366af..1a2214301ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationMap.cs @@ -8,12 +8,6 @@ // map between annotation id and attached annotations used by the service // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Annotations; - namespace MS.Internal.Annotations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationObservableCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationObservableCollection.cs index 96ce541e57e..94fdf7a7cb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationObservableCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationObservableCollection.cs @@ -11,15 +11,10 @@ // ItemChanged event. // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows; -using System.Windows.Data; namespace MS.Internal.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationResourceCollection.cs index b45dd8084da..a95e27676ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationResourceCollection.cs @@ -9,15 +9,9 @@ // is used specifically for AnnotationResources. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Annotations; -using System.Windows.Data; namespace MS.Internal.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationXmlConstants.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationXmlConstants.cs index dfd8a0e2c0e..c374aab65b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationXmlConstants.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AnnotationXmlConstants.cs @@ -8,8 +8,6 @@ // adheres to the annotation schema. // -using System; - namespace MS.Internal.Annotations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotation.cs index 8331e76062b..11eb1cfe995 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotation.cs @@ -7,13 +7,9 @@ // AttachedAnnotation defines the IAttachedAnnotation interface // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Annotations; using System.Windows.Annotations.Storage; -using System.Windows.Media; -using MS.Utility; namespace MS.Internal.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotationChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotationChangedEventArgs.cs index 4caeb1f60c6..cede993dcb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotationChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/AttachedAnnotationChangedEventArgs.cs @@ -8,23 +8,6 @@ // for the AttachedAnnotationChanged event fired by the AnnotationService // -using System; -using System.Collections; -using System.ComponentModel; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Annotations.Storage; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Xml; -using System.Diagnostics; -using MS.Internal; -using MS.Utility; -using System.Reflection; // for BindingFlags -using System.Globalization; // for CultureInfo - namespace MS.Internal.Annotations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AdornerPresentationContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AdornerPresentationContext.cs index a152d03c03b..415930d86ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AdornerPresentationContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AdornerPresentationContext.cs @@ -12,11 +12,7 @@ // presentation context stored in the annotation component. // -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; -using System.Windows.Annotations; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationAdorner.cs index abd176a4a0f..1504cd918fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationAdorner.cs @@ -8,9 +8,6 @@ // between the component and the adorner layer. // -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationComponentManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationComponentManager.cs index a5b69defcaa..6496dc51145 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationComponentManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationComponentManager.cs @@ -7,13 +7,9 @@ // AnnotationComponentManager // -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Annotations; using System.Windows.Documents; -using System.Windows.Media; namespace MS.Internal.Annotations.Component { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationHighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationHighlightLayer.cs index 12ebae93a13..65da4d051c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationHighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/AnnotationHighlightLayer.cs @@ -8,20 +8,13 @@ // and StickyNote anchors as well. // -using System; -using MS.Internal; -using System.Diagnostics; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Documents; -using MS.Internal.Documents; using System.Windows.Media; -using MS.Internal.Text; using System.Windows.Shapes; using MS.Internal.Annotations.Anchoring; -using System.Windows.Controls; namespace MS.Internal.Annotations.Component { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/HighlightComponent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/HighlightComponent.cs index 79e90f5bd21..473124e7292 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/HighlightComponent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/HighlightComponent.cs @@ -7,23 +7,15 @@ // Description: AnnotationComponent that visualizes highlights // -using System; -using MS.Internal; -using System.Diagnostics; using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Shapes; -using MS.Internal.Text; using System.Xml; using System.IO; using System.Windows.Annotations; -using System.Reflection; -using System.Windows.Annotations.Storage; using System.Windows.Controls; -using MS.Internal.Annotations.Anchoring; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IAnnotationComponent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IAnnotationComponent.cs index 48a987016bf..3cbdb733539 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IAnnotationComponent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IAnnotationComponent.cs @@ -7,10 +7,8 @@ // IAnnotationComponent // -using System; using System.Collections; using System.Windows; -using System.Windows.Annotations; using System.Windows.Media; namespace MS.Internal.Annotations.Component diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IHighlightRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IHighlightRange.cs index 2a367fb7c67..400e0900c1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IHighlightRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/IHighlightRange.cs @@ -7,20 +7,9 @@ // between HighlightComponent and AnnotationHighlightLayer // -using System; -using MS.Internal; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Windows; using System.Windows.Annotations; -using System.Windows.Documents; using System.Windows.Media; -using MS.Internal.Text; using System.Windows.Shapes; -using MS.Internal.Annotations.Anchoring; -using System.Windows.Controls; namespace MS.Internal.Annotations.Component { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/MarkedHighlightComponent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/MarkedHighlightComponent.cs index 88d3c535cd5..3da58ffa113 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/MarkedHighlightComponent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/MarkedHighlightComponent.cs @@ -12,9 +12,6 @@ // See spec at StickyNoteControlSpec.mht // -using System; -using System.ComponentModel; -using System.Windows.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Data; @@ -22,12 +19,9 @@ using System.Windows.Documents; using System.Windows.Media; using System.Windows.Shapes; -using System.Text; using System.Collections; -using System.Collections.Generic; using System.Xml; using System.Windows.Input; -using System.Diagnostics; // Assert using MS.Internal.Annotations.Anchoring; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/PresentationContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/PresentationContext.cs index 60779063c43..5c28f355bef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/PresentationContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Component/PresentationContext.cs @@ -7,9 +7,7 @@ // PresentationContext // -using System; using System.Windows; -using System.Windows.Media; namespace MS.Internal.Annotations.Component { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/ObservableDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/ObservableDictionary.cs index c6562a0faaf..5d36870c74b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/ObservableDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/ObservableDictionary.cs @@ -12,11 +12,8 @@ // Spec: Simplifying Store Cache Model.doc // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; namespace MS.Internal.Annotations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/OwnedObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/OwnedObject.cs index 85b2dd59373..d8dcfe74d85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/OwnedObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/OwnedObject.cs @@ -11,8 +11,6 @@ // reproduced from a round-trip serialization/deserialization. // -using System; - namespace MS.Internal.Annotations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Serializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Serializer.cs index 5a69eeb668d..a00acbc352f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Serializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Serializer.cs @@ -12,14 +12,9 @@ // choose not to for our purposes. // -using System; -using System.Diagnostics; using System.Reflection; -using System.Windows.Annotations.Storage; using System.Xml; -using System.Xml.Schema; using System.Xml.Serialization; -using MS.Internal; namespace MS.Internal.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Storage/StoreAnnotationsMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Storage/StoreAnnotationsMap.cs index a07233111d8..ad3376e5329 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Storage/StoreAnnotationsMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/Storage/StoreAnnotationsMap.cs @@ -12,14 +12,7 @@ // Spec: CAF Storage Spec.doc // -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Diagnostics; -using System.IO; -using System.Windows; using System.Windows.Annotations; -using MS.Utility; namespace MS.Internal.Annotations.Storage diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/TextAnchor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/TextAnchor.cs index 594bb99590c..2264e0431fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/TextAnchor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/TextAnchor.cs @@ -13,11 +13,8 @@ // a table). // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; -using System.Windows; using System.Windows.Documents; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/XmlElementCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/XmlElementCollection.cs index 3ab15e4498c..c14213f5c98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/XmlElementCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Annotations/XmlElementCollection.cs @@ -13,16 +13,10 @@ // // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; using System.Windows; -using System.Windows.Data; using System.Xml; -using MS.Internal; namespace MS.Internal.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppModelKnownContentFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppModelKnownContentFactory.cs index 9c67b4bf932..a8007a5505a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppModelKnownContentFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppModelKnownContentFactory.cs @@ -7,14 +7,10 @@ // Provides a method to turn a baml stream into an object. // -using System; using System.IO; using System.Windows; using System.Windows.Markup; using System.Windows.Navigation; -using MS.Internal.Controls; -using MS.Internal.Navigation; -using MS.Internal.Utility; using MS.Internal.Resources; using System.IO.Packaging; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs index f819a711b0a..47ab6841795 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs @@ -13,13 +13,6 @@ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // -using System; -using System.Collections; -using System.Diagnostics; -using System.Globalization; -using System.Security; -using Microsoft.Win32; -using System.IO.Packaging; using System.Windows; using System.Windows.Interop; using MS.Internal.Utility; @@ -27,8 +20,6 @@ using System.Runtime.InteropServices; using MS.Internal.Documents.Application; -using SecurityHelper = MS.Internal.SecurityHelper; - namespace MS.Internal.AppModel { enum LaunchResult diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/BamlStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/BamlStream.cs index ef13fd71c18..00d1c30d7ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/BamlStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/BamlStream.cs @@ -8,13 +8,9 @@ // the assembly which hosts the baml stream. // -using System; using System.IO; using System.Reflection; -using System.Resources; -using System.Globalization; using System.Windows.Markup; -using System.Security; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ContentFilePart.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ContentFilePart.cs index 1c26339ac09..91b46575037 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ContentFilePart.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ContentFilePart.cs @@ -7,17 +7,10 @@ // ContentFilePart is an implementation of the abstract PackagePart class. It contains an override for GetStreamCore. // -using System; using System.IO.Packaging; using System.Windows; -using System.Windows.Resources; using System.IO; -using System.Resources; -using System.Globalization; -using System.Security; using System.Windows.Navigation; -using System.Diagnostics; -using System.Reflection; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IBrowserHostServices.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IBrowserHostServices.cs index dbd66cb1c0d..4723b17883d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IBrowserHostServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IBrowserHostServices.cs @@ -27,10 +27,6 @@ // and unmanaged worlds // -using System; -using System.Runtime.InteropServices; -using System.Security; - namespace MS.Internal.AppModel { //********************************************************************************************// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IContentContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IContentContainer.cs index d2fae0041a8..1dac838740a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IContentContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IContentContainer.cs @@ -6,10 +6,6 @@ // Description: BindProduct. Abstract representation of the product of a bind // -using System; -using System.IO; -using MS.Internal.Utility; - namespace MS.Internal.AppModel { // Interface that's required to be implemented by all classes that diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/INavigator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/INavigator.cs index d8fac0973d5..efbee81a6af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/INavigator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/INavigator.cs @@ -9,14 +9,8 @@ // by NavigationWindow and Frame. // -using System; using System.Collections; -using System.ComponentModel; - -using MS.Internal.Utility; -using System.Windows; using System.Windows.Navigation; -using System.Windows.Documents; using System.Windows.Media; namespace MS.Internal.AppModel diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IconHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IconHelper.cs index 637a51de895..cb7abdcb82a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IconHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/IconHelper.cs @@ -7,21 +7,13 @@ // implementation for the Window class. // -using System; -using System.Security; -using System.Diagnostics; using System.Collections.ObjectModel; using System.Runtime.InteropServices; -using System.ComponentModel; using System.Windows; -using System.Windows.Interop; using System.Windows.Media.Imaging; using System.Windows.Media; - -using MS.Internal; using MS.Internal.Interop; -using MS.Internal.PresentationFramework; // SecurityHelper using MS.Win32; namespace MS.Internal.AppModel diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/JournalNavigationScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/JournalNavigationScope.cs index 9d88b4cc4ee..9f3afdaaade 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/JournalNavigationScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/JournalNavigationScope.cs @@ -13,10 +13,7 @@ // NavigationService. // -using System; using System.Collections; -using System.Security; -using System.Diagnostics; using System.Windows; using System.Windows.Navigation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/Journaling.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/Journaling.cs index 4a4ba6a8427..757b426d118 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/Journaling.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/Journaling.cs @@ -6,15 +6,11 @@ // Description: Contains various journaling related internal enums and classes // -using System; -using System.Security; using System.Runtime.Serialization; -using System.Diagnostics; using System.Windows; using System.Windows.Markup; using System.Windows.Navigation; -using MS.Internal.Utility; //In order to avoid generating warnings about unknown message numbers and //unknown pragmas when compiling your C# source code with the actual C# compiler, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/MimeObjectFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/MimeObjectFactory.cs index cdcc8aad3c9..3d8ee4bcb96 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/MimeObjectFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/MimeObjectFactory.cs @@ -8,13 +8,7 @@ // mime type + stream into objects. // -using System; -using System.Windows; using System.IO; -using System.Collections.Generic; -using MS.Internal.Utility; -using System.Diagnostics; -using System.Globalization; using System.Windows.Markup; namespace MS.Internal.AppModel diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/NavigationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/NavigationHelper.cs index 44f213bdc8d..81ce98102a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/NavigationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/NavigationHelper.cs @@ -2,15 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Navigation; using System.Windows.Controls; -using System.Windows.Automation; using System.Windows.Media; -using System.Globalization; -using System.Diagnostics; -using MS.Internal; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/OleCmdHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/OleCmdHelper.cs index d6405e60464..14b406d4af1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/OleCmdHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/OleCmdHelper.cs @@ -8,21 +8,15 @@ // IOleCommandTarget calls in browser hosting scenario // -using System; using System.Collections; -using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Threading; using System.Windows; -using System.Security; using System.Windows.Input; -using System.Windows.Interop; -using System.Windows.Navigation; using System.Windows.Controls; using MS.Internal.Documents; // DocumentApplicationDocumentViewer -using MS.Internal.PresentationFramework; // SecurityHelper using MS.Internal.KnownBoxes; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ProgressPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ProgressPage.cs index 9e65c42d767..3be58d9322b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ProgressPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ProgressPage.cs @@ -8,11 +8,9 @@ // the managed one from up to v3.5. See Host\DLL\ProgressPage.hxx for details. // -using System; using System.Runtime.InteropServices; using System.Windows.Interop; using System.Windows.Threading; -using System.Security; // Disambiguate MS.Internal.HRESULT... using HR = MS.Internal.Interop.HRESULT; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/RequestStatusBarUpdateEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/RequestStatusBarUpdateEventArgs.cs index 2817f06ee4c..001dec550fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/RequestStatusBarUpdateEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/RequestStatusBarUpdateEventArgs.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Net; using System.Windows; using MS.Internal.Utility; -using System.Security; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourceContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourceContainer.cs index 082f7b0779f..244de190f12 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourceContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourceContainer.cs @@ -12,20 +12,13 @@ // the NotSupportedException. // -using System; using System.IO.Packaging; using System.IO; -using System.Collections.Generic; -using System.Windows.Resources; -using System.Resources; using System.Reflection; using System.Globalization; -using MS.Internal.PresentationFramework; // SafeSecurityHelper using System.Windows; using System.Windows.Navigation; using MS.Internal.Resources; -using System.Windows.Interop; -using System.Security; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs index b4f5115abda..6e91bad1f47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs @@ -8,17 +8,11 @@ // ResourcePart is an implementation of the abstract PackagePart class. It contains an override for GetStreamCore. // -using System; using System.IO.Packaging; using System.Windows; -using System.Windows.Resources; using System.IO; -using System.Resources; -using System.Globalization; -using System.Security; using MS.Internal.Resources; -using MS.Internal; //In order to avoid generating warnings about unknown message numbers and //unknown pragmas when compiling your C# source code with the actual C# compiler, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ReturnEventSaver.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ReturnEventSaver.cs index e247ea7f99e..24e9e6a63b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ReturnEventSaver.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ReturnEventSaver.cs @@ -15,14 +15,9 @@ // saved list to the calling pagefunction // -using System; using System.Windows.Navigation; using System.Windows; -using System.Diagnostics; -using System.Collections; using System.Reflection; -using System.IO; -using System.Security; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/SecurityMgrSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/SecurityMgrSite.cs index f73249c2c80..ad82fbbfdc9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/SecurityMgrSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/SecurityMgrSite.cs @@ -8,12 +8,8 @@ // It is primarily used to supply an hwnd to be modal to- when a ProcessUrlAction call // is required to show UI. -using System; using MS.Win32; -using System.Runtime.InteropServices; using System.Windows; -using System.Security; -using MS.Internal.AppModel; namespace MS.Internal { @@ -32,7 +28,7 @@ public void GetWindow( /* [out] */ ref IntPtr phwnd) Window curWindow = Application.Current.MainWindow; if (curWindow != null) { - phwnd = curWindow.CriticalHandle; + phwnd = curWindow.Handle; } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ShellProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ShellProvider.cs index 16ddad1bebf..01987ea9e74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ShellProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ShellProvider.cs @@ -2,25 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Text; +using MS.Win32; +using MS.Internal.Interop; + +// Some COM interfaces and Win32 structures are already declared in the framework. +// Interesting ones to remember in System.Runtime.InteropServices.ComTypes are: +using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; // Interfaces and enums are taken from ShObjIdl.idl namespace MS.Internal.AppModel { - using System; - using System.Runtime.CompilerServices; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Security; - using System.Text; - using MS.Win32; - using MS.Internal.Interop; - - // Some COM interfaces and Win32 structures are already declared in the framework. - // Interesting ones to remember in System.Runtime.InteropServices.ComTypes are: - using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; - using IPersistFile = System.Runtime.InteropServices.ComTypes.IPersistFile; - using IStream = System.Runtime.InteropServices.ComTypes.IStream; + // There are THREE definitions of HRESULT. Two in ErrorCodes, and one in wgx_render.cs. + // wgx_render.cs wins if we don't put this inside of the namespace. + using Win32Error = MS.Internal.Interop.Win32Error; + using HRESULT = MS.Internal.Interop.HRESULT; #region Structs @@ -652,7 +651,7 @@ internal interface IFileSaveDialog : IFileDialog ] internal interface IApplicationDestinations { - // Set the App User Model ID for the application removing destinations from its list. If an AppID is not provided + // Set the App User Model ID for the application removing destinations from its list. If an AppID is not provided // via this method, the system will use a heuristically determined ID. This method must be called before // RemoveDestination or RemoveAllDestinations. void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID); @@ -676,14 +675,14 @@ internal interface IApplicationDocumentLists { /// /// Set the App User Model ID for the application retrieving this list. If an AppID is not provided via this method, - /// the system will use a heuristically determined ID. This method must be called before GetList. + /// the system will use a heuristically determined ID. This method must be called before GetList. /// /// App Id. void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID); /// - /// Retrieve an IEnumObjects or IObjectArray for IShellItems and/or IShellLinks. - /// Items may appear in both the frequent and recent lists. + /// Retrieve an IEnumObjects or IObjectArray for IShellItems and/or IShellLinks. + /// Items may appear in both the frequent and recent lists. /// /// Which of the known list types to retrieve /// The number of items desired. @@ -739,7 +738,7 @@ internal interface IObjectWithAppUserModelId }; /// - /// Provides access to the ProgID associated with an object + /// Provides access to the ProgID associated with an object /// [ ComImport, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs index 2c6b79663f3..0f47f46e942 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Controls; using System.Windows.Input; -using System.Windows.Media; -using System.Security; namespace MS.Internal.Commands { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXContainer.cs index 52ca9447136..395c152e716 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXContainer.cs @@ -9,15 +9,8 @@ // Source copied from AxContainer.cs // -using System; -using System.Collections; -using System.Diagnostics; -using Microsoft.Win32; - using System.Windows.Interop; using MS.Win32; -using System.Security; -using System.Windows.Controls; namespace MS.Internal.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXHelper.cs index c1c683b7401..f947b2f27c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXHelper.cs @@ -9,11 +9,8 @@ // Source copied from axhosthelper.cs // -using System; -using System.Collections; using System.Collections.Specialized; using System.Runtime.InteropServices; -using System.Security; using MS.Win32; namespace MS.Internal.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXSite.cs index ac2dc48a6f8..1b3f7d9e187 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ActiveXSite.cs @@ -3,18 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Runtime.InteropServices; -using Microsoft.Win32; using System.Windows; using System.Windows.Interop; -using MS.Internal.Controls; -using MS.Internal; -using MS.Internal.PresentationFramework; using MS.Win32; -using System.Security; -using System.Windows.Controls; namespace MS.Internal.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ConnectionPointCookie.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ConnectionPointCookie.cs index 49814b3aa31..f9998b07633 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ConnectionPointCookie.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ConnectionPointCookie.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security ; using System.Windows; -using MS.Internal; using MS.Win32; // Since we disable PreSharp warnings in this file, PreSharp warning is unknown to C# compiler. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/CustomCategoryAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/CustomCategoryAttribute.cs index e597c6c98c0..41c45fe0e1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/CustomCategoryAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/CustomCategoryAttribute.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using MS.Internal; -using System.Windows; -using System.Diagnostics; -using System.Globalization; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerable.cs index eeaf55ffa85..055bd02a92c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerable.cs @@ -6,7 +6,6 @@ // Description: Empty enumerable // -using System; using System.Collections; namespace MS.Internal.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerator.cs index 6781c0c5580..130b88b79f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EmptyEnumerator.cs @@ -6,7 +6,6 @@ // Description: Empty enumerator // -using System; using System.Collections; namespace MS.Internal.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EnumUnknown.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EnumUnknown.cs index 764197d91ba..da041e9ca32 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EnumUnknown.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/EnumUnknown.cs @@ -8,12 +8,7 @@ // Source copied from AxContainer.cs // -using System; -using System.Collections; -using System.Diagnostics; using System.Runtime.InteropServices; -using Microsoft.Win32; -using System.Security; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/IGeneratorHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/IGeneratorHost.cs index 4cac5b2bdea..6ea80779523 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/IGeneratorHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/IGeneratorHost.cs @@ -8,8 +8,6 @@ // Specs: Data Styling.mht // -using System; -using System.ComponentModel; using System.Windows; using System.Windows.Controls; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasFeedbackAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasFeedbackAdorner.cs index b7e74104698..a0f118b5c72 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasFeedbackAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasFeedbackAdorner.cs @@ -7,9 +7,6 @@ // A class which is used as the feedback adorner of the InkCanvas selection // -using MS.Internal; -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasInnerCanvas.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasInnerCanvas.cs index 4e80a2ec105..ebccee9e043 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasInnerCanvas.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasInnerCanvas.cs @@ -7,10 +7,7 @@ // Defines a Canvas-like class which is used by InkCanvas for the layout. // -using System; using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasSelectionAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasSelectionAdorner.cs index 1de0463a27d..ef2e8d37411 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasSelectionAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InkCanvasSelectionAdorner.cs @@ -7,13 +7,6 @@ // A class which is used as the selection adorner of the InkCanvas selection // -using MS.Internal; -using MS.Internal.Controls; -using MS.Internal.Ink; -using System; -using System.Diagnostics; -using System.Collections.Generic; -using System.Collections; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InnerItemCollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InnerItemCollectionView.cs index 7855b423152..42706c9fb9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InnerItemCollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/InnerItemCollectionView.cs @@ -10,7 +10,6 @@ // See specs at ItemsControl.mht // -using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ModelTreeEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ModelTreeEnumerator.cs index c8b005e2b8a..07b937641ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ModelTreeEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ModelTreeEnumerator.cs @@ -3,16 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using MS.Internal.Controls; -using MS.Internal.Data; -using MS.Utility; namespace MS.Internal.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteAnnotations.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteAnnotations.cs index 4f7e3463861..b929376ad0b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteAnnotations.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteAnnotations.cs @@ -12,26 +12,16 @@ using MS.Internal; using MS.Internal.Annotations; using MS.Internal.Annotations.Component; -using MS.Internal.Controls; using MS.Internal.Controls.StickyNote; -using MS.Internal.KnownBoxes; -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; // Assert using System.Globalization; -using System.IO; using System.Windows; using System.Windows.Annotations; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; using System.Xml; -using System.Windows.Documents; using MS.Internal.Documents; -using MS.Internal.Annotations.Anchoring; //TextSelectionHelper using System.Windows.Controls.Primitives; // IScrollInfo using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteContentControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteContentControl.cs index 0ad3188cb51..8948482c712 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteContentControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteContentControl.cs @@ -8,17 +8,12 @@ // See spec at StickyNoteControlSpec.mht // -using System; -using System.Diagnostics; using System.IO; using System.Text; using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Ink; -using System.Windows.Markup; using System.Xml; namespace MS.Internal.Controls.StickyNote diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteHelper.cs index d7dd325b83f..2e0c6d49050 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/StickyNote/StickyNoteHelper.cs @@ -8,38 +8,6 @@ // See spec at http://tabletpc/longhorn/Specs/StickyNoteControlSpec.mht // -using MS.Internal.Annotations.Component; -using MS.Utility; -using System; -using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Security; -using System.Threading; -using System.Windows; -using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Resources; -using System.Windows.Markup; -using System.Windows.Shapes; -using System.Xml; -using System.Xml.XPath; - namespace MS.Internal.Controls.StickyNote { //------------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/TemplatedAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/TemplatedAdorner.cs index 9d7faed1a78..dea11cab1bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/TemplatedAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/TemplatedAdorner.cs @@ -12,17 +12,10 @@ // See specs at Specs/Validation.mht // -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; using System.Windows.Media; using System.Windows; -using System.Windows.Data; using System.Windows.Controls; using System.Windows.Documents; -using MS.Utility; namespace MS.Internal.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationErrorCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationErrorCollection.cs index 11357274108..143f320db61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationErrorCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationErrorCollection.cs @@ -12,13 +12,8 @@ // -using System; -using System.ComponentModel; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows; using System.Windows.Controls; -using System.Windows.Data; namespace MS.Internal.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationRuleCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationRuleCollection.cs index c5dc7333cb8..671b0a653a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationRuleCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/ValidationRuleCollection.cs @@ -12,8 +12,6 @@ // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserEvent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserEvent.cs index a2c811a7e6f..b7a00e4194d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserEvent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserEvent.cs @@ -10,15 +10,8 @@ // Copied from WebBrowse.cs in winforms // -using System; -using System.ComponentModel; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.Text; using System.Windows.Navigation; -using MS.Internal.PresentationFramework; using System.Windows.Controls; using MS.Win32; using MS.Internal.AppModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserSite.cs index d8bb6b3f8a2..37e365d1550 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Controls/WebBrowserSite.cs @@ -10,15 +10,8 @@ // Copied from WebBrowser.cs in winforms // -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using MS.Win32; -using System.Security; using MS.Internal.Interop; -using MS.Internal.PresentationFramework; using System.Windows.Controls; using System.Windows.Interop; using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AccessorTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AccessorTable.cs index 1cefa808957..83b99c794aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AccessorTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AccessorTable.cs @@ -14,15 +14,7 @@ property. We cache the result of this discovery process in the AccessorTable; table lookup is cheaper than doing reflection again. \***************************************************************************/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; // IBindingList -using System.Diagnostics; -using System.Reflection; // TypeDescriptor -using System.Windows; // SR using System.Windows.Threading; // Dispatcher -using MS.Internal; // Invariant.Assert namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs index 12773f0682d..00cd86b79c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs @@ -8,8 +8,6 @@ // Specs: Asynchronous Data Model.mht // -using System; - namespace MS.Internal.Data { /// Type for the work and completion delegates of an AsyncDataRequest diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingCollection.cs index cc4ef37085a..8b881dc95ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingCollection.cs @@ -9,16 +9,9 @@ // Specs: UIBind.mht // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows; -using System.Windows.Markup; using System.Windows.Data; -using MS.Utility; -using MS.Internal; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingExpressionUncommonField.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingExpressionUncommonField.cs index a500324d15b..01c6b26a5f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingExpressionUncommonField.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingExpressionUncommonField.cs @@ -7,7 +7,6 @@ // Description: Defines an UncommonField of type BindingExpression. // -using System; using System.Windows; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingValueChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingValueChangedEventArgs.cs index 936188b41f6..8e96c363301 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingValueChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingValueChangedEventArgs.cs @@ -8,8 +8,6 @@ // Specs: UIBinding.mht // -using System; - namespace MS.Internal.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingWorker.cs index 5f02b403e82..53f181d6ba3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/BindingWorker.cs @@ -6,13 +6,9 @@ // Description: Defines BindingWorker base class. // -using System; -using System.Diagnostics; -using System.Reflection; using System.ComponentModel; using System.Windows; -using System.Windows.Controls; using System.Windows.Data; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ClrBindingWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ClrBindingWorker.cs index ae5e9c459f7..2b5997fb4a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ClrBindingWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ClrBindingWorker.cs @@ -6,23 +6,14 @@ // Description: Defines ClrBindingWorker object, workhorse for CLR bindings // -using System; -using System.Collections; using System.Reflection; -using System.Globalization; using System.Windows.Threading; using System.Threading; using System.ComponentModel; - -using System.Diagnostics; using System.Windows; using System.Windows.Controls; // Validation using System.Windows.Data; -using System.Windows.Markup; // for GetTypeFromName -using MS.Internal.Controls; // Validation -using MS.Internal.Utility; // for GetTypeFromName -using MS.Utility; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupInternal.cs index c4c4070dd13..5cf4dd3e171 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupInternal.cs @@ -8,10 +8,8 @@ // See spec at Grouping.mht // -using System; using System.Collections; // IEnumerator using System.ComponentModel; // PropertyChangedEventArgs, GroupDescription -using System.Diagnostics; // Debug using System.Windows; // DependencyProperty.UnsetValue using System.Windows.Data; // CollectionViewGroup using System.Windows.Threading; // Dispatcher diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupRoot.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupRoot.cs index ffb15fc6c85..c2a3ff8473c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupRoot.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewGroupRoot.cs @@ -9,13 +9,10 @@ // See spec at Grouping.mht // -using System; using System.Collections; // IComparer -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ObservableCollection using System.Collections.Specialized; // INotifyCollectionChanged using System.ComponentModel; // PropertyChangedEventArgs, GroupDescription -using System.Diagnostics; // Debug.Assert using System.Globalization; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewProxy.cs index 41bd1c5e4d6..b246dca732f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CollectionViewProxy.cs @@ -9,9 +9,7 @@ // doesn't already have it. // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CommitManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CommitManager.cs index 9947e2166b4..2d54403ac10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CommitManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CommitManager.cs @@ -6,16 +6,10 @@ // Description: CommitManager provides global services for committing dirty bindings. // -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; - using System.Windows; using System.Windows.Data; using System.Windows.Media; -using MS.Internal.Data; - namespace MS.Internal.Data { internal class CommitManager diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CompositeCollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CompositeCollectionView.cs index 11199433d12..0c053c99a19 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CompositeCollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/CompositeCollectionView.cs @@ -9,19 +9,13 @@ // CollectionView.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Data; -using MS.Internal; // Invariant.Assert -using MS.Internal.Controls; using System.Windows.Controls; using MS.Internal.Utility; -using MS.Utility; using MS.Internal.Hashing.PresentationFramework; // HashHelper #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs index 2a13b41b33e..5c6b7092c4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs @@ -6,22 +6,14 @@ // Description: Data binding engine. // -using System; -using System.Collections.Generic; // Dictionary using System.ComponentModel; -using System.Diagnostics; using System.Collections; using System.Collections.Specialized; -using System.Globalization; using System.Windows.Threading; -using System.Security; // using System.Threading; using System.Windows; using System.Windows.Data; -using System.Windows.Markup; -using MS.Internal.Data; -using MS.Internal; // Invariant.Assert namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindOperation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindOperation.cs index 38efc9a4314..bbedb85b7fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindOperation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindOperation.cs @@ -6,7 +6,6 @@ // Description: Analogous to DispatcherOperation - one unit of cross-thread work. // -using System; using System.Windows.Threading; namespace MS.Internal.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataExtensionMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataExtensionMethods.cs index 216954e7921..35bf897d93c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataExtensionMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataExtensionMethods.cs @@ -6,11 +6,7 @@ // Description: Extension methods used by Data Services code // -using System; using System.Collections; -using System.Diagnostics; - -using System.Windows.Data; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultAsyncDataDispatcher.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultAsyncDataDispatcher.cs index 81507ae0578..9e9f7583a91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultAsyncDataDispatcher.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultAsyncDataDispatcher.cs @@ -6,12 +6,9 @@ // Description: Default async scheduler for data operations. // -using System; using System.Collections; using System.Threading; using System.Windows; -using System.Windows.Data; -using MS.Internal; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultValueConverter.cs index f93c7a4681d..57af5b63169 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DefaultValueConverter.cs @@ -8,7 +8,6 @@ // typically wraps a type converter. // -using System; using System.Globalization; using System.Collections; using System.ComponentModel; @@ -20,9 +19,6 @@ using System.Windows.Baml2006; // WpfKnownType using System.Windows.Markup; // IUriContext -using MS.Internal; // Invariant.Assert -using System.Diagnostics; - namespace MS.Internal.Data { #region DefaultValueConverter diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DifferencingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DifferencingCollection.cs index a39e026136c..2a27497b504 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DifferencingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DifferencingCollection.cs @@ -29,13 +29,10 @@ required that these be the same - you can Update against a different IEnumerable flexibility of the previous paragraph comes into play. \***************************************************************************/ -using System; using System.Collections; // IEnumerable -using System.Collections.Generic; // IList using System.Collections.ObjectModel; // ObservableCollection using System.Collections.Specialized; // INotifyCollectionChanged using System.ComponentModel; // PropertyChangedEventArgs -using MS.Internal; // Invariant.Assert namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DisplayMemberTemplateSelector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DisplayMemberTemplateSelector.cs index a25651f79fc..b6ff14a8be8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DisplayMemberTemplateSelector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DisplayMemberTemplateSelector.cs @@ -6,12 +6,9 @@ // Description: Defines DisplayMemberTemplateSelector class. // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Data; -using MS.Internal; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicObjectAccessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicObjectAccessor.cs index 5da2c9c58ed..fba78ec3e97 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicObjectAccessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicObjectAccessor.cs @@ -6,7 +6,6 @@ // Description: Accessors for dynamic objects // -using System; using SW = System.Windows; // SR namespace MS.Internal.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicValueConverter.cs index c217f81b1dd..8ad75d2c376 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DynamicValueConverter.cs @@ -7,18 +7,10 @@ // and change value converters depending on changing source and target types // -using System; using System.Globalization; -using System.Collections; -using System.ComponentModel; - -using System.Reflection; using System.Windows; using System.Windows.Data; -using MS.Internal; // Invariant.Assert -using System.Diagnostics; - namespace MS.Internal.Data { // dynamically pick and switch a default value converter to convert between source and target type diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/EnumerableCollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/EnumerableCollectionView.cs index 3869feb0f9b..8c6126bda58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/EnumerableCollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/EnumerableCollectionView.cs @@ -6,14 +6,10 @@ // Description: Collection view over an IEnumerable. // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IAsyncDataDispatcher.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IAsyncDataDispatcher.cs index 6bd4bc96d53..83804d7253e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IAsyncDataDispatcher.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IAsyncDataDispatcher.cs @@ -8,9 +8,6 @@ // Specs: Asynchronous Data Model.mht // -using System; -using System.Windows.Data; - namespace MS.Internal.Data { /// Interface for the asynchronous data dispatcher. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexedEnumerable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexedEnumerable.cs index 3e9ab066c6f..5766fb23659 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexedEnumerable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexedEnumerable.cs @@ -8,16 +8,11 @@ // to read item[N], the following indices will be a sequence for index N+1, N+2 etc. // -using System; using System.Collections; using System.Collections.Specialized; -using System.ComponentModel; using System.Reflection; - -using System.Diagnostics; using System.Windows; using System.Windows.Data; -using MS.Utility; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexerPropertyInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexerPropertyInfo.cs index 6e1e40b44a6..1feab869545 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexerPropertyInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/IndexerPropertyInfo.cs @@ -8,7 +8,6 @@ // property in SourceValueInfo is really a named indexed property (from VB). // -using System; using System.Reflection; namespace MS.Internal.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingBlock.cs index 4b197c14d64..6f3b9bd43a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingBlock.cs @@ -6,14 +6,6 @@ // Description: A component of the list data structure used for live shaping. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; - -using System.Windows; -using System.Windows.Data; - namespace MS.Internal.Data { internal class LiveShapingBlock : RBNode diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingItem.cs index 1fd02cf4da9..684a8de9af0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingItem.cs @@ -6,9 +6,6 @@ // Description: A proxy for a source item, used in live shaping. // -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs index fb0b1fb6e7a..b7e9b19356b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs @@ -39,14 +39,10 @@ move from one list to the other. view. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.Windows; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingTree.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingTree.cs index ba47b8723bd..a943bf8368b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingTree.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingTree.cs @@ -6,8 +6,6 @@ // Description: Root of the RB tree used for live shaping. // -using System; -using System.Collections; using System.Collections.Specialized; namespace MS.Internal.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ObjectRef.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ObjectRef.cs index f6fea5ec928..c842b0fc10b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ObjectRef.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ObjectRef.cs @@ -9,18 +9,12 @@ // See spec at Data Binding.mht // -using System; -using System.Collections; -using System.Diagnostics; using System.Globalization; -using System.Reflection; using System.Windows; using System.Windows.Media; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Markup; -using MS.Internal; -using MS.Internal.Utility; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ParameterCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ParameterCollection.cs index ce8fe46998f..acd72f89940 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ParameterCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ParameterCollection.cs @@ -7,7 +7,6 @@ // and can be made Read-Only. Created for ObjectDataProvider. // -using System; using System.Collections; // IList using System.Collections.ObjectModel; // Collection using System.Windows; // SR diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PathParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PathParser.cs index db60db63b22..636786cda7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PathParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PathParser.cs @@ -6,7 +6,6 @@ // Description: Parser for the Path of a (CLR) binding // -using System; using System.Collections; using System.Text; // StringBuilder using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PropertyPathWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PropertyPathWorker.cs index f8883a721aa..7bc06aa6e95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PropertyPathWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/PropertyPathWorker.cs @@ -6,21 +6,15 @@ // Description: Defines PropertyPathWorker object, workhorse for CLR bindings // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Globalization; using System.Text; -using System.Windows.Threading; using System.Windows; using System.Windows.Controls; // Validation using System.Windows.Data; using System.Windows.Markup; -using MS.Internal; -using MS.Internal.Hashing.PresentationFramework; // HashHelper namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBNode.cs index 7306f3519ad..c06e2881eb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBNode.cs @@ -6,11 +6,7 @@ // Description: Node in a red-black tree. // -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.IO; using System.Text; using TypeConverterHelper = System.Windows.Markup.TypeConverterHelper; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBTree.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBTree.cs index 2db5f8b92b9..5714d9acd0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBTree.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/RBTree.cs @@ -38,11 +38,7 @@ subtree. This permits O(log n) implementations of search-by-index, 3. Fingers. Short-lived pointers to a position within the data structure. */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Text; using System.Windows; // SR using TypeConverterHelper = System.Windows.Markup.TypeConverterHelper; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/SortFieldComparer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/SortFieldComparer.cs index 890ea5f1b7a..67dc212f1b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/SortFieldComparer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/SortFieldComparer.cs @@ -8,14 +8,10 @@ // See spec at IDataCollection.mht // -using System; using System.ComponentModel; using System.Collections; -using System.Collections.Generic; -using System.Reflection; using System.Globalization; -using MS.Utility; using System.Windows; namespace MS.Internal.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/StaticPropertyChangedEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/StaticPropertyChangedEventManager.cs index 425756a9e38..9d9a13acecb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/StaticPropertyChangedEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/StaticPropertyChangedEventManager.cs @@ -7,12 +7,9 @@ // pattern. See WeakEventTable.cs for an overview. // -using System; using System.Collections; // ICollection -using System.Collections.Generic; // List using System.Collections.Specialized; // HybridDictionary using System.ComponentModel; // INotifyPropertyChanged -using System.Diagnostics; // Debug using System.Reflection; // EventInfo using System.Windows; // WeakEventManager diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueChangedEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueChangedEventManager.cs index 7e1e7ece193..7ad8cc59a4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueChangedEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueChangedEventManager.cs @@ -26,15 +26,10 @@ Callback method deliver the "event" to the listeners that are interested in that property. \****************************************************************************/ -using System; using System.Collections; // ICollection -using System.Collections.Generic; // List using System.Collections.Specialized; // HybridDictionary using System.ComponentModel; // PropertyDescriptor -using System.Diagnostics; // Debug -using System.Reflection; // MethodInfo using System.Windows; // WeakEventManager -using MS.Internal.PresentationFramework; // SR namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueTable.cs index 0df94e82a6e..cee313508e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ValueTable.cs @@ -20,14 +20,10 @@ The malfeasant properties seem to be isolated to ADO-related classes in See the ShouldCache method. \***************************************************************************/ -using System; using System.Collections; -using System.Collections.Generic; // IEnumerable using System.Collections.Specialized; // HybridDictionary using System.ComponentModel; // IBindingList -using System.Reflection; // TypeDescriptor using System.Windows; // SR -using MS.Internal; // Invariant.Assert namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ViewManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ViewManager.cs index 3650da0a397..203d24acd21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ViewManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ViewManager.cs @@ -124,11 +124,9 @@ mitigate it. \***************************************************************************/ -using System; using System.ComponentModel; using System.Collections; using System.Collections.Specialized; -using System.Diagnostics; using System.Reflection; using System.Windows; // for exception strings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XDeferredAxisSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XDeferredAxisSource.cs index 584c37e209a..c77702852df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XDeferredAxisSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XDeferredAxisSource.cs @@ -31,8 +31,6 @@ which solves (2). At each request to GetValue, we update the contents of dependency on XLinq. Reflection saves the day. \***************************************************************************/ -using System; -using System.Diagnostics; using System.Collections; using System.Collections.ObjectModel; // ReadOnlyObservableCollection using System.Collections.Specialized; // HybridDictionary diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlBindingWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlBindingWorker.cs index ee293d23092..fe2cc0c5a02 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlBindingWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlBindingWorker.cs @@ -6,20 +6,14 @@ // Description: Defines XmlBindingWorker object, workhorse for XML bindings // -using System; using System.Xml; using System.Xml.XPath; using System.Collections; using System.ComponentModel; -using System.Reflection; -using System.Windows.Threading; -using System.Threading; -using System.Diagnostics; using System.Windows; using System.Windows.Data; using System.Windows.Controls; // IGeneratorHost using System.Windows.Markup; -using MS.Internal.Data; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlDataCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlDataCollection.cs index 9925d398882..2542451c2c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlDataCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlDataCollection.cs @@ -10,9 +10,7 @@ using System.Xml; using System.Collections.ObjectModel; -using System.Collections.Specialized; using System.Windows.Data; -using System.Windows.Markup; namespace MS.Internal.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlNodeChangedEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlNodeChangedEventManager.cs index 332d3a843ff..5ff3375222f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlNodeChangedEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/XmlNodeChangedEventManager.cs @@ -7,7 +7,6 @@ // pattern. See WeakEventTable.cs for an overview. // -using System; using System.Xml; using System.Windows; // WeakEventManager diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/DataStreams.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/DataStreams.cs index fb38fea8b64..93de5d6ac3c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/DataStreams.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/DataStreams.cs @@ -8,20 +8,13 @@ // -using System; using System.Collections; using System.Collections.Specialized; -using System.Diagnostics; using System.Formats.Nrbf; using System.IO; -using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; -using System.Security; -using MS.Internal.AppModel; using System.Windows; -using System.Windows.Navigation; using System.Windows.Controls; -using System.Windows.Controls.Primitives; namespace MS.Internal.AppModel { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/FrameworkObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/FrameworkObject.cs index cfa281271d8..6907f1ecfca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/FrameworkObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/FrameworkObject.cs @@ -38,14 +38,11 @@ you would write fo.SomeMethod(arg); */ -using System; using System.Windows; using System.Windows.Markup; using System.Windows.Media; // Visual, etc. using System.Windows.Media.Media3D; // Visual3D, etc. -using System.IO; - namespace MS.Internal { internal struct FrameworkObject diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Generated/AvTraceMessages.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Generated/AvTraceMessages.cs index 8d529b662eb..288ff8f0f9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Generated/AvTraceMessages.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Generated/AvTraceMessages.cs @@ -5,9 +5,6 @@ // NOTE: This file was generated by $(WpfCodeGenDir)AvTrace\AvTraceMessages.tt. // Any manual updates to this file will overwritten. -using System; -using System.Diagnostics; - namespace MS.Internal { static internal partial class TraceData diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceContent.cs index 6369c3f789e..01205cd4248 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceContent.cs @@ -6,14 +6,8 @@ // Description: Utility that handles parsing Baml Resource Content // -using System; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Diagnostics; -using System.Collections.Generic; - -using System.Windows; namespace MS.Internal.Globalization { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceDeserializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceDeserializer.cs index a74a4fd7bc0..ee5c731e34f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceDeserializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceDeserializer.cs @@ -5,15 +5,8 @@ // Internal class that build the baml tree for localization -using System; using System.IO; -using System.Globalization; -using System.Runtime.InteropServices; using System.Collections; -using System.Collections.Generic; - -using System.Diagnostics; -using System.Text; using System.Windows; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceSerializer.cs index 5325e1c9d4e..113cf1ac87a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlResourceSerializer.cs @@ -5,17 +5,9 @@ // Class that implements BamlResourceSerializer -using System; using System.IO; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Collections; -using System.Collections.Generic; using System.Windows.Markup; using System.Windows.Markup.Localizer; -using System.Diagnostics; -using System.Text; -using System.Windows; namespace MS.Internal.Globalization { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeMap.cs index 8e2bfdd3b72..8478f0c95ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeMap.cs @@ -4,16 +4,11 @@ // Class that implements BamlTreeMap. -using System; using System.IO; using System.Xml; -using System.Globalization; using System.Collections; -using System.Collections.Generic; using System.Windows.Markup; using System.Windows.Markup.Localizer; -using System.Diagnostics; -using System.Text; using System.Windows; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeNode.cs index 487d800778f..300b1cffe31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeNode.cs @@ -6,10 +6,6 @@ // Description: BamlTreeNode structures // -using System; -using System.Collections.Generic; -using System.Diagnostics; - using System.Windows; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeUpdater.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeUpdater.cs index ddd673f46c7..682ed386150 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeUpdater.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/BamlTreeUpdater.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Globalization; -using System.Runtime.InteropServices; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Text; -using System.ComponentModel; using System.Xml; -using System.Windows; using System.Windows.Markup; using System.Windows.Markup.Localizer; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizableResourceBuilder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizableResourceBuilder.cs index b656c6467a0..2a8917c5f12 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizableResourceBuilder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizableResourceBuilder.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Globalization; -using System.Collections.Generic; using System.Windows; using System.Windows.Markup; using System.Windows.Markup.Localizer; -using System.Diagnostics; using System.Text; namespace MS.Internal.Globalization diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizationComments.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizationComments.cs index fcafe2e7db3..5e36615c7a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizationComments.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Globalization/LocalizationComments.cs @@ -8,9 +8,7 @@ using System; using System.Diagnostics; -using System.IO; using System.Text; -using System.Text.RegularExpressions; using System.Collections.Generic; #if !PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Helper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Helper.cs index a32a75daecc..3a5de2b7930 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Helper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Helper.cs @@ -7,25 +7,16 @@ // Implements some helper functions. // -using MS.Internal.Utility; -using System; using System.Collections; using System.Collections.ObjectModel; // Collection using System.ComponentModel; -using System.Diagnostics; -using System.IO.Packaging; - using System.Reflection; using System.Windows; using System.Windows.Data; // BindingBase using System.Windows.Markup; // IProvideValueTarget using System.Windows.Media; -using System.Security; - -using MS.Internal.AppModel; using System.Windows.Threading; -using System.Collections.Generic; using MS.Internal.Hashing.PresentationFramework; using System.Windows.Controls.Primitives; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ByteStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ByteStream.cs index 41efa353359..dde2981b892 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ByteStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ByteStream.cs @@ -8,14 +8,10 @@ // -using System; -using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; // for IStream using System.Windows; using MS.Win32; // for NativeMethods -using System.Security; // for marking critical methods namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ContentDescriptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ContentDescriptor.cs index 0c737492f57..66cf9580d44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ContentDescriptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ContentDescriptor.cs @@ -9,8 +9,6 @@ // InitElementDictionary. // -using System; - namespace MS.Internal.IO.Packaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/CorePropertiesFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/CorePropertiesFilter.cs index fa34cecacf6..1f90a0beaf5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/CorePropertiesFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/CorePropertiesFilter.cs @@ -10,7 +10,6 @@ // EncryptedPackageEnvelope respectively. // -using System; using System.Windows; using System.IO.Packaging; using MS.Internal.Interop; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/EncryptedPackageFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/EncryptedPackageFilter.cs index eb49d519ace..a422832b37c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/EncryptedPackageFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/EncryptedPackageFilter.cs @@ -9,7 +9,6 @@ // is an EncryptedPackageEnvelope. // -using System; using System.Windows; using System.Runtime.InteropServices; using System.IO.Packaging; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/FixedPageContentExtractor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/FixedPageContentExtractor.cs index 9bad4c88eb2..ac0665321a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/FixedPageContentExtractor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/FixedPageContentExtractor.cs @@ -7,7 +7,6 @@ // Given a DOM node for a fixed page, enumerates its text content. // -using System; using System.Xml; namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/IndexingContentUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/IndexingContentUnit.cs index 796d6b45b82..8fed2f1287d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/IndexingContentUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/IndexingContentUnit.cs @@ -9,7 +9,6 @@ // -using System; using MS.Internal.Interop; // for CHUNK_BREAKTYPE namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedFilter.cs index 6699a79a608..e56d6c50ba7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedFilter.cs @@ -9,21 +9,12 @@ // -using System.Diagnostics; -using System; using System.Windows; // for ExceptionStringTable -using System.IO; // for FileAccess using System.Runtime.InteropServices; -using System.Collections; -using System.Security; // for SecurityCritical using MS.Internal.Interop; // for CHUNK_BREAKTYPE, etc. -using MS.Internal; // for Invariant -using MS.Win32; // for NativeMethods -using MS.Internal.PresentationFramework; // SecurityHelper // Not using the whole of System.Runtime.InteropServices.ComTypes so as to avoid collisions. -using IPersistFile = System.Runtime.InteropServices.ComTypes.IPersistFile; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedIStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedIStream.cs index 4c46d87b5b8..0f9dc155c6b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedIStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/ManagedIStream.cs @@ -8,14 +8,10 @@ // object of type System.IO.Stream. // -using System; using System.IO; -using System.Diagnostics; // for Assert -using System.IO.Packaging; // for native APIs using System.Runtime.InteropServices; // for Marshal, COMException, etc. using System.Runtime.InteropServices.ComTypes; // for IStream using System.Windows; // for ExceptionStringTable -using System.Security; // for SecurityCritical using MS.Win32; // for NativeMethods diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/PackageFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/PackageFilter.cs index e3939206bae..efa3129eaac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/PackageFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/PackageFilter.cs @@ -7,21 +7,17 @@ // Managed equivalent of IFilter implemenation for Package // -using System; using System.IO; using System.IO.Packaging; using System.Collections; -using System.Diagnostics; // For Assert using System.Runtime.InteropServices; // For Marshal.ThrowExceptionForHR using System.Windows; // for ExceptionStringTable using Microsoft.Win32; // For RegistryKey using MS.Internal.Interop; // For STAT_CHUNK, etc. -using MS.Internal; // For ContentType using MS.Internal.Utility; // For BindUriHelper using MS.Internal.IO.Packaging.Extensions; using Package = System.IO.Packaging.Package; -using PackUriHelper = System.IO.Packaging.PackUriHelper; using InternalPackUriHelper = MS.Internal.IO.Packaging.PackUriHelper; namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/UnsafeIndexingFilterStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/UnsafeIndexingFilterStream.cs index 46987bc5078..1a1cb7e3ec7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/UnsafeIndexingFilterStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/UnsafeIndexingFilterStream.cs @@ -12,13 +12,11 @@ // in Adam Nathan's ".Net and COM". // -using System; using System.IO; using System.Runtime.InteropServices; // For Marshal using System.Windows; // for ExceptionStringTable using MS.Win32; // For NativeMethods using MS.Internal.Interop; // for IStream -using System.Security; // For SecurityCritical namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs index de9253c70c0..c67be78a067 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs @@ -11,19 +11,13 @@ // #define TRACE #endif -using System; using System.IO; using System.Xml; -using MS.Win32; // For SafeNativeMethods using System.Globalization; // For CultureInfo -using System.Diagnostics; // For Assert using System.Collections; // For Stack and Hashtable -using System.Collections.Generic; // For List<> using System.Runtime.InteropServices; // For COMException -using System.Runtime.InteropServices.ComTypes; // For IStream, etc. using System.Windows; // for ExceptionStringTable using MS.Internal.Interop; // for CHUNK_BREAKTYPE (and other IFilter-related definitions) -using MS.Internal; // for Invariant namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlFixedPageInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlFixedPageInfo.cs index 6e47a01e03d..93e4d7cda81 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlFixedPageInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlFixedPageInfo.cs @@ -8,11 +8,8 @@ // The class functions as an array of XmlGlyphRunInfo's in markup order. // -using System; using System.Windows; // For ExceptionStringTable using System.Xml; // For DOM objects -using System.Diagnostics; // For Assert -using System.Globalization; // For CultureInfo namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlGlyphRunInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlGlyphRunInfo.cs index ae2d0ed037e..74d0caa241f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlGlyphRunInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XmlGlyphRunInfo.cs @@ -8,9 +8,7 @@ // The class functions as an array of XmlGlyphRunInfo's in markup order. // -using System; using System.Xml; // For DOM objects -using System.Diagnostics; // For Assert using System.Globalization; // For CultureInfo using System.Windows; // For ExceptionStringTable using Windows = System.Windows; // For Windows.Point (as distinct from System.Drawing.Point) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XpsFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XpsFilter.cs index 674f6b2e750..f45de9fd061 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XpsFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XpsFilter.cs @@ -12,19 +12,13 @@ // ContainerFilterImpl and IndexingFilterMarshaler. // -using System; using System.IO; using System.IO.Packaging; -using System.Diagnostics; // For Assert using System.Runtime.InteropServices; // For Marshal.ThrowExceptionForHR -using System.Globalization; // For CultureInfo using System.Windows; // for ExceptionStringTable -using System.Security; // For SecurityCritical using MS.Win32; using MS.Internal.Interop; // For STAT_CHUNK, etc. -using MS.Internal.IO.Packaging; // For ManagedIStream -using MS.Internal; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/indexingfiltermarshaler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/indexingfiltermarshaler.cs index dc43abb5739..45a720e31b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/indexingfiltermarshaler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/indexingfiltermarshaler.cs @@ -10,16 +10,10 @@ // -using System.Diagnostics; -using System; using System.Runtime.InteropServices; -using System.Collections; using System.Windows; // for ExceptionStringTable -using System.Security; // for SecurityCritical using MS.Internal.Interop; // for STAT_CHUNK, etc. -using MS.Internal; // for Invariant -using MS.Win32; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IWeakHashtable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IWeakHashtable.cs index 41165745a29..b0210726e0b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IWeakHashtable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IWeakHashtable.cs @@ -3,11 +3,10 @@ // See the LICENSE file in the project root for more information. +using System.Collections; + namespace MS.Internal { - using System; - using System.Collections; - internal interface IWeakHashtable { // Hashtable members diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/InheritedPropertyChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/InheritedPropertyChangedEventArgs.cs index 5f1d301fb5d..eb334005469 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/InheritedPropertyChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/InheritedPropertyChangedEventArgs.cs @@ -6,7 +6,6 @@ // Description: Event args for the (internal) InheritedPropertyChanged event // -using System; using System.Windows; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardData.cs index 152ba48d2fc..d58a81e0a28 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardData.cs @@ -11,9 +11,7 @@ // -using System; using System.Windows; -using System.Security; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardProcessor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardProcessor.cs index 4baff8170d5..cefa7b7ec61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardProcessor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ClipboardProcessor.cs @@ -10,20 +10,14 @@ // Features: // -using System; using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Security; -using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Ink; using System.Windows.Media; using System.Windows.Markup; using System.Xml; -using MS.Internal.PresentationFramework; //security helper namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/DrawingAttributesDefaultValueFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/DrawingAttributesDefaultValueFactory.cs index 4759ca73770..902103df9d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/DrawingAttributesDefaultValueFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/DrawingAttributesDefaultValueFactory.cs @@ -6,8 +6,6 @@ // Description: DefaultValueFactory for DrawingAttributes // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Ink; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditBehavior.cs index acfc7b9af94..6c98e541486 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditBehavior.cs @@ -10,20 +10,8 @@ // -using System; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows.Input; -using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Navigation; using System.Windows.Media; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditingCoordinator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditingCoordinator.cs index 6a5b8fb090b..c494e6be139 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditingCoordinator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EditingCoordinator.cs @@ -9,24 +9,9 @@ // -using System; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; -using System.Windows.Ink; using System.Windows.Input; using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Navigation; -using System.Windows.Media; -using MS.Utility; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ElementsClipboardData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ElementsClipboardData.cs index bd7325a359c..73d9178767e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ElementsClipboardData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ElementsClipboardData.cs @@ -10,11 +10,7 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Windows; -using System.Windows.Controls; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EraserBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EraserBehavior.cs index 85aa8881e04..a27fa392eb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EraserBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/EraserBehavior.cs @@ -10,23 +10,11 @@ // -using System; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows.Input; using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Ink; -using System.Windows.Interop; -using System.Windows.Navigation; using System.Windows.Media; -using Swi = System.Windows.Ink; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs index 80931afe616..2b35092b6c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs @@ -10,10 +10,6 @@ // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ISFClipboardData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ISFClipboardData.cs index 2538286fdbf..89334ad9891 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ISFClipboardData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/ISFClipboardData.cs @@ -11,12 +11,9 @@ // -using System; using System.IO; using System.Windows; -using System.Windows.Controls; using System.Windows.Ink; -using System.Security; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCanvasSelection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCanvasSelection.cs index 5f5321fb26f..e5471e81b28 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCanvasSelection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCanvasSelection.cs @@ -8,25 +8,13 @@ // -using MS.Utility; -using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Ink; -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.ComponentModel; -using System.ComponentModel.Design; using System.Windows; using System.Windows.Media; using System.Windows.Documents; using System.Windows.Ink; -using System.Windows.Input; using System.Windows.Controls; -using System.Windows.Markup; -using System.Windows.Threading; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCollectionBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCollectionBehavior.cs index 44ffa3e4535..5ea49295a94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCollectionBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/InkCollectionBehavior.cs @@ -11,20 +11,11 @@ // -using System; -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Input; using System.Windows.Media; using System.Windows.Controls; using System.Windows.Ink; -using System.Windows.Interop; -using System.ComponentModel; -using System.Collections.Specialized; -using Swi = System.Windows.Ink; -using System.Windows.Documents; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoHelper.cs index 6434555fce9..dd9fef6bdbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoHelper.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows; using System.Windows.Media; -using System.Windows.Ink; -using System.Collections; -using System.Collections.Generic; -using System.Windows.Documents; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoSelectionBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoSelectionBehavior.cs index 90be2851d95..28ce02fb6df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoSelectionBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/LassoSelectionBehavior.cs @@ -10,20 +10,11 @@ using MS.Internal.Controls; -using System; -using System.ComponentModel; -using System.ComponentModel.Design; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows.Input; using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; using System.Windows.Ink; -using System.Windows.Interop; -using System.Windows.Navigation; using System.Windows.Media; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/PenCursorManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/PenCursorManager.cs index b96341d3c34..2b7e87da383 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/PenCursorManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/PenCursorManager.cs @@ -12,11 +12,6 @@ //#define CURSOR_DEBUG using MS.Win32; -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Runtime.ConstrainedExecution; -using System.Security; using System.Windows; using System.Windows.Controls; using System.Windows.Ink; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditingBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditingBehavior.cs index 2bdd4cced3f..126592ff2bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditingBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditingBehavior.cs @@ -9,22 +9,9 @@ -using System; -using System.Diagnostics; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Collections; -using System.Collections.Generic; using System.Windows.Input; using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Navigation; -using System.Windows.Media; -using System.Windows.Ink; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditor.cs index 90054eeb525..bc1656c125d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/SelectionEditor.cs @@ -11,24 +11,9 @@ //#define TRACE_MAJOR // DO NOT LEAVE ENABLED IN CHECKED IN CODE //#define TRACE_ADDITIONAL // DO NOT LEAVE ENABLED IN CHECKED IN CODE -using MS.Internal; -using MS.Internal.Controls; -using System; -using System.Security; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Diagnostics; using System.Windows; -using System.Windows.Media; -using System.Windows.Documents; using System.Windows.Input; using System.Windows.Controls; -using System.Windows.Markup; -using System.Threading; -using System.Windows.Ink; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StrokeCollectionDefaultValueFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StrokeCollectionDefaultValueFactory.cs index 87e0e703a6a..7a05a5fc663 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StrokeCollectionDefaultValueFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StrokeCollectionDefaultValueFactory.cs @@ -7,10 +7,7 @@ // -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Controls; using System.Windows.Ink; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StylusEditingBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StylusEditingBehavior.cs index 0819bdb69eb..570d92955a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StylusEditingBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/StylusEditingBehavior.cs @@ -2,22 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Collections; -using System.Collections.Generic; using System.Windows.Input; -using System.Windows; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Navigation; -using System.Windows.Media; -using System.Security; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/TextClipboardData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/TextClipboardData.cs index bf2f22ecc7f..af10858317e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/TextClipboardData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/TextClipboardData.cs @@ -8,13 +8,8 @@ // It also can get the unicode text from the IDataObject and create a corresponding textbox. // -using System; -using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Controls; -using System.Windows.Markup; -using System.Text; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/XamlClipboardData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/XamlClipboardData.cs index 2ca03e10a10..cfdac017e95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/XamlClipboardData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/XamlClipboardData.cs @@ -10,16 +10,9 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Windows; -using System.Windows.Controls; using System.Windows.Markup; -using System.Security; using System.Text; -using System.Diagnostics; -using MS.Internal; //security helper from PresentationCore namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/IndexingFilter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/IndexingFilter.cs index b3d4821d28a..08bfbf156c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/IndexingFilter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/IndexingFilter.cs @@ -11,7 +11,6 @@ // -using System; using System.Runtime.InteropServices; using MS.Internal.IO.Packaging; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/InternalDispatchObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/InternalDispatchObject.cs index 48cf3a6ced8..9ee26866729 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/InternalDispatchObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Interop/InternalDispatchObject.cs @@ -40,16 +40,13 @@ // -using System; -using System.Security; using System.Reflection; -using System.Collections.Generic; using System.Runtime.InteropServices; using System.Globalization; namespace MS.Internal.Interop { -internal abstract class InternalDispatchObject : IReflect + internal abstract class InternalDispatchObject : IReflect { /// /// DISPID->MethodInfo map used by InvokeMember() diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/KnownBoxes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/KnownBoxes.cs index 2e5f034b4f1..5dce5148e1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/KnownBoxes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/KnownBoxes.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows; -using System.Windows.Controls; namespace MS.Internal.KnownBoxes { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/LayoutDump.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/LayoutDump.cs index 6f075dbcd44..106456ae4a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/LayoutDump.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/LayoutDump.cs @@ -6,15 +6,12 @@ // Description: Set of layout tree verification utilities. // -using System; using System.IO; using System.Xml; using System.Windows; using System.Globalization; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows.Media; using System.Windows.Documents; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/ListOfObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/ListOfObject.cs index 40cd0cd7ce2..54f5b362f44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/ListOfObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/ListOfObject.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Markup/StaticExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Markup/StaticExtension.cs index fab6f804f37..0cf0a313b67 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Markup/StaticExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Markup/StaticExtension.cs @@ -9,14 +9,7 @@ * * \***************************************************************************/ -using System; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; using System.Windows.Input; -using System.Reflection; -using MS.Internal.WindowsBase; -using MS.Utility; -using System.Runtime.CompilerServices; using System.Windows.Markup; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/MatchedTextInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/MatchedTextInfo.cs index 8b6cc2e45c1..134e07841f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/MatchedTextInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/MatchedTextInfo.cs @@ -7,9 +7,6 @@ // Description: Holds the information regarding the matched text from text search // -using System; -using System.Windows; - namespace System.Windows.Controls { internal class MatchedTextInfo diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/BindStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/BindStream.cs index 7fea021c178..6a4a446109e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/BindStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/BindStream.cs @@ -9,11 +9,8 @@ // -using System; using System.IO; -using System.Security; // SecurityCritical attribute using MS.Internal.AppModel; -using System.Net; using System.Windows.Threading; //DispatcherObject using System.Windows.Markup; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/JournalEntryStack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/JournalEntryStack.cs index 90190d19164..ae11d187f08 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/JournalEntryStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Navigation/JournalEntryStack.cs @@ -2,17 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Collections.Specialized; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Threading; - -using MS.Internal; -using MS.Internal.AppModel; -using MS.Utility; -using System.ComponentModel; namespace System.Windows.Navigation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PrePostDescendentsWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PrePostDescendentsWalker.cs index 4a4f884039d..e1c204228b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PrePostDescendentsWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PrePostDescendentsWalker.cs @@ -9,10 +9,7 @@ // -using System; -using System.Diagnostics; using System.Windows; -using MS.Utility; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/NativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/NativeMethods.cs index 85fc9c055f8..64b6e2c539b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/NativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/NativeMethods.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace MS.Internal.Printing { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/PrintDlgExMarshaler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/PrintDlgExMarshaler.cs index 0c52f92bd19..6916ec355e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/PrintDlgExMarshaler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/PrintDlgExMarshaler.cs @@ -4,11 +4,9 @@ #if !DONOTREFPRINTINGASMMETA -using System; using System.Printing.Interop; using System.Printing; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Controls; namespace MS.Internal.Printing diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/UnsafeNativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/UnsafeNativeMethods.cs index cf409ea2445..c38f611dc7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/UnsafeNativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/UnsafeNativeMethods.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; using MS.Internal.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/Win32PrintDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/Win32PrintDialog.cs index cc4c3cd9d66..cd41f5f8347 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/Win32PrintDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Printing/Win32PrintDialog.cs @@ -5,11 +5,9 @@ #if !DONOTREFPRINTINGASMMETA -using System; using System.Printing.Interop; using System.Printing; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Controls; namespace MS.Internal.Printing @@ -64,7 +62,7 @@ internal partial class Win32PrintDialog { System.Windows.Interop.WindowInteropHelper helper = new System.Windows.Interop.WindowInteropHelper(System.Windows.Application.Current.MainWindow); - owner = helper.CriticalHandle; + owner = helper.Handle; } try diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Progressivity/IByteRangeDownloaderService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Progressivity/IByteRangeDownloaderService.cs index c9d8a7029ba..518746f0537 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Progressivity/IByteRangeDownloaderService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Progressivity/IByteRangeDownloaderService.cs @@ -27,10 +27,8 @@ // -using System; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; -using System.Security; namespace MS.Internal.Progressivity { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BackgroundFormatInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BackgroundFormatInfo.cs index 5e83e58c636..313d1c0b1ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BackgroundFormatInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BackgroundFormatInfo.cs @@ -8,7 +8,6 @@ // -using System; using MS.Internal.Documents; // FlowDocumentFormatter using System.Windows.Threading; // DispatcherTimer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParaClient.cs index 56907252393..7fca4ce24d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParaClient.cs @@ -7,15 +7,7 @@ // paragraph in PTS world. // -using System; -using System.Collections.Generic; // ReadOnlyCollection -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows; -using System.Windows.Documents; // TextPointer -using System.Windows.Media; -using MS.Internal; using MS.Internal.Documents; // ParagraphResult using MS.Internal.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParagraph.cs index f299323aa81..3a38649c42d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BaseParagraph.cs @@ -7,8 +7,6 @@ // of a text based content. // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BreakRecordTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BreakRecordTable.cs index d5fac2cdbaa..cfbe01fcc51 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BreakRecordTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/BreakRecordTable.cs @@ -8,8 +8,6 @@ // -using System; // WeakReference, ... -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows.Documents; // FlowDocument, TextPointer using MS.Internal.Documents; // TextDocumentView diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParaClient.cs index 523bf4a4b6f..e0ddd2a6f65 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParaClient.cs @@ -10,14 +10,9 @@ using MS.Internal.Text; using MS.Internal.Documents; using MS.Internal.PtsTable; -using System.Security; using System.Windows; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Threading; -using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.ObjectModel; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParagraph.cs index 96984bd0a2d..0bfa8556c22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/CellParagraph.cs @@ -7,12 +7,8 @@ // -using System; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Documents; -using MS.Internal.PtsHost; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ColumnPropertiesGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ColumnPropertiesGroup.cs index d1ffddec15f..61cc43d0636 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ColumnPropertiesGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ColumnPropertiesGroup.cs @@ -8,12 +8,9 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Documents; -using MS.Internal.Text; namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParaClient.cs index 1b9ea84e11e..887466e66c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParaClient.cs @@ -9,12 +9,7 @@ // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParagraph.cs index a9e66414bd6..c75b411089f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ContainerParagraph.cs @@ -13,15 +13,10 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Security; // SecurityCritical using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; -using MS.Internal.Text; using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DirtyTextRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DirtyTextRange.cs index 06d747c8f95..5b40eab29f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DirtyTextRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DirtyTextRange.cs @@ -6,8 +6,6 @@ // Description: Dirty text range describes change in the TextContainer. // -using System; -using System.Windows.Controls; using System.Windows.Documents; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DtrList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DtrList.cs index 93ce545d655..bf702863fc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DtrList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/DtrList.cs @@ -7,10 +7,6 @@ // contains information about tree changes. // - -using System; -using System.Diagnostics; - namespace MS.Internal.PtsHost { // ---------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/EmbeddedObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/EmbeddedObject.cs index c7483741a65..67fdc11ffb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/EmbeddedObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/EmbeddedObject.cs @@ -7,7 +7,6 @@ // Description: Definition for embedded object inside a text paragraph. // -using System; using System.Windows; using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ErrorHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ErrorHandler.cs index 1b94b9d4dfc..fac843fb250 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ErrorHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ErrorHandler.cs @@ -7,7 +7,6 @@ // -using System; using System.Globalization; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureHelper.cs index c8a5071fd10..81e942a3515 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureHelper.cs @@ -8,9 +8,8 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParaClient.cs index a7284e9dd0b..70d4cf98425 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParaClient.cs @@ -7,14 +7,8 @@ // related data of paragraphs associated with figures. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using System.Windows.Documents; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParagraph.cs index 7cd2ff88ee2..044ff5f2b20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FigureParagraph.cs @@ -11,17 +11,11 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Security; // SecurityCritical using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Media; using MS.Internal.Text; -using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParaClient.cs index f8e8610549f..0321e6bd75f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParaClient.cs @@ -8,17 +8,7 @@ // for floaters and UIElements // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Security; -using System.Windows; -using System.Windows.Media; -using System.Windows.Documents; using MS.Internal.Documents; -using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParagraph.cs index 434ec238351..95c5a8be830 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterBaseParagraph.cs @@ -9,13 +9,7 @@ #pragma warning disable 1634, 1691 // avoid generating warnings about unknown // message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Security; // SecurityCritical -using System.Windows; using System.Windows.Documents; -using MS.Internal.Documents; -using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParaClient.cs index 5e7127570a8..481b283c52f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParaClient.cs @@ -8,12 +8,7 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParagraph.cs index d65d7eb87aa..a245dc7294d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FloaterParagraph.cs @@ -7,14 +7,10 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Security; // SecurityCritical using System.Windows; using System.Windows.Documents; -using MS.Internal.Documents; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FlowDocumentPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FlowDocumentPage.cs index c2197cadbe5..ffa0d791abc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FlowDocumentPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/FlowDocumentPage.cs @@ -7,19 +7,11 @@ // a PTS host (FlowDocument). // -using System; -using System.IO; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections; -using System.Diagnostics; using System.Threading; -using System.Security; using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using System.Windows.Documents; -using System.Windows.Threading; // Dispatcher using MS.Internal.Documents; using MS.Internal.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Line.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Line.cs index 38bc13f7943..9999421b809 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Line.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Line.cs @@ -8,16 +8,10 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Security; // SecurityCritical using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBase.cs index 4265a9d00b0..845a4edd38f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBase.cs @@ -8,14 +8,8 @@ // -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Internal.Text; using MS.Internal.Documents; @@ -23,7 +17,7 @@ using MS.Internal.PtsHost.UnsafeNativeMethods; #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBreakRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBreakRecord.cs index f9191e87d95..bc4834bf2ec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBreakRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineBreakRecord.cs @@ -8,10 +8,6 @@ // -using System; -using System.Windows; -using System.Windows.Documents; -using MS.Internal.Text; using System.Windows.Media.TextFormatting; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineVisual.cs index 8cc12887a2c..298442d48d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/LineVisual.cs @@ -8,7 +8,6 @@ // -using System; using System.Windows.Media; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListItemParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListItemParagraph.cs index a559e2d1838..8fe145097a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListItemParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListItemParagraph.cs @@ -7,10 +7,7 @@ // Description: ListItemParagraph represents a single list item. // -using System; using System.Windows; -using System.Windows.Documents; -using MS.Internal.Text; namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerLine.cs index 7013ab03fd2..15cf43617ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerLine.cs @@ -8,17 +8,10 @@ // -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Internal.Text; -using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerSourceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerSourceInfo.cs index f23fbe35087..0a06960da5a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerSourceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListMarkerSourceInfo.cs @@ -8,13 +8,10 @@ // This file must always be kept up to date with changes in TextMarkerSource // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; // List -using MS.Internal.Text; +using MS.Internal.Text; using System.Windows.Media; // FormattedText and Brush -using MS.Internal.TextFormatting; // TextMarkerSource using System.Text; // StringBuilder namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParaClient.cs index 0918cb11658..9def197a5d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParaClient.cs @@ -9,13 +9,9 @@ // -using System; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Documents; -using MS.Internal.Documents; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParagraph.cs index d870cd4ec96..44b4d23a76e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ListParagraph.cs @@ -7,13 +7,10 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; -using MS.Internal.Text; namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MarginCollapsingState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MarginCollapsingState.cs index bc69f15cea2..a77f33468b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MarginCollapsingState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MarginCollapsingState.cs @@ -7,9 +7,6 @@ // Description: Provides paragraph level margin collapsing support. // - -using System; - namespace MS.Internal.PtsHost { // ---------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MbpInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MbpInfo.cs index c817b2555b5..460db4eabf2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MbpInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/MbpInfo.cs @@ -7,12 +7,10 @@ // Description: Provides paragraph level margin collapsing support. // -using System; using System.Windows; // DependencyObject using System.Windows.Documents; // Block using MS.Internal.Text; // TextDpi using System.Windows.Media; // Brush -using MS.Internal.PtsHost.UnsafeNativeMethods; // Pts namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalBreakSession.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalBreakSession.cs index 187507c5bcc..a8dbc96795c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalBreakSession.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalBreakSession.cs @@ -7,13 +7,6 @@ // Description: OptimalBreakSession is unmanaged resouce handle to TextParagraphCache // -using System; -using System.Collections; -using System.Windows; -using System.Security; // SecurityCritical -using System.Windows.Documents; -using MS.Internal.Text; -using MS.Internal.PtsHost.UnsafeNativeMethods; using System.Windows.Media.TextFormatting; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalTextSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalTextSource.cs index 07cef9a0cf6..d9a1cf1fb4f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalTextSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/OptimalTextSource.cs @@ -8,18 +8,11 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Security; // SecurityCritical using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Internal.Text; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageBreakRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageBreakRecord.cs index f9ec8642c32..feb3fb11ba7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageBreakRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageBreakRecord.cs @@ -6,10 +6,7 @@ // Description: Break records for PTS pages. // -using System; // IntPtr, IDisposable, ... using System.Threading; // Interlocked -using System.Security; // SecurityCritical -using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageVisual.cs index a28ab2c1141..0e6a737141f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PageVisual.cs @@ -6,14 +6,9 @@ // Description: Visual representing a PTS page. // -using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; -using System.Windows.Controls; using System.Windows.Media; -using System.Windows.Threading; namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphElementVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphElementVisual.cs index dd88d9ff726..41b35128f92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphElementVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphElementVisual.cs @@ -6,8 +6,6 @@ // Description: Visual representing a part of paragraph. // -using System; -using System.Windows; using System.Windows.Media; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphVisual.cs index a18f2bda3b3..cc2afb77df6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/ParagraphVisual.cs @@ -6,7 +6,6 @@ // Description: Visual representing a paragraph. // -using System; using System.Windows; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Pts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Pts.cs index a3a930d7ddb..29f72c2ced0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Pts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Pts.cs @@ -19,14 +19,9 @@ // -using System; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; using System.Windows; using MS.Internal.Text; -using MS.Utility; -using MS.Internal.TextFormatting; using DllImport = MS.Internal.PresentationFramework.DllImport; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs index c02d565254d..8808b0981db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs @@ -20,9 +20,6 @@ // management. // -using System; // IntPtr -using System.Collections.Generic; // List -using System.Security; // SecurityCritical, SecurityTreatAsSafe using System.Threading; // Interlocked using System.Windows; // WrapDirection using System.Windows.Media.TextFormatting; // TextFormatter diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsContext.cs index d1337a305e4..84347f5a1aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsContext.cs @@ -6,10 +6,7 @@ // Description: Context used to communicate with PTS component. // -using System; // IntPtr, IDisposable, ... using System.Collections; // ArrayList -using System.Collections.Generic; // List -using System.Security; // SecurityCritical, SecurityTreatAsSafe using System.Threading; // Interlocked using System.Windows.Media.TextFormatting; // TextFormatter using System.Windows.Threading; // DispatcherObject diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHelper.cs index fdafd995f41..2624611a1f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHelper.cs @@ -7,11 +7,6 @@ // Description: Helper services to query PTS objects. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHost.cs index 38e13c11d05..e246099b6a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsHost.cs @@ -19,20 +19,15 @@ // Description: Provides PTS callbacks implementation / forwarding. // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol - +// message numbers and unknown pragmas for PRESharp contol + #pragma warning disable 6500 // Specifically disable warning about unhandled null reference and SEH exceptions. -using System; // IntPtr -using System.Threading; // Monitor -using System.Diagnostics; -using System.Security; // SecurityCritical using System.Windows; -using System.Windows.Documents; +using System.Windows.Documents; using System.Windows.Media.TextFormatting; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS -using System.Collections.Generic; namespace MS.Internal.PtsHost { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsPage.cs index 859c9d64ea7..9463be65fbc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsPage.cs @@ -7,17 +7,11 @@ // Description: Wrapper for PTS page. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security; using System.Threading; using System.Windows; using System.Windows.Media; using System.Windows.Documents; using MS.Internal.Text; -using MS.Utility; using System.Windows.Threading; using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowParagraph.cs index ab39f91650b..c4f65426d29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowParagraph.cs @@ -6,12 +6,8 @@ // // Description: RowParagraph represents a single row in a table // -using System; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Documents; -using MS.Internal.PtsTable; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowVisual.cs index 1d7584b414b..2f7f58c29b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RowVisual.cs @@ -11,10 +11,6 @@ // // -using System; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RunClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RunClient.cs index e8834b2e04d..3452b40b356 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RunClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/RunClient.cs @@ -9,14 +9,11 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal; using MS.Internal.Text; using MS.Internal.Documents; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Section.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Section.cs index 4b68b02aa8b..fcf10e48ce8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Section.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Section.cs @@ -9,9 +9,7 @@ // -using System; using System.Windows; -using System.Security; using System.Windows.Documents; using System.Windows.Media; using MS.Internal.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SectionVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SectionVisual.cs index d1acae52ea2..dee96541004 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SectionVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SectionVisual.cs @@ -8,11 +8,8 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Media; -using System.Windows.Threading; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Segment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Segment.cs index 5d7c5bd9aaf..975835abcf3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Segment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/Segment.cs @@ -7,9 +7,6 @@ // Description: Interface representing PTS segment. // - -using System; - namespace MS.Internal.PtsHost { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/StructuralCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/StructuralCache.cs index f9380464bd2..f390fa76d4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/StructuralCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/StructuralCache.cs @@ -8,13 +8,7 @@ // -using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; -using MS.Utility; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParaClient.cs index 6bfe8ee9848..f4ea1dfeae3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParaClient.cs @@ -8,12 +8,7 @@ // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParagraph.cs index 472963862f0..7a10a2c0fae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/SubpageParagraph.cs @@ -8,16 +8,11 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Diagnostics; -using System.Security; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using MS.Internal.Documents; using MS.Internal.Text; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParaClient.cs index c65167c753c..3ca306c7d82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParaClient.cs @@ -8,16 +8,10 @@ // -using MS.Internal; using MS.Internal.PtsTable; using MS.Internal.Text; using MS.Internal.Documents; -using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Security; using System.Windows; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParagraph.cs index 770a788a178..3afeb3a2c06 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TableParagraph.cs @@ -8,18 +8,10 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol - -using MS.Internal.Documents; -using MS.Internal.PtsTable; -using MS.Internal.Text; -using MS.Utility; -using System; -using System.Collections; -using System.Diagnostics; +// message numbers and unknown pragmas for PRESharp contol + using System.Windows; using System.Windows.Documents; -using System.Windows.Media; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextFormatterHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextFormatterHost.cs index b306ee74886..68a83bf8795 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextFormatterHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextFormatterHost.cs @@ -8,9 +8,6 @@ // -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextPanelDebug.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextPanelDebug.cs index e68d9fc8d52..1ee2431d505 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextPanelDebug.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextPanelDebug.cs @@ -7,9 +7,6 @@ // Description: Debug helpers for TextFlow. // -using System; -using System.Diagnostics; - namespace MS.Internal.PtsHost { #if TEXTPANELLAYOUTDEBUG diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaClient.cs index e8ac5299ede..a1615d47bae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaClient.cs @@ -9,17 +9,11 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Media.TextFormatting; using System.Windows.Documents; -using MS.Internal; using MS.Internal.Documents; using MS.Internal.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaLineResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaLineResult.cs index 45133b17554..5ab4b4626aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaLineResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParaLineResult.cs @@ -8,9 +8,6 @@ // -using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Documents; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParagraph.cs index 5c51fdc211d..81e833ae5a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/TextParagraph.cs @@ -9,18 +9,11 @@ // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using System.Windows.Threading; using MS.Internal.Text; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParaClient.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParaClient.cs index f0a54bb7f68..b364e154fba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParaClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParaClient.cs @@ -7,10 +7,6 @@ // related data of BlockUIContainers. // -using System; // IntPtr -using System.Collections.Generic; // List -using System.Collections.ObjectModel; // ReadOnlyCollection -using System.Security; // SecurityCritical using System.Windows; // FrameworkElement using System.Windows.Media; // Visual using System.Windows.Documents; // BlockUIContainer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParagraph.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParagraph.cs index b97126234b6..7a3c82043d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParagraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UIElementParagraph.cs @@ -7,11 +7,8 @@ // Description: UIElementParagraph class provides a wrapper for UIElements. // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol -using System; -using System.Collections; // IEnumerator -using System.Security; // SecurityCritical using System.Windows; // UIElement using System.Windows.Documents; // BlockUIContainer using MS.Internal.Text; // TextDpi diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UnmanagedHandle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UnmanagedHandle.cs index 2c6a8709532..c4531a9919a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UnmanagedHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UnmanagedHandle.cs @@ -8,9 +8,6 @@ // which can be used in unmanaged world. // - -using System; - namespace MS.Internal.PtsHost { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UpdateRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UpdateRecord.cs index e38b89541b0..6c870b2dd59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UpdateRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/UpdateRecord.cs @@ -9,9 +9,6 @@ // -using System; -using System.Diagnostics; - using MS.Internal.PtsHost.UnsafeNativeMethods; namespace MS.Internal.PtsHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/CalculatedColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/CalculatedColumn.cs index 1c784bc058e..3c9e9f37e73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/CalculatedColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/CalculatedColumn.cs @@ -11,12 +11,7 @@ // -using MS.Internal.PtsHost; -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Documents; -using System.Windows.Media; using MS.Internal.PtsHost.UnsafeNativeMethods; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/RowSpanVector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/RowSpanVector.cs index 47f1dab857c..c4229b27bea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/RowSpanVector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsTable/RowSpanVector.cs @@ -8,8 +8,6 @@ // -using System; -using System.Diagnostics; using System.Windows.Documents; namespace MS.Internal.PtsTable diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemCoreHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemCoreHelper.cs index 791ea490484..8d09399ea81 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemCoreHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemCoreHelper.cs @@ -6,8 +6,6 @@ // Description: Helper methods for code that uses types from System.Core. // -using System; - namespace MS.Internal { internal static class SystemCoreHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemDataHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemDataHelper.cs index 690c9be8ac8..38b7ecf0dc5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemDataHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemDataHelper.cs @@ -6,9 +6,7 @@ // Description: Helper methods for code that uses types from System.Data. // -using System; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlHelper.cs index 7e7c02a473b..271e1eafc45 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlHelper.cs @@ -6,7 +6,6 @@ // Description: Helper methods for code that uses types from System.Xml. // -using System; using System.Collections; using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlLinqHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlLinqHelper.cs index c53864f103a..38b2eaaead5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlLinqHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/SystemXmlLinqHelper.cs @@ -6,7 +6,6 @@ // Description: Helper methods for code that uses types from System.Xml.Linq. // -using System; using System.ComponentModel; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/ComplexLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/ComplexLine.cs index 569380a63ff..71e9d233c11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/ComplexLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/ComplexLine.cs @@ -8,13 +8,8 @@ // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/DynamicPropertyReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/DynamicPropertyReader.cs index 88882c5a535..ee590c95e55 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/DynamicPropertyReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/DynamicPropertyReader.cs @@ -9,17 +9,11 @@ // -using System; -using System.Diagnostics; using System.Globalization; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.TextFormatting; using System.Windows.Markup; -using MS.Internal.PtsHost; -using MS.Internal.Annotations.Component; namespace MS.Internal.Text { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/InlineObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/InlineObject.cs index f85ba890cff..9237c076450 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/InlineObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/InlineObject.cs @@ -7,13 +7,10 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal; namespace MS.Internal.Text { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/Line.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/Line.cs index 15fc3bd89c1..b209a8bf000 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/Line.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/Line.cs @@ -8,16 +8,9 @@ // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.PtsHost; namespace MS.Internal.Text { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineMetrics.cs index 6820c3557f2..5dd68511131 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineMetrics.cs @@ -7,10 +7,6 @@ // -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; namespace MS.Internal.Text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineProperties.cs index 561fce4af5b..4dc4c15d7a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/LineProperties.cs @@ -8,14 +8,10 @@ // -using System; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Media.TextFormatting; -using MS.Internal.Documents; using MS.Internal.PtsHost; // TextParagraph namespace MS.Internal.Text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/MarkerProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/MarkerProperties.cs index f77bfc27f23..a73de6a27d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/MarkerProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/MarkerProperties.cs @@ -8,11 +8,9 @@ // -using System; using System.Windows; using System.Windows.Documents; using System.Windows.Media.TextFormatting; -using MS.Internal.PtsHost.UnsafeNativeMethods; // Relative line height from PTS namespace MS.Internal.Text { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/SimpleLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/SimpleLine.cs index 6eb579d4d3f..7e49e3685fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/SimpleLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/SimpleLine.cs @@ -8,12 +8,7 @@ // -using System; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; using System.Windows.Media.TextFormatting; namespace MS.Internal.Text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextDpi.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextDpi.cs index 3dcd1dfeef4..edc7566b22f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextDpi.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextDpi.cs @@ -8,10 +8,7 @@ // -using System; // Double, ... using System.Windows; // DependencyObject -using System.Windows.Documents; // TextElement, ... -using System.Windows.Media; // FontFamily using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS namespace MS.Internal.Text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextLineResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextLineResult.cs index 3f7044c008f..17f43194ac0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextLineResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextLineResult.cs @@ -8,12 +8,8 @@ // -using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextProperties.cs index 2ca23e4ad08..48572baeef9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextProperties.cs @@ -8,8 +8,6 @@ // -using System; -using System.Diagnostics; using System.Globalization; using System.Windows; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextSpanModifier.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextSpanModifier.cs index baf5b9a529b..09320794cda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextSpanModifier.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TextSpanModifier.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Globalization; using System.Windows; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TypographyProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TypographyProperties.cs index 75ecc1b8e64..3fa6dc8d72e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TypographyProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Text/TypographyProperties.cs @@ -7,10 +7,7 @@ // -using System; -using System.Diagnostics; using System.Windows; -using System.Windows.Media; using System.Windows.Media.TextFormatting; namespace MS.Internal.Text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceData.cs index 26e5aeb984c..d9fe715f7cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceData.cs @@ -9,18 +9,13 @@ // for Data Binding and Styling // -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Text; using System.Windows; using System.Windows.Data; using System.Windows.Diagnostics; using System.Windows.Markup; -using MS.Internal.Data; -using MS.Win32; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceHwndHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceHwndHost.cs index ad9bf5e41ae..29978cbe940 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceHwndHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceHwndHost.cs @@ -9,17 +9,6 @@ // for HwndHosts // -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Text; -using System.Windows; -using System.Windows.Data; -using MS.Internal.Data; -using MS.Win32; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceShell.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceShell.cs index e96b445a162..22f00dd74cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceShell.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/TraceShell.cs @@ -9,17 +9,6 @@ // for Shell integration // -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Text; -using System.Windows; -using System.Windows.Data; -using MS.Internal.Data; -using MS.Win32; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/UncommonValueTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/UncommonValueTable.cs index 62b2b7f4b0a..617705e28b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/UncommonValueTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/UncommonValueTable.cs @@ -6,7 +6,6 @@ // Description: A table for storing up to 32 uncommon values. // -using System; using System.Windows; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/BindUriHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/BindUriHelper.cs index 102eca47916..4d5e64dba4a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/BindUriHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/BindUriHelper.cs @@ -7,28 +7,12 @@ // Description: BindUriHelper class. Allows bindToObject, bindToStream // -using System; -using System.IO; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Text; -using MS.Win32; #if PRESENTATIONFRAMEWORK using System.Windows; using System.Windows.Navigation; -using System.Windows.Media; -using MS.Internal.PresentationFramework; using MS.Internal.AppModel; -using System.Windows.Controls; -using MS.Internal ; -using System.Security; -using System.IO.Packaging; -using System.Reflection; -using MS.Internal.Utility; -using System.Net; // In order to avoid generating warnings about unknown message numbers and // unknown pragmas when compiling your C# source code with the actual C# compiler, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/MonitorWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/MonitorWrapper.cs index 149423f9087..f2a80fa1510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/MonitorWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/MonitorWrapper.cs @@ -8,11 +8,7 @@ // -using System; using System.Threading; -using System.Windows; - -using MS.Internal; namespace MS.Internal.Utility { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/TraceLog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/TraceLog.cs index ea72266ef44..950c6edf8c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/TraceLog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Utility/TraceLog.cs @@ -14,7 +14,6 @@ // the debugger). Log entries are timestamped. // -using System; using System.Collections; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakDictionary.cs index 92c66be6e46..3d8da4ce7f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakDictionary.cs @@ -3,12 +3,10 @@ // See the LICENSE file in the project root for more information. +using System.Collections; + namespace MS.Internal { - using System; - using System.Collections; - using System.Collections.Generic; - /// /// Helper WeakDictionary class implemented using WeakHashTable /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashSet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashSet.cs index ed145d7fc2c..513113110c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashSet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashSet.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; + // This file was generated, please do not edit it directly. // // This file was generated using the common file located at: namespace MS.Internal { - using System; - using System.Collections; - using System.Collections.Generic; - /// /// Helper WeakHashSet class implemented using WeakHashTable /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashtable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashtable.cs index a51feb28d9d..5a61d3df19c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashtable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakHashtable.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. +using System.Collections; + // This was ripped from the BCL's WeakHashtable and the namespace was changed. // // This class doesn't work when the keys are value-types. @@ -10,10 +12,6 @@ namespace MS.Internal { - using System; - using System.Collections; - using System.Diagnostics; - /// /// This is a hashtable that stores object keys as weak references. /// It monitors memory usage and will periodically scavenge the diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakObjectHashtable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakObjectHashtable.cs index 940bef3aec9..0a793650e24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakObjectHashtable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WeakObjectHashtable.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. +using System.Collections; + // This is a variant of WeakHashtable that works when the keys are value-types. // In particular: // 1. Do not create weak references to a value-type key. That makes no sense - @@ -16,9 +18,6 @@ namespace MS.Internal { - using System; - using System.Collections; - /// /// This is a hashtable that stores object keys as weak references. /// It monitors memory usage and will periodically scavenge the diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT.cs index 791c03f69d9..8100fc57747 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT.cs @@ -2,28 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; -using System.Numerics; -using System.Security.Cryptography; -using System.Text; -using System.Threading; -using System.Linq.Expressions; +using WinRT.Interop; #pragma warning disable 0169 // The field 'xxx' is never used #pragma warning disable 0649 // Field 'xxx' is never assigned to, and will always have its default value namespace WinRT { - using System.Diagnostics; - using WinRT.Interop; - internal static class DelegateExtensions { public static void DynamicInvokeAbi(this System.Delegate del, object[] invoke_params) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Attributes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Attributes.cs index f6d9b005a4f..73833001b09 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Attributes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Attributes.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Text; namespace WinRT { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.cs index acaedd94748..9e78af2a458 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.cs @@ -1,19 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Numerics; -using System.Security.Cryptography; -using System.Text; -using System.Threading; -using System.Linq.Expressions; using WinRT.Interop; #if !NETSTANDARD2_0 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.net5.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.net5.cs index 1492530057a..68aa5b335ec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.net5.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ComWrappersSupport.net5.cs @@ -1,13 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Text; using WinRT.Interop; using static System.Runtime.InteropServices.ComWrappers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Context.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Context.cs index 6ceceec12cc..15ffbd760e4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Context.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Context.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; using WinRT.Interop; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ExceptionHelpers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ExceptionHelpers.cs index 5152bc7a30e..b39042f8615 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ExceptionHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ExceptionHelpers.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/FundamentalMarshalers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/FundamentalMarshalers.cs index 64bd715a4a4..833af347992 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/FundamentalMarshalers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/FundamentalMarshalers.cs @@ -1,10 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; - namespace ABI.System { internal struct Boolean diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/GuidGenerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/GuidGenerator.cs index 3ebfe5920ee..e6e146f6229 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/GuidGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/GuidGenerator.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Linq; using System.Reflection; using System.Security.Cryptography; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/IInspectable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/IInspectable.cs index ceaf9388cae..d7337b68393 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/IInspectable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/IInspectable.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Text; using WinRT.Interop; namespace WinRT diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/ExceptionErrorInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/ExceptionErrorInfo.cs index f6eccf4bb0e..4e044257c99 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/ExceptionErrorInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/ExceptionErrorInfo.cs @@ -1,18 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Runtime.InteropServices; -using System.Numerics; -using System.Security.Cryptography; -using System.Text; -using System.Threading; -using System.Linq.Expressions; +using global::WinRT; namespace WinRT.Interop { @@ -85,8 +75,6 @@ public string GetDescription() namespace ABI.WinRT.Interop { - using global::WinRT; - [Guid("1CF2B120-547D-101B-8E65-08002B2BD119")] internal class IErrorInfo : global::WinRT.Interop.IErrorInfo { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IContextCallback.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IContextCallback.cs index f6899206362..5461f83828a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IContextCallback.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IContextCallback.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Text; using WinRT; using WinRT.Interop; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IUnknownVftbl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IUnknownVftbl.cs index 1fe5fec3c9f..cf9d4740102 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IUnknownVftbl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/IUnknownVftbl.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Text; namespace WinRT.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/StandardDelegates.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/StandardDelegates.cs index e90dbd6af4f..3ca452bf95d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/StandardDelegates.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Interop/StandardDelegates.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Text; namespace WinRT.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Marshalers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Marshalers.cs index 97fbbc2f86a..2510219ff24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Marshalers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Marshalers.cs @@ -1,17 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using System.Runtime.InteropServices; -using System.Numerics; -using System.Security.Cryptography; -using System.Text; using System.Linq.Expressions; -using System.Collections.Concurrent; using WinRT.Interop; #pragma warning disable 0169 // The field 'xxx' is never used diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ObjectReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ObjectReference.cs index 06b50c80950..a0733e01ab1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ObjectReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/ObjectReference.cs @@ -1,13 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Text; using WinRT.Interop; #pragma warning disable 0169 // The field 'xxx' is never used diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections.cs index 03f950e46db..364dabe6138 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections.cs @@ -1,15 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Numerics; using System.Reflection; using System.Threading; -using System.Windows.Input; namespace WinRT { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IEnumerable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IEnumerable.cs index d3df6280122..19d066cc7b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IEnumerable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IEnumerable.cs @@ -1,16 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq.Expressions; using System.Reflection; using System.Runtime.InteropServices; using WinRT; using WinRT.Interop; -using System.Diagnostics; +using global::System.Runtime.CompilerServices; #pragma warning disable 0169 // warning CS0169: The field '...' is never used #pragma warning disable 0649 // warning CS0169: Field '...' is never assigned to @@ -34,9 +31,6 @@ internal interface IIterator namespace MS.Internal.WindowsRuntime.ABI.System.Collections.Generic { - using global::System; - using global::System.Runtime.CompilerServices; - [Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")] internal class IEnumerable : global::System.Collections.Generic.IEnumerable, global::MS.Internal.WindowsRuntime.Windows.Foundation.Collections.IIterable { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IReadOnlyList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IReadOnlyList.cs index a892ac4b07d..7e70124050c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IReadOnlyList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/Projections/IReadOnlyList.cs @@ -1,16 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq.Expressions; using System.Reflection; using System.Runtime.InteropServices; using WinRT; using WinRT.Interop; -using System.Diagnostics; +using global::System.Runtime.CompilerServices; #pragma warning disable 0169 // warning CS0169: The field '...' is never used #pragma warning disable 0649 // warning CS0169: Field '...' is never assigned to @@ -29,9 +26,6 @@ interface IVectorView : IIterable namespace MS.Internal.WindowsRuntime.ABI.System.Collections.Generic { - using global::System; - using global::System.Runtime.CompilerServices; - [Guid("BBE1FA4C-B0E3-4583-BAEF-1F1B2E483E56")] internal class IReadOnlyList : global::System.Collections.Generic.IReadOnlyList { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/TypeExtensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/TypeExtensions.cs index eb27ca44310..0c1a019306b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/TypeExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/TypeExtensions.cs @@ -1,11 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; -using System.Text; namespace WinRT { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT_Interop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT_Interop.cs index b7edcf22c8f..d6dc81cb240 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT_Interop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT_Interop.cs @@ -1,18 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Runtime.InteropServices; -using System.Numerics; -using System.Security.Cryptography; -using System.Text; -using System.Threading; -using System.Linq.Expressions; #pragma warning disable CS0649 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Data.Text.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Data.Text.cs index 3d08c140811..a361bcf1f89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Data.Text.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Data.Text.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Linq.Expressions; -using System.Reflection; using System.Runtime.InteropServices; using WinRT; using WinRT.Interop; @@ -19,9 +12,9 @@ namespace MS.Internal.WindowsRuntime { -namespace Windows.Data.Text -{ - [global::WinRT.WindowsRuntimeType] + namespace Windows.Data.Text + { + [global::WinRT.WindowsRuntimeType] internal enum AlternateNormalizationFormat : int { @@ -423,8 +416,8 @@ private struct InterfaceTag{}; } namespace ABI.Windows.Data.Text -{ - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + { + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] internal struct AlternateWordForm { public static IObjectReference CreateMarshaler(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm obj) => obj is null ? null : MarshalInspectable.CreateMarshaler(obj).As(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Globalization.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Globalization.cs index d8ac473fdf3..d529efdf217 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Globalization.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/Windows.Globalization.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Linq.Expressions; -using System.Reflection; using System.Runtime.InteropServices; using WinRT; using WinRT.Interop; @@ -19,9 +12,9 @@ namespace MS.Internal.WindowsRuntime { -namespace Windows.Globalization -{ - [global::WinRT.WindowsRuntimeType] + namespace Windows.Globalization + { + [global::WinRT.WindowsRuntimeType] [Guid("EA79A752-F7C2-4265-B1BD-C4DEC4E4F080")] internal interface ILanguage @@ -212,8 +205,8 @@ internal enum LanguageLayoutDirection : int } namespace ABI.Windows.Globalization -{ - [global::WinRT.ObjectReferenceWrapper(nameof(_obj))] + { + [global::WinRT.ObjectReferenceWrapper(nameof(_obj))] [Guid("EA79A752-F7C2-4265-B1BD-C4DEC4E4F080")] internal class ILanguage : global::MS.Internal.WindowsRuntime.Windows.Globalization.ILanguage { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Windows/Data/Text/WordsSegmenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Windows/Data/Text/WordsSegmenter.cs index 84fd31f0a9d..447b4d59694 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Windows/Data/Text/WordsSegmenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Windows/Data/Text/WordsSegmenter.cs @@ -18,13 +18,7 @@ // set to "und" (undetermined language). // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security; using MS.Internal.PresentationFramework.Interop; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/Application/DocumentApplicationJournalEntry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/Application/DocumentApplicationJournalEntry.cs index e6353a6354a..86b8ef09b6b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/Application/DocumentApplicationJournalEntry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/Application/DocumentApplicationJournalEntry.cs @@ -7,11 +7,6 @@ // UI state. // -using System; -using System.Runtime.Serialization; -using System.Security; -using System.Diagnostics; -using System.Windows; using System.Windows.Documents; using System.Windows.Navigation; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ColumnResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ColumnResult.cs index ce633808e92..a4201477f2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ColumnResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ColumnResult.cs @@ -7,11 +7,7 @@ // information for a column. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Security; using System.Windows; using System.Windows.Documents; using MS.Internal.PtsHost; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentElementCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentElementCollection.cs index 10daf4866f1..3f1d64985eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentElementCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentElementCollection.cs @@ -6,12 +6,7 @@ // Description: Generic Collection of Table related objects. // -using MS.Utility; -using System; -using System.Collections.Generic; using System.Collections; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentHostHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentHostHelper.cs index 9213b5f7f55..b3f23c14501 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentHostHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ContentHostHelper.cs @@ -7,10 +7,7 @@ // useful for performing common tasks with IContentHost. // -using System; // Object -using System.Collections.Generic; // List using System.Windows; // IContentHost -using System.Windows.Controls; // TextBlock using System.Windows.Controls.Primitives; // DocumentPageView using System.Windows.Documents; // FlowDocument using System.Windows.Media; // Visual diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGrid.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGrid.cs index 1f1a2821efa..faedef8b8bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGrid.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGrid.cs @@ -8,11 +8,7 @@ // -using MS.Internal; -using MS.Internal.Media; using MS.Utility; -using MS.Win32; -using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; @@ -20,11 +16,8 @@ using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridContextMenu.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridContextMenu.cs index 187bc5e22d4..147f4f10920 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridContextMenu.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridContextMenu.cs @@ -2,25 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Input; + // // Description: Context menu for DocumentGrid // namespace MS.Internal.Documents { - using MS.Internal; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; - using System.Runtime.InteropServices; - using System.Security; - using MS.Internal.Documents; - using MS.Win32; - using System.Windows.Interop; - // A Component of DocumentViewer supporting the default ContextMenu. internal static class DocumentGridContextMenu { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridPage.cs index 6101a9961ca..3c546d95a88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentGridPage.cs @@ -9,24 +9,11 @@ // -using MS.Internal.Annotations.Anchoring; -using MS.Win32; -using System.Threading; using System.Windows; -using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Shapes; - -using System.Windows.Input; using System.Windows.Media; -using System; -using System.Collections; -using System.Diagnostics; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageHost.cs index 1c1e864d29d..d9fb4807240 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageHost.cs @@ -6,7 +6,6 @@ // Description: Provides a view port for a page of content for a DocumentPage. // -using System; using System.Windows; // UIElement using System.Windows.Media; // Visual diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageTextView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageTextView.cs index 5e66a8e35f1..94d9bd81548 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageTextView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentPageTextView.cs @@ -6,8 +6,6 @@ // Description: TextView implementation for DocumentPageView. // -using System; // InvalidOperationException, ... -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows; // Point, Rect, ... using System.Windows.Controls.Primitives; // DocumentPageView diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentViewerHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentViewerHelper.cs index 50a9373fbec..910e34734dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentViewerHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentViewerHelper.cs @@ -6,14 +6,12 @@ // Description: Defines various helper methods used by document viewews. // -using System; // EventHandler using System.Windows; // Visibility using System.Windows.Controls; // Border using System.Windows.Controls.Primitives; // PlacementMode using System.Windows.Input; // KeyboardNavigation using System.Windows.Documents; // ITextRange using System.Windows.Media; // VisualTreeHelper -using System.Security; // SecurityCritical, SecurityTreatAsSafe using System.Globalization; // CultureInfo using System.Windows.Markup; // XmlLanguage using System.Windows.Interop; // HwndSource @@ -283,7 +281,7 @@ internal static void ShowFindUnsuccessfulMessage(FindToolBar findToolBar) messageString = String.Format(System.Globalization.CultureInfo.CurrentCulture, messageString, findToolBar.SearchText); HwndSource hwndSource = PresentationSource.CriticalFromVisual(findToolBar) as HwndSource; - IntPtr hwnd = (hwndSource != null) ? hwndSource.CriticalHandle : IntPtr.Zero; + IntPtr hwnd = (hwndSource != null) ? hwndSource.Handle : IntPtr.Zero; PresentationFramework.SecurityHelper.ShowMessageBoxHelper( hwnd, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentsTrace.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentsTrace.cs index 2529c16eaaa..1b977241a23 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentsTrace.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/DocumentsTrace.cs @@ -3,18 +3,15 @@ // See the LICENSE file in the project root for more information. +using System.Reflection; +using MS.Internal.PresentationFramework; // SecurityHelper + // // Description: DocumentsTrace is a tracing utility for Fixed and Flow documents // namespace MS.Internal.Documents { - using System; - using System.Diagnostics; - using System.Reflection; - using System.Security; - using MS.Internal.PresentationFramework; // SecurityHelper - internal sealed class DocumentsTrace { internal static class FixedFormat diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentPaginator.cs index ca589c290cc..ac437d834d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentPaginator.cs @@ -8,11 +8,8 @@ // versions of GetPage and ComputePageCount. // -using System; // IServiceProvider -using System.ComponentModel; // AsyncCompletedEventArgs using System.Windows; // Size using System.Windows.Documents; // DocumentPaginator -using System.Windows.Media; // Visual namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentSequencePaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentSequencePaginator.cs index 177df06ada3..bd419be9461 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentSequencePaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FixedDocumentSequencePaginator.cs @@ -8,11 +8,8 @@ // versions of GetPage and ComputePageCount. // -using System; // IServiceProvider -using System.ComponentModel; // AsyncCompletedEventArgs using System.Windows; // Size using System.Windows.Documents; // DocumentPaginator -using System.Windows.Media; // Visual namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentFormatter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentFormatter.cs index 362db09998d..01677ee4dda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentFormatter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentFormatter.cs @@ -6,11 +6,8 @@ // Description: Bottomless content formatter associated with FlowDocument. // -using System; // Object using System.Windows; // Size using System.Windows.Documents; // FlowDocument -using System.Windows.Media; // Visual -using System.Windows.Threading; // DispatcherOperationCallback using MS.Internal.PtsHost; // FlowDocumentPage using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentPaginator.cs index 2e4f53644c1..72c001970d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentPaginator.cs @@ -6,15 +6,11 @@ // Description: DynamicDocumentPaginator associated with FlowDocument. // -using System; // Object -using System.Collections.Generic; // List -using System.ComponentModel; // AsyncCompletedEventArgs using System.Windows; // Size using System.Windows.Documents; // DocumentPaginator using System.Windows.Media; // Visual using System.Windows.Threading; // DispatcherOperationCallback using MS.Internal.PtsHost; // BreakRecordTable, FlowDocumentPage -using MS.Internal.Text; // DynamicPropertyReader namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentView.cs index 8f5b3d273a7..e081755f72d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/FlowDocumentView.cs @@ -7,13 +7,11 @@ // bottomless area. // -using System; // Object using System.Windows; // Size using System.Windows.Controls; // ScrollViewer using System.Windows.Controls.Primitives; // IScrollInfo using System.Windows.Documents; // FlowDocument using System.Windows.Media; // Visual -using System.Windows.Media.Imaging; // RenderTargetBitmap using MS.Internal.PtsHost; // FlowDocumentPage using MS.Internal.Text; // TextDpi diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/HostedElements.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/HostedElements.cs index 21677df16fe..30fa618d7c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/HostedElements.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/HostedElements.cs @@ -7,11 +7,7 @@ // using System.Collections; -using MS.Internal.Documents; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System; -using System.Diagnostics; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IDocumentScrollInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IDocumentScrollInfo.cs index 1378aba80d6..f76b7a9ba28 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IDocumentScrollInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IDocumentScrollInfo.cs @@ -7,17 +7,11 @@ // Spec: 03.01.01 API Design.PageGrid+.doc // -using MS.Internal; -using MS.Utility; using System.Collections.ObjectModel; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Media; using System.Windows; -using System; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IFlowDocumentViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IFlowDocumentViewer.cs index 0ffd14dfd09..f10334f48e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IFlowDocumentViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IFlowDocumentViewer.cs @@ -3,12 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; // Object, IServiceProvider using System.Windows; // Rect, Point using System.Windows.Documents; // ITextSelection using System.Windows.Controls; // FlowDocumentScrollViewer -using System.Windows.Controls.Primitives; // IScrollInfo -using System.Windows.Input; // UICommand using System.Windows.Threading; // Dispatcher using MS.Internal.KnownBoxes; // BooleanBoxes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IParentUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IParentUndoUnit.cs index 4c0e1c19ed7..0e3e9c0f5ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IParentUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IParentUndoUnit.cs @@ -8,10 +8,6 @@ // See spec at Undo spec.htm // -using System.Collections; - -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ITextBoxViewHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ITextBoxViewHost.cs index 75f8e51ebed..3a706fee388 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ITextBoxViewHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ITextBoxViewHost.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; + // // Description: Interface for Controls hosting TextBoxView. // namespace System.Windows.Controls { - using System.Windows.Documents; - // Controls built on TextBoxView must implement this interface // which is passed to the TextBoxView ctor. // TextBoxView requires that the object implementing ITextBoxViewHost diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IUndoUnit.cs index d9cb2ab4978..0614f320c9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/IUndoUnit.cs @@ -8,8 +8,6 @@ // See spec at Undo spec.htm // -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/LineResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/LineResult.cs index 0cc141db09c..a2e35af5419 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/LineResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/LineResult.cs @@ -6,8 +6,6 @@ // Description: Access to calculated information of a line of text. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/MultiPageTextView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/MultiPageTextView.cs index 1107d971f2d..733e32430a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/MultiPageTextView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/MultiPageTextView.cs @@ -6,8 +6,6 @@ // Description: TextView implementation for collection of DocumentPageTextViews. // -using System; // InvalidOperationException, ... -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows; // Point, Rect, ... using System.Windows.Controls; // FlowDocumentPageViewer, DocumentViewer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/PageCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/PageCache.cs index 0e27ed1f5fa..d115e8cf212 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/PageCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/PageCache.cs @@ -6,11 +6,7 @@ // Description: PageCache caches information about individual pages in a document. // -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Threading; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParagraphResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParagraphResult.cs index 6f388a52efa..f013f9175c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParagraphResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParagraphResult.cs @@ -7,10 +7,7 @@ // information for a paragraph. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParentUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParentUndoUnit.cs index 2d4e8215fe8..89b4f730468 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParentUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ParentUndoUnit.cs @@ -8,10 +8,8 @@ // See spec at Undo spec.htm // -using System; using System.Windows; using System.Collections; -using MS.Utility; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/RowCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/RowCache.cs index c312d601dc5..083d273e04b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/RowCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/RowCache.cs @@ -6,12 +6,7 @@ // Description: RowCache caches information about Row layouts used by DocumentGrid. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; -using System.Windows.Documents; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ScrollData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ScrollData.cs index 21f6411616a..15a66392942 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ScrollData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/ScrollData.cs @@ -6,11 +6,9 @@ // Description: IScrollInfo implementation helper for FlowDocumentView, TextBoxView. // -using System; using System.Windows; using System.Windows.Controls; using System.Windows.Media; -using MS.Internal; using System.Windows.Controls.Primitives; // for doc comments namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableColumnCollectionInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableColumnCollectionInternal.cs index 0144bc60162..35460be8b44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableColumnCollectionInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableColumnCollectionInternal.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.Windows; using System.Windows.Documents; -using System.Diagnostics; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableTextElementCollectionInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableTextElementCollectionInternal.cs index 4507a849ac2..f3baeeefd37 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableTextElementCollectionInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TableTextElementCollectionInternal.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Windows; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLine.cs index 19089273951..e4e0138450f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLine.cs @@ -6,19 +6,12 @@ // Description: TextLine wrapper used by TextBoxView. // -using System; using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; using MS.Internal; -using MS.Internal.PtsHost; using MS.Internal.Text; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLineDrawingVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLineDrawingVisual.cs index 7f0c335bb9a..027d296d97c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLineDrawingVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxLineDrawingVisual.cs @@ -6,9 +6,6 @@ // Description: Extension of DrawingVisual for state that TextBoxView needs. // -using System; -using System.Windows; -using System.Windows.Controls; using System.Windows.Media; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxView.cs index 79fa8a27a53..682dc5e7f46 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextBoxView.cs @@ -2,25 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using System.Windows.Threading; +using System.Collections.ObjectModel; +using MS.Internal; +using MS.Internal.Text; +using MS.Internal.Documents; +using MS.Internal.PtsHost; +using System.Windows.Media.TextFormatting; + // // Description: Content presenter for the TextBox. // namespace System.Windows.Controls { - using System.Windows.Documents; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - using System.Windows.Threading; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using MS.Internal; - using MS.Internal.Telemetry.PresentationFramework; - using MS.Internal.Text; - using MS.Internal.Documents; - using MS.Internal.PtsHost; - using System.Windows.Media.TextFormatting; - // Content presenter for the TextBox. internal class TextBoxView : FrameworkElement, ITextView, IScrollInfo, IServiceProvider { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextContainerHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextContainerHelper.cs index 259e8b120a4..540abe66535 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextContainerHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextContainerHelper.cs @@ -6,15 +6,12 @@ // Description: Helper services for TextContainer. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using MS.Internal.Text; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextDocumentView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextDocumentView.cs index 991d49111da..2757d3cb501 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextDocumentView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextDocumentView.cs @@ -6,8 +6,6 @@ // Description: TextView implementation for FlowDocument pages. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls.Primitives; // IScrollInfo diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextParagraphView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextParagraphView.cs index 30255603999..d87abe14728 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextParagraphView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextParagraphView.cs @@ -6,16 +6,10 @@ // Description: TextView implementation for TextBlock. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using MS.Internal.Text; -using MS.Internal.PtsHost; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextViewBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextViewBase.cs index 8d08306b7dc..5f322c4379b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextViewBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/TextViewBase.cs @@ -7,8 +7,6 @@ // the functionality common across TextViews. // -using System; // InvalidOperationException, ... -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows; // Point, Rect, ... using System.Windows.Controls.Primitives; // DocumentPageView diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UIElementIsland.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UIElementIsland.cs index 209dee0f2f9..de658488c9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UIElementIsland.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UIElementIsland.cs @@ -6,8 +6,6 @@ // Description: UIElement layout island. // -using System; -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows; // UIElement using System.Windows.Media; // Visual diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoCloseAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoCloseAction.cs index 60e1374f709..2264463d6dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoCloseAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoCloseAction.cs @@ -6,8 +6,6 @@ // Description: Enum for UndoManager.Close method. // -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoManager.cs index 72ade24a51f..4c05f0db50d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/documents/UndoManager.cs @@ -8,17 +8,8 @@ // See spec at Undo spec.htm // -using System; using System.Windows; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Diagnostics; -using MS.Utility; -using System.Windows.Markup; -using System.Windows.Documents; -using System.Windows.Controls.Primitives; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Win32/UxThemeWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Win32/UxThemeWrapper.cs index 67a08749841..ca896d9ff2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Win32/UxThemeWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Win32/UxThemeWrapper.cs @@ -2,18 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Collections.Specialized; // NameValueCollection using System.Configuration; // ConfigurationManager -using System.Diagnostics; using System.IO; -using System.Runtime.InteropServices; -using System.Security; using System.Windows; -using System.Windows.Media; using System.Text; -using MS.Win32; using MS.Internal; namespace MS.Win32 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonDialog.cs index b458a2139ba..08ac50f1dca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonDialog.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using System.Threading; +using System.Windows; +using System.Windows.Interop; + +using MS.Internal.Interop; +using MS.Win32; + // // // Description: @@ -17,17 +25,6 @@ namespace Microsoft.Win32 { - using System; - using System.Runtime.InteropServices; - using System.Security; - using System.Threading; - using System.Windows; - using System.Windows.Interop; - - using MS.Internal.Interop; - using MS.Internal.PresentationFramework; - using MS.Win32; - /// /// An abstract base class for displaying common dialogs. /// @@ -155,7 +152,7 @@ public Nullable ShowDialog(Window owner) } // Get the handle of the owner window using WindowInteropHelper. - IntPtr hwndOwner = (new WindowInteropHelper(owner)).CriticalHandle; + IntPtr hwndOwner = (new WindowInteropHelper(owner)).Handle; // Just in case, check if the window's handle is zero. if (hwndOwner == IntPtr.Zero) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonItemDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonItemDialog.cs index 2c41b4cff29..f3e3c76357f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonItemDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonItemDialog.cs @@ -2,31 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: -// CommonItemDialog is an abstract class derived from CommonDialog -// that implements shared functionality common to all IFileDialog -// variants. It provides a common options storage and events handling. -// +using MS.Internal.AppModel; +using MS.Internal.Interop; +using MS.Win32; +using System.ComponentModel; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows; + +// There are THREE definitions of HRESULT. Two in ErrorCodes, and one in wgx_render.cs. +// wgx_render.cs wins if we don't explicitly define it here. +using HRESULT = MS.Internal.Interop.HRESULT; namespace Microsoft.Win32 { - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.Interop; - using MS.Win32; - - using System; - using System.ComponentModel; - using System.Collections.Generic; - using System.IO; - using System.Runtime.InteropServices; - using System.Text; - using System.Windows; - - using HRESULT = MS.Internal.Interop.HRESULT; - /// /// Provides a common base class for wrappers around both the /// File Open and File Save common dialog boxes. Derives from @@ -45,7 +34,7 @@ public abstract class CommonItemDialog : CommonDialog #region Constructors /// - /// In an inherited class, initializes a new instance of + /// In an inherited class, initializes a new instance of /// the System.Windows.CommonItemDialog class. /// private protected CommonItemDialog() @@ -68,7 +57,7 @@ private protected CommonItemDialog() /// /// Resets all properties to their default values. - /// Classes derived from CommonItemDialog are expected to + /// Classes derived from CommonItemDialog are expected to /// call Base.Reset() at the beginning of their /// implementation of Reset() if they choose to /// override this function. @@ -141,13 +130,13 @@ public string DefaultDirectory } } - // The actual flag is FOS_NODEREFERENCELINKS (set = do not dereference, unset = deref) - + // The actual flag is FOS_NODEREFERENCELINKS (set = do not dereference, unset = deref) - // while we have true = dereference and false=do not dereference. Because we expose - // the opposite of the Windows flag as a property to be clearer, we need to negate + // the opposite of the Windows flag as a property to be clearer, we need to negate // the value in both the getter and the setter here. /// - /// Gets or sets a value indicating whether the dialog box returns the location - /// of the file referenced by the shortcut or whether it returns the location + /// Gets or sets a value indicating whether the dialog box returns the location + /// of the file referenced by the shortcut or whether it returns the location /// of the shortcut (.lnk). Not all dialogs allow users to select shortcuts. /// public bool DereferenceLinks @@ -238,7 +227,7 @@ public string Title } } - // If false, the file dialog boxes will allow invalid characters in the returned file name. + // If false, the file dialog boxes will allow invalid characters in the returned file name. // We are actually responsible for dealing with this flag - it determines whether all of the // processing in ProcessFileNames (which includes things such as the AddExtension feature) // occurs. @@ -324,7 +313,7 @@ internal void SetOption(FOS option, bool value) } else { - // if value is false, AND the bitwise complement of the + // if value is false, AND the bitwise complement of the // option with _dialogOptions _dialogOptions &= ~option; } @@ -340,7 +329,7 @@ internal void SetOption(FOS option, bool value) /// Returns the choice the user made in the message box /// (true if MessageBoxResult.Yes, /// false if OK or MessageBoxResult.No) - /// + /// /// We have to do this instead of just calling MessageBox because /// of an issue where keyboard navigation would fail after showing /// a message box. See http://bugcheck/default.asp?URL=/Bugs/URT/84016.asp @@ -468,7 +457,7 @@ private protected virtual void RevertItemOk(object state) { } // If multiple files are selected, we only return the first filename. /// - /// Gets a string containing the full path of the file or folder selected in + /// Gets a string containing the full path of the file or folder selected in /// the dialog box. /// private protected string CriticalItemName @@ -494,7 +483,7 @@ private protected string[] MutableItemNames /// /// In cases where we need to return an array of strings, we return - /// a clone of the array. We also need to make sure we return a + /// a clone of the array. We also need to make sure we return a /// string[0] instead of a null if we don't have any filenames. /// private protected string[] CloneItemNames() @@ -532,9 +521,9 @@ private protected string[] CloneItemNames() // variables and for the options bitmask. private void Initialize() { - // + // // Initialize Options Flags - // + // _dialogOptions = 0; // _dialogOptions is an int containing a set of // bit flags used to initialize the dialog box. // Within our code, we only use GetOption and SetOption @@ -559,7 +548,7 @@ private void Initialize() // // Initialize additional properties - // + // _itemNames = null; _title = null; _initialDirectory = null; @@ -670,8 +659,8 @@ private static IShellItem ResolveCustomPlace(FileDialogCustomPlace customPlace) // // The solution is this private property, which returns the title of the // file dialog (using the stored handle of the dialog _hwndFileDialog to - // call GetWindowText). - // + // call GetWindowText). + // // It is designed to only be called by MessageBoxWithFocusRestore. private string DialogCaption { @@ -781,7 +770,7 @@ void IDisposable.Dispose() private string _defaultDirectory; // Starting directory if no recent private string _rootDirectory; // Topmost directory - // We store the handle of the file dialog inside our class + // We store the handle of the file dialog inside our class // for a variety of purposes (like getting the title of the dialog // box when we need to show a message box with the same title bar caption) private IntPtr _hwndFileDialog; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialog.cs index d48f72fbe51..079f3d8c503 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialog.cs @@ -2,6 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.AppModel; +using MS.Internal.Interop; +using System.ComponentModel; +using System.IO; +using System.Windows; + // // // Description: @@ -15,17 +22,6 @@ namespace Microsoft.Win32 { - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.Interop; - - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Text; - using System.Windows; - /// /// Provides a common base class for wrappers around both the /// File Open and File Save common dialog boxes. Derives from diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlace.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlace.cs index ccc11430d26..79a3eabce42 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlace.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlace.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - namespace Microsoft.Win32 { - using System; - using System.Globalization; - /// /// A union of KnownFolders and file paths that can be placed into FileDialog's Favorites pane. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlaces.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlaces.cs index 5044e267db5..04937cf550b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlaces.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/FileDialogCustomPlaces.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - namespace Microsoft.Win32 { - using System; - // Guids defined here are copied from the KnownFolders.h file, part of the Windows SDK. // Not all folders in that header will work for FileDialogs. The WPF implementation limits the list to locations that have a physical backing, // e.g. not ControlPanel, Computer, etc. The real file dialogs work at a higher level of abstraction (shell namespaces instead of the file system) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFileDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFileDialog.cs index 76fadf864a1..f9c60fe0c46 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFileDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFileDialog.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; +using System.Windows; + +using MS.Internal.AppModel; +using MS.Internal.Interop; + // // // Description: @@ -13,17 +19,6 @@ namespace Microsoft.Win32 { - using System; - using System.Collections.Generic; - using System.IO; - using System.Security; - using System.Windows; - - using MS.Internal.AppModel; - using MS.Internal.Interop; - using MS.Internal.PresentationFramework; - using MS.Win32; - /// /// Represents a common dialog box that allows the user to open one or more file(s). /// This class cannot be inherited. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFolderDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFolderDialog.cs index d06aeb1fb30..36a88c43a68 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFolderDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFolderDialog.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.ComponentModel; +using System.IO; + +using MS.Internal.AppModel; +using MS.Internal.Interop; + // // // Description: @@ -12,14 +18,6 @@ namespace Microsoft.Win32 { - using System; - using System.ComponentModel; - using System.IO; - using System.Text; - - using MS.Internal.AppModel; - using MS.Internal.Interop; - /// /// Represents a common dialog box that allows the user to open one or more folder(s). /// This class cannot be inherited. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/SaveFileDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/SaveFileDialog.cs index 70b09338c25..70884c5c9c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/SaveFileDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/SaveFileDialog.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.AppModel; +using MS.Internal.Interop; +using System.IO; +using System.Windows; + // // // Description: @@ -14,16 +19,6 @@ namespace Microsoft.Win32 { - using MS.Internal.AppModel; - using MS.Internal.Interop; - using MS.Internal.PresentationFramework; - using MS.Win32; - using System; - using System.Collections.Generic; - using System.IO; - using System.Security; - using System.Windows; - /// /// Represents a common dialog box that allows the user to specify options /// for saving a file. This class cannot be inherited. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/OtherAssemblyAttrs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/OtherAssemblyAttrs.cs index 067d8d404f1..1b76fb97697 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/OtherAssemblyAttrs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/OtherAssemblyAttrs.cs @@ -7,42 +7,37 @@ // using MS.Internal.PresentationFramework; -using System; -using System.Resources; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -using System.Security; -using System.Windows.Markup; -[assembly:TypeForwardedTo(typeof(System.Windows.NameScope))] -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.ArrayExtension))] -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.IProvideValueTarget))] -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.NullExtension))] -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.StaticExtension))] -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.TypeExtension))] +[assembly: TypeForwardedTo(typeof(System.Windows.NameScope))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.ArrayExtension))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.IProvideValueTarget))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.NullExtension))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.StaticExtension))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.TypeExtension))] // IProvidePropertyFallback is an internal interface and not included in the PresentationCore reference assembly. // Therefore we need to ensure it's not included in the PresentationFramework reference assembly as it won't be defined there. #if !PRESENTATION_FRAMEWORK_REF -[assembly:TypeForwardedTo(typeof(System.Windows.Markup.IProvidePropertyFallback))] +[assembly: TypeForwardedTo(typeof(System.Windows.Markup.IProvidePropertyFallback))] #endif -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkRoyale)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkLuna)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkAero)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkAero2)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkAeroLite)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkClassic)] -[assembly:InternalsVisibleTo(BuildInfo.SystemWindowsPresentation)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemCore)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemXml)] -[assembly:InternalsVisibleTo(BuildInfo.SystemWindowsControlsRibbon)] -[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkFluent)] -[assembly:DependencyAttribute("mscorlib,", LoadHint.Always)] -[assembly:DependencyAttribute("System,", LoadHint.Always)] -[assembly:DependencyAttribute("WindowsBase,", LoadHint.Always)] -[assembly:DependencyAttribute("PresentationCore,", LoadHint.Always)] -[assembly:DependencyAttribute("System.Xaml,", LoadHint.Sometimes)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkRoyale)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkLuna)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkAero)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkAero2)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkAeroLite)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkClassic)] +[assembly: InternalsVisibleTo(BuildInfo.SystemWindowsPresentation)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemCore)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkSystemXml)] +[assembly: InternalsVisibleTo(BuildInfo.SystemWindowsControlsRibbon)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFrameworkFluent)] +[assembly: DependencyAttribute("mscorlib,", LoadHint.Always)] +[assembly: DependencyAttribute("System,", LoadHint.Always)] +[assembly: DependencyAttribute("WindowsBase,", LoadHint.Always)] +[assembly: DependencyAttribute("PresentationCore,", LoadHint.Always)] +[assembly: DependencyAttribute("System.Xaml,", LoadHint.Sometimes)] // Due to the XBAP script interop feature, we take a dependency on System.Core for the use // of the dynamic pseudo-type, on BrowserInteropHelper.HostScript. The dynamic type really @@ -53,36 +48,36 @@ // this eager loading to be caused by PresentationFramework's dependency on it. Note there // is a plan by the CLR team to remove the attribute on System.Core. At that point, we can // likely drop the attribute below, but there should be no harm in leaving it. -[assembly:DependencyAttribute("System.Core,", LoadHint.Sometimes)] +[assembly: DependencyAttribute("System.Core,", LoadHint.Sometimes)] -[assembly:System.Windows.ThemeInfoAttribute(System.Windows.ResourceDictionaryLocation.ExternalAssembly, System.Windows.ResourceDictionaryLocation.None)] +[assembly: System.Windows.ThemeInfoAttribute(System.Windows.ResourceDictionaryLocation.ExternalAssembly, System.Windows.ResourceDictionaryLocation.None)] // Namespace information for Xaml -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Documents")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shapes")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shell")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Navigation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Data")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls.Primitives")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Documents")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shapes")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shell")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Navigation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Data")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls.Primitives")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Documents")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shapes")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shell")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Navigation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Data")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls.Primitives")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Documents")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shapes")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shell")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Navigation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Data")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls.Primitives")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Controls")] [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Documents")] @@ -96,18 +91,18 @@ [assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Input")] [assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "wpf")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/winfx/2006/xaml", "x")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml", "x")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Documents")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Shapes")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Navigation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Data")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls.Primitives")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Animation")] -[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] -[assembly:System.Windows.Markup.XmlnsPrefix ("http://schemas.microsoft.com/xps/2005/06", "metro")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Documents")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Shapes")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Navigation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Data")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls.Primitives")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Animation")] +[assembly: System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] +[assembly: System.Windows.Markup.XmlnsPrefix("http://schemas.microsoft.com/xps/2005/06", "metro")] [assembly: System.Windows.Markup.XmlnsCompatibleWith("http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key", "http://schemas.microsoft.com/winfx/2006/xaml")] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj index 1c7c88d193d..5b90421c0a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj @@ -34,6 +34,8 @@ + + @@ -47,7 +49,6 @@ - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/ComponentModel/DesignerProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/ComponentModel/DesignerProperties.cs index d2884d79b49..52539176307 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/ComponentModel/DesignerProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/ComponentModel/DesignerProperties.cs @@ -3,6 +3,9 @@ // See the LICENSE file in the project root for more information. +using System.Windows; +using MS.Internal.KnownBoxes; + // // Description: // Provides attached properties used to communicate with a designer. @@ -12,10 +15,6 @@ namespace System.ComponentModel { - using System; - using System.Windows; - using MS.Internal.KnownBoxes; - /// /// The DesignerProperties class provides attached properties that can be used to /// query the state of a control when it is running in a designer. Designer tools diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AccentColorHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AccentColorHelper.cs index abf767a129b..04e82dc8e04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AccentColorHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AccentColorHelper.cs @@ -1,10 +1,4 @@ -using System; using System.Windows.Media; -using System.Windows.Appearance; - -using MS.Internal; -using Microsoft.Win32; -using System.Runtime.InteropServices; using MS.Internal.WindowsRuntime.Windows.UI.ViewManagement; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnchorInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnchorInfo.cs index f5b339fe1e1..114309e53f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnchorInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnchorInfo.cs @@ -7,15 +7,6 @@ // IAnchorInfo is the public portion of IAttachedAnnotation. // - -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Annotations; -using System.Windows.Annotations.Storage; -using System.Windows.Media; -using MS.Utility; - namespace System.Windows.Annotations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Annotation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Annotation.cs index 5eff7e04050..8fd0746026d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Annotation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Annotation.cs @@ -12,16 +12,9 @@ // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Windows.Annotations.Storage; -using System.Windows.Data; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationAuthorChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationAuthorChangedEventArgs.cs index 043e8878c0e..6285c22a69e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationAuthorChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationAuthorChangedEventArgs.cs @@ -12,7 +12,6 @@ // Spec: Simplifying Store Cache Model.doc // -using System; using System.ComponentModel; namespace System.Windows.Annotations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationComponentChooser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationComponentChooser.cs index 3306e161d77..2ff8e3fb0cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationComponentChooser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationComponentChooser.cs @@ -7,10 +7,6 @@ // AnnotationComponentChooser // -using System; -using System.Diagnostics; -using System.Reflection; -using System.Windows; using System.Windows.Controls; using MS.Internal.Annotations; using MS.Internal.Annotations.Component; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationDocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationDocumentPaginator.cs index 32eb688c952..c8fa3aba558 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationDocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationDocumentPaginator.cs @@ -3,18 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.IO; using System.Windows.Annotations.Storage; using System.Windows.Documents; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; -using System.Windows.Shapes; using MS.Internal; using MS.Internal.Annotations; using MS.Internal.Annotations.Anchoring; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationHelper.cs index cf43feb9986..43a20fa0909 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationHelper.cs @@ -4,28 +4,16 @@ #pragma warning disable 1634, 1691 -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Windows.Threading; -using System.IO; -using System.Windows; -using System.Windows.Annotations.Storage; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Markup; using System.Xml; -using System.Diagnostics; using MS.Internal; using MS.Internal.Annotations; using MS.Internal.Annotations.Anchoring; using MS.Internal.Annotations.Component; -using MS.Internal.Documents; using MS.Utility; namespace System.Windows.Annotations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResource.cs index d151c4ab5bc..e07da11d185 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResource.cs @@ -12,15 +12,9 @@ // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Annotations.Storage; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResourceChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResourceChangedEventArgs.cs index c8825d40678..8e12c9cb705 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResourceChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationResourceChangedEventArgs.cs @@ -12,7 +12,6 @@ // Spec: Simplifying Store Cache Model.doc // -using System; using System.ComponentModel; namespace System.Windows.Annotations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationService.cs index 123065a2255..64fd28efcb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/AnnotationService.cs @@ -9,31 +9,19 @@ // and invoking the annotation framework. // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; using System.Windows.Threading; -using System.IO; -using System.Windows; using System.Windows.Annotations.Storage; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Markup; -using System.Xml; using MS.Internal; using MS.Internal.Annotations; using MS.Internal.Annotations.Anchoring; using MS.Internal.Annotations.Component; -using MS.Internal.Documents; using MS.Utility; -using System.Reflection; // for BindingFlags -using System.Globalization; // for CultureInfo -using System.Threading; namespace System.Windows.Annotations { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorBase.cs index 708a5e4922e..cd9be229eac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorBase.cs @@ -12,11 +12,7 @@ // Spec: Simplifying Store Cache Model.doc // -using System; -using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Xml; using MS.Internal.Annotations; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorGroup.cs index 0d177cf6463..f77f1bc8716 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorGroup.cs @@ -11,14 +11,8 @@ // Spec: Simplifying Store Cache Model.doc // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Annotations.Storage; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPart.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPart.cs index 7860b88d1df..4da679333cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPart.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPart.cs @@ -11,11 +11,7 @@ // Spec: Simplifying Store Cache Model.doc // -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.Xml; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPartList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPartList.cs index 9d47746ea75..7ad3b402c4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPartList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/LocatorPartList.cs @@ -13,15 +13,8 @@ // Spec: Simplifying Store Cache Model.doc // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Annotations.Storage; -using System.Windows.Data; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs index 6413862d947..9dcca35a156 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs @@ -9,14 +9,6 @@ // Spec: CAF%20Storage%20Spec.doc // - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Xml; -using System.Windows.Annotations; -using System.Windows.Markup; - namespace System.Windows.Annotations.Storage { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/StoreContentChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/StoreContentChangedEventArgs.cs index 2bc700d9a27..9bb1361329d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/StoreContentChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/StoreContentChangedEventArgs.cs @@ -12,11 +12,6 @@ // Spec: CAF%20Storage%20Spec.doc // - -using System; -using System.Collections; -using System.Xml; - namespace System.Windows.Annotations.Storage { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/XmlStreamStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/XmlStreamStore.cs index 216c6430144..dcb886b0ed4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/XmlStreamStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/XmlStreamStore.cs @@ -12,25 +12,14 @@ // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Diagnostics; using System.IO; -using System.Windows; -using System.Windows.Annotations; using System.Xml; -using System.Xml.Schema; using System.Xml.XPath; -using System.Xml.Serialization; using MS.Internal; using MS.Internal.Annotations; using MS.Internal.Annotations.Storage; using MS.Utility; using System.Windows.Markup; -using MS.Internal.Controls.StickyNote; -using System.Windows.Controls; namespace System.Windows.Annotations.Storage { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Appearance/WindowBackdropManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Appearance/WindowBackdropManager.cs index e80504c34d0..81157e76b02 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Appearance/WindowBackdropManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Appearance/WindowBackdropManager.cs @@ -1,4 +1,3 @@ -using System.Runtime.InteropServices; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Application.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Application.cs index 929a2b56911..183bb2cbf48 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Application.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Application.cs @@ -21,39 +21,26 @@ //warnings 1634 and 1691. (From PreSharp Documentation) #pragma warning disable 1634, 1691 -using System; - using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.IO; using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; -using System.Resources; using System.Threading; using System.IO.Packaging; using System.Windows.Threading; using System.Windows.Navigation; -using System.Windows; using System.Windows.Interop; using System.Windows.Resources; using System.Windows.Markup; using System.Net; -using System.Text; using MS.Internal; using MS.Internal.AppModel; using MS.Internal.IO.Packaging; using MS.Internal.Interop; -using MS.Internal.Navigation; -using MS.Internal.Telemetry; using MS.Internal.Utility; -using MS.Internal.Resources; using MS.Utility; using MS.Win32; using Microsoft.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AttachedPropertyBrowsableForChildrenAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AttachedPropertyBrowsableForChildrenAttribute.cs index 94158b4ffd2..720d55832c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AttachedPropertyBrowsableForChildrenAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/AttachedPropertyBrowsableForChildrenAttribute.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -namespace System.Windows +namespace System.Windows { - using System; - /// /// This attribute declares that a property is visible when the /// property owner is a parent of another element. For example, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonAutomationPeer.cs index b4b03e97267..848134e887b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonAutomationPeer.cs @@ -2,21 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonBaseAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonBaseAutomationPeer.cs index d5c2a3f6d90..c95ca3db3b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonBaseAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ButtonBaseAutomationPeer.cs @@ -2,27 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { - /// - public abstract class ButtonBaseAutomationPeer: FrameworkElementAutomationPeer + /// + public abstract class ButtonBaseAutomationPeer: FrameworkElementAutomationPeer { /// protected ButtonBaseAutomationPeer(ButtonBase owner): base(owner) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarAutomationPeer.cs index af50fe69cfe..67f064fc1b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarAutomationPeer.cs @@ -3,15 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Globalization; -using System.Security; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; using MS.Internal.Automation; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarButtonAutomationPeer.cs index abc8c28f2b9..b9d35ee39ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CalendarButtonAutomationPeer.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Input; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CheckBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CheckBoxAutomationPeer.cs index 35c0edf9302..a504b50f841 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CheckBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/CheckBoxAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ComboBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ComboBoxAutomationPeer.cs index 7ca001e1231..52260901c3f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ComboBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ComboBoxAutomationPeer.cs @@ -2,23 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs index 161c8476ea2..d301fc5958a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs @@ -7,7 +7,6 @@ // Description: Base class for AutomationPeers associated with TextPattern. // -using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; // ITextPointer using MS.Internal.Automation; // EventMap diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContextMenuAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContextMenuAutomationPeer.cs index 38f6d2ebce0..9721aeecf9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContextMenuAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContextMenuAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridAutomationPeer.cs index 4bddf1b1f9e..94fa409237d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridAutomationPeer.cs @@ -2,14 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Media; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellAutomationPeer.cs index 09b7cc49696..fc8c8a0a891 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellAutomationPeer.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using MS.Internal; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellItemAutomationPeer.cs index 9a4c55bd455..0be0e9914b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridCellItemAutomationPeer.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderAutomationPeer.cs index c6ce565296b..fc6a9b6a3a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using MS.Internal; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderItemAutomationPeer.cs index 48d469f9564..6e954a9ddb0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeaderItemAutomationPeer.cs @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Data; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeadersPresenterAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeadersPresenterAutomationPeer.cs index 89a01bbabf3..ce15cd50be2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeadersPresenterAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridColumnHeadersPresenterAutomationPeer.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridDetailsPresenterAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridDetailsPresenterAutomationPeer.cs index 3424b00156d..5cdc99e1e0f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridDetailsPresenterAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridDetailsPresenterAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using MS.Internal; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridItemAutomationPeer.cs index 9d95825d1a5..0b8189360b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridItemAutomationPeer.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Security; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowAutomationPeer.cs index 5fe23e9e737..ceb8c4670d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowAutomationPeer.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using MS.Internal; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowHeaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowHeaderAutomationPeer.cs index fb3de3f9ba6..b060bfd5b26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowHeaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DataGridRowHeaderAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using MS.Internal; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DatePickerAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DatePickerAutomationPeer.cs index 759682dd287..31fdbe5f465 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DatePickerAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DatePickerAutomationPeer.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DateTimeAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DateTimeAutomationPeer.cs index b41058772fe..4f9ae3d6660 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DateTimeAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DateTimeAutomationPeer.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Input; using System.Windows.Threading; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentAutomationPeer.cs index 63df16cb25c..e1567e1f150 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentAutomationPeer.cs @@ -6,8 +6,6 @@ // Description: AutomationPeer associated with flow and fixed documents. // -using System.Collections.Generic; // List -using System.Security; // SecurityCritical using System.Windows.Documents; // ITextContainer using System.Windows.Interop; // HwndSource using System.Windows.Media; // Visual diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentPageViewAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentPageViewAutomationPeer.cs index dae3e3ebc8f..67e1074d478 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentPageViewAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentPageViewAutomationPeer.cs @@ -6,9 +6,7 @@ // Description: AutomationPeer associated with DocumentPageView. // -using System.Collections.Generic; // List using System.Globalization; // CultureInfo -using System.Windows.Controls; // DocumentViewer using System.Windows.Controls.Primitives; // DocumentPageView namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerAutomationPeer.cs index dfabbc118bc..d6682d30a1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerAutomationPeer.cs @@ -2,20 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerBaseAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerBaseAutomationPeer.cs index 84526b9d846..5aec83c7fb5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerBaseAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/DocumentViewerBaseAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: AutomationPeer associated with DocumentViewerBase. // -using System.Collections.Generic; // List using System.Windows.Controls.Primitives; // DocumentViewerBase using System.Windows.Documents; // IDocumentPaginatorSource diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ExpanderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ExpanderAutomationPeer.cs index e2da658f4a4..86ec4c672ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ExpanderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ExpanderAutomationPeer.cs @@ -2,21 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FixedPageAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FixedPageAutomationPeer.cs index ccb1704b6ec..622a4bbdd44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FixedPageAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FixedPageAutomationPeer.cs @@ -2,20 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentPageViewerAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentPageViewerAutomationPeer.cs index e4f07b4327f..86321a1ff67 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentPageViewerAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentPageViewerAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: AutomationPeer associated with FlowDocumentPageViewer. // -using System.Collections.Generic; // List using System.Windows.Controls; // FlowDocumentPageViewer using MS.Internal.Documents; // IFlowDocumentView diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentReaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentReaderAutomationPeer.cs index ba8269b22c3..45fd37d0c11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentReaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentReaderAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: AutomationPeer associated with FlowDocumentReader. // -using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IMultipleViewProvider using System.Windows.Controls; // FlowDocumentReader using System.Windows.Documents; // FlowDocument diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentScrollViewerAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentScrollViewerAutomationPeer.cs index 1392f3125e0..694ab23a4f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentScrollViewerAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FlowDocumentScrollViewerAutomationPeer.cs @@ -7,7 +7,6 @@ // Description: AutomationPeer associated with FlowDocumentScrollViewer. // -using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IScrollProvider using System.Windows.Controls; // FlowDocumentScrollViewer using System.Windows.Documents; // FlowDocument diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameAutomationPeer.cs index cfe9e146983..88ac58bf438 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; -using System.ComponentModel; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkContentElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkContentElementAutomationPeer.cs index 037604350f6..f6b595b0668 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkContentElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkContentElementAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: AutomationPeer associated with FrameworkContnetElement. // -using System.Windows.Markup; // DefinitionProperties using System.Windows.Controls; // Label namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkElementAutomationPeer.cs index e58910a9bf1..2d34ffc08bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/FrameworkElementAutomationPeer.cs @@ -2,20 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; -using System.Windows.Markup; - -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridSplitterAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridSplitterAutomationPeer.cs index 384bea229d0..29669426291 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridSplitterAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridSplitterAutomationPeer.cs @@ -2,19 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewAutomationPeer.cs index dd584035eeb..f1e215587a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewAutomationPeer.cs @@ -2,25 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Internal.Automation; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewCellAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewCellAutomationPeer.cs index 9bb7c5b7b5c..239d2617037 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewCellAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewCellAutomationPeer.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; using System.Windows.Media; using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewColumnHeaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewColumnHeaderAutomationPeer.cs index 8db7591a253..39d96658871 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewColumnHeaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewColumnHeaderAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewHeaderRowPresenterAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewHeaderRowPresenterAutomationPeer.cs index 56e509adcb7..f91d00820d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewHeaderRowPresenterAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewHeaderRowPresenterAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewItemAutomationPeer.cs index 8be12299561..283007f3ef3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GridViewItemAutomationPeer.cs @@ -2,22 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupBoxAutomationPeer.cs index c5389b280ca..91d2f941d44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupBoxAutomationPeer.cs @@ -2,19 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupItemAutomationPeer.cs index decff77e872..bf60886bcc7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/GroupItemAutomationPeer.cs @@ -2,23 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Data; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; using MS.Internal.Data; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/HwndHostAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/HwndHostAutomationPeer.cs index 7abc1a8cbbe..56e2f3f0398 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/HwndHostAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/HwndHostAutomationPeer.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Interop; -using System.Security; using MS.Internal.Automation; namespace System.Windows.Automation.Peers @@ -39,7 +35,7 @@ override internal InteropAutomationProvider GetInteropChild() HostedWindowWrapper wrapper = null; HwndHost host = (HwndHost)Owner; - IntPtr hwnd = host.CriticalHandle; + IntPtr hwnd = host.Handle; if(hwnd != IntPtr.Zero) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/IViewAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/IViewAutomationPeer.cs index 864ce985271..d4e961f5884 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/IViewAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/IViewAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: IViewAutomationPeer interface // -using System.Collections.Generic; using System.Collections.Specialized; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ImageAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ImageAutomationPeer.cs index c40ca25d852..e72d06c1862 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ImageAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ImageAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkCanvasAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkCanvasAutomationPeer.cs index b76c7993f82..7765891b1df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkCanvasAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkCanvasAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkPresenterAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkPresenterAutomationPeer.cs index 616e786bb6b..df41dddd7d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkPresenterAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/InkPresenterAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemAutomationPeer.cs index 01f2962f2f2..5b5be0b384a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemAutomationPeer.cs @@ -2,23 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; using MS.Internal; using MS.Internal.Data; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlAutomationPeer.cs index ee349cb6e2f..42bf331eaf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlAutomationPeer.cs @@ -2,26 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Interop; -using System.Windows.Media; using MS.Internal; using MS.Internal.Automation; using MS.Internal.Hashing.PresentationFramework; // HashHelper -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlItemAutomationPeer.cs index 088db5231c9..059c2914f8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlItemAutomationPeer.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Controls; - namespace System.Windows.Automation.Peers { // work around (ItemsControl.GroupStyle doesn't show items in groups in the UIAutomation tree) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlWrapperAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlWrapperAutomationPeer.cs index a9eb8c9264f..859f3c6c7b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlWrapperAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ItemsControlWrapperAutomationPeer.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { // work around (ItemsControl.GroupStyle doesn't show items in groups in the UIAutomation tree) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/LabelAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/LabelAutomationPeer.cs index c40b1044952..1fb11b56942 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/LabelAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/LabelAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxAutomationPeer.cs index 168d04f0df4..f9c02dc5b6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemAutomationPeer.cs index eeaa273971f..08127c478f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemWrapperAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemWrapperAutomationPeer.cs index f80ee4ff4c4..af77a27d527 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemWrapperAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListBoxItemWrapperAutomationPeer.cs @@ -2,27 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Input; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { - /// - public class ListBoxItemWrapperAutomationPeer: FrameworkElementAutomationPeer + /// + public class ListBoxItemWrapperAutomationPeer: FrameworkElementAutomationPeer { /// public ListBoxItemWrapperAutomationPeer(ListBoxItem owner): base(owner) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListViewAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListViewAutomationPeer.cs index e93f8b3657f..6611bcd41db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListViewAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ListViewAutomationPeer.cs @@ -2,21 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MediaElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MediaElementAutomationPeer.cs index 8a293f53561..6c1c9f6850a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MediaElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MediaElementAutomationPeer.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuAutomationPeer.cs index 9006150f7ed..c42f38e5b68 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuItemAutomationPeer.cs index 5fef2642694..f0a6e36d267 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/MenuItemAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/NavigationWindowAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/NavigationWindowAutomationPeer.cs index 3cadb46208c..85bf3323d1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/NavigationWindowAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/NavigationWindowAutomationPeer.cs @@ -2,13 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Automation; using System.Windows.Navigation; -using System.Windows.Interop; -using System.Windows.Media; -using System.ComponentModel; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PasswordBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PasswordBoxAutomationPeer.cs index c73b5040eda..dad57d19311 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PasswordBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PasswordBoxAutomationPeer.cs @@ -7,22 +7,10 @@ // Description: The AutomationPeer for PasswordBox. // -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Documents; - -using MS.Internal; using MS.Internal.Automation; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PopupRootAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PopupRootAutomationPeer.cs index 688e1e938a2..e0e0feaabdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PopupRootAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/PopupRootAutomationPeer.cs @@ -2,17 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ProgressBarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ProgressBarAutomationPeer.cs index a2525881959..65e7e2e6538 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ProgressBarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ProgressBarAutomationPeer.cs @@ -2,15 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RadioButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RadioButtonAutomationPeer.cs index 7101cb1be5e..54829755612 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RadioButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RadioButtonAutomationPeer.cs @@ -2,18 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RangeBaseAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RangeBaseAutomationPeer.cs index 35733c39934..8a1fcae51cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RangeBaseAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RangeBaseAutomationPeer.cs @@ -2,19 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RepeatButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RepeatButtonAutomationPeer.cs index 88a65e503a6..a0bdb07a59d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RepeatButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RepeatButtonAutomationPeer.cs @@ -2,19 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RichTextBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RichTextBoxAutomationPeer.cs index 952ce0e9a7f..bea50979981 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RichTextBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/RichTextBoxAutomationPeer.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Documents; -using System.Windows.Interop; -using System.Windows.Media; using MS.Internal.Documents; -using MS.Internal; using MS.Internal.Automation; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollBarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollBarAutomationPeer.cs index 1c0e2f5c8ad..825c6ae4746 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollBarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollBarAutomationPeer.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollViewerAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollViewerAutomationPeer.cs index 722d1d00b41..933e0a7a22c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollViewerAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ScrollViewerAutomationPeer.cs @@ -2,19 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorAutomationPeer.cs index ead34ff2bd3..d2fac7507b8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorAutomationPeer.cs @@ -2,21 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorItemAutomationPeer.cs index a6cb4d4bc91..8bdd14141a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SelectorItemAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SeparatorAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SeparatorAutomationPeer.cs index bb2c3eafdac..cc3f80506f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SeparatorAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SeparatorAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SliderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SliderAutomationPeer.cs index afb9372cd04..777c0b5b133 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SliderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/SliderAutomationPeer.cs @@ -2,15 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarAutomationPeer.cs index 03927f0d817..53add53db8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarAutomationPeer.cs @@ -2,21 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; using System.Windows.Media; using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarItemAutomationPeer.cs index 678e83be8d5..eac1b6e9c5a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/StatusBarItemAutomationPeer.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabControlAutomationPeer.cs index 9903bc1058f..b21f32e93af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabControlAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemAutomationPeer.cs index 1b2e6afc559..6ffe364f306 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemAutomationPeer.cs @@ -2,20 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemWrapperAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemWrapperAutomationPeer.cs index fd6acc8e588..5fa7b6746d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemWrapperAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TabItemWrapperAutomationPeer.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; namespace System.Windows.Automation.Peers { - /// - public class TabItemWrapperAutomationPeer: FrameworkElementAutomationPeer + /// + public class TabItemWrapperAutomationPeer: FrameworkElementAutomationPeer { /// public TabItemWrapperAutomationPeer(TabItem owner): base(owner) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs index 82d72a6cbcd..660efedc5c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs @@ -6,7 +6,6 @@ // Description: Base class for AutomationPeers associated with TextPattern. // -using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; // ITextPointer using MS.Internal.Automation; // EventMap, TextAdaptor diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBlockAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBlockAutomationPeer.cs index c458b438b98..d386e175dd8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBlockAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBlockAutomationPeer.cs @@ -7,9 +7,7 @@ // Description: AutomationPeer associated with TextBlock. // -using System.Collections.Generic; // List using System.Windows.Controls; // TextBlock -using System.Windows.Documents; // ITextContainer using MS.Internal.Documents; // TextContainerHelper namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBoxAutomationPeer.cs index a2756d057f4..5b405c3f751 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextBoxAutomationPeer.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Documents; - -using MS.Internal; using MS.Internal.Automation; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextElementAutomationPeer.cs index 63dfc9d0817..1578237e09d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextElementAutomationPeer.cs @@ -6,13 +6,9 @@ // Description: AutomationPeer associated with TextElements. // -using System.Collections; -using System.Collections.Generic; // List -using System.Security; // SecurityCritical using System.Windows.Documents; // ITextContainer using System.Windows.Media; // Geometry using System.Windows.Interop; // HwndSource -using MS.Internal.Automation; // TextAdaptor using MS.Internal; using MS.Internal.Documents; // TextContainerHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ThumbAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ThumbAutomationPeer.cs index 0a428139f7e..71ab073b787 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ThumbAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ThumbAutomationPeer.cs @@ -2,19 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToggleButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToggleButtonAutomationPeer.cs index e836624e825..25f4888566f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToggleButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToggleButtonAutomationPeer.cs @@ -2,19 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolBarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolBarAutomationPeer.cs index d93284842f6..de3d957d580 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolBarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolBarAutomationPeer.cs @@ -2,18 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolTipAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolTipAutomationPeer.cs index 76d7f371234..0231acf9850 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolTipAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ToolTipAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; -using System.ComponentModel; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewAutomationPeer.cs index ff923297535..542cd4adfb7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewAutomationPeer.cs @@ -2,21 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; - -using MS.Internal; -using MS.Win32; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewDataItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewDataItemAutomationPeer.cs index e6af9188871..cf3bd49a0c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewDataItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewDataItemAutomationPeer.cs @@ -8,23 +8,11 @@ // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Threading; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { public class TreeViewDataItemAutomationPeer : ItemAutomationPeer, ISelectionItemProvider, IScrollItemProvider, IExpandCollapseProvider diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewItemAutomationPeer.cs index 52f60d8fa9f..6a2f3ac63fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TreeViewItemAutomationPeer.cs @@ -2,22 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Interop; using System.Windows.Media; -using MS.Internal; -using MS.Win32; - namespace System.Windows.Automation.Peers { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/UserControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/UserControlAutomationPeer.cs index 466272a3549..2982e889006 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/UserControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/UserControlAutomationPeer.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; -using System.Windows.Interop; -using System.Windows.Media; -using System.ComponentModel; namespace System.Windows.Automation.Peers { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/Viewport3DAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/Viewport3DAutomationPeer.cs index 491760f24f4..c78ff2e98d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/Viewport3DAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/Viewport3DAutomationPeer.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls; namespace System.Windows.Automation.Peers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/WindowAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/WindowAutomationPeer.cs index 640856cd141..2d4ae744399 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/WindowAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/WindowAutomationPeer.cs @@ -2,16 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; using System.Text; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; using System.ComponentModel; - -using MS.Internal; using MS.Win32; // Used to support the warnings disabled below @@ -47,7 +40,7 @@ override protected string GetNameCore() try { StringBuilder sb = new StringBuilder(512); - UnsafeNativeMethods.GetWindowText(new HandleRef(null, window.CriticalHandle), sb, sb.Capacity); + UnsafeNativeMethods.GetWindowText(new HandleRef(null, window.Handle), sb, sb.Capacity); name = sb.ToString(); } catch (Win32Exception) @@ -79,7 +72,7 @@ override protected Rect GetBoundingRectangleCore() if(!window.IsSourceWindowNull) { NativeMethods.RECT rc = new NativeMethods.RECT(0,0,0,0); - IntPtr windowHandle = window.CriticalHandle; + IntPtr windowHandle = window.Handle; if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed { try { SafeNativeMethods.GetWindowRect(new HandleRef(null, windowHandle), ref rc); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/BroadcastEventHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/BroadcastEventHelper.cs index ace65f98990..8025619d878 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/BroadcastEventHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/BroadcastEventHelper.cs @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; using System.Windows.Threading; -using System.Windows.Documents; using MS.Internal; using MS.Internal.PresentationFramework; // SafeSecurityHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ColorConvertedBitmapExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ColorConvertedBitmapExtension.cs index 1738d73617b..89e41db861c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ColorConvertedBitmapExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ColorConvertedBitmapExtension.cs @@ -9,17 +9,10 @@ * * \***************************************************************************/ -using System; using System.IO; -using System.Collections; -using System.Diagnostics; -using System.Windows; -using System.Windows.Documents; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Imaging; -using System.Reflection; -using MS.Internal; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKey.cs index a0421e601f6..1ce9d55f971 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKey.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Reflection; -using System.Text; using System.ComponentModel; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKeyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKeyConverter.cs index 2cbcf35a9c1..b9243008be9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKeyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ComponentResourceKeyConverter.cs @@ -5,11 +5,8 @@ // // -using System; using System.ComponentModel; using System.Globalization; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Condition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Condition.cs index ce0887f65bf..11e24727000 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Condition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Condition.cs @@ -2,14 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System.IO; using System.Windows.Markup; using System.ComponentModel; - -using System; using System.Windows.Data; -using System.Diagnostics; using System.Globalization; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ConditionCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ConditionCollection.cs index 56083d347f2..0fdffa59882 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ConditionCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ConditionCollection.cs @@ -11,10 +11,6 @@ * \***************************************************************************/ using System.Collections.ObjectModel; // Collection -using System.Diagnostics; // Debug.Assert -using System.Windows.Data; // Binding knowledge -using System.Windows.Media; // Visual knowledge -using System.Windows.Markup; // MarkupExtension namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ControlTemplate.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ControlTemplate.cs index deb5e1a55b7..f966b28e95d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ControlTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ControlTemplate.cs @@ -11,9 +11,6 @@ // // -using System.Diagnostics; // Debug -using System.Windows.Controls; // Control -using System.Windows.Media.Animation; // Timeline using System.Windows.Navigation; // PageFunctionBase using System.ComponentModel; // DesignerSerializationVisibilityAttribute & DefaultValue using System.Windows.Markup; // DependsOnAttribute diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AVElementHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AVElementHelper.cs index 78070ea02fb..11ac67b9257 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AVElementHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AVElementHelper.cs @@ -8,14 +8,7 @@ using MS.Internal; -using MS.Utility; -using System.Diagnostics; -using System.Windows.Threading; -using System; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Security; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AccessText.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AccessText.cs index 72b99cc2624..63be66087db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AccessText.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AccessText.cs @@ -6,12 +6,10 @@ using System.Collections; using System.ComponentModel; using System.Globalization; -using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Markup; -using System.Diagnostics; using System.Xml; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AddingNewItemEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AddingNewItemEventArgs.cs index fcc2d323f6d..196ee5609c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AddingNewItemEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AddingNewItemEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AdornedElementPlaceholder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AdornedElementPlaceholder.cs index b4605470695..f27b3a84d41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AdornedElementPlaceholder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AdornedElementPlaceholder.cs @@ -11,18 +11,11 @@ // See specs at Validation.mht // -using System; using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Media; -using System.Windows; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Markup; using MS.Internal.Controls; -using MS.Utility; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AlternationConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AlternationConverter.cs index 50b39a98eaf..22327edcd17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AlternationConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/AlternationConverter.cs @@ -6,9 +6,7 @@ // Description: Convert between index and a list of values. // -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Windows.Data; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToSelectiveScrollingOrientationConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToSelectiveScrollingOrientationConverter.cs index 5f4d512918f..34b56420500 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToSelectiveScrollingOrientationConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToSelectiveScrollingOrientationConverter.cs @@ -3,9 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Windows; using System.Windows.Data; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToVisibilityConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToVisibilityConverter.cs index 45427b52f9c..97ef589e522 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToVisibilityConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BooleanToVisibilityConverter.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Windows; -using System.Windows.Media; using System.Windows.Data; using System.Globalization; -using System.Collections.Generic; - -using MS.Internal.Controls; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Border.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Border.cs index 4b8aefc430e..8d33efdd287 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Border.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Border.cs @@ -11,10 +11,6 @@ using MS.Internal; using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; -using System; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BorderGapMaskConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BorderGapMaskConverter.cs index ba2d4d680ab..8e856d7a7a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BorderGapMaskConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BorderGapMaskConverter.cs @@ -7,7 +7,6 @@ // using System.Globalization; -using System.Windows.Controls; using System.Windows.Data; using System.Windows.Media; using System.Windows.Shapes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Button.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Button.cs index 09318d64cc6..cb124b56633 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Button.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Button.cs @@ -2,19 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Shapes; - -using MS.Utility; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Calendar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Calendar.cs index e12e5f61e91..00c94607c9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Calendar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Calendar.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarBlackoutDatesCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarBlackoutDatesCollection.cs index b46031de7b0..9578f93561c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarBlackoutDatesCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarBlackoutDatesCollection.cs @@ -3,10 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using System.Threading; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateChangedEventArgs.cs index a45f08b216d..ca308b91094 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateChangedEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRange.cs index a323b1bdb60..93e1c4a7479 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRange.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRangeChangingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRangeChangingEventArgs.cs index 504518c6eb3..1fd9d4125a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRangeChangingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarDateRangeChangingEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarSelectionChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarSelectionChangedEventArgs.cs index 842c84a0756..31de538ede6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarSelectionChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CalendarSelectionChangedEventArgs.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Windows; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Canvas.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Canvas.cs index 0e680cf7820..7731b8b6049 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Canvas.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Canvas.cs @@ -7,20 +7,11 @@ // Spec at Canvas.xml // -using MS.Internal; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; - using System.Windows.Media; - -using System; - using MS.Internal.PresentationFramework; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CheckBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CheckBox.cs index fee2635c1a1..497bee317ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CheckBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CheckBox.cs @@ -3,17 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Windows.Threading; - -using System.Windows.Automation; using System.Windows.Controls.Primitives; -using System.Windows; using System.Windows.Input; -using System.Windows.Media; -using MS.Utility; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CleanUpVirtualizedItemEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CleanUpVirtualizedItemEventArgs.cs index b22fcda0f05..5069ccf7ce8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CleanUpVirtualizedItemEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CleanUpVirtualizedItemEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.ComponentModel; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ClickMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ClickMode.cs index 5ee43b7be14..970353935aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ClickMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ClickMode.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinition.cs index 6962180fe76..2da494315cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinition.cs @@ -2,20 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Markup; -using MS.Internal; -using System.Reflection; using System.ComponentModel; -using BuildInfo=MS.Internal.PresentationFramework.BuildInfo; +using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; //--------------------------------------------------------------------------- // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBox.cs index 6eea8bca056..bc792c20ac2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBox.cs @@ -3,25 +3,15 @@ // See the LICENSE file in the project root for more information. -using System; - using System.ComponentModel; - -using System.Collections; using System.Collections.Specialized; -using System.Diagnostics; -using System.Globalization; using System.Windows.Threading; - -using System.Windows; using System.Windows.Automation.Peers; -using System.Security; using System.Windows.Media; using System.Windows.Input; using System.Windows.Documents; using System.Windows.Interop; using System.Windows.Controls.Primitives; -using System.Windows.Markup; using System.Windows.Shapes; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBoxItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBoxItem.cs index f9cb8c0062f..5141616b510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBoxItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ComboBoxItem.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.KnownBoxes; -using System; -using System.ComponentModel; - -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Media; using System.Windows.Input; -using System.Windows.Controls.Primitives; -using System.Windows.Shapes; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContainerTracking.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContainerTracking.cs index 7b77c2cb98c..b53b68e1a05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContainerTracking.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContainerTracking.cs @@ -2,18 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls.Primitives; -using System.Windows.Input; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentControl.cs index d6ec24bbd76..ddbe8ccb4f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentControl.cs @@ -2,24 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.ComponentModel; -using System.Windows.Threading; - -using System.Diagnostics; using System.Windows.Data; -using System.Windows.Media; using System.Windows.Markup; - -using MS.Utility; using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Data; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; -using System.Text; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentPresenter.cs index cd07de84954..63a8d42c2ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContentPresenter.cs @@ -8,25 +8,16 @@ // Specs: Data Styling.mht // -using System; -using System.Diagnostics; using System.ComponentModel; -using System.Reflection; - -using System.Windows.Threading; - -using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Data; using System.Windows.Markup; using MS.Internal; -using MS.Internal.Data; using MS.Internal.KnownBoxes; using System.Windows.Documents; using MS.Utility; using MS.Internal.PresentationFramework; -using System.Collections.Specialized; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenu.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenu.cs index 9a4065934d8..7725c3fe574 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenu.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenu.cs @@ -3,22 +3,14 @@ // See the LICENSE file in the project root for more information. -using System; -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; -using System.Windows; #if OLD_AUTOMATION using System.Windows.Automation.Provider; #endif using System.Windows.Input; -using System.Windows.Media; using System.Windows.Controls.Primitives; -using System.Windows.Markup; -using System.Windows.Shapes; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenuService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenuService.cs index 59af4e9ac33..290a8458bd7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenuService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ContextMenuService.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Input; using MS.Internal.KnownBoxes; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs index addb6ada908..7c95677571a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs @@ -3,21 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; - -using System.Windows.Controls.Primitives; using System.Windows.Media; -using System.Windows; using System.Windows.Input; using System.Windows.Documents; - -using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ConversionValidationRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ConversionValidationRule.cs index 0e108782ed2..ef02d415e66 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ConversionValidationRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ConversionValidationRule.cs @@ -8,10 +8,7 @@ // conversion failure, as there is no actual ValidationRule. // -using System; -using System.Windows; using System.Globalization; -using System.Windows.Controls; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CustomDictionarySources.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CustomDictionarySources.cs index 74ffc3db9e0..452cafb76ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CustomDictionarySources.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/CustomDictionarySources.cs @@ -6,13 +6,7 @@ // Description: Collection of Uri objects used to specify location of custom dictionaries. // -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Text; -using System.Windows.Markup; -using System.Windows.Navigation; using System.Windows.Controls.Primitives; using System.Windows.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataErrorValidationRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataErrorValidationRule.cs index 4b754832dc4..17255b7ed59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataErrorValidationRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataErrorValidationRule.cs @@ -8,13 +8,9 @@ // a data error in the source item itself (e.g. as exposed by IDataErrorInfo). // -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Controls; using System.Windows.Data; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGrid.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGrid.cs index 9eec6828583..d97b7fb193b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGrid.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGrid.cs @@ -4,13 +4,10 @@ using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; using System.Text; using System.Windows.Automation; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridAutoGeneratingColumnEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridAutoGeneratingColumnEventArgs.cs index ef361695ee3..9887557b867 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridAutoGeneratingColumnEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridAutoGeneratingColumnEventArgs.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Text; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBeginningEditEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBeginningEditEventArgs.cs index 59c6d573abe..bdbab9386d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBeginningEditEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBeginningEditEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBoundColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBoundColumn.cs index 3e145a59947..49923b4fa27 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBoundColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridBoundColumn.cs @@ -3,13 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Data; -using System.Windows.Input; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCell.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCell.cs index e7ba77acf23..d434e939c17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCell.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCell.cs @@ -3,17 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Threading; using System.Windows.Automation; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellClipboardEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellClipboardEventArgs.cs index a51060ba38f..2c35cb0e1be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellClipboardEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellClipboardEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellEditEndingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellEditEndingEventArgs.cs index 3b25c9c686e..fa264cf99f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellEditEndingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellEditEndingEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellInfo.cs index d99ad9852fe..3916267624a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellInfo.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellsPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellsPanel.cs index a52029077c9..730afef12b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCellsPanel.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.Diagnostics; -using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCheckBoxColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCheckBoxColumn.cs index 6122b5b4660..ede8012af93 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCheckBoxColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridCheckBoxColumn.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Input; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardCellContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardCellContent.cs index da5df5a410c..3fb445c7970 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardCellContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardCellContent.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardHelper.cs index 6aa871c5c4b..ad256bfdbbd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridClipboardHelper.cs @@ -3,12 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; -using System.Windows; using MS.Internal.Text; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumn.cs index fd3197460bb..1f2ce9b181a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumn.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Windows; using System.Windows.Data; using System.Windows.Input; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnCollection.cs index 45a121f350a..7707aa15a7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnCollection.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.Diagnostics; -using System.Windows; using System.Windows.Threading; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnDropSeparator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnDropSeparator.cs index 14d763fafa3..d276e7be4bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnDropSeparator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnDropSeparator.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls.Primitives; -using MS.Internal; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnEventArgs.cs index 091c9bb7fae..ee058fcb1c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnFloatingHeader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnFloatingHeader.cs index 657948c972c..d44e2f808cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnFloatingHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnFloatingHeader.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Media; -using MS.Internal; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnHeaderCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnHeaderCollection.cs index a613b33864a..b5dc92ed9b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnHeaderCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnHeaderCollection.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnReorderingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnReorderingEventArgs.cs index e64ee93f151..2898fc14e7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnReorderingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridColumnReorderingEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridComboBoxColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridComboBoxColumn.cs index 63d16f8cf1e..422c132e48a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridComboBoxColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridComboBoxColumn.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Data; using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditAction.cs index b2e96651703..5153d3884b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditAction.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditingUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditingUnit.cs index e5cc4a94e21..768dc1655d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditingUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridEditingUnit.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridGridLinesVisibility.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridGridLinesVisibility.cs index 41c074ea72e..e9a78f6455e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridGridLinesVisibility.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridGridLinesVisibility.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibility.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibility.cs index 97042efd4bb..4b58a149060 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibility.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibility.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { [Flags] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibilityToVisibilityConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibilityToVisibilityConverter.cs index 34380036750..4b22c6027a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibilityToVisibilityConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHeadersVisibilityToVisibilityConverter.cs @@ -3,9 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Windows; using System.Windows.Data; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHelper.cs index b150f9fc907..a5bd537c1b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHelper.cs @@ -3,18 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Threading; using MS.Internal; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHyperlinkColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHyperlinkColumn.cs index d5dcc44375c..abf9df499ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHyperlinkColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridHyperlinkColumn.cs @@ -3,15 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridItemAttachedStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridItemAttachedStorage.cs index 10b8b51137c..062668c92ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridItemAttachedStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridItemAttachedStorage.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLength.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLength.cs index bc1a8ebbd55..917ac40068d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLength.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLength.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; using System.Globalization; -using System.Windows; -using MS.Internal; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthConverter.cs index 9f045ac378b..f70bcf47e9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthConverter.cs @@ -3,14 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Security; -using System.Windows; using MS.Internal; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthUnitType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthUnitType.cs index 052ebc3f8a2..252e71e99a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthUnitType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridLengthUnitType.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.ComponentModel; -using System.Globalization; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridNotificationTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridNotificationTarget.cs index 36669a45e91..e17a7d213ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridNotificationTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridNotificationTarget.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridPreparingCellForEditEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridPreparingCellForEditEventArgs.cs index 3480cf52a44..e0d5b05ede0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridPreparingCellForEditEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridPreparingCellForEditEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRow.cs index f9ee842f9ed..9849eb680ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRow.cs @@ -3,17 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Data; -using System.Windows.Media; using System.Windows.Threading; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowClipboardEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowClipboardEventArgs.cs index 4f6326eca9e..1fb5d4a4f9c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowClipboardEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowClipboardEventArgs.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Text; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowDetailsEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowDetailsEventArgs.cs index 701df3ac7ff..9c583eac239 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowDetailsEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowDetailsEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - namespace System.Windows.Controls { public class DataGridRowDetailsEventArgs : EventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowEventArgs.cs index c22ba0abb0a..a4677e2cb04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridRowEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - namespace System.Windows.Controls { public class DataGridRowEventArgs : EventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionMode.cs index f8181c7f2dc..3dc79107fa6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionMode.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionUnit.cs index 45bb4a02897..9f1706dd760 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSelectionUnit.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventArgs.cs index 39a92bf2ace..2a3333e5630 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventHandler.cs index be7e569b1fe..0c4a1b7943c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridSortingEventHandler.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTemplateColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTemplateColumn.cs index 80c79490700..1ff42e129d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTemplateColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTemplateColumn.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Data; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs index ae2bae55c24..fe20986c61a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridrowEditEndingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridrowEditEndingEventArgs.cs index b44e8f20600..98af13a990c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridrowEditEndingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridrowEditEndingEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Input; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePicker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePicker.cs index a4158234784..5b3bc2dadf5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePicker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePicker.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Globalization; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePickerDateValidationErrorEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePickerDateValidationErrorEventArgs.cs index 88c4249957c..eb1b3148f37 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePickerDateValidationErrorEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DatePickerDateValidationErrorEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DateTimeHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DateTimeHelper.cs index 693ce6e4fcc..bf58105d3dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DateTimeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DateTimeHelper.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Globalization; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Decorator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Decorator.cs index 82adf649d88..565eff94bb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Decorator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Decorator.cs @@ -7,14 +7,9 @@ // Spec at Decorator.xml // -using MS.Internal; using MS.Internal.Controls; -using MS.Utility; -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media; using System.Windows.Markup; // IAddChild, ContentPropertyAttribute diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredRunTextReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredRunTextReference.cs index ab050efe28e..3da63a483d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredRunTextReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredRunTextReference.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; + // // Description: Proxy object passed to the property system to delay load // TextProperty values. @@ -9,8 +11,6 @@ namespace System.Windows.Controls { - using System.Windows.Documents; - // Proxy object passed to the property system to delay load TextProperty // values. internal class DeferredRunTextReference : DeferredReference diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredTextReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredTextReference.cs index b806cdd18c9..e56a8acab90 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredTextReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DeferredTextReference.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; + // // Description: Proxy object passed to the property system to delay load // TextProperty values. @@ -9,8 +11,6 @@ namespace System.Windows.Controls { - using System.Windows.Documents; - // Proxy object passed to the property system to delay load TextProperty // values. internal class DeferredTextReference : DeferredReference diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DefinitionBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DefinitionBase.cs index 354b7d63c94..2e8010f3622 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DefinitionBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DefinitionBase.cs @@ -15,14 +15,7 @@ // using MS.Internal; -using MS.Internal.KnownBoxes; -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Threading; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DockPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DockPanel.cs index a019c5ed1d7..398732c1897 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DockPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DockPanel.cs @@ -7,17 +7,11 @@ // Spec at DockPanel.xml // -using MS.Internal; using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Media; -using System; - namespace System.Windows.Controls { #region Dock enum type diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DocumentViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DocumentViewer.cs index 155e781f8fc..5d88bd25b9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DocumentViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DocumentViewer.cs @@ -11,26 +11,14 @@ using MS.Internal.Documents; using MS.Internal.Telemetry.PresentationFramework; using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; // For DesignerSerializationVisibility using System.Globalization; -using System.Reflection; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Navigation; // For HyperLink navigation event. using System.Windows.Markup; -using MS.Internal.Automation; // For TextAdaptor. -using System.Security; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionRoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionRoutedEventArgs.cs index 86d3194c479..1b3c6cfdbc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionRoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionRoutedEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { #region ExceptionRoutedEventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionValidationRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionValidationRule.cs index fa4767bb053..36075d314d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionValidationRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ExceptionValidationRule.cs @@ -12,10 +12,7 @@ // See specs at Validation.mht // -using System; -using System.Windows; using System.Globalization; -using System.Windows.Controls; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Expander.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Expander.cs index 2eb7295929a..3feb40d7cdb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Expander.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Expander.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.ComponentModel; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentReader.cs index cb1a7b771ca..f3c5616696d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentReader.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; // Object using System.Collections; // IEnumerator -using System.Collections.Generic; // Stack -using System.Collections.ObjectModel; // ReadOnlyCollection -using System.Security; // SecurityCritical using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Data; // BindingOperations using System.Windows.Controls.Primitives; // PlacementMode @@ -15,7 +11,6 @@ using System.Windows.Input; // KeyEventArgs using System.Windows.Media; // ScaleTransform, VisualTreeHelper using System.Windows.Markup; // IAddChild -using System.Windows.Threading; // Dispatcher using MS.Internal; // Invariant, DoubleUtil using MS.Internal.Commands; // CommandHelpers using MS.Internal.Controls; // EmptyEnumerator diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentScrollViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentScrollViewer.cs index 442a5bf406f..c5d1202c56f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentScrollViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/FlowDocumentScrollViewer.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; // Object using System.Collections; // IEnumerator -using System.Collections.Generic; // Stack using System.Collections.ObjectModel; // ReadOnlyCollection -using System.Security; // SecurityCritical using System.Windows.Annotations; // AnnotationService using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Data; // BindingOperations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Frame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Frame.cs index 72e4aaed05e..6ec3217cb97 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Frame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Frame.cs @@ -8,16 +8,9 @@ // It can use its own journal ("island frame") or its prent's, if available. // -using System; -using System.Net; using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.Windows.Threading; -using System.Security; - -using System.Windows; using System.Windows.Input; using System.Windows.Automation.Peers; using System.Windows.Media; @@ -28,12 +21,7 @@ using MS.Internal.AppModel; using MS.Internal.Utility; using MS.Internal.KnownBoxes; -using MS.Utility; -using MS.Internal.Controls; using MS.Internal.Telemetry.PresentationFramework; -using System.Collections.Generic; - -using SecurityHelper=MS.Internal.PresentationFramework.SecurityHelper; namespace System.Windows.Navigation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs index 7e7a8040c82..a5bea90178f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs @@ -17,18 +17,9 @@ using MS.Internal.Controls; using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridSplitter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridSplitter.cs index 5b14aae9b93..c15d32a7baa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridSplitter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridSplitter.cs @@ -3,18 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Diagnostics; -using System.Windows; using System.Windows.Controls.Primitives; -using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Automation.Peers; - -using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridView.cs index ed6ae42b883..ab1cba19494 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridView.cs @@ -6,7 +6,6 @@ using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Automation.Peers; using System.Windows.Markup; -using System.Diagnostics; // Debug using MS.Internal; // Helper using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumn.cs index 19eeeea6563..bcf3b11d056 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumn.cs @@ -4,7 +4,6 @@ using System.ComponentModel; // DesignerSerializationVisibility -using System.Diagnostics; using System.Windows.Data; // BindingBase using System.Windows.Markup; // [ContentProperty] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollection.cs index 30fbd4bbcc3..e90716450a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollection.cs @@ -3,13 +3,10 @@ // See the LICENSE file in the project root for more information. -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ObservableCollection using System.Collections.Specialized; // NotifyCollectionChangedEventHandler using System.ComponentModel; // DesignerSerializationVisibility -using System.Diagnostics; // Debug using System.Runtime.CompilerServices; -using System.Windows.Data; // Binding.IndexerName using MS.Internal; // Helper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollectionChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollectionChangedEventArgs.cs index f88267221c7..7899b24a117 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollectionChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnCollectionChangedEventArgs.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. -using System.Windows.Controls; -using System.Collections.Generic; // IList using System.Collections.Specialized; // NotifyCollectionChangedEventArgs using System.Collections.ObjectModel; // Collection, ReadOnlyCollection -using System.Diagnostics; // Assert namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnHeader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnHeader.cs index 65ba42bac5c..ebbc6e017bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewColumnHeader.cs @@ -4,9 +4,6 @@ using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; // SafeHandle -using System.Security; // using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Controls.Primitives; // ButtonBase using System.Windows.Input; // MouseButtonEventArgs @@ -14,7 +11,6 @@ using MS.Internal; // DoubleUtil using MS.Internal.KnownBoxes; // BooleanBoxes -using MS.Win32; // SafeNativeMethods namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewHeaderRowPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewHeaderRowPresenter.cs index bbe8b88ee83..559d22fda9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewHeaderRowPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewHeaderRowPresenter.cs @@ -3,15 +3,12 @@ // See the LICENSE file in the project root for more information. -using System.Collections.Generic; // List using System.Collections.Specialized; // NotifyCollectionChangedAction using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Controls.Primitives; // GridViewRowPresenterBase -using System.Windows.Data; // Binding using System.Windows.Input; // MouseEventArgs using System.Windows.Media; // SolidColorBrush -using System.Diagnostics; using MS.Internal; // Helper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewRowPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewRowPresenter.cs index 63e7ec293eb..d776aa0be8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewRowPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GridViewRowPresenter.cs @@ -3,15 +3,11 @@ // See the LICENSE file in the project root for more information. -using System.Collections.Generic; // List using System.Collections.Specialized; // NotifyCollectionChangedAction -using System.ComponentModel; // PropertyChangedEventArgs -using System.Diagnostics; using System.Windows.Controls.Primitives; // GridViewRowPresenterBase using System.Windows.Data; // BindingBase using MS.Internal; // DoubleUtil -using MS.Utility; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GroupItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GroupItem.cs index 502b5511fb3..8885c4bde56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GroupItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/GroupItem.cs @@ -8,16 +8,8 @@ // Specs: Data Styling.mht // -using System; -using System.Collections; -using System.Collections.Specialized; using System.Windows.Media; using System.Windows.Controls.Primitives; -using System.Windows.Threading; -using System.Collections.Generic; -using MS.Internal.Utility; -using MS.Internal.Hashing.PresentationFramework; -using System.Diagnostics; using MS.Internal; using System.Windows.Automation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedContentControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedContentControl.cs index e5b732eeef8..b2894705bfa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedContentControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedContentControl.cs @@ -3,18 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.ComponentModel; -using System.Windows; using System.Windows.Data; using System.Windows.Threading; using System.Windows.Media; - -using MS.Utility; using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Data; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedItemsControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedItemsControl.cs index 8b92742ea58..1833b19ab20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedItemsControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/HeaderedItemsControl.cs @@ -2,19 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.ComponentModel; using System.Windows.Threading; using System.Windows.Data; -using System.Windows.Media; - -using MS.Utility; using MS.Internal; using MS.Internal.Controls; using MS.Internal.KnownBoxes; -using MS.Internal.Data; using MS.Internal.PresentationFramework; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/IProvideDataGridColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/IProvideDataGridColumn.cs index 403c7a3ba2f..e5dd3e1bbe9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/IProvideDataGridColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/IProvideDataGridColumn.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Image.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Image.cs index 45adf39ada7..8e096fe9980 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Image.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Image.cs @@ -7,24 +7,16 @@ // Layout Spec at Image.xml // -using MS.Internal; using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; -using System.Diagnostics; -using System.ComponentModel; #if OLD_AUTOMATION using System.Windows.Automation.Provider; #endif -using System.Windows.Threading; using System.Windows.Media; using System.Windows.Media.Imaging; -using System.Windows.Documents; using System.Windows.Markup; using System.Windows.Navigation; -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventArgs.cs index 517ccdbbe79..3f44893a91d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventHandler.cs index 4ae43cf1f28..429ed586f7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InitializingNewItemEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvas.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvas.cs index 9328046bddc..96af9a7be73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvas.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvas.cs @@ -9,23 +9,13 @@ // editing ink // -using MS.Utility; -using MS.Internal; using MS.Internal.Commands; using MS.Internal.Controls; using MS.Internal.Ink; using MS.Internal.KnownBoxes; -using System; using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Specialized; using System.ComponentModel; -using System.ComponentModel.Design; -using System.Diagnostics; -using System.IO; -using System.Windows; -using System.Collections.Generic; -using System.Security; using System.Runtime.InteropServices; using System.Windows.Media; using System.Windows.Data; @@ -33,13 +23,11 @@ using System.Windows.Ink; using System.Windows.Input; using System.Windows.Input.StylusPlugIns; -using System.Windows.Controls; using System.Windows.Markup; // IAddChild, ContentPropertyAttribute using System.Windows.Threading; using System.Windows.Automation.Peers; using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; -using SecurityHelper = MS.Internal.SecurityHelper; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvasSelectionHitResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvasSelectionHitResult.cs index 1c9679fec2f..7f6acd9a897 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvasSelectionHitResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkCanvasSelectionHitResult.cs @@ -7,8 +7,6 @@ // Defines an enum type of the InkCanvas selection handle // -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkPresenter.cs index e53fe6a71cf..61a61dee8af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/InkPresenter.cs @@ -7,16 +7,9 @@ // A rendering element which binds to the strokes data // -using System; -using System.Diagnostics; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Windows; using System.Windows.Media; -using System.Windows.Controls; using System.Windows.Ink; using System.Windows.Threading; -using System.Windows.Input; using MS.Internal.Ink; using System.Windows.Automation.Peers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemCollection.cs index eb3b8e3e328..6e35c9d9b4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemCollection.cs @@ -10,20 +10,11 @@ // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; - -using System.Windows; using System.Windows.Data; // for CollectionContainer -using System.Windows.Markup; - -using MS.Utility; -using MS.Internal; using MS.Internal.Controls; using MS.Internal.Data; // for IndexedEnumerable using MS.Internal.KnownBoxes; // for BooleanBoxes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerGenerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerGenerator.cs index fef9bba1d7d..2d694e0e512 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerGenerator.cs @@ -8,9 +8,7 @@ // Specs: Data Styling.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; @@ -19,13 +17,9 @@ using System.Windows.Media; using System.Windows.Controls.Primitives; // IItemContainerGenerator using System.Windows.Data; -using System.Windows.Markup; -using System.Diagnostics; using System.Text; using MS.Internal; using MS.Internal.Controls; -using MS.Internal.KnownBoxes; -using MS.Internal.Utility; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerTemplateSelector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerTemplateSelector.cs index c505101bcfb..dcf720194a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerTemplateSelector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerTemplateSelector.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Diagnostics; -using System.Windows.Media; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsControl.cs index b88050e38a0..09343d1aa16 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsControl.cs @@ -3,30 +3,21 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Controls.Primitives; using System.Windows.Data; -using System.Windows; using System.Windows.Media; using System.Windows.Markup; using System.Windows.Input; using System.Windows.Automation.Peers; - -using MS.Utility; using MS.Internal; using MS.Internal.Controls; using MS.Internal.Data; -using MS.Internal.Hashing.PresentationFramework; // HashHelper using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; -using MS.Internal.Utility; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPanelTemplate.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPanelTemplate.cs index 201de7b6b44..b5063f89e59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPanelTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPanelTemplate.cs @@ -7,11 +7,6 @@ // that manages layout of containers for an ItemsControl. // -using System.ComponentModel; -using System.Windows.Controls; -using System.Windows.Markup; -using System.Diagnostics; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPresenter.cs index 243865e6028..cd80738cb75 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemsPresenter.cs @@ -8,12 +8,8 @@ // Specs: Data Styling.mht // -using System; -using System.Collections; -using System.Diagnostics; using System.Windows.Media; using MS.Internal; -using MS.Internal.Data; // WeakRefKey namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Label.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Label.cs index c2794b1f237..0a8c3419328 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Label.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Label.cs @@ -8,14 +8,9 @@ * Implements label control. * \***************************************************************************/ -using System; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Input; using System.Windows.Markup; using System.ComponentModel; -using System.Xaml; using MS.Internal.Telemetry.PresentationFramework; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBox.cs index 88d409cc0b0..761c7b4089a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBox.cs @@ -4,19 +4,13 @@ using MS.Internal; -using MS.Utility; using System.Collections; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; using System.Windows.Media; using System.Windows.Controls.Primitives; using System.Windows.Input; -using System.Windows.Shapes; -using System.Windows.Data; using System.Windows.Automation.Peers; - -using System; using MS.Internal.Commands; // CommandHelpers using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBoxItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBoxItem.cs index 3a8189764ba..1aee788f0d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBoxItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListBoxItem.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; using System.ComponentModel; - -using System.Diagnostics; using System.Windows.Threading; using System.Windows.Automation; @@ -16,9 +12,6 @@ using System.Windows.Media; using System.Windows.Input; using System.Windows.Controls.Primitives; -using System.Windows.Shapes; - -using System; // Disable CS3001: Warning as Error: not CLS-compliant #pragma warning disable 3001 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListViewItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListViewItem.cs index 9650fab4b14..592a373105f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListViewItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ListViewItem.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Automation.Provider; - - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaElement.cs index ddb13a6c64d..c905c2d8371 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaElement.cs @@ -6,16 +6,9 @@ // Description: Contains the MediaElement class. // -using MS.Internal; -using MS.Utility; -using System; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Automation.Peers; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; using System.Windows.Markup; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaScriptCommandRoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaScriptCommandRoutedEventArgs.cs index 347932ea042..51fc5efdce3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaScriptCommandRoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MediaScriptCommandRoutedEventArgs.cs @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { #region MediaScriptCommandRoutedEventArgs - + /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Menu.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Menu.cs index e81b88aed0e..baa6ba3c5c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Menu.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Menu.cs @@ -3,23 +3,13 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; -using System.ComponentModel; - -using System.Diagnostics; -using System.Windows.Threading; #if OLD_AUTOMATION using System.Windows.Automation.Provider; #endif -using System.Windows.Media; using System.Windows.Input; using System.Windows.Controls.Primitives; - -using System; -using System.Security; using MS.Internal.Telemetry.PresentationFramework; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs index 7c08c1c6009..97cf59acf26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs @@ -3,21 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; -using System.Diagnostics; using System.Windows.Threading; using System.Globalization; using System.ComponentModel; using System.Collections; using System.Collections.Specialized; -using System.Security; - - -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Data; @@ -25,8 +17,6 @@ using System.Windows.Input; using System.Windows.Controls.Primitives; -using System.Windows.Shapes; -using System.Windows.Markup; // Disable CS3001: Warning as Error: not CLS-compliant #pragma warning disable 3001 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuScrollingVisibilityConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuScrollingVisibilityConverter.cs index 4af96de74b8..ddf92e69afa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuScrollingVisibilityConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuScrollingVisibilityConverter.cs @@ -6,14 +6,8 @@ // Description: Used to show or hide arrow buttons in scrolling menus. // -using System; using System.Globalization; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Data; -using System.Windows.Media; using MS.Internal; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MultipleCopiesCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MultipleCopiesCollection.cs index b9134ae1261..c2657c28502 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MultipleCopiesCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MultipleCopiesCollection.cs @@ -3,12 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Data; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/NotifyDataErrorValidationRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/NotifyDataErrorValidationRule.cs index 66acb7d5742..0699593fdb3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/NotifyDataErrorValidationRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/NotifyDataErrorValidationRule.cs @@ -8,15 +8,7 @@ // a data error in the source item itself as exposed by INotifyDataErrorInfo. // -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using MS.Internal; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Orientation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Orientation.cs index 56cf3305e54..ed5e00cc4bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Orientation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Orientation.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Page.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Page.cs index daa297556b4..b246efbb1f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Page.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Page.cs @@ -6,31 +6,24 @@ // Description: Implements the Avalon Page class // -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; - -using System.Windows.Controls.Primitives; using System.Windows.Navigation; using System.Windows.Media; using System.Windows.Markup; using System.Windows.Documents; - -using MS.Internal.AppModel; using MS.Internal.KnownBoxes; using MS.Internal; -using MS.Utility; //In order to avoid generating warnings about unknown message numbers and //unknown pragmas when compiling your C# source code with the actual C# compiler, //you need to disable warnings 1634 and 1691. (Presharp Documentation) #pragma warning disable 1634, 1691 -namespace System.Windows.Controls -{ +namespace System.Windows.Controls +{ #region Page Class - + /// /// Public class Page /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PageRanges.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PageRanges.cs index c1ddb2f51bd..f245d74cfe1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PageRanges.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PageRanges.cs @@ -8,9 +8,7 @@ This file contains the implementation of the PageRange class dialog. */ -using System; using System.Globalization; -using System.Windows; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Panel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Panel.cs index 0141df93420..3bb8d16a5c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Panel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Panel.cs @@ -3,22 +3,15 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Controls.Primitives; // IItemContainerGenerator -using System.Windows.Documents; using System.Windows.Media; using System.Windows.Markup; // IAddChild, ContentPropertyAttribute -using System.Windows.Threading; -using MS.Internal; using MS.Internal.Controls; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; -using MS.Utility; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PanningMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PanningMode.cs index ce60c735395..6de7972a2f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PanningMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PanningMode.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordBox.cs index 648e58521a1..11b42ce5790 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordBox.cs @@ -6,21 +6,13 @@ // Description: The stock password control. // -using System.Diagnostics; -using System.Collections; using System.ComponentModel; -using System.Globalization; using System.Security; -using System.Text; using System.Windows.Media; -using System.Windows.Data; using System.Windows.Documents; -using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Input; using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Threading; using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextContainer.cs index df8473e36b5..06b7347e69a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextContainer.cs @@ -6,11 +6,8 @@ // Description: Backing store for the PasswordBox control. // -using System; -using System.Windows.Threading; using System.Collections; using System.Security; -using System.Diagnostics; using System.Windows.Documents; using MS.Internal; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextNavigator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextNavigator.cs index 31e3d411bc4..200343d5867 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextNavigator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PasswordTextNavigator.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; + // // Description: An override class representing a movable // position within a PasswordTextContainer. @@ -9,12 +11,6 @@ namespace System.Windows.Controls { - using System; - using System.Windows.Threading; - using System.Diagnostics; - using System.Windows.Documents; - using MS.Internal; - // TextNavigator implementation for the PasswordTextContainer. internal sealed class PasswordTextPointer : ITextPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PopupControlService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PopupControlService.cs index 2484530d7f5..71705186aca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PopupControlService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PopupControlService.cs @@ -5,23 +5,13 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Internal.Media; using MS.Win32; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Threading; -using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Windows.Markup; using System.Windows.Threading; -using System.Security; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/AutoToolTipPlacement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/AutoToolTipPlacement.cs index cb2c0bab15f..8c31bf85324 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/AutoToolTipPlacement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/AutoToolTipPlacement.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { - /// - /// Placement options for Slider's AutoToolTip - /// - public enum AutoToolTipPlacement + /// + /// Placement options for Slider's AutoToolTip + /// + public enum AutoToolTipPlacement { /// /// No AutoToolTip diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/BulletDecorator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/BulletDecorator.cs index f46e52b2a10..0ae4e079d11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/BulletDecorator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/BulletDecorator.cs @@ -5,15 +5,9 @@ using MS.Internal; -using MS.Utility; using MS.Internal.Documents; -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ButtonBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ButtonBase.cs index e4a7bb8beb5..ffedc821654 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ButtonBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ButtonBase.cs @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Windows.Threading; -using System.Windows.Automation; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows; using System.Windows.Input; using System.Windows.Media; -using MS.Utility; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; -using System.Diagnostics; -using System.Security; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarButton.cs index 9a26cefad48..e9ebdc4a264 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarButton.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Controls; -using System.Windows.Data; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarDayButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarDayButton.cs index 3a3327b39d5..79182f29510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarDayButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarDayButton.cs @@ -4,10 +4,7 @@ -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Controls; -using System.Windows.Data; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarItem.cs index 0c7b06169c2..3db9c371da1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CalendarItem.cs @@ -3,12 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Controls; using System.Windows.Data; using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacement.cs index 0c48bcaf20e..ad1f34ff6f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacement.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacementCallback.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacementCallback.cs index 6b52802abfe..bc5811ef4d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacementCallback.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/CustomPopupPlacementCallback.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridCellsPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridCellsPresenter.cs index 13d5ffe4f08..22d9b6291a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridCellsPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridCellsPresenter.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeader.cs index 631141853ff..305342d0704 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeader.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Automation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeadersPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeadersPresenter.cs index 71f6970c3c0..b38d3c6087b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeadersPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridColumnHeadersPresenter.cs @@ -4,11 +4,6 @@ -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridDetailsPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridDetailsPresenter.cs index d3a17df613d..2359d66a8e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridDetailsPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridDetailsPresenter.cs @@ -4,10 +4,6 @@ -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Automation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowHeader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowHeader.cs index a633631a4a2..8cc09ac9c6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowHeader.cs @@ -3,14 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; -using MS.Internal; using System.Windows.Automation; namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowsPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowsPresenter.cs index 6bf074968d9..af49e918691 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowsPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DataGridRowsPresenter.cs @@ -2,16 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Threading; -using MS.Internal; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DatePickerTextBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DatePickerTextBox.cs index e2394c394b3..4384de82715 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DatePickerTextBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DatePickerTextBox.cs @@ -4,13 +4,8 @@ -using System.Diagnostics; using System.Globalization; -using System.Windows; -using System.Windows.Controls; using System.Windows.Data; -using System.Windows.Input; -using System.Windows.Media; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentPageView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentPageView.cs index 8aa194e5a1d..d1a52a0d127 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentPageView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentPageView.cs @@ -6,17 +6,13 @@ // Description: Provides a view port for a page of content for a DocumentPage. // -using System.Windows.Automation; // AutomationPattern using System.Windows.Automation.Peers; // AutomationPeer -using System.Windows.Controls; // StretchDirection -using System.Windows.Controls.Primitives; // DocumentViewerBase using System.Windows.Documents; // DocumentPaginator using System.Windows.Media; // Visual using System.Windows.Media.Imaging; // RenderTargetBitmap using System.Windows.Threading; // Dispatcher using MS.Internal; // Invariant using MS.Internal.Documents; // DocumentPageHost, DocumentPageTextView -using MS.Internal.Automation; // TextAdaptor using MS.Internal.KnownBoxes; // BooleanBoxes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentViewerBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentViewerBase.cs index 265fd6c194a..92b1d0a1f8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentViewerBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DocumentViewerBase.cs @@ -11,25 +11,20 @@ // and Annotation support. // #pragma warning disable 1634, 1691 // avoid generating warnings about unknown - // message numbers and unknown pragmas for PRESharp contol +// message numbers and unknown pragmas for PRESharp contol using System.Collections; // IEnumerator -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows.Annotations; // AnnotationService -using System.Windows.Automation; // AutomationPattern using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Documents; // IDocumentPaginatorSource, ... using System.Windows.Documents.Serialization; // WritingCompletedEventArgs using System.Windows.Input; // UICommand using System.Windows.Media; // Visual using System.Windows.Markup; // IAddChild, XamlSerializerUtil, ContentPropertyAttribute -using System.Windows.Threading; // DispatcherPriority using MS.Internal; // Invariant, DoubleUtil using MS.Internal.KnownBoxes; // BooleanBoxes -using MS.Internal.Annotations; // TextAnchor using MS.Internal.Annotations.Anchoring;// DataIdProcessor, FixedPageProcessor, ... -using MS.Internal.Automation; // TextAdaptor using MS.Internal.Documents; // MultiPageTextView using MS.Internal.Controls; // EmptyEnumerator using MS.Internal.Commands; // CommandHelpers diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragCompletedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragCompletedEventArgs.cs index be616e5f6e1..a1f67c4d764 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragCompletedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragCompletedEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Controls; -using System.Windows; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragDeltaEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragDeltaEventArgs.cs index a6352491ed0..9ee2a749a49 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragDeltaEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragDeltaEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragStartedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragStartedEventArgs.cs index f0ed4487f44..0ad5f2b5fc3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragStartedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/DragStartedEventArgs.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/GridViewRowPresenterBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/GridViewRowPresenterBase.cs index ccd74acf4ab..788dcd62ddc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/GridViewRowPresenterBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/GridViewRowPresenterBase.cs @@ -5,11 +5,7 @@ using System.Collections; // IEnumerator -using System.Collections.Generic; // List using System.Collections.Specialized; // NotifyCollectionChangedEventHandler -using System.Collections.ObjectModel; // Collection -using System.ComponentModel; // PropertyChangedEventArgs -using System.Diagnostics; // Debug using System.Windows.Media; // VisualOperations using MS.Internal.Controls; // EmptyEnumerator diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IContainItemStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IContainItemStorage.cs index d249499a89a..3d6f2575b91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IContainItemStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IContainItemStorage.cs @@ -6,8 +6,6 @@ // Description: IContainItemStorage interface // -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IHierarchicalVirtualizationAndScrollInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IHierarchicalVirtualizationAndScrollInfo.cs index 30ac20d347f..3a1d3aa315e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IHierarchicalVirtualizationAndScrollInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IHierarchicalVirtualizationAndScrollInfo.cs @@ -6,9 +6,6 @@ // Description: IHierarchicalVirtualizationAndScrollInfo interface // - -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IItemContainerGenerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IItemContainerGenerator.cs index f19cb3d6d40..4380e80ccb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IItemContainerGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IItemContainerGenerator.cs @@ -8,9 +8,7 @@ // Specs: Data Styling.mht // -using System; using System.Windows.Markup; -using MS.Internal.Data; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IRecyclingItemContainerGenerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IRecyclingItemContainerGenerator.cs index 5ff9309d5ac..a992039e1b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IRecyclingItemContainerGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IRecyclingItemContainerGenerator.cs @@ -8,8 +8,6 @@ // Spec: Item Container Recycling Spec.docx // -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IScrollInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IScrollInfo.cs index 31741e4e6b4..39ece8b1877 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IScrollInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/IScrollInfo.cs @@ -7,12 +7,7 @@ // Spec: Virtualization in Layout.doc // -using MS.Internal; -using MS.Utility; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Media; -using System; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ItemsChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ItemsChangedEventArgs.cs index 17573f038ec..474e6cf3087 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ItemsChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ItemsChangedEventArgs.cs @@ -8,9 +8,7 @@ // Specs: Data Styling.mht // -using System; using System.Collections.Specialized; -using System.ComponentModel; namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/LayoutInformation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/LayoutInformation.cs index ab78c1af821..a94a04977c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/LayoutInformation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/LayoutInformation.cs @@ -4,7 +4,6 @@ // Spec: LayoutInformation class.doc -using System; using System.Windows.Media; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MenuBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MenuBase.cs index 13433e45197..9f85482c19c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MenuBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MenuBase.cs @@ -3,22 +3,13 @@ // See the LICENSE file in the project root for more information. -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; -using System.ComponentModel; -using System.Collections; using System.Collections.Specialized; -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Diagnostics; using System.Windows.Threading; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Input; -using System.Security; -using System; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MultiSelector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MultiSelector.cs index 2e61413d6e2..d677666f3b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MultiSelector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/MultiSelector.cs @@ -4,10 +4,8 @@ -using System; using System.ComponentModel; using System.Collections; -using System.Collections.ObjectModel; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PlacementMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PlacementMode.cs index fe1bb5668a2..4271dd6d9b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PlacementMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PlacementMode.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Popup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Popup.cs index 390a6eb4429..82f6cfbd3d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Popup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Popup.cs @@ -4,15 +4,10 @@ -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Automation.Provider; using System.Windows.Data; @@ -25,13 +20,11 @@ using Accessibility; using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Data; using MS.Internal.KnownBoxes; using MS.Internal.Interop; -using MS.Utility; using MS.Win32; -using CommonDependencyProperty=MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; +using CommonDependencyProperty = MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 @@ -3400,7 +3393,7 @@ private static bool ConnectedToForegroundWindow(IntPtr window) private static IntPtr GetHandle(HwndSource hwnd) { // add hook to the popup's window - return (hwnd!=null ? hwnd.CriticalHandle : IntPtr.Zero); + return (hwnd!=null ? hwnd.Handle : IntPtr.Zero); } private static IntPtr GetParentHandle(HwndSource hwnd) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupAnimation.cs index ecb4f0a2861..6574f528fe8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupAnimation.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupPrimaryAxis.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupPrimaryAxis.cs index bf0a87feabc..815efd4c88a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupPrimaryAxis.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupPrimaryAxis.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupRoot.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupRoot.cs index 96bf88e3127..10bcc4b1a26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupRoot.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/PopupRoot.cs @@ -2,20 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Windows.Threading; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Markup; -using System.Runtime.InteropServices; -using MS.Utility; -using MS.Win32; -using MS.Internal; -using MS.Internal.Data; using MS.Internal.KnownBoxes; namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RangeBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RangeBase.cs index 1d95090145e..54078514bb5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RangeBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RangeBase.cs @@ -3,22 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Globalization; using System.Windows.Threading; using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; - -using MS.Internal; -using MS.Utility; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RepeatButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RepeatButton.cs index d7f2b2507c0..53e3d30adcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RepeatButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/RepeatButton.cs @@ -4,20 +4,11 @@ -using System; -using System.Collections; using System.ComponentModel; using System.Windows.Threading; - -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Controls.Primitives; using System.Windows.Input; -using System.Windows.Media; - -using MS.Win32; -using MS.Utility; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ResizeGrip.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ResizeGrip.cs index e790cd6d8a3..6e63a884f32 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ResizeGrip.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ResizeGrip.cs @@ -6,13 +6,6 @@ // Description: Implements the ResizeGrip control // -using System; -using System.Diagnostics; - -using System.Windows; -using System.Windows.Threading; -using System.Windows.Media; -using System.Windows.Shapes; #if OLD_AUTOMATION using System.Windows.Automation.Provider; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollBar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollBar.cs index 55b2e609890..c4402b425c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollBar.cs @@ -3,32 +3,16 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Data; - -using System.Windows.Media; using System.Windows.Input; -using System.Windows.Markup; using MS.Internal; using MS.Internal.Commands; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; -using MS.Internal.Utility; -using MS.Win32; -using System.Security; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollContentPresenter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollContentPresenter.cs index cd130439ec4..7f915f356b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollContentPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollContentPresenter.cs @@ -8,20 +8,10 @@ using MS.Internal; using MS.Utility; -using System; -using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Automation.Provider; using System.Windows.Controls.Primitives; -using System.Windows.Data; using System.Windows.Documents; -using System.Windows.Input; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollEventArgs.cs index b359e00a265..df2dc9f563c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ScrollEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows.Controls; -using System.Windows; - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/SelectiveScrollingGrid.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/SelectiveScrollingGrid.cs index 053df94be59..dd9c56b17d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/SelectiveScrollingGrid.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/SelectiveScrollingGrid.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Controls; using System.Windows.Data; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Selector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Selector.cs index 16e2bddce36..28b1e971527 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Selector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Selector.cs @@ -5,23 +5,14 @@ using System.ComponentModel; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.Windows.Threading; using System.Windows.Data; -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; using System.Windows.Input; -using MS.Utility; using MS.Internal; using MS.Internal.Data; using MS.Internal.KnownBoxes; -using MS.Internal.Hashing.PresentationFramework; // HashHelper - -using System; -using System.Diagnostics; using MS.Internal.Controls; using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBar.cs index a60d56684b5..52d92abc756 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBar.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Windows.Automation.Peers; -using System.Windows.Media; -using System.Windows.Threading; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBarItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBarItem.cs index 38d8838a2de..27fc2adc041 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBarItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/StatusBarItem.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TabPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TabPanel.cs index 0e774aa12ad..9c22125cd9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TabPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TabPanel.cs @@ -3,14 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using MS.Internal; -using MS.Utility; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; using System.Windows.Media; using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TextBoxBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TextBoxBase.cs index 7d6b1ab3dd4..088f1ef8599 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TextBoxBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TextBoxBase.cs @@ -2,30 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Collections.ObjectModel; +using System.Windows.Documents; // TextEditor +using System.Windows.Input; // MouseButtonEventArgs + +using MS.Internal.Documents; // Undo + +using System.Windows.Media; // VisualTreeHelper + // // Description: The base class for TextBox and RichTextBox. // namespace System.Windows.Controls.Primitives { - using MS.Internal; - using System.Threading; - using System.Collections.ObjectModel; - using System.ComponentModel; // DefaultValue - - using System.Security; - - using System.Windows.Automation; // TextPattern - using System.Windows.Automation.Provider; // AutomationProvider - using System.Windows.Data; // Binding - using System.Windows.Documents; // TextEditor - using System.Windows.Input; // MouseButtonEventArgs - using System.Windows.Markup; // XamlDesignerSerializer - - using MS.Internal.Documents; // Undo - - using System.Windows.Media; // VisualTreeHelper - //------------------------------------------------------ // // Public Enumerations diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Thumb.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Thumb.cs index 31c99e63915..8746be91e54 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Thumb.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Thumb.cs @@ -2,23 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Runtime.InteropServices; - -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Input; -using System.Windows.Media; - -using MS.Utility; -using MS.Win32; -using MS.Internal; using MS.Internal.PresentationFramework; // SafeSecurityHelper namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickBar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickBar.cs index aafca780871..48b1c4d80c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickBar.cs @@ -3,28 +3,14 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Collections; using MS.Internal; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Data; - -using System.Windows.Input; using System.Windows.Media; -using System.Windows.Shapes; using MS.Internal.KnownBoxes; -using MS.Win32; - // For typeconverter -using System.ComponentModel.Design.Serialization; -using System.Reflection; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickPlacement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickPlacement.cs index af9d4aaee5b..913d8792f4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickPlacement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/TickPlacement.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Controls.Primitives { - /// - /// Placement options for Slider's Tickbar - /// - public enum TickPlacement + /// + /// Placement options for Slider's Tickbar + /// + public enum TickPlacement { /// /// No TickMark diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToggleButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToggleButton.cs index e1f2bdba1b5..f9b4d800931 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToggleButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToggleButton.cs @@ -3,19 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; -using System.Windows.Controls.Primitives; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Shapes; using MS.Internal.KnownBoxes; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarOverflowPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarOverflowPanel.cs index 61297f0b31c..684bdb6944d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarOverflowPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarOverflowPanel.cs @@ -3,16 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; -using System.Windows.Documents; -using System; -using System.Diagnostics; - using MS.Internal; namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarPanel.cs index 1f4e593352d..798216911d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/ToolBarPanel.cs @@ -6,18 +6,9 @@ using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; - -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Media; -using System.Windows.Threading; namespace System.Windows.Controls.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Track.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Track.cs index 8db694510d9..4a6d3a01e2b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Track.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/Track.cs @@ -9,20 +9,9 @@ using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; -using MS.Utility; -using System.Collections; -using System.ComponentModel; -using System.Threading; -using System.Windows.Automation; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows; using System.Windows.Data; using System.Windows.Media; -using System.Windows.Markup; using System.Windows.Input; -using System; -using System.Diagnostics; namespace System.Windows.Controls.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/UniformGrid.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/UniformGrid.cs index dd1253aebfb..d793037bbf7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/UniformGrid.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Primitives/UniformGrid.cs @@ -15,14 +15,6 @@ // straightforward to construct this straightforward panel. // - -using System; -using System.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - - namespace System.Windows.Controls.Primitives { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialog.cs index 7ee333e38ef..c6dcd83b70e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialog.cs @@ -9,23 +9,13 @@ This file contains the implementation of the PrintDialog class and its supporting enums. */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; using System.Printing; -using System.Security; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Interop; using System.Windows.Media; -using System.Windows.Shapes; using System.Windows.Xps; using MS.Internal.Printing; using System.Windows.Xps.Serialization; using System.Windows.Documents; using System.Windows.Documents.Serialization; // WritingCompletedEventArgs -using MS.Internal.PresentationFramework; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialogException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialogException.cs index 3f2e385121b..92b93a74861 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialogException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PrintDialogException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.Serialization; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ProgressBar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ProgressBar.cs index 81ac243c7dc..994cfa55330 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ProgressBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ProgressBar.cs @@ -7,14 +7,7 @@ // Implementation of ProgressBar control. // -using System; -using System.Collections.Specialized; -using System.Threading; - using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; - -using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs index c065a503a73..5f52fcaa2d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs @@ -2,19 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.ComponentModel; -using System.Threading; -using System.Windows.Threading; - -using System.Windows.Automation; using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows; using System.Windows.Input; using System.Windows.Media; -using MS.Utility; using MS.Internal.Telemetry.PresentationFramework; // Disable CS3001: Warning as Error: not CLS-compliant diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RealizedColumnsBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RealizedColumnsBlock.cs index 0854c2e641f..39a4aa7dba0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RealizedColumnsBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RealizedColumnsBlock.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RichTextBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RichTextBox.cs index 10546dd193c..a574e738b1c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RichTextBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RichTextBox.cs @@ -2,28 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using System.Windows.Input; // KeyboardNavigation +using System.ComponentModel; // DefaultValue +using System.Windows.Controls.Primitives; // TextBoxBase +using System.Windows.Documents; // TextEditor +using System.Windows.Automation.Peers; // AutomationPattern +using System.Windows.Markup; // IAddChild +using System.Collections; // IEnumerator +using MS.Internal.Controls; // EmptyEnumerator +using MS.Internal.Telemetry.PresentationFramework; + // // Description: The stock rich text editing control. // namespace System.Windows.Controls { - using MS.Internal; - using MS.Internal.Documents; - using System.Windows.Threading; - using System.Windows.Input; // KeyboardNavigation - using System.ComponentModel; // DefaultValue - using System.Windows.Controls.Primitives; // TextBoxBase - using System.Windows.Documents; // TextEditor - using System.Windows.Automation.Peers; // AutomationPattern - using System.Windows.Media; // GlyphRun - using System.Windows.Markup; // IAddChild - using System.Collections; // IEnumerator - using System.Collections.ObjectModel; // ReadOnlyCollection - using MS.Internal.Automation; // For TextAdaptor - using MS.Internal.Controls; // EmptyEnumerator - using MS.Internal.Telemetry.PresentationFramework; - /// /// RichTextBox control /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RowDefinition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RowDefinition.cs index b50920ea489..0dad7db5b65 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RowDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RowDefinition.cs @@ -2,20 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Markup; -using MS.Internal; -using System.Reflection; using System.ComponentModel; -using BuildInfo=MS.Internal.PresentationFramework.BuildInfo; +using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; //--------------------------------------------------------------------------- // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollChangedEventArgs.cs index a0f63a4ab13..8fc3622d277 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollChangedEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollUnit.cs index f73549a6614..75620abad03 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollUnit.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollViewer.cs index e9e1160d139..46ae5bbb35f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ScrollViewer.cs @@ -10,23 +10,15 @@ using MS.Internal.PresentationFramework; using MS.Internal.Telemetry.PresentationFramework; using MS.Utility; -using System; -using System.Collections; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Markup; using System.Windows.Shapes; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventArgs.cs index 22e0fd5f496..037018464a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventArgs.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventHandler.cs index f0b6dad76a8..1c57491eae8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsChangedEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsCollection.cs index f66a687db06..a942b5004be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedCellsCollection.cs @@ -3,12 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedDatesCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedDatesCollection.cs index c26109c88f1..8501dd9f93c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedDatesCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedDatesCollection.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Threading; -using System.Windows; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedItemCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedItemCollection.cs index 38cec5ec82a..d956955a2b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedItemCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectedItemCollection.cs @@ -7,8 +7,6 @@ // Description: SelectedItemCollection holds the list of selected items of a Selector. // -using System; -using System.Collections; using System.Collections.ObjectModel; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectionChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectionChangedEventArgs.cs index 3f5dc2f4129..b3fd32639fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectionChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectionChangedEventArgs.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; - -using System.Windows; using System.Windows.Controls.Primitives; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectiveScrollingOrientation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectiveScrollingOrientation.cs index 7aca5c30d1f..397ea7df420 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectiveScrollingOrientation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SelectiveScrollingOrientation.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SinglePageViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SinglePageViewer.cs index b2421ed01a0..6b801d3b099 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SinglePageViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SinglePageViewer.cs @@ -9,7 +9,6 @@ // can be viewed using this control. // -using System.Collections.Generic; // Stack using System.Collections.ObjectModel; // ReadOnlyCollection using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Documents; // IDocumentPaginatorSouce, ... @@ -22,9 +21,7 @@ using MS.Internal.Commands; // CommandHelpers using MS.Internal.Documents; // FindToolBar using MS.Internal.KnownBoxes; // BooleanBoxes -using MS.Internal.PresentationFramework; // SecurityHelper using MS.Internal.AppModel; // IJournalState -using System.Security; // SecurityCritical, SecurityTreatAsSafe namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Slider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Slider.cs index 3651af6831f..1aa5dccf1f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Slider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Slider.cs @@ -3,30 +3,19 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Collections; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; -using System.Windows.Data; using System.Windows.Input; using System.Windows.Media; - -using MS.Win32; using MS.Internal; using MS.Internal.Commands; using MS.Internal.Telemetry.PresentationFramework; // For typeconverter -using System.ComponentModel.Design.Serialization; -using System.Reflection; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SoundPlayerAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SoundPlayerAction.cs index a2ec435374a..fd14f68f661 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SoundPlayerAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SoundPlayerAction.cs @@ -11,24 +11,11 @@ * \***************************************************************************/ using MS.Internal; -using MS.Internal.PresentationFramework; -using MS.Utility; -using System; -using System.Collections; using System.ComponentModel; // DefaultValueAttribute using System.IO; -using System.IO.Packaging; using System.Media; -using System.Net; -using System.Windows; -using System.Windows.Documents; -using System.Windows.Markup; -using System.Windows.Media; using System.Windows.Navigation; using System.Windows.Threading; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; using System.Threading.Tasks; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SpellCheck.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SpellCheck.cs index 7c064d26e9d..68b1cce8afd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SpellCheck.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/SpellCheck.cs @@ -2,20 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Threading; +using System.Windows.Documents; +using System.Windows.Controls.Primitives; +using System.Collections; + // // Description: Speller properties for TextBoxBase. // namespace System.Windows.Controls { - using System.Threading; - using System.Windows.Documents; - using System.Windows.Controls.Primitives; - using System.ComponentModel; - using System.Collections.Generic; - using System.Collections; - using System.Windows.Markup; - /// /// Speller properties for TextBoxBase. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Stack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Stack.cs index 9bb52861b6d..6055505c7bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Stack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Stack.cs @@ -12,15 +12,9 @@ using MS.Internal; using MS.Internal.Telemetry.PresentationFramework; using MS.Utility; - -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Controls.Primitives; using System.Windows.Media; -using System.Windows.Threading; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StickyNote.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StickyNote.cs index 35d2f97da21..ca3ea271756 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StickyNote.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StickyNote.cs @@ -12,37 +12,21 @@ // See spec at StickyNoteControlSpec.mht // -using System; -using System.ComponentModel; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.Diagnostics; // Assert using System.Globalization; -using System.IO; -using System.Reflection; using System.Xml; -using System.Xml.Serialization; -using Microsoft.Win32; // SystemEvents using MS.Internal; using MS.Internal.Annotations.Component; using MS.Internal.Controls.StickyNote; using MS.Internal.Commands; using MS.Internal.KnownBoxes; using System.Windows.Threading; -using System.Windows; using System.Windows.Data; using System.Windows.Annotations; -using System.Windows.Automation; using System.Windows.Controls.Primitives; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; -using System.Text; -using System.Text.RegularExpressions; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StyleSelector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StyleSelector.cs index e218f32995e..056c6096388 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StyleSelector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/StyleSelector.cs @@ -8,14 +8,6 @@ // Specs: Data Styling.mht // -using System.Windows.Shapes; -using System.Windows.Media; -using System.Windows.Data; -using System.ComponentModel; - - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabControl.cs index ec6dd96ad97..008a94040cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabControl.cs @@ -4,23 +4,13 @@ using System.ComponentModel; -using System.Collections; using System.Collections.Specialized; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; -using System.Windows.Data; using System.Windows.Input; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Media; using System.Windows.Controls.Primitives; -using System.Windows.Markup; -using MS.Utility; using MS.Internal.Telemetry.PresentationFramework; -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabItem.cs index 8031d1506b3..048b3bb90a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TabItem.cs @@ -3,18 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; -using System.Windows.Threading; using System.ComponentModel; using System.Windows.Automation; using System.Windows.Automation.Peers; -using System.Windows.Media; using System.Windows.Input; -using System.Windows; using System.Windows.Data; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs index 2d2e9b6e36e..2467d06280c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs @@ -8,10 +8,7 @@ // Spec for Text Object Model (TOM) at Text Object Model.doc // -using System; // Exception -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection -using System.Security; // SecurityCritical, ... using System.Windows; // PresentationSource using System.Windows.Automation; // SupportedTextSelection using System.Windows.Automation.Peers; // AutomationPeer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBlock.cs index 72c1e1cd5d7..048f9060cc7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBlock.cs @@ -7,25 +7,15 @@ // Most text scenarios should use the FlowDocumentScrollViewer. // -using System; -using System.IO; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Globalization; -using System.Windows.Automation; using System.Windows.Threading; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.TextFormatting; using System.Windows.Markup; - -using MS.Utility; using MS.Internal; // Invariant.Assert -using MS.Internal.Automation; // TextAdaptor using System.Windows.Automation.Peers; using MS.Internal.Text; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBox.cs index 9d0ac375944..fec869ef9bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextBox.cs @@ -2,34 +2,27 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Collections; // IEnumerator +using System.ComponentModel; // DefaultValue +using System.Windows.Media; +using System.Windows.Data; // Binding +using System.Windows.Documents; +using System.Windows.Automation.Peers; +using System.Windows.Input; // CanExecuteRoutedEventArgs, ExecuteRoutedEventArgs + +using System.Windows.Controls.Primitives; // TextBoxBase +using System.Windows.Markup; // IAddChild, XamlDesignerSerializer, ContentPropertyAttribute +using MS.Internal.Documents; // Undo +using MS.Internal.Commands; // CommandHelpers +using MS.Internal.Telemetry.PresentationFramework; + // // Description: The stock plain text editing control. // namespace System.Windows.Controls { - using MS.Internal; - using System.Threading; - using System.Collections; // IEnumerator - using System.ComponentModel; // DefaultValue - using System.Globalization; - using System.Windows; - using System.Windows.Media; - using System.Windows.Data; // Binding - using System.Windows.Documents; - using System.Windows.Automation.Peers; - using System.Windows.Input; // CanExecuteRoutedEventArgs, ExecuteRoutedEventArgs - - using System.Windows.Controls.Primitives; // TextBoxBase - using System.Windows.Navigation; - using System.Windows.Markup; // IAddChild, XamlDesignerSerializer, ContentPropertyAttribute - using MS.Utility; - using MS.Internal.Text; - using MS.Internal.Automation; // TextAdaptor - using MS.Internal.Documents; // Undo - using MS.Internal.Commands; // CommandHelpers - using MS.Internal.Telemetry.PresentationFramework; - /// /// The stock text editing control. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChange.cs index 8664b530f49..14d6e0c580a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChange.cs @@ -6,10 +6,6 @@ // Description: // -using System; -using System.Windows; -using System.Collections; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChangedEventArgs.cs index ed255c46a2e..b52b0457014 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextChangedEventArgs.cs @@ -7,8 +7,6 @@ // using System.ComponentModel; -using System.Windows.Documents; -using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextRangeAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextRangeAdaptor.cs index 794d72b904a..d832160ee20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextRangeAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextRangeAdaptor.cs @@ -6,9 +6,7 @@ // Description: TextRange provider adaptor for Text Object Model based objects // -using System; // Exception, ... using System.Collections; // Hashtable -using System.Collections.Generic; // List using System.Collections.ObjectModel; // ReadOnlyCollection using System.Globalization; // CultureInfo using System.Windows; // TextDecorationCollection diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextSearch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextSearch.cs index fe077c3cab9..dcda66c0e04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextSearch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextSearch.cs @@ -3,23 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Windows; using System.Windows.Threading; using System.Windows.Data; -using System.ComponentModel; using System.Windows.Input; - -using System.Collections; using MS.Win32; using System.Globalization; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Markup; // for XmlLanguage -using System.Windows.Media; -using System.Text; -using System.Collections.Generic; using MS.Internal; using MS.Internal.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBar.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBar.cs index c0a38aff38d..c41ddcde6e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBar.cs @@ -3,23 +3,14 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; - -using System.Windows; -using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Shapes; - -using MS.Utility; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs index 958cf135b14..8a12641423c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs @@ -5,20 +5,12 @@ using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Documents; using MS.Internal.KnownBoxes; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; - -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Controls.Primitives; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Documents; using System.Windows.Media; using System.Windows.Input; using System.Windows.Markup; // IAddChild, ContentPropertyAttribute diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTip.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTip.cs index cfd25918c66..4e9e92ebe98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTip.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTip.cs @@ -3,23 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.ComponentModel; - -using System.Collections; -using System.Collections.Specialized; using System.Windows.Threading; - -using System.Windows; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Data; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; -using System.Windows.Markup; -using System.Windows.Shapes; -using MS.Utility; using MS.Internal.KnownBoxes; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTipService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTipService.cs index 225ed2482f8..7ad6c7f62b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTipService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolTipService.cs @@ -3,12 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Input; -using System.Windows.Media; using MS.Internal.KnownBoxes; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeView.cs index cb160d09aa4..0ca1fa64b57 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeView.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeViewItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeViewItem.cs index fa65bf75ea4..423acf149e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeViewItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TreeViewItem.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UIElementCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UIElementCollection.cs index 849d46516b6..dabb3fcb7cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UIElementCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UIElementCollection.cs @@ -6,12 +6,8 @@ // Description: Contains the UIElementCollection base class. // -using MS.Internal; -using System; using System.Collections; using System.Windows.Media; -using System.Windows.Threading; -using System.Windows.Markup; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UserControl.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UserControl.cs index 50705419b3c..6beebe17e10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UserControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/UserControl.cs @@ -3,14 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Markup; -using System.Diagnostics; using MS.Internal.KnownBoxes; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Validation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Validation.cs index f75e13b9da7..9e8f1aa68ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Validation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Validation.cs @@ -9,22 +9,14 @@ // See specs at Validation.mht // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Threading; using MS.Internal.Controls; -using MS.Internal.Data; using MS.Internal.KnownBoxes; -using MS.Utility; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationError.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationError.cs index d8ee94bc452..f8f0f9e01a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationError.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationError.cs @@ -10,8 +10,6 @@ // See specs at Validation.mht // -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationErrorEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationErrorEventArgs.cs index 9b83590ec4c..e002064f7db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationErrorEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationErrorEventArgs.cs @@ -9,9 +9,6 @@ // See specs at Validation.mht // -using System; -using System.Windows; - using MS.Internal; namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationResult.cs index 652fa3c3f13..0b60fa54fdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationResult.cs @@ -9,8 +9,6 @@ // See specs at Validation.mht // -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationRule.cs index 3d8386b895a..dea41b10efe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationRule.cs @@ -13,7 +13,6 @@ // See specs at Validation.mht // -using System; using System.Globalization; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationStep.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationStep.cs index 62c28cffe9a..16e9234ccf5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationStep.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ValidationStep.cs @@ -6,7 +6,6 @@ // Description: Enum describing the different steps in the validation process. // -using System; using System.ComponentModel; // doc comments namespace System.Windows.Controls diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBase.cs index 02e8e55d87b..21ef526d002 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBase.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Diagnostics; // Debug using System.Windows.Automation.Peers; // IViewAutomationPeer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBox.cs index e0388297a8e..86a726f8acd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewBox.cs @@ -8,17 +8,11 @@ // using MS.Internal; -using MS.Utility; using MS.Internal.Controls; using MS.Internal.Telemetry.PresentationFramework; -using System.Diagnostics; using System.Collections; -using System.Windows.Threading; using System.Windows.Media; -using System.Windows.Documents; - -using System; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewPort3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewPort3D.cs index 7114d159e68..0a802b95c6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewPort3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ViewPort3D.cs @@ -10,16 +10,11 @@ using MS.Internal; using MS.Internal.KnownBoxes; -using System; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Media; using System.Windows.Media.Media3D; using System.Windows.Markup; -using System.Windows.Threading; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLength.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLength.cs index 7d0de9683e6..668192b9fa0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLength.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLength.cs @@ -6,7 +6,6 @@ // Description: Virtualization cache length implementation // -using MS.Internal; using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLengthConverter.cs index c4c8fbff7c0..1340a432b3f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationCacheLengthConverter.cs @@ -7,17 +7,10 @@ // using MS.Internal; -using MS.Utility; using System.ComponentModel; -using System.Windows; -using System; -using System.Security; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Windows.Markup; -using System.Text; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationMode.cs index 8cb9cea259b..45995a01ad3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizationMode.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizedCellInfoCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizedCellInfoCollection.cs index e87578f5c1b..9831e962cb8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizedCellInfoCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizedCellInfoCollection.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingPanel.cs index 2140711a065..f318f96ddba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingPanel.cs @@ -4,13 +4,7 @@ using MS.Internal; -using MS.Utility; - -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; using System.Windows.Media; using System.Windows.Controls.Primitives; // IItemContainerGenerator diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingStackPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingStackPanel.cs index e91668edd86..4fcd3453d05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingStackPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingStackPanel.cs @@ -8,21 +8,16 @@ using MS.Internal; using MS.Internal.Controls; using MS.Utility; - -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Globalization; -using System.Diagnostics; using System.IO; using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Threading; using System.Windows.Input; using System.Windows.Data; -using MS.Internal.Data; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs index 1151e5151a7..8d6900c55ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs @@ -2,14 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Security; -using System.Runtime.InteropServices; - -using MS.Internal; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WebBrowser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WebBrowser.cs index f15a9689765..5ebd5e587cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WebBrowser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WebBrowser.cs @@ -6,32 +6,22 @@ // Description: // WebBrowser is a wrapper for the webbrowser activex control -using System; -using System.ComponentModel; using System.Runtime.InteropServices; -using System.Windows; using MS.Win32; -using System.Security; using System.Windows.Controls.Primitives; //PopupRoot -using MS.Internal.Utility ; +using MS.Internal.Utility; using MS.Internal.AppModel; //RootBrowserWindow using System.Windows.Interop; using System.Windows.Input; -using System.Windows.Threading; -using System.Diagnostics; using System.Windows.Navigation; using System.IO; //Stream using System.Threading; // thread using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Interop; using MS.Internal.Telemetry.PresentationFramework; -using System.IO.Packaging; using System.Diagnostics.CodeAnalysis; using HRESULT = MS.Internal.Interop.HRESULT; -using SafeSecurityHelper=MS.Internal.PresentationFramework.SafeSecurityHelper; -using SecurityHelperPF=MS.Internal.PresentationFramework.SecurityHelper; using PackUriHelper = MS.Internal.IO.Packaging.PackUriHelper; /* Overview of Keyboard Input Routing for the WebOC diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WrapPanel.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WrapPanel.cs index 08eb16fa18b..f1cda5064b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WrapPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/WrapPanel.cs @@ -9,18 +9,8 @@ using MS.Internal; using MS.Internal.Telemetry.PresentationFramework; -using MS.Utility; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; - -using System.Windows.Media; - - -using System; - namespace System.Windows.Controls { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/CornerRadiusConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/CornerRadiusConverter.cs index 8666e42a7e5..a4d9768535e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/CornerRadiusConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/CornerRadiusConverter.cs @@ -9,16 +9,11 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; -using System.Text; -using System.Windows; -using System.Security; using MS.Internal; -using MS.Utility; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/Binding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/Binding.cs index 481667fac9a..6429edb16d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/Binding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/Binding.cs @@ -8,22 +8,14 @@ // See spec at Data Binding.mht // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; -using System.Diagnostics; using System.ComponentModel; using System.Xml; - -using System.Windows; using System.Windows.Controls; // Validation -using System.Windows.Markup; -using MS.Utility; using MS.Internal; // Invariant.Assert using MS.Internal.Controls; // Validation using MS.Internal.Data; -using MS.Internal.KnownBoxes; namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingBase.cs index 2cdc1b21bb8..87c3fc5f824 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingBase.cs @@ -9,10 +9,8 @@ // See spec at Data Binding.mht // -using System; using System.Collections.ObjectModel; // Collection using System.ComponentModel; // [DefaultValue] -using System.Diagnostics; // Debug.Assert using System.Globalization; // CultureInfo using System.Windows.Markup; // MarkupExtension using System.Windows.Controls; // ValidationRule diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpression.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpression.cs index ced9291429a..3776d136d4a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpression.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpression.cs @@ -8,25 +8,16 @@ // See spec at Data Binding.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.ComponentModel; using System.Globalization; using System.Windows.Threading; using System.Threading; -using System.Windows; -using System.Windows.Input; using System.Windows.Controls; using System.Windows.Markup; -using MS.Utility; using MS.Internal; -using MS.Internal.Controls; // Validation using MS.Internal.Data; -using MS.Internal.KnownBoxes; -using MS.Internal.Utility; // TraceLog namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpressionBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpressionBase.cs index 21915f79801..83367f5f2a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpressionBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingExpressionBase.cs @@ -14,23 +14,15 @@ // BindingExpression.GetReference correctly //#define USE_ITEM_REFERENCE -using System; -using System.Collections.Generic; // List using System.Collections.ObjectModel; // Collection using System.ComponentModel; // TypeConverter -using System.Diagnostics; // StackTrace using System.Globalization; // CultureInfo using System.Threading; // Thread - -using System.Windows; // FrameworkElement using System.Windows.Controls; // Validation using System.Windows.Markup; // XmlLanguage using System.Windows.Threading; // Dispatcher using MS.Internal; // Invariant.Assert -using MS.Internal.Controls; // ValidationErrorCollection using MS.Internal.Data; // DataBindEngine -using MS.Internal.KnownBoxes; // BooleanBoxes -using MS.Internal.Utility; // TraceLog namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingGroup.cs index ac2c55f8420..dcfe9ac103a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingGroup.cs @@ -6,17 +6,12 @@ // Description: Defines BindingGroup object, manages a collection of bindings. // -using System; using System.Collections; // IList -using System.Collections.Generic; // IList using System.Collections.ObjectModel; // Collection using System.Collections.Specialized; // INotifyCollectionChanged using System.ComponentModel; // IEditableObject -using System.Diagnostics; // Debug using System.Globalization; // CultureInfo using System.Threading; // Thread - -using System.Windows; using System.Windows.Controls; // ValidationRule using MS.Internal.Controls; // ValidationRuleCollection using MS.Internal; // InheritanceContextHelper diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingListCollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingListCollectionView.cs index 002ac814614..e20bea6c6f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingListCollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingListCollectionView.cs @@ -6,19 +6,14 @@ // See spec at CollectionView.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Threading; using MS.Internal; using MS.Internal.Data; -using MS.Utility; namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingOperations.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingOperations.cs index 60dcae636bc..0e88e7e5ac5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingOperations.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingOperations.cs @@ -8,18 +8,9 @@ // See spec at Data Binding.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; -using System.ComponentModel; -using System.Globalization; using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Markup; -using System.Windows.Threading; using MS.Internal.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionContainer.cs index 6d9d0446f19..41bd9722885 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionContainer.cs @@ -11,20 +11,12 @@ // using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; - -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; -using MS.Utility; using MS.Internal; // Invariant.Assert using MS.Internal.Utility; using MS.Internal.Data; // IndexedEnumerable -using System; - namespace System.Windows.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionRegisteringEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionRegisteringEventArgs.cs index ca820eeca77..8de10cc8cbb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionRegisteringEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionRegisteringEventArgs.cs @@ -8,7 +8,6 @@ // See spec at Cross-thread Collections.docx // -using System; using System.Collections; namespace System.Windows.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionSynchronizationCallback.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionSynchronizationCallback.cs index 73734aa7b80..ded1fbffc6e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionSynchronizationCallback.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionSynchronizationCallback.cs @@ -8,7 +8,6 @@ // See spec at Cross-thread Collections.docx // -using System; using System.Collections; namespace System.Windows.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionView.cs index d3428709a88..53a44c03321 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionView.cs @@ -10,17 +10,13 @@ // -using System; using System.ComponentModel; using System.Globalization; using System.Reflection; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.Diagnostics; -using System.Windows; using System.Threading; using System.Windows.Threading; using MS.Internal.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewRegisteringEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewRegisteringEventArgs.cs index 9bcba5d17f9..2e409e72ff6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewRegisteringEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewRegisteringEventArgs.cs @@ -8,8 +8,6 @@ // See spec at Cross-thread Collections.docx // -using System; - namespace System.Windows.Data { public class CollectionViewRegisteringEventArgs : EventArgs diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewSource.cs index a00a99e62fd..8b731066db5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CollectionViewSource.cs @@ -9,7 +9,6 @@ // See spec at CollectionViewSource.mht // -using System; using System.Collections; // IEnumerable using System.Collections.ObjectModel; // ObservableCollection using System.Collections.Specialized; // NotifyCollectionChanged* diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CompositeCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CompositeCollection.cs index 0e0ebbbb1e8..ec4d213b8ff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CompositeCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/CompositeCollection.cs @@ -9,18 +9,9 @@ // using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; - -using System.Windows; -using System.Windows.Markup; - -using MS.Internal; // Invariant.Assert using MS.Internal.Data; -using MS.Utility; - -using System; namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataChangedEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataChangedEventManager.cs index d29a18e0899..607a672bdfe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataChangedEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataChangedEventManager.cs @@ -7,9 +7,6 @@ // pattern. See WeakEventTable.cs for an overview. // -using System; -using System.Windows; // WeakEventManager - namespace System.Windows.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataTransferEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataTransferEventArgs.cs index 2fdcc81c4ae..6b3e31af97d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataTransferEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/DataTransferEventArgs.cs @@ -8,8 +8,6 @@ // Specs: UIBinding.mht // -using System; - namespace System.Windows.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/FilterEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/FilterEventArgs.cs index 14b0f6d12dd..307ff0180b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/FilterEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/FilterEventArgs.cs @@ -8,8 +8,6 @@ // Specs: CollectionViewSource.mht // -using System; - namespace System.Windows.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IMultiValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IMultiValueConverter.cs index e209073fd42..f4dee6dfce1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IMultiValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IMultiValueConverter.cs @@ -10,19 +10,16 @@ // See spec at Data Binding.mht // -using System; -using System.Windows; using System.Globalization; -using System.Reflection; namespace System.Windows.Data { -/// -/// Interface for MultiValueConverter object - -/// used by MultiBinding to convert and combine source values to target values -/// and to convert and split target values to source values. -/// -public interface IMultiValueConverter + /// + /// Interface for MultiValueConverter object - + /// used by MultiBinding to convert and combine source values to target values + /// and to convert and split target values to source values. + /// + public interface IMultiValueConverter { /// /// Convert a value. Called when moving values from sources to target. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IValueConverter.cs index 7298ba3a5cb..b89b953fc8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/IValueConverter.cs @@ -9,34 +9,31 @@ // Specs: Transformer.mht // -using System; -using System.Windows; using System.Globalization; -using System.Reflection; namespace System.Windows.Data { -/// -/// Interface for ValueConverter object -/// -/// -/// When implementing this interface it is a good practice to decorate your implementation -/// with a attribute -/// to indicate to development tools between what data types your converter can convert. -/// -/// [ValueConversion(typeof(Employee), typeof(Brush))] -/// class MyConverter : IValueConverter -/// { -/// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) -/// { -/// if (value is Dev) return Brushes.Beige; -/// if (value is Employee) return Brushes.Salmon; -/// return Brushes.Yellow; -/// } -/// } -/// -/// -public interface IValueConverter + /// + /// Interface for ValueConverter object + /// + /// + /// When implementing this interface it is a good practice to decorate your implementation + /// with a attribute + /// to indicate to development tools between what data types your converter can convert. + /// + /// [ValueConversion(typeof(Employee), typeof(Brush))] + /// class MyConverter : IValueConverter + /// { + /// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + /// { + /// if (value is Dev) return Brushes.Beige; + /// if (value is Employee) return Brushes.Salmon; + /// return Brushes.Yellow; + /// } + /// } + /// + /// + public interface IValueConverter { /// /// Convert a value. Called when moving a value from source to target. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ListCollectionView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ListCollectionView.cs index d6b65399ac0..1ff443cae44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ListCollectionView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ListCollectionView.cs @@ -8,21 +8,15 @@ // See spec at CollectionView.mht // -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; // ConstructorInfo - -using System.Windows; using System.Windows.Threading; using MS.Internal; using MS.Internal.Data; -using MS.Utility; namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs index 162ba9878a5..8a901a52821 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs @@ -8,29 +8,24 @@ // Specs: UIBinding.mht // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.Windows.Controls; // Validation using System.Windows.Markup; using MS.Internal.Controls; // Validation using MS.Internal.Data; -using MS.Utility; namespace System.Windows.Data { -/// -/// Describes a collection of bindings attached to a single property. -/// The inner bindings contribute their values to the MultiBinding, -/// which combines/converts them into a resultant final value. -/// In the reverse direction, the target value is tranlated to -/// a set of values that are fed back into the inner bindings. -/// -[ContentProperty("Bindings")] + /// + /// Describes a collection of bindings attached to a single property. + /// The inner bindings contribute their values to the MultiBinding, + /// which combines/converts them into a resultant final value. + /// In the reverse direction, the target value is tranlated to + /// a set of values that are fed back into the inner bindings. + /// + [ContentProperty("Bindings")] public class MultiBinding : BindingBase, IAddChild { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBindingExpression.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBindingExpression.cs index 36bc791b325..c810abb5945 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBindingExpression.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBindingExpression.cs @@ -8,33 +8,22 @@ // See spec at Data Binding.mht // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Threading; -using System.Threading; using System.Windows.Controls; -using System.Windows.Input; // FocusChangedEvent -using System.Windows.Markup; -using MS.Internal.Controls; // Validation -using MS.Internal.KnownBoxes; using MS.Internal.Data; -using MS.Utility; using MS.Internal; // Invariant.Assert namespace System.Windows.Data { -/// -/// Describes a collection of BindingExpressions attached to a single property. -/// The inner BindingExpressions contribute their values to the MultiBindingExpression, -/// which combines/converts them into a resultant final value. -/// In the reverse direction, the target value is tranlated to -/// a set of values that are fed back into the inner BindingExpressions. -/// -public sealed class MultiBindingExpression: BindingExpressionBase, IDataBindEngineClient + /// + /// Describes a collection of BindingExpressions attached to a single property. + /// The inner BindingExpressions contribute their values to the MultiBindingExpression, + /// which combines/converts them into a resultant final value. + /// In the reverse direction, the target value is tranlated to + /// a set of values that are fed back into the inner BindingExpressions. + /// + public sealed class MultiBindingExpression: BindingExpressionBase, IDataBindEngineClient { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ObjectDataProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ObjectDataProvider.cs index 08deff11ee8..9d360cc18e8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ObjectDataProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ObjectDataProvider.cs @@ -8,18 +8,13 @@ // Specs: Avalon DataProviders.mht // -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Threading; -using System.Windows; -using System.Windows.Data; using MS.Internal; using MS.Internal.Data; // ParameterCollection -using System.Windows.Markup; //--------------------------------------------------------------------------- // Design notes: diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBinding.cs index f83b6ab003e..73e79756430 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBinding.cs @@ -9,24 +9,20 @@ // See spec at Data Binding.mht // -using System; -using System.Collections; using System.Collections.ObjectModel; // Collection using System.ComponentModel; -using System.Globalization; using System.Windows.Markup; using MS.Internal.Data; -using MS.Utility; namespace System.Windows.Data { -/// -/// Describes a collection of bindings attached to a single property. -/// These behave as "priority" bindings, meaning that the property -/// receives its value from the first binding in the collection that -/// can produce a legal value. -/// -[ContentProperty("Bindings")] + /// + /// Describes a collection of bindings attached to a single property. + /// These behave as "priority" bindings, meaning that the property + /// receives its value from the first binding in the collection that + /// can produce a legal value. + /// + [ContentProperty("Bindings")] public class PriorityBinding : BindingBase, IAddChild { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBindingExpression.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBindingExpression.cs index 88af9f13229..762cfc39474 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBindingExpression.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PriorityBindingExpression.cs @@ -10,27 +10,20 @@ // See spec at Data Binding.mht // -using System; -using System.Collections; using System.Collections.ObjectModel; // Collection -using System.Diagnostics; -using System.Threading; using System.Windows.Controls; // ValidationStep -using System.Windows.Threading; -using System.Windows.Markup; using MS.Internal; using MS.Internal.Data; -using MS.Utility; namespace System.Windows.Data { -/// -/// Describes a collection of BindingExpressions attached to a single property. -/// These behave as "priority" BindingExpressions, meaning that the property -/// receives its value from the first BindingExpression in the collection that -/// can produce a legal value. -/// -public sealed class PriorityBindingExpression : BindingExpressionBase + /// + /// Describes a collection of BindingExpressions attached to a single property. + /// These behave as "priority" BindingExpressions, meaning that the property + /// receives its value from the first BindingExpression in the collection that + /// can produce a legal value. + /// + public sealed class PriorityBindingExpression : BindingExpressionBase { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PropertyGroupDescription.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PropertyGroupDescription.cs index 3a9964d544e..6bcbb5a23cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PropertyGroupDescription.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/PropertyGroupDescription.cs @@ -9,12 +9,9 @@ // See spec at Grouping.mht // -using System; // StringComparison using System.Collections; // IComparer using System.ComponentModel; // [DefaultValue] using System.Globalization; // CultureInfo -using System.Reflection; // PropertyInfo -using System.Windows; // SR using MS.Internal; // XmlHelper namespace System.Windows.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/RelativeSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/RelativeSource.cs index 8d45a076a35..a191f7115cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/RelativeSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/RelativeSource.cs @@ -7,7 +7,6 @@ // using System.ComponentModel; // ISupportInitialize -using System.Diagnostics; using System.Windows.Markup; // MarkupExtension namespace System.Windows.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueConversionAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueConversionAttribute.cs index 8922b2b4d4a..42541f4c0fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueConversionAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueConversionAttribute.cs @@ -10,8 +10,6 @@ // Specs: Data Binding.mht // -using System; - namespace System.Windows.Data { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueUnavailableException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueUnavailableException.cs index cb78fa08471..41d3857ac64 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueUnavailableException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/ValueUnavailableException.cs @@ -7,8 +7,6 @@ // by a validation rule is not available. // -using System; - namespace System.Windows.Data { ///Exception class thrown when a value requested by a validation rule is not available diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlDataProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlDataProvider.cs index f9bfa30cdcf..9f19e0bac2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlDataProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlDataProvider.cs @@ -9,21 +9,15 @@ // XmlDataSource.mht // -using System; using System.IO; // Stream -using System.Collections; using System.ComponentModel; // ISupportInitialize, AsyncCompletedEventHandler, [DesignerSerialization*], [DefaultValue] -using System.Diagnostics; using System.IO.Packaging; // PackUriHelper -using System.Globalization; // CultureInfo using System.Net; // WebRequest, IWebRequestCreate using System.Threading; // ThreadPool, WaitCallback using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; // IXmlSerializable using System.Xml.XPath; -using System.Windows; -using System.Windows.Data; using System.Windows.Threading; // Dispatcher* using System.Windows.Markup; // IUriContext, [XamlDesignerSerializer] using MS.Internal; // CriticalExceptions diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMapping.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMapping.cs index d151b7d0909..f71964f504e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMapping.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMapping.cs @@ -9,7 +9,6 @@ // WCP DataSources.mht // -using System; using System.ComponentModel; // ISupportInitialize namespace System.Windows.Data diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMappingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMappingCollection.cs index 97e67f8b7f0..993a52a7967 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMappingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/XmlNamespaceMappingCollection.cs @@ -9,12 +9,9 @@ // WCP DataSources.mht // -using System; using System.Collections; // IEnumerator -using System.Collections.Generic; // ICollection using System.Xml; using System.Windows.Markup; -using MS.Utility; namespace System.Windows.Data { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTemplateKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTemplateKey.cs index efcec9bc58f..8f6ff57968c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTemplateKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTemplateKey.cs @@ -7,9 +7,6 @@ // Description: Resource key for a DataTemplate // -using System; -using System.Reflection; - namespace System.Windows { /// Resource key for a DataTemplate diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTrigger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTrigger.cs index 7382e7c9939..e63a38a99a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTrigger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DataTrigger.cs @@ -8,10 +8,8 @@ // gets values from data. // -using System; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Data; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContent.cs index e80f32f0782..e568e706f77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContent.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.IO; -using System.Security; using System.Xaml; -using System.Xaml.Permissions; using System.Windows.Baml2006; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContentConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContentConverter.cs index a895542c6c7..db939b3225a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContentConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DeferrableContentConverter.cs @@ -2,26 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; -using System.Net; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.Diagnostics; using System.ComponentModel; -using System.Windows.Threading; -using System.Windows.Media; -using System.IO.Packaging; -using MS.Internal.IO.Packaging; // for PackageCacheEntry using System.Globalization; -using System.Windows.Navigation; - -using MS.Internal; -using MS.Internal.Utility; -using MS.Internal.AppModel; -using MS.Utility; using System.Xaml; using System.Windows.Baml2006; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DependencyPropertyHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DependencyPropertyHelper.cs index 900f503148e..09e3c32d956 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DependencyPropertyHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DependencyPropertyHelper.cs @@ -10,7 +10,6 @@ // See spec at GetValueSource.mht // -using System; using MS.Internal; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalker.cs index 86a02f588c5..6a0a72ab254 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalker.cs @@ -2,14 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; -using MS.Utility; using System.Windows.Controls.Primitives; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalkerBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalkerBase.cs index 50fe3198db9..9239bbf6719 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalkerBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DescendentsWalkerBase.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Diagnostics; -using System.Windows; using System.Windows.Media; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingDiagnostics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingDiagnostics.cs index 6e9a28f0e43..00ed812ed2c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingDiagnostics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingDiagnostics.cs @@ -7,8 +7,6 @@ // Binding diagnostics API // -using System.Collections.Generic; - namespace System.Windows.Diagnostics { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingFailedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingFailedEventArgs.cs index a86f56d9f85..644c1ba4327 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingFailedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/BindingFailedEventArgs.cs @@ -6,7 +6,6 @@ // Description: // Contains EventArg types raised to communicate BindingFailed events. -using System.Diagnostics; using System.Windows.Data; namespace System.Windows.Diagnostics diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs index 51020f0058a..fa4a3c0f3b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs @@ -11,14 +11,8 @@ // iii. Notifies listeners when themed ResourceDictionary instances get // unloaded (generic ResourceDictionary instances are never unloaded) -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Reflection; -using System.Security; -using System.Windows; using System.Windows.Threading; using MS.Internal; using MS.Internal.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryInfo.cs index 446be891fe2..3c3a0637a21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryInfo.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.Reflection; namespace System.Windows.Diagnostics diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DialogResultConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DialogResultConverter.cs index 23158ca3064..a061938956a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DialogResultConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DialogResultConverter.cs @@ -9,7 +9,6 @@ // // -using System; using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Adorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Adorner.cs index 72a37c82489..fe77e5ac5a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Adorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Adorner.cs @@ -8,11 +8,8 @@ // See spec at AdornerLayer Spec.htm // -using System; -using System.Collections; using System.Windows.Data; using System.Windows.Media; -using System.Windows.Input; using System.Windows.Threading; using MS.Internal; // DoubleUtil diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerDecorator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerDecorator.cs index fac623c3971..941aeda768c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerDecorator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerDecorator.cs @@ -9,12 +9,8 @@ // See spec at: AdornerLayer Spec.htm // -using System; -using System.Collections; -using System.Windows; using System.Windows.Controls; using System.Windows.Media; -using System.Windows.Threading; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerHitTestResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerHitTestResult.cs index 073f4f2597c..fd3ef6c30ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerHitTestResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerHitTestResult.cs @@ -10,23 +10,17 @@ // See spec at: AdornerLayer Spec.htm // -using System; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Threading; -using System.Collections; -using MS.Internal; using System.Windows.Documents; namespace System.Windows.Media { - /// - /// Data provided as a result of calling AdornerLayer.AdornerHitTest(). - /// In addition to the visual and point information provided by the base - /// class PointHitTestResult, also returns the Adorner that was hit (since - /// there may be multiple Visuals in a single Adorner). - /// - public class AdornerHitTestResult : PointHitTestResult + /// + /// Data provided as a result of calling AdornerLayer.AdornerHitTest(). + /// In addition to the visual and point information provided by the base + /// class PointHitTestResult, also returns the Adorner that was hit (since + /// there may be multiple Visuals in a single Adorner). + /// + public class AdornerHitTestResult : PointHitTestResult { private readonly Adorner _adorner; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerLayer.cs index c50aceada6b..483d6298934 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AdornerLayer.cs @@ -8,15 +8,11 @@ // See spec at: AdornerLayer Spec.htm // -using System; using System.Windows.Media; -using System.Diagnostics; using System.Collections; using System.Collections.Specialized; using System.Windows.Threading; using System.Windows.Controls; - -using MS.Utility; using MS.Internal; using MS.Internal.Controls; using MS.Internal.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AnchoredBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AnchoredBlock.cs index bf40222175a..7cb6068d3a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AnchoredBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/AnchoredBlock.cs @@ -13,7 +13,6 @@ using System.ComponentModel; // TypeConverter using System.Windows.Media; // Brush using System.Windows.Markup; // ContentProperty -using MS.Internal; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Block.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Block.cs index f6f32223e57..f55626f80df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Block.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Block.cs @@ -9,13 +9,11 @@ // using System.ComponentModel; // TypeConverter -using System.Windows.Controls; // Border using System.Windows.Media; // Brush -using MS.Internal; // DoubleUtil using MS.Internal.Text; // Text DPI restrictions using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// Block element - an abstract class, a base for elements allowed diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockCollection.cs index 24e0c2c81f8..c87d260bea1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockCollection.cs @@ -10,8 +10,6 @@ namespace System.Windows.Documents { - using MS.Internal; // Invariant - /// /// Collection of Block elements - elements allowed as children /// of FlowDocument, Section, ListItem, TableCell, Floater and Figure. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockUIContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockUIContainer.cs index a1e47c3aa54..2381b22b8b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockUIContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/BlockUIContainer.cs @@ -7,7 +7,6 @@ // flow content block collections // -using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Markup; // ContentProperty namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CaretElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CaretElement.cs index 64a21fd7fc3..02c3d87a913 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CaretElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CaretElement.cs @@ -2,26 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; // Brush, Transform +using System.Windows.Media.Animation; // AnimationClock +using System.Windows.Controls; // ScrollViewer +using MS.Win32; // SafeNativeMethods +using MS.Internal; // DoubleUtil.AreClose(), Invariant.Assert +using MS.Internal.Documents; // IFlowDocumentViewer +using System.Runtime.InteropServices; // HandleRef +using System.Windows.Interop; +using System.Windows.Controls.Primitives; + // // Description: Caret rendering visual. // namespace System.Windows.Documents { - using System.Security; // SecurityCritical, SecurityTreatAsSafe - using System.Windows.Media; // Brush, Transform - using System.Windows.Media.Animation; // AnimationClock - using System.Windows.Controls; // ScrollViewer - using MS.Win32; // SafeNativeMethods - using MS.Internal; // DoubleUtil.AreClose(), Invariant.Assert - using MS.Internal.Documents; // IFlowDocumentViewer - using System.Runtime.InteropServices; // HandleRef - using System.Collections.Generic; // List - using System.Windows.Interop; - using System.Windows.Controls.Primitives; - - -// Disable pragma warnings to enable PREsharp pragmas + // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChangeBlockUndoRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChangeBlockUndoRecord.cs index 9be6bca06d5..ee14e79bbfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChangeBlockUndoRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChangeBlockUndoRecord.cs @@ -7,8 +7,6 @@ // TextContainer. // -using System; -using System.Windows; using MS.Internal; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChildDocumentBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChildDocumentBlock.cs index c0adee0844c..5fa4639c37c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChildDocumentBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ChildDocumentBlock.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; + // // Description: // Represent a node in the doubly linked list a DocumentSequenceTextContainer @@ -11,11 +13,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Diagnostics; - - //===================================================================== /// /// Represent a node in the doubly linked list a DocumentSequenceTextContainer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ColumnResizeAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ColumnResizeAdorner.cs index 36c1061e991..67c4f4d5d01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ColumnResizeAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ColumnResizeAdorner.cs @@ -7,15 +7,7 @@ // Description: Adorner for column resize. // -using System; -using System.Diagnostics; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using MS.Win32; -using MS.Internal; namespace System.Windows.Documents.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CompositionAdorner.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CompositionAdorner.cs index 16a715c1647..ada5b11dc1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CompositionAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/CompositionAdorner.cs @@ -2,22 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; // ArrayList +using System.Windows.Media; // Brush, Transform +using System.Windows.Controls.Primitives; // TextBoxBase +using System.Windows.Input; // InputLanguageManager +using MS.Win32; // TextServices +using MS.Internal; // Invariant + // // Description: Composition adorner to render the composition display attribute. // namespace System.Windows.Documents { - using System.Collections; // ArrayList - using System.Diagnostics; - using System.Windows.Media; // Brush, Transform - using System.Windows.Controls; // TextBox - using System.Windows.Controls.Primitives; // TextBoxBase - using System.Windows.Input; // InputLanguageManager - using System.Windows.Threading; // Dispatcher - using MS.Win32; // TextServices - using MS.Internal; // Invariant - internal class CompositionAdorner : Adorner { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DPTypeDescriptorContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DPTypeDescriptorContext.cs index 4f2a36cff06..0ba234c0b0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DPTypeDescriptorContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DPTypeDescriptorContext.cs @@ -2,17 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Globalization; + // // Description: Set of static methods implementing text range serialization // namespace System.Windows.Documents { - using MS.Internal; - using System.Windows; - using System.Globalization; - using System.Windows.Media; - /// /// An object implementing ITypeDescriptorContext intended to be used in serialization /// scenarios for checking whether a particular value can be converted to a string diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DisplayAttributeHighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DisplayAttributeHighlightLayer.cs index ce20bd212ed..2bbdfc615b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DisplayAttributeHighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DisplayAttributeHighlightLayer.cs @@ -6,11 +6,6 @@ // Description: Highlight rendering for IME compositions. // -using System; -using System.Diagnostics; -using System.Collections; -using System.Windows.Media; - namespace System.Windows.Documents { #if UNUSED_IME_HIGHLIGHT_LAYER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReference.cs index dc0d91cef65..02da4c4d52c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReference.cs @@ -2,6 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using MS.Internal.Utility; +using System.Windows.Navigation; +using System.Windows.Markup; +using System.IO; + // // Description: // Implements the DocumentReference element @@ -9,26 +16,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.Documents; - using MS.Internal.Utility; - using MS.Internal.Navigation; - using MS.Internal.PresentationFramework; // SecurityHelper - using System.Reflection; - using System.Windows; // DependencyID etc. - using System.Windows.Navigation; - using System.Windows.Markup; - using System.Windows.Threading; // Dispatcher - using System; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using System.IO.Packaging; - using System.Net; - using System.Security; - - //===================================================================== /// /// DocumentReference is the class that references a Document. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReferenceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReferenceCollection.cs index 9c2fe2f3d47..104cb91e78c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReferenceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentReferenceCollection.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Specialized; + // // Description: // Implements the DocumentReferenceCollection as holder for a collection @@ -10,12 +12,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.Diagnostics; - - //===================================================================== /// /// DocumentReferenceCollection is an ordered collection of DocumentReference diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequence.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequence.cs index c56b72a53f1..e0351f639da 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequence.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequence.cs @@ -8,16 +8,12 @@ // using MS.Internal.Documents; -using MS.Utility; // ExceptionStringTable using System.Collections; using System.Collections.Specialized; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.Windows.Automation.Peers; // AutomationPeer using System.Windows.Threading; // Dispatcher -using System.Windows; // DependencyID etc. using System.Windows.Media; // Visual using System.Windows.Markup; // IAddChild, ContentProperty using System.Windows.Navigation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceHighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceHighlightLayer.cs index 9519206c7bf..2fd8ae0e3f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceHighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceHighlightLayer.cs @@ -2,18 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Collections; + // // Description: DocumentSequence's HighlightLayer for TextSelection. // namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Diagnostics; - using System.Collections; - using System.Collections.Generic; - // A special HighlightLayer that exists only to notify a FixedDocument // of changes to its highlights when the highlights are stored on a // DocumentSequenceTextContainer. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextContainer.cs index 51b62bf8045..96bf22a1ac1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextContainer.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using System.Collections.Specialized; +using System.Collections.ObjectModel; + // // Description: // DocumentSequenceTextContainer is a TextContainer that aggregates @@ -12,19 +17,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.Documents; - using System; - using System.Collections; - using System.Collections.Specialized; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows; // DependencyID etc. - using System.Text; - using System.Windows.Threading; // Dispatcher - //===================================================================== /// /// DocumentSequenceTextContainer is a TextContainer that aggregates diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextPointer.cs index 82415491b5d..2cfab4bfb13 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextPointer.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: // DocumentSequenceTextPointer is an implementation of ITextPointer/ITextPointer @@ -13,14 +15,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using MS.Utility; - using MS.Internal; - using System.Windows; - using System; - using System.Diagnostics; - - /// /// DocumentSequenceTextPointer is an implementation of ITextPointer for FixedDocumentSequence /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextView.cs index ff6579770d6..455cf1eba43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentSequenceTextView.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using MS.Internal; +using System.Collections.ObjectModel; +using System.Windows.Media; + // // Description: // DocumentSequenceTextView implements TextView for DocumentSequence @@ -10,19 +15,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using MS.Internal; - using MS.Utility; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Diagnostics; - using System.Windows; - using System.Windows.Media; - using System.Windows.Shapes; - - /// /// DocumentSequenceTextView implements TextView for DocumentSequence /// to support text editing (e.g Selection). diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/NamedElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/NamedElement.cs index 4ec831313bc..1cb2000d974 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/NamedElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/NamedElement.cs @@ -3,18 +3,6 @@ // See the LICENSE file in the project root for more information. -using MS.Internal.Documents; -using MS.Utility; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Controls.Primitives; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Shapes; using System.Windows.Markup; [assembly: XmlnsDefinition( diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/SemanticBasicElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/SemanticBasicElement.cs index 4deed4ffc56..9d50777cf84 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/SemanticBasicElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/SemanticBasicElement.cs @@ -3,18 +3,7 @@ // See the LICENSE file in the project root for more information. -using MS.Internal.Documents; -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Controls.Primitives; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Shapes; using System.Windows.Markup; [assembly: XmlnsDefinition( diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/StoryFragments.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/StoryFragments.cs index 088a9fd6e63..9f25babf62d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/StoryFragments.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/DocumentStructures/StoryFragments.cs @@ -3,18 +3,7 @@ // See the LICENSE file in the project root for more information. -using MS.Internal.Documents; -using MS.Utility; -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Controls.Primitives; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Shapes; using System.Windows.Markup; [assembly: XmlnsDefinition( diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/EditingCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/EditingCommands.cs index f5c66cb4a4a..2e27fa07b17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/EditingCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/EditingCommands.cs @@ -2,15 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Input; // Command + // // Description: Command definitions for Rich Text Editing. // namespace System.Windows.Documents { - using System.Windows.Input; // Command - using System.ComponentModel; // TypeConverter - /// /// Command definitions for Rich Text Editing. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Figure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Figure.cs index a6f8565e465..8a4c3e7fc32 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Figure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Figure.cs @@ -7,8 +7,6 @@ // using System.ComponentModel; // TypeConverter -using System.Windows.Controls; // TextBlock -using MS.Internal; using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDSBuilder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDSBuilder.cs index 5436049845f..ba756ac878a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDSBuilder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDSBuilder.cs @@ -2,6 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Controls; +using System.Windows.Markup; +using System.Windows.Shapes; +using System.Windows.Documents.DocumentStructures; +using Ds = System.Windows.Documents.DocumentStructures; +using System.Collections; + // // Description: // FixedTextBuilder contains heuristics to map fixed document elements @@ -10,21 +17,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System.Windows.Controls; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Markup; - using System.Windows.Shapes; - using System.Windows.Documents.DocumentStructures; - using Ds=System.Windows.Documents.DocumentStructures; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Text; - //===================================================================== /// /// FixedTextBuilder contains heuristics to map fixed document elements diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDocument.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDocument.cs index 5d3067c3884..695ad26237f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDocument.cs @@ -2,6 +2,25 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; // DoubleUtil +using MS.Internal.Documents; +using System.Windows.Threading; // Dispatcher +using System.Windows.Automation.Peers; // AutomationPeer +using System.Windows.Documents.DocumentStructures; +using System.Windows.Media; // Visual +using System.Windows.Markup; // IAddChild, ContentPropertyAttribute +using System.IO; +using System.IO.Packaging; +using System.Collections; +using System.ComponentModel; // DesignerSerializationVisibility +using System.Globalization; +using MS.Internal.Annotations.Component; +using System.Windows.Navigation; +using System.Windows.Controls; +using MS.Internal.IO.Packaging; + +using PackUriHelper = System.IO.Packaging.PackUriHelper; + // // Description: // Implements the FixedDocument element @@ -10,36 +29,6 @@ namespace System.Windows.Documents { - using MS.Internal; // DoubleUtil - using MS.Internal.Documents; - using MS.Utility; // ExceptionStringTable - using MS.Internal.Utility; - using System.Windows.Threading; // Dispatcher - using System.Windows; // DependencyID etc. - using System.Windows.Automation.Peers; // AutomationPeer - using System.Windows.Documents; // DocumentPaginator - using System.Windows.Documents.DocumentStructures; - using System.Windows.Media; // Visual - using System.Windows.Markup; // IAddChild, ContentPropertyAttribute - using System.Windows.Shapes; // Glyphs - using System; - using System.IO; - using System.IO.Packaging; - using System.Net; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; // DesignerSerializationVisibility - using System.Diagnostics; - using System.Globalization; - using System.Runtime.Serialization.Formatters.Binary; - using MS.Internal.Annotations.Component; - using System.Windows.Navigation; - using System.Windows.Controls; - using System.Text; - using MS.Internal.IO.Packaging; - using System.Security; - - using PackUriHelper = System.IO.Packaging.PackUriHelper; //===================================================================== /// /// FixedDocument is the spine of a portable, high fidelity fixed-format diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedElement.cs index d9c20f4eacd..7adedffafcf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedElement.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Markup; // for XmlLanguage +using System.Windows.Navigation; +using System.Globalization; +using System.Text; + // // Description: // FixedElement represents a flow element/object in the Fixed Document. @@ -9,22 +17,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Controls; - using System.Windows.Shapes; - using System.Windows.Markup; // for XmlLanguage - using System.Windows.Media; - using System.Windows.Navigation; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Text; - using System.Security; - /// /// FixedElement represents a flow element/object in the Fixed Document. /// Its children collection is used for DependencyProperty evaluation. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFindEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFindEngine.cs index 99fabb73398..506ee22f5f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFindEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFindEngine.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; +using System.Xml; +using System.Text; +using System.Globalization; +using System.Windows.Markup; + // // Description: // Implements fast, paginated search functionality for Fixed documents @@ -10,14 +16,6 @@ namespace System.Windows.Documents { - using System; - using System.IO; - using System.Xml; - using System.Text; - using System.Globalization; - using System.Diagnostics; - using System.Windows.Markup; - internal sealed class FixedFindEngine { //Searches for the specified pattern and updates start *or* end pointers depending on search direction diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFlowMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFlowMap.cs index 63881d59f0e..fe3a843220a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFlowMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedFlowMap.cs @@ -2,20 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; + // // Description: Implements Fixed/Flow structural mapping // namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Diagnostics; - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.Text; - //-------------------------------------------------------------------- // // Internal Enums diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHighlight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHighlight.cs index 41537f64659..24e7a8bffbd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHighlight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHighlight.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Windows.Media; // Brush +using System.Windows.Media.TextFormatting; // CharacterHit +using System.Windows.Shapes; // Glyphs +using System.Windows.Controls; // Image + // // Description: // Implements FixedHighlight @@ -9,17 +15,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows.Media; // Brush - using System.Windows.Media.TextFormatting; // CharacterHit - using System.Windows.Shapes; // Glyphs - using System.Windows.Controls; // Image - - - //===================================================================== /// /// FixedHighlight represents partial glyph run that is highlighted on a fixed document. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHyperlink.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHyperlink.cs index f277ac9d73b..dbccfd75266 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHyperlink.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedHyperlink.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Navigation; + // // Description: // Implements the help class of FixedHyperLink. @@ -9,17 +11,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows.Threading; - using System.Windows.Markup; - using System.Windows.Navigation; - using System.Windows.Media; - /// /// The IFixedNavigate interface will be implemented by FixedPage, FixedDocument, /// and FixedDocumentSequence to support fixed hyperlink. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedLineResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedLineResult.cs index 6979155269d..4615c4e4d8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedLineResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedLineResult.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; + // // Description: // FixedLineResult represents a per-line layout info for a fixe page @@ -9,13 +11,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - - //===================================================================== /// /// FixedLineResult represents a per-line layout info for a fixe page diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedNode.cs index cf662d10fbd..2884bec0101 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedNode.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; +using System.Text; + // // Description: // FixedNode is an immutable type that represents a fast and @@ -12,11 +15,6 @@ namespace System.Windows.Documents { - using System; - using System.Diagnostics; - using System.Globalization; - using System.Text; - //===================================================================== /// /// FixedNode is an immutable type that represents a fast and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPage.cs index b4c863bcfbc..6bbb43088f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPage.cs @@ -2,6 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; +using System.ComponentModel; +using System.Windows.Controls; +using System.Windows.Documents.DocumentStructures; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Navigation; +using System.Windows.Shapes; +using MS.Internal.Documents; +using MS.Internal.Utility; + +using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; + // // Description: // Implements the FixedPage element @@ -10,28 +24,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.Globalization; - using System.IO.Packaging; - using System.Text; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Documents.DocumentStructures; - using System.Windows.Input; - using System.Windows.Markup; - using System.Windows.Media; - using System.Windows.Navigation; - using System.Windows.Shapes; - using MS.Internal; - using MS.Internal.Documents; - using MS.Internal.Utility; - - using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; - //===================================================================== /// /// FixedPage is the container element for a metafile that represents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPageStructure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPageStructure.cs index 1217aff1388..0d0ea32ab24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPageStructure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPageStructure.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; +using System.Windows.Shapes; +using System.Windows.Controls; +using MS.Internal.Documents; +using CultureInfo = System.Globalization.CultureInfo; + // // Description: // FixedPageStructure represents deduced information (such as boundary, @@ -10,18 +16,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows.Media; - using System.Windows.Shapes; - using System.Windows.Controls; - using System.Windows.Markup; - using System.Windows.Documents.DocumentStructures; - using MS.Internal.Documents; - using CultureInfo = System.Globalization.CultureInfo; - //===================================================================== /// /// FixedPageStructure represents deduced information (such as boundary, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPosition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPosition.cs index 2601fd972d8..ff33970b4de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPosition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedPosition.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; + // // Description: // FixedPosition represents a hit-testable position in a fixed document's tree. @@ -9,13 +11,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - - //===================================================================== /// /// FixedPosition represents a hit-testable position in a fixed document's tree. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMContainer.cs index a6892dee313..aac5dd9af41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMContainer.cs @@ -9,10 +9,6 @@ namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows.Media; - internal abstract class FixedSOMContainer :FixedSOMSemanticBox, IComparable { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMElement.cs index 6fcb21d82c0..bd9be43c9c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMElement.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; +using System.Windows.Shapes; +using System.Windows.Controls; + /*++ Description: Abstract class that provides a common base class for all non-container semantic elements. @@ -11,13 +15,6 @@ namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Shapes; - using System.Windows.Controls; - internal abstract class FixedSOMElement : FixedSOMSemanticBox { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMFixedBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMFixedBlock.cs index 67206c6163a..bc202e28dcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMFixedBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMFixedBlock.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; +using System.Text; + /*++ Description: This class reprsents a table row on the page. It would contain several table cells @@ -9,13 +12,6 @@ This class reprsents a table row on the page. It would contain several table cel namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Generic; - using System.Windows.Media; - using System.Globalization; - using System.Diagnostics; - using System.Text; - internal sealed class FixedSOMFixedBlock : FixedSOMPageElement { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMGroup.cs index 8b63f4d8da4..b6d983b5ab9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMGroup.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; + /*++ Description: A concrete container that can be used to put together to group different or same types of containers @@ -9,12 +11,6 @@ A concrete container that can be used to put together to group different or same namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows.Media; - using System.Globalization; - - internal class FixedSOMGroup :FixedSOMPageElement, IComparable { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMImage.cs index d84c716d0ca..b6b998d0213 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMImage.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + /*++ Description: SOM object that wraps an image on the page. The corresponding markup element can be either an image or @@ -10,14 +16,6 @@ a Path with an ImageBrush namespace System.Windows.Documents { - using System.Windows.Automation; - using System.Windows.Controls; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Shapes; - using System.Globalization; - using System.Diagnostics; - internal sealed class FixedSOMImage : FixedSOMElement { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineCollection.cs index 89a768c5aa4..b0272a01b92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineCollection.cs @@ -10,17 +10,11 @@ These ranges are used in construction of FixedBlocks and Tables namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Windows.Shapes; - using System.Windows.Media; - using System.Diagnostics; - using System.Windows; - //Stores a collection of horizontal and vertical lines sorted by y and x axis respectively // Needs performance review: It might be better to use a list while creating FixedSOMLineRanges and then convert them to an array //when consuming them, i.e. determinining separation etc. We are doing lots of indexed access at this stage - + internal sealed class FixedSOMLineCollection { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineRanges.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineRanges.cs index f8b62783c40..10714acc2c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineRanges.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMLineRanges.cs @@ -9,13 +9,6 @@ Internal helper class that can store a set of sorted lines by their start and en namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Generic; - using System.Windows.Shapes; - using System.Windows.Controls; - using System.Diagnostics; - using System.Windows.Media; - internal class FixedSOMLineRanges { public void AddRange(double start, double end) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPage.cs index 94bf31b4127..cc19cf68d8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPage.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Markup; // for XmlLanguage +using System.Windows.Media; +using System.Globalization; + /*++ Description: A semantic container that contains all the first-level containers on the page @@ -9,13 +13,6 @@ A semantic container that contains all the first-level containers on the page namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Generic; - using System.Windows.Markup; // for XmlLanguage - using System.Windows.Media; - using System.Globalization; - using System.Diagnostics; - internal sealed class FixedSOMPage: FixedSOMContainer { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageConstructor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageConstructor.cs index 708a098ae22..468c0fb6217 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageConstructor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageConstructor.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Shapes; +using System.Windows.Controls; +using System.Windows.Media; + /*++ Description: This class is responsible for algorithmically reconstructing a semantic object model (SOM) @@ -10,15 +14,6 @@ namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Generic; - using System.Windows.Shapes; - using System.Windows.Controls; - using System.Diagnostics; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Globalization; - #region GeometryAnalyzer /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageElement.cs index 001a5a0face..b0f08b22dbb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMPageElement.cs @@ -9,9 +9,7 @@ namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Diagnostics; - + internal abstract class FixedSOMPageElement :FixedSOMContainer { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMSemanticBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMSemanticBox.cs index f1ee5289d1c..ecfd8af619c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMSemanticBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMSemanticBox.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; + /*++ Description: This class is the abstract base class for all the objects in SOM. It consists of a bounding rectangle, and @@ -10,12 +12,6 @@ implements IComparable interface to figure out content ordering on the page namespace System.Windows.Documents { - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Windows.Media; - using System.Windows.Markup; - internal abstract class FixedSOMSemanticBox : IComparable { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTable.cs index 85ab58a6e2f..60a7831f3b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTable.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; + /*++ Description: This class reprsents a table on the page @@ -9,13 +11,6 @@ This class reprsents a table on the page namespace System.Windows.Documents { - using System.Windows.Shapes; - using System.Windows.Media; - using System.Windows.Markup; - using System.Diagnostics; - using System.Windows; - using System.Globalization; - internal sealed class FixedSOMTable : FixedSOMPageElement { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableCell.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableCell.cs index ae07f016e22..68c2ccac088 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableCell.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableCell.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; + /*++ Description: This class reprsents a table cell on the page. Objects of this class would contain @@ -10,12 +12,6 @@ This class reprsents a table cell on the page. Objects of this class would conta namespace System.Windows.Documents { - using System.Windows.Shapes; - using System.Windows.Media; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - internal sealed class FixedSOMTableCell : FixedSOMContainer { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableRow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableRow.cs index a49eda092ba..964be5d147e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableRow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTableRow.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Media; + /*++ Description: This class reprsents a table row on the page. It would contain several table cells @@ -9,12 +11,6 @@ This class reprsents a table row on the page. It would contain several table cel namespace System.Windows.Documents { - using System.Windows.Shapes; - using System.Windows.Media; - using System.Globalization; - using System.Diagnostics; - using System.Windows; - internal sealed class FixedSOMTableRow : FixedSOMContainer { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTextRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTextRun.cs index a2df2d8cd73..8088e574dd9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTextRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSOMTextRun.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Markup; // for XmlLanguage +using System.Windows.Media; +using System.Globalization; + /*++ Description: This class represents a (partial) Glyphs element on the page. Most of the time it will be a full glyphs element @@ -10,14 +14,6 @@ Partial elements are necessary when we decide that a single Glyphs element repre namespace System.Windows.Documents { - using System.Windows.Shapes; - using System.Windows.Markup; // for XmlLanguage - using System.Windows.Media; - using System.Diagnostics; - using System.Globalization; - using System.Windows; - using System.Collections.Generic; - //a set of characters that have the same font, face and size internal sealed class FixedSOMTextRun : FixedSOMElement, IComparable { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSchema.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSchema.cs index c1f5e67f217..7b889b624ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSchema.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSchema.cs @@ -4,27 +4,18 @@ #region Using directives -using System; using System.Collections; -using System.Collections.Generic; using System.Text; -using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.Markup; using System.Xml; using System.IO; using System.IO.Packaging; -using System.Xml.Schema; -using System.Net; using System.Resources; using System.Reflection; -using System.Globalization; -using System.Security; using MS.Internal; #endregion -using InternalPackUriHelper = MS.Internal.IO.Packaging.PackUriHelper; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextBuilder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextBuilder.cs index 5f62fd2086d..2fff300666f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextBuilder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextBuilder.cs @@ -2,6 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Windows.Controls; // UIElementCollection +using System.Windows.Media; +using System.Windows.Automation; +using System.Windows.Documents.DocumentStructures; +using System.Collections; +using System.Globalization; +using System.Text; +using System.IO; +using System.Xml; +using Path = System.Windows.Shapes.Path; + +using MS.Utility; + // // Description: // FixedTextBuilder contains heuristics to map fixed document elements @@ -10,26 +24,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System.Windows.Controls; // UIElementCollection - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Markup; - using System.Windows.Shapes; // Glyphs - using System.Windows.Automation; - using System.Windows.Documents.DocumentStructures; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Text; - using System.IO; - using System.Xml; - using Path=System.Windows.Shapes.Path; - - using MS.Utility; - //===================================================================== /// /// FixedTextBuilder contains heuristics to map fixed document elements diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextContainer.cs index f5b59187d6b..d016a22fcca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextContainer.cs @@ -2,6 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Shapes; +using System.Collections; + // // Description: // Implements the FixedTextContainer @@ -11,21 +17,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.Documents; - using MS.Utility; - using System.Windows; // DependencyID etc. - using System.Windows.Controls; - using System.Windows.Media; - using System.Windows.Markup; - using System.Windows.Shapes; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Text; - using System.Windows.Threading; // Dispatcher - //===================================================================== /// /// FixedTextContainer is an implementaiton of TextContainer for Fixed Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextPointer.cs index 38ab06a2e18..2c30ba8561d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextPointer.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: // FixedTextPointer is an implementation of TextPointer/TextNavigator @@ -13,13 +15,6 @@ namespace System.Windows.Documents { - using MS.Utility; - using System.Windows; - using System; - using System.Diagnostics; - using MS.Internal; - - /// /// FixedTextPointer is an implementation of TextPointer/TextNavigator /// for Fixed Document. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextView.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextView.cs index 56320f84dba..a1f169470fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextView.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedTextView.cs @@ -2,28 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Collections; +using System.Collections.ObjectModel; +using System.Windows.Controls; +using System.Windows.Shapes; +using System.Windows.Media; +using System.Windows.Media.TextFormatting; // CharacterHit + // // Description: TextView implementation for FixedDocument. // namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.Documents; - using MS.Internal.Media; - using MS.Utility; - using System.Collections; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Diagnostics; - using System.Windows.Documents; - using System.Windows.Controls; - using System.Windows.Shapes; - using System.Windows.Media; - using System.Windows.Media.TextFormatting; // CharacterHit - using System; - - /// /// TextView for each individual FixedDocumentPage /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Floater.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Floater.cs index 2551fc63168..653597545ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Floater.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Floater.cs @@ -7,7 +7,6 @@ // using System.ComponentModel; -using MS.Internal; using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowNode.cs index ff22ba43dc1..7c7db1ef67d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowNode.cs @@ -11,9 +11,6 @@ namespace System.Windows.Documents { - using System; - using System.Diagnostics; - //===================================================================== /// /// FlowNode represents a structural node in the Flow Order of a fixed document. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowPosition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowPosition.cs index bee322e2f02..fa80a1e1245 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowPosition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FlowPosition.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Collections; +using System.Globalization; +using System.Windows.Controls; + // // Description: // FlowPosition represents a navigational position in a document's content flow. @@ -9,15 +14,6 @@ namespace System.Windows.Documents { - using MS.Internal.Documents; - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - using System.Windows.Controls; - - - //===================================================================== /// /// FlowPosition represents a navigational position in a document's content flow. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkRichTextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkRichTextComposition.cs index 7cf60801c25..3a3cdea31df 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkRichTextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkRichTextComposition.cs @@ -6,10 +6,6 @@ // Description: the TextComposition class // -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Input; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkTextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkTextComposition.cs index a1bd4e8f778..37d31d14193 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkTextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FrameworkTextComposition.cs @@ -8,12 +8,8 @@ using MS.Internal; using MS.Win32; -using System; -using System.Diagnostics; using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Input; -using System.Security; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Glyphs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Glyphs.cs index 31edad01645..bb46398a91b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Glyphs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Glyphs.cs @@ -8,27 +8,14 @@ // Spec: Glyphs element and GlyphRun object.htm // -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.IO; -using System.Windows.Threading; - - -using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Windows.Markup; using System.ComponentModel; -using System.Security; - -using MS.Utility; -using MS.Internal.Navigation; using MS.Internal.Utility; -using MS.Internal; -using BuildInfo=MS.Internal.PresentationFramework.BuildInfo; +using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightChangedEventHandler.cs index 64c11a638a1..56975e0454c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightChangedEventHandler.cs @@ -6,8 +6,6 @@ // Description: HighlightLayer.Changed event handler. // -using System.Collections; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightLayer.cs index 1101bfeec43..75cc86416ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightLayer.cs @@ -6,8 +6,6 @@ // Description: A group of non-overlapping text highlights with a single owner. // -using System.Collections; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightVisual.cs index 60595b7cf8f..a136c873d94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/HighlightVisual.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using System.Windows.Media; // Visual +using System.Collections; + // // Description: // Implements the HighlightVisual element for rendering highlight for fixed @@ -10,20 +14,6 @@ namespace System.Windows.Documents { - using MS.Internal; // DoubleUtil - using MS.Internal.Documents; - using MS.Utility; // ExceptionStringTable - using System.ComponentModel; - using System.Windows.Threading; // Dispatcher - using System.Windows; // DependencyID etc. - using System.Windows.Media; // Visual - using System.Windows.Shapes; // Glyphs - using System; - using System.Collections; - using System.IO; - using System.Diagnostics; - - internal sealed class HighlightVisual : Adorner { //-------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Highlights.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Highlights.cs index 4dec01f9cff..e4b4de396d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Highlights.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Highlights.cs @@ -7,7 +7,6 @@ // using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Hyperlink.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Hyperlink.cs index a645154eb98..4ef38efc19e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Hyperlink.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Hyperlink.cs @@ -8,22 +8,16 @@ // using System.ComponentModel; -using System.Diagnostics; -using System.IO.Packaging; -using System.Security; -using System.Text; using System.Windows.Automation.Peers; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Navigation; using System.Windows.Shapes; -using MS.Internal; using MS.Internal.AppModel; using System.Windows.Threading; -using CommonDependencyProperty=MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; -using SecurityHelper=MS.Internal.PresentationFramework.SecurityHelper; +using CommonDependencyProperty = MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextContainer.cs index 1be9687e92e..5ff35ce7d43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextContainer.cs @@ -6,7 +6,6 @@ // Description: An abstract interface describing a linear text document. // -using System; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextPointer.cs index 9b6cddcc468..245736fc26d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextPointer.cs @@ -8,8 +8,6 @@ namespace System.Windows.Documents { - using System; - // Abstract version of TextPointer. It has full read-only support for // rich content, but only supports plain text editing. internal interface ITextPointer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextRange.cs index ca8497c381a..67a11e38c3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextRange.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; + // // Description: A part of abstract layer of TextOM. // Defines an abstraction for a TextRange. @@ -15,12 +17,6 @@ namespace System.Windows.Documents { - using System.Diagnostics; - using System.Collections.Generic; - using System.Threading; - using System.Globalization; - using System.IO; - /// /// A class a portion of text content. /// Can be contigous or disjoint; supports rectangular table ranges. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextSelection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextSelection.cs index 75876c7e848..76929af2a1d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextSelection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ITextSelection.cs @@ -10,14 +10,6 @@ namespace System.Windows.Documents { - using System.Diagnostics; - using System.Collections.Generic; - using System.Globalization; - using System.Windows.Input; - using System.Threading; - using MS.Internal.Documents; - using MS.Win32; - /// /// The TextSelection class encapsulates selection state for the TextEditor /// class. It has no public constructor, but is exposed via a public property diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ImmComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ImmComposition.cs index c243e9a4896..931aefdf4cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ImmComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ImmComposition.cs @@ -7,21 +7,13 @@ // This class handles IMM32 IME's composition string and support level 3 input to TextBox and RichTextBox. // -using System; using System.Runtime.InteropServices; -using System.Threading; using System.Collections; -using System.Diagnostics; using System.Windows.Media; using System.Windows.Input; -using System.Windows.Documents; using System.Windows.Interop; -using System.Windows.Threading; -using System.Security; -using System.Text; using MS.Win32; using MS.Internal.Documents; -using MS.Internal.PresentationFramework; using MS.Internal; using MS.Internal.Interop; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineCollection.cs index e0ee3bf5622..23f2e569603 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineCollection.cs @@ -2,17 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Markup; // ContentWrapper +using System.Windows.Controls; // TextBlock +using System.Collections; + // // Description: Collection of Inline elements // namespace System.Windows.Documents { - using MS.Internal; // Invariant - using System.Windows.Markup; // ContentWrapper - using System.Windows.Controls; // TextBlock - using System.Collections; - /// /// Collection of Inline elements - elements allowed as children /// of Paragraph, Span and TextBlock elements. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineUIContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineUIContainer.cs index 35f9b9005cc..802f35a2e02 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineUIContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InlineUIContainer.cs @@ -7,12 +7,10 @@ // flow content inline collections // -using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Markup; // XamlDesignerSerializationManager -using MS.Internal; using MS.Internal.Documents; -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// InlineUIContainer - a wrapper for embedded UIElements in text diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InputScopeAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InputScopeAttribute.cs index 314582057d2..60b57d8af88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InputScopeAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/InputScopeAttribute.cs @@ -7,16 +7,8 @@ // Description: InputScopeAttribute is an image object that links IOleDataObject. // -using System; -using System.Security; using System.Runtime.InteropServices; -using System.Windows.Threading; - -using System.Diagnostics; -using System.Windows.Media; using System.Windows.Input; -using System.Windows.Documents; -using System.Windows.Controls; using MS.Win32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/LinkTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/LinkTarget.cs index acecd64297f..3c51a4ac8bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/LinkTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/LinkTarget.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; + // // Description: // Implements the LinkTargetCollection as holder for a collection @@ -10,15 +12,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows.Threading; - using System.Windows.Markup; - //===================================================================== /// /// LinkTarget is the class that keep name that a named element exist in document diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItem.cs index 7d5256b11ef..34889e5b3c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItem.cs @@ -8,12 +8,11 @@ // such as bullets and numbering. // -using MS.Internal; // Invariant using System.Windows.Markup; // ContentProperty using System.ComponentModel; // TypeConverter using System.Windows.Media; // Brush -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// ListItem acts by default like a Paragraph, but with different diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItemCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItemCollection.cs index 5ca4e1c7e36..d819ef06b6e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItemCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ListItemCollection.cs @@ -8,8 +8,6 @@ namespace System.Windows.Documents { - using MS.Internal; // Invariant - /// /// Collection of ListItem elements /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MoveSizeWinEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MoveSizeWinEventHandler.cs index e808db56b56..d5852d0f0b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MoveSizeWinEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MoveSizeWinEventHandler.cs @@ -6,10 +6,8 @@ // Description: MoveSizeWinEventHandler implementation. // -using System; using System.Collections; using System.Runtime.InteropServices; -using System.Security; using MS.Win32; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/RCW.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/RCW.cs index 35d94102058..d35ccfe34a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/RCW.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/RCW.cs @@ -6,10 +6,8 @@ // Description: RCW for ISpellChecker and related COM types. // -using System; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -using System.Security; /// /// RCW for spellcheck.idl found in Windows SDK diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/OptionDescription.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/OptionDescription.cs index 8544c6c1fc0..70fec628daa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/OptionDescription.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/OptionDescription.cs @@ -8,15 +8,11 @@ // that is expressed in terms of .NET types. // -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Security; +using IOptionDescription = System.Windows.Documents.MsSpellCheckLib.RCW.IOptionDescription; namespace System.Windows.Documents.MsSpellCheckLib { - using IOptionDescription = RCW.IOptionDescription; - internal partial class SpellChecker { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellChecker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellChecker.cs index 98d597617d8..22c31083a4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellChecker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellChecker.cs @@ -8,21 +8,18 @@ // resilience against out-of-proc COM server failures. // -using System.Collections.Generic; using System.ComponentModel; using System.Runtime.InteropServices; -using System.Security; +using ISpellChecker = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellChecker; +using IEnumString = System.Windows.Documents.MsSpellCheckLib.RCW.IEnumString; +using ISpellCheckerChangedEventHandler = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellCheckerChangedEventHandler; +using IOptionDescription = System.Windows.Documents.MsSpellCheckLib.RCW.IOptionDescription; +using IEnumSpellingError = System.Windows.Documents.MsSpellCheckLib.RCW.IEnumSpellingError; namespace System.Windows.Documents { namespace MsSpellCheckLib { - using ISpellChecker = RCW.ISpellChecker; - using IEnumString = RCW.IEnumString; - using ISpellCheckerChangedEventHandler = RCW.ISpellCheckerChangedEventHandler; - using IOptionDescription = RCW.IOptionDescription; - using IEnumSpellingError = RCW.IEnumSpellingError; - /// /// This type encapsulates services provided by RCW.ISpellChecker interface and provides /// a resilient (to out-of-proc COM server failures) interface to callers. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventArgs.cs index 4ec1876f86b..8454a757a0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventArgs.cs @@ -6,8 +6,6 @@ // Description: EventArgs class that supports SpellCheckerChangedEventHandler. // -using System; - namespace System.Windows.Documents { namespace MsSpellCheckLib diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventHandler.cs index d04a4eb4800..d951ec1fc47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellCheckerChangedEventHandler.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using ISpellChecker = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellChecker; +using ISpellCheckerChangedEventHandler = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellCheckerChangedEventHandler; + // // Description: An implementation of ISpellCheckerChangedEventHandler // that is exposed by MsSpellCheckLib.RCW. @@ -15,9 +18,6 @@ namespace System.Windows.Documents { namespace MsSpellCheckLib { - using ISpellChecker = RCW.ISpellChecker; - using ISpellCheckerChangedEventHandler = RCW.ISpellCheckerChangedEventHandler; - internal partial class SpellChecker { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellingError.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellingError.cs index 107d1abe85a..457d313e0f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellingError.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellChecker/SpellingError.cs @@ -11,15 +11,11 @@ // is CorrectiveAction.GetSuggestions. // -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Security; +using ISpellingError = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellingError; namespace System.Windows.Documents.MsSpellCheckLib { - using ISpellingError = RCW.ISpellingError; - internal partial class SpellChecker { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerCreationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerCreationHelper.cs index e34e6803085..309432e45b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerCreationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerCreationHelper.cs @@ -10,8 +10,6 @@ // using MS.Internal; -using System.Collections.Generic; -using System.Security; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerFactory.cs index ad617e96ea1..ae8aa2e1015 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/SpellCheckerFactory/SpellCheckerFactory.cs @@ -11,22 +11,18 @@ // COM types to .NET types. // -using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Reflection; -using System.Security; using MS.Internal; +using ISpellChecker = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellChecker; +using ISpellCheckerFactory = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellCheckerFactory; +using IUserDictionariesRegistrar = System.Windows.Documents.MsSpellCheckLib.RCW.IUserDictionariesRegistrar; +using SpellCheckerFactoryClass = System.Windows.Documents.MsSpellCheckLib.RCW.SpellCheckerFactoryClass; namespace System.Windows.Documents { namespace MsSpellCheckLib { - using ISpellChecker = RCW.ISpellChecker; - using ISpellCheckerFactory = RCW.ISpellCheckerFactory; - using IUserDictionariesRegistrar = RCW.IUserDictionariesRegistrar; - using SpellCheckerFactoryClass = RCW.SpellCheckerFactoryClass; - /// /// Encapsulation of RCW.ISpellCheckerFactory and RCW.IUserDictionariesRegistrar funcionalities /// and provides a resilient (to out-of-proc COM server failures) interface to callers. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/ChangeNotifyWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/ChangeNotifyWrapper.cs index e877d6cea12..e86e17b9cb8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/ChangeNotifyWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/ChangeNotifyWrapper.cs @@ -6,7 +6,6 @@ // Description: See below. // -using System; using System.ComponentModel; /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/Extensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/Extensions.cs index b43310ac147..fd342520f3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/Extensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/Extensions.cs @@ -6,21 +6,16 @@ // Description: Extension methods for use with MsSpellCheckLib.RCW interfaces // -using System; -using System.Collections.Generic; -using System.Reflection; using System.Runtime.InteropServices; -using System.Security; +using IEnumString = System.Windows.Documents.MsSpellCheckLib.RCW.IEnumString; +using IEnumSpellingError = System.Windows.Documents.MsSpellCheckLib.RCW.IEnumSpellingError; +using ISpellingError = System.Windows.Documents.MsSpellCheckLib.RCW.ISpellingError; + +using SpellingError = System.Windows.Documents.MsSpellCheckLib.SpellChecker.SpellingError; +using CorrectiveAction = System.Windows.Documents.MsSpellCheckLib.SpellChecker.CorrectiveAction; namespace System.Windows.Documents.MsSpellCheckLib { - using IEnumString = RCW.IEnumString; - using IEnumSpellingError = RCW.IEnumSpellingError; - using ISpellingError = RCW.ISpellingError; - - using SpellingError = SpellChecker.SpellingError; - using CorrectiveAction = SpellChecker.CorrectiveAction; - /// /// Extension methods for use with MsSpellCheckLib.RCW interfaces /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/RetryHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/RetryHelper.cs index 37415954a82..d7536691484 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/RetryHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/MsSpellCheckLib/Utils/RetryHelper.cs @@ -6,9 +6,6 @@ // Description: See for RetryHelper class below. // -using System; -using System.Collections.Generic; -using System.Reflection; using MS.Internal; namespace System.Windows.Documents.MsSpellCheckLib diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NLGSpellerInterop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NLGSpellerInterop.cs index 4231671f8bb..cb62e4448b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NLGSpellerInterop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NLGSpellerInterop.cs @@ -2,6 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using MS.Internal; +using MS.Win32; +using System.Globalization; +using System.Windows.Controls; +using MS.Internal.PresentationFramework; + // // Description: Custom COM marshalling code and interfaces for interaction // with the Natural Language Group's nl6 proofing engine. @@ -9,17 +16,6 @@ namespace System.Windows.Documents { - using System.Collections; - using System.Runtime.InteropServices; - using MS.Internal; - using MS.Win32; - using System.Globalization; - using System.Security; - using System.IO; - using System.Collections.Generic; - using System.Windows.Controls; - using MS.Internal.PresentationFramework; - // Custom COM marshalling code and interfaces for interaction // with the Natural Language Group's nl6 proofing engine. internal class NLGSpellerInterop : SpellerInteropBase diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NaturalLanguageHyphenator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NaturalLanguageHyphenator.cs index b81111a53b1..e6c970c05d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NaturalLanguageHyphenator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NaturalLanguageHyphenator.cs @@ -9,15 +9,11 @@ // NaturalLanguage6.dll - the component owned by the Natural Language Team. // -using System.Security; -using System.Collections; using System.Globalization; -using System.IO; using System.Runtime.InteropServices; using System.Windows.Media.TextFormatting; -using MS.Win32; using MS.Internal; -using DllImport=MS.Internal.PresentationFramework.DllImport; +using DllImport = MS.Internal.PresentationFramework.DllImport; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextContainer.cs index a1ba0087b57..3274397404d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextContainer.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.Documents; +using MS.Internal; + // // Description: // NullTextContainer is an immutable empty TextContainer that contains @@ -11,13 +14,6 @@ namespace System.Windows.Documents { - using System; - using System.Diagnostics; - using System.Windows.Threading; - using System.Windows; // DependencyID etc. - using MS.Internal.Documents; - using MS.Internal; - //===================================================================== /// /// NullTextContainer is an immutable empty TextContainer that contains diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextNavigator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextNavigator.cs index 7647e31ef23..f7334710a28 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextNavigator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/NullTextNavigator.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: // TextNavigator implementation for NullTextContainer @@ -12,11 +14,6 @@ namespace System.Windows.Documents { - using System; - using System.Diagnostics; - using System.Windows; - using MS.Internal; - /// /// NullTextPointer is an implementation of ITextPointer for NullTextContainer /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContent.cs index 0b7caa04827..7061dcf86fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContent.cs @@ -2,6 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using MS.Internal.Utility; +using System.Windows.Navigation; +using System.Windows.Markup; +using System.Windows.Threading; // Dispatcher +using System.Collections.Specialized; +using System.ComponentModel; +using System.IO; + +using MS.Utility; + // // Description: // Implements the PageContent element @@ -9,32 +21,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.Documents; - using MS.Internal.Utility; - using MS.Internal.Navigation; - using MS.Internal.PresentationFramework; // SecurityHelper - using System.Reflection; - using System.Windows; // DependencyID etc. - using System.Windows.Controls; - using System.Windows.Media; - using System.Windows.Navigation; - using System.Windows.Markup; - using System.Windows.Threading; // Dispatcher - using System; - using System.Collections.Specialized; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using System.IO.Packaging; - using System.Net; - using System.Security; - using System.Globalization; - - using MS.Utility; - //===================================================================== /// /// PageContent is the class that references or directly hosts a page stream. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentAsyncResult.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentAsyncResult.cs index 7d6b2332316..d29e746bad5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentAsyncResult.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentAsyncResult.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; +using System.Windows.Threading; +using System.Threading; + // // Description: // Implements the PageContentAsyncResult @@ -9,22 +13,6 @@ namespace System.Windows.Documents { - using System; - using System.Diagnostics; - using System.IO; - using System.Windows.Threading; - using System.Threading; - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.Utility; - using MS.Internal.Navigation; - using MS.Utility; - using System.Reflection; - using System.Windows.Controls; - using System.Windows.Markup; - using System.Net; - using System.IO.Packaging; - /// /// IAsyncResult for GetPageAsync. This item is passed around and queued up during various /// phase of async call. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentCollection.cs index 4510738e820..787a9dfd0a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PageContentCollection.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; + // // Description: // Implements the PageContentCollection element @@ -9,13 +11,6 @@ namespace System.Windows.Documents { - using System; - using System.Collections.Generic; - using System.Collections; - using System.Diagnostics; - using System.Windows.Markup; - - //===================================================================== /// /// PageContentCollection is an ordered collection of PageContent diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PrecursorTextChangeType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PrecursorTextChangeType.cs index e8fbe4bd4e9..606f6c3e422 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PrecursorTextChangeType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PrecursorTextChangeType.cs @@ -6,10 +6,6 @@ // Description: // -using System; -using System.Windows; -using System.Collections; - namespace System.Windows.Documents { // These are possible changes added to a change list. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PropertyRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PropertyRecord.cs index 41842b298b4..cea2197a84f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PropertyRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/PropertyRecord.cs @@ -6,8 +6,6 @@ // Description: DependencyProperty/value pair struct used by TextContainer undo. // -using System; - namespace System.Windows.Documents { // This struct records DependencyProperty/value pairs. We use the struct diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RangeContentEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RangeContentEnumerator.cs index 86c5862464a..35cf1da3857 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RangeContentEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RangeContentEnumerator.cs @@ -7,12 +7,8 @@ // Description: IEnumerator for TextRange and TextElement content. // -using System; using System.Collections; using MS.Internal; -using System.Text; -using MS.Utility; -using System.Windows.Controls; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlLexer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlLexer.cs index 5c0ef9a8a48..0cf04312cf0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlLexer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlLexer.cs @@ -7,7 +7,6 @@ // using System.Collections; -using System.Diagnostics; using System.Globalization; using System.Text; using System.IO; // Stream diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlReader.cs index 9a347031b5d..2286785949b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RtfToXamlReader.cs @@ -7,7 +7,6 @@ // using System.Collections; -using System.Diagnostics; using System.Globalization; using System.Text; using System.IO; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RubberbandSelector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RubberbandSelector.cs index 6927e13aeea..d365b60faf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RubberbandSelector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/RubberbandSelector.cs @@ -3,27 +3,17 @@ // See the LICENSE file in the project root for more information. +using MS.Internal; // For Invariant.Assert +using MS.Internal.Documents; +using System.Windows.Controls; // Canvas +using System.Collections; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Media.TextFormatting; // CharacterHit +using System.Windows.Input; + namespace System.Windows.Documents { - using MS.Internal; // For Invariant.Assert - using MS.Internal.Documents; - using System.Windows; // DependencyID etc. - using System.Windows.Controls; // Canvas - using System.Collections; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Media.TextFormatting; // CharacterHit - using System.Windows.Shapes; // Glyphs - using System.Windows.Markup; - using System.Windows.Input; - using System.Threading; - using System; - using System.IO; - using System.Collections.Generic; - using System.Security ; - using System.Diagnostics; - - //===================================================================== /// /// Class has a function similar to that of TextEditor. It can be attached diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SelectionWordBreaker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SelectionWordBreaker.cs index 18c3ada3c5e..0e9025258a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SelectionWordBreaker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SelectionWordBreaker.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Win32; +using MS.Internal; // Invariant + // // Description: Word breaker used for TextSelection's auto-word selection and // ctl-arrow navigation. @@ -9,9 +12,6 @@ namespace System.Windows.Documents { - using MS.Win32; - using MS.Internal; // Invariant - // Word breaker used for TextSelection's auto-word selection and ctl-arrow // navigation. // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/ISerializerFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/ISerializerFactory.cs index 98e9ccec148..9a826ecb463 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/ISerializerFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/ISerializerFactory.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; + #if !DONOTREFPRINTINGASMMETA // // @@ -11,9 +13,6 @@ // namespace System.Windows.Documents.Serialization { - using System; - using System.IO; - /// /// ISerializerFactory is implemented by an assembly containing a plug-in serializer and provides /// functionality to instantiate the associated serializer diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs index d8beefc43f9..e051844f738 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; +using System.Reflection; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Win32; + #if !DONOTREFPRINTINGASMMETA // // @@ -11,16 +16,6 @@ // namespace System.Windows.Documents.Serialization { - using System; - using System.Globalization; - using System.Collections.Generic; - using System.Reflection; - using System.Windows; - using System.Security; - using System.Diagnostics.CodeAnalysis; - using Microsoft.Win32; - using MS.Internal.PresentationFramework; - /// /// SerializerDescriptor describes an individual plug-in serializer /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerProvider.cs index baa3fd76b2e..3bc3c8727a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerProvider.cs @@ -10,16 +10,10 @@ // See spec at // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; -using System.Reflection; -using System.Security; using System.Windows.Xps.Serialization; -using System.Diagnostics.CodeAnalysis; using Microsoft.Win32; -using MS.Internal.PresentationFramework; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriter.cs index 7f38a92b70a..0e4928cddb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriter.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Printing; +using System.Windows.Media; + #if !DONOTREFPRINTINGASMMETA // // Description: Plug-in document serializers implement this abstract class @@ -10,12 +13,6 @@ // namespace System.Windows.Documents.Serialization { - using System; - using System.Printing; - using System.Windows.Documents; - using System.Windows.Media; - using System.Security; - /// /// SerializerWriter is an abstract class that is implemented by plug-in document serializers /// Objects of this class are instantiated by SerializerProvider.Create diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterCollator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterCollator.cs index 79ed330c3c1..0bd7ac9f991 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterCollator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterCollator.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Printing; +using System.Windows.Media; + #if !DONOTREFPRINTINGASMMETA // // Description: Plug-in document serializers implement this abstract class @@ -10,11 +13,6 @@ // namespace System.Windows.Documents.Serialization { - using System; - using System.Printing; - using System.Windows.Media; - using System.Security; - /// /// SerializerWriterCollator is an abstract class that is implemented by plug-in document serializers /// Objects of this class are instantiated by SerializerWriter.CreateVisualCellator diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterEventHandlers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterEventHandlers.cs index 17e1c646fe5..534a16e8b0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterEventHandlers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerWriterEventHandlers.cs @@ -14,7 +14,6 @@ EventHandlers used with the XpsDocumentWriter and XPSEmitter classes. #if !DONOTREFPRINTINGASMMETA using System.Printing; #endif -using System.Security; namespace System.Windows.Documents.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Span.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Span.cs index 89ba555d64c..abf639616a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Span.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Span.cs @@ -7,11 +7,10 @@ // using MS.Internal; // Invariant.Assert -using System.Windows.Controls; // TextBlock using System.Windows.Markup; // ContentProperty using System.ComponentModel; // DesignerSerializationVisibility -namespace System.Windows.Documents +namespace System.Windows.Documents { /// /// Span element used for grouping other Inline elements. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Speller.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Speller.cs index a0f10b22c6d..7d282900966 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Speller.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Speller.cs @@ -2,27 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Threading; +using System.Windows.Threading; +using System.Globalization; +using System.Collections; +using System.Windows.Controls; +using System.Windows.Markup; // XmlLanguage +using System.Windows.Input; +using System.IO; +using System.Windows.Navigation; + // // Description: Spell checking component for the TextEditor. // namespace System.Windows.Documents { - using MS.Internal; - using System.Threading; - using System.Windows.Threading; - using System.Globalization; - using System.Collections; - using System.Collections.Generic; - using System.Security; - using System.Runtime.InteropServices; - using MS.Win32; - using System.Windows.Controls; - using System.Windows.Markup; // XmlLanguage - using System.Windows.Input; - using System.IO; - using System.Windows.Navigation; - // Spell checking component for the TextEditor. // Class is marked as partial to allow for definition of TextMapOffsetLogger in a separate // source file. When TextMapOffsetLogger is removed, the partial declaration can diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerError.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerError.cs index 5761d3ff301..df86d1cdd0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerError.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerError.cs @@ -2,17 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Documents; +using MS.Internal; + // // Description: A misspelled word in a TextBox or RichTextBox. // namespace System.Windows.Controls { - using System.Collections; - using System.Collections.Generic; - using System.Windows.Documents; - using MS.Internal; - /// /// A misspelled word in a TextBox or RichTextBox. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerHighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerHighlightLayer.cs index d0301a2e222..563976a1400 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerHighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerHighlightLayer.cs @@ -6,12 +6,9 @@ // Description: Highlight rendering for the Speller. // -using System; using MS.Internal; -using System.Windows.Documents; using System.Windows.Media; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerInteropBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerInteropBase.cs index 153a240079f..f1cfa2777d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerInteropBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerInteropBase.cs @@ -3,16 +3,11 @@ // See the LICENSE file in the project root for more information. +using System.Globalization; +using System.Windows.Controls; + namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.Reflection; - using System.Runtime.InteropServices; - using System.Security; - using System.Windows.Controls; - internal abstract class SpellerInteropBase: IDisposable { #region Internal Types diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerStatusTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerStatusTable.cs index eb765dab353..83fc08eeb51 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerStatusTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SpellerStatusTable.cs @@ -2,17 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Collections; + // // Description: Run-length table of document status for use the by the Speller. // namespace System.Windows.Documents { - using MS.Internal; - using System.Collections; - using System.Diagnostics; - using System.Windows.Controls; - // Run-length table of document status for use the by the Speller. // // The speller tracks all document content as either diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SplayTreeNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SplayTreeNode.cs index ca427567eb1..ef8efb96884 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SplayTreeNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/SplayTreeNode.cs @@ -7,7 +7,6 @@ // tree. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/StaticTextPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/StaticTextPointer.cs index fcaab3b34d4..e6d3a5a207a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/StaticTextPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/StaticTextPointer.cs @@ -2,18 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: Optimized minimal version of TextPointer that gets stored on the stack. // namespace System.Windows.Documents { - using System; - using MS.Internal; - using System.Threading; - using System.Windows; - using System.Collections; - internal struct StaticTextPointer { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Table.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Table.cs index 269dd710ba4..6f651f4b2ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Table.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Table.cs @@ -8,18 +8,9 @@ // See spec at WPP TableOM.doc // -using MS.Internal; -using MS.Internal.PtsHost; -using MS.Internal.PtsTable; -using MS.Utility; -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows; using System.Windows.Automation.Peers; -using System.Windows.Media; using System.Windows.Markup; using MS.Internal.PtsHost.UnsafeNativeMethods; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCell.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCell.cs index 29de8a0d451..c3e4f02cd0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCell.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCell.cs @@ -17,25 +17,12 @@ // Why even AffectsRender causes it? using MS.Internal; -using MS.Internal.PtsHost; -using MS.Internal.PtsTable; -using MS.Internal.Text; -using MS.Utility; -using System.Diagnostics; -using System.Security; -using System.Windows.Threading; -using System.Collections; -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Media; -using System.Windows.Controls; using System.Windows.Markup; using System.ComponentModel; // TypeConverter -using System.Collections.Generic; using MS.Internal.Documents; -using System; - using MS.Internal.PtsHost.UnsafeNativeMethods; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCellCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCellCollection.cs index 1d59622d3bc..47fcae11b67 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCellCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableCellCollection.cs @@ -6,9 +6,7 @@ // Description: Collection of TableCell objects. // -using System; using System.Collections; -using System.Collections.Generic; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumn.cs index 80af8b00ff9..9cba4da2cdf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumn.cs @@ -6,17 +6,9 @@ // Description: Table column object implementation. // -using System; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions -using System.Collections; -using System.Collections.Generic; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumnCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumnCollection.cs index 9a199babc2b..0da995232f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumnCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableColumnCollection.cs @@ -6,9 +6,7 @@ // Description: Collection of TableColumn objects. // -using System; using System.Collections; -using System.Collections.Generic; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRow.cs index 0de84ecf53a..db04d249d6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRow.cs @@ -8,25 +8,10 @@ // See spec at WPP TableOM.doc // -using MS.Internal; -using MS.Internal.PtsHost; using MS.Internal.PtsTable; -using MS.Internal.Text; -using MS.Utility; - -using System; -using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Security; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; using System.Windows.Markup; -using System.Collections.Generic; using MS.Internal.Documents; -using MS.Internal.PtsHost.UnsafeNativeMethods; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowCollection.cs index 61dea34f89a..f0a28d32cf3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowCollection.cs @@ -6,9 +6,7 @@ // Description: Collection of TableRow objects. // -using System; using System.Collections; -using System.Collections.Generic; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroup.cs index 0cb528aecc8..3c86c46dd9c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroup.cs @@ -13,28 +13,11 @@ //you need to disable warnings 1634 and 1691. (Presharp Documentation) #pragma warning disable 1634, 1691 -using MS.Internal.PtsHost; using MS.Internal.PtsTable; -using MS.Utility; - -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Media; using System.Windows.Markup; -using System.Collections.Generic; using MS.Internal.Documents; -using MS.Internal; -using MS.Internal.Data; -using MS.Internal.PtsHost.UnsafeNativeMethods; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroupCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroupCollection.cs index 6f54b97d9ca..c6e15a3f196 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroupCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TableRowGroupCollection.cs @@ -6,9 +6,7 @@ // Description: Collection of TableRowGroup objects. // -using System; using System.Collections; -using System.Collections.Generic; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextChangeType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextChangeType.cs index e0a964003fb..bc4f5b8fbbc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextChangeType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextChangeType.cs @@ -6,10 +6,6 @@ // Description: // -using System; -using System.Windows; -using System.Collections; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainer.cs index 83946ff3059..b2775d5210c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainer.cs @@ -8,13 +8,8 @@ //#define DEBUG_SLOW -using System; using System.Windows.Threading; using MS.Internal; -using System.Collections; -using System.ComponentModel; -using System.Windows.Controls; -using System.Windows.Markup; using MS.Internal.Documents; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventArgs.cs index 350d214acb1..e4cfd35e99f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventArgs.cs @@ -6,8 +6,6 @@ // Description: The arguments sent when a Change event is fired in a TextContainer. // -using System; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventHandler.cs index 394886f2dd1..3928fdb1175 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangeEventHandler.cs @@ -6,9 +6,6 @@ // Description: Delegate for a Change event fired on a TextContainer. // -using System; -using System.Windows; - namespace System.Windows.Documents { // Delegate for a ChangeAdded event fired on a TextContainer. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventArgs.cs index a0bb2f8c8a5..89bbac82f96 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventArgs.cs @@ -6,10 +6,7 @@ // Description: The arguments sent when a TextChangedEvent is fired in a TextContainer. // -using System; -using System.Windows; using System.Windows.Controls; -using System.Collections.Generic; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventHandler.cs index 99ec40aa896..41734ea7015 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextContainerChangedEventHandler.cs @@ -6,9 +6,6 @@ // Description: Delegate for a TextChangedEvent fired on a TextContainer. // -using System; -using System.Windows; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditor.cs index fc810416001..4ce474e8ac8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditor.cs @@ -2,6 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Globalization; +using System.Threading; +using System.Collections; // ArrayList +using System.Runtime.InteropServices; +using System.Windows.Threading; +using System.Windows.Input; +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase +using System.Windows.Markup; +using MS.Win32; +using MS.Internal.Documents; +using MS.Internal.Commands; // CommandHelpers + #pragma warning disable 1634, 1691 // To enable presharp warning disables (#pragma suppress) below. // // Description: Text editing service for controls. @@ -9,26 +23,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - using System.Security; - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCharacters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCharacters.cs index 9315da2df9a..76fca2350ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCharacters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCharacters.cs @@ -2,32 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Input; +using MS.Internal.Commands; // CommandHelpers + // // Description: A component of TextEditor supporting character formatting commands // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorContextMenu.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorContextMenu.cs index f0cb7511413..4f4546a21d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorContextMenu.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorContextMenu.cs @@ -2,24 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; +using System.Runtime.InteropServices; +using MS.Win32; +using System.Windows.Interop; + // // Description: A Component of TextEditor supporting the default ContextMenu. // namespace System.Windows.Documents { - using MS.Internal; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; - using System.Runtime.InteropServices; - using System.Security; - using MS.Win32; - using System.Windows.Interop; - // A Component of TextEditor supporting the default ContextMenu. internal static class TextEditorContextMenu { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCopyPaste.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCopyPaste.cs index 4dadf70258e..0ae2179249d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCopyPaste.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorCopyPaste.cs @@ -2,35 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Globalization; +using System.Xml; +using System.IO; +using System.Runtime.InteropServices; +using System.Windows.Input; +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Markup; +using MS.Internal.Commands; // CommandHelpers + // // Description: A Component of TextEditor supporting Cut/Copy/Paste commands // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Security; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Xml; - using System.IO; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorDragDrop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorDragDrop.cs index afcc86538c6..e3b4a7b30e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorDragDrop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorDragDrop.cs @@ -2,6 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Runtime.InteropServices; +using System.Windows.Input; +using System.Windows.Interop; // WindowInteropHelper +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase +using System.Windows.Data; // BindingExpression +using System.Windows.Media; +using MS.Win32; + // // Description: A Component of TextEditor class supposrtinng Drag-and-drop // functionality @@ -9,33 +19,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Interop; // WindowInteropHelper - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Data; // BindingExpression - using System.Windows.Media; - using System.Windows.Markup; - using System.Windows; - using System.Security; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - using MS.Internal.PresentationFramework; //Demand for drag and drop - - using SecurityHelper=MS.Internal.SecurityHelper; - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorLists.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorLists.cs index 956301b686a..a1e4c8fab8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorLists.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorLists.cs @@ -2,32 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Input; +using MS.Internal.Commands; // CommandHelpers + // // Description: A Component of TextEditor supporting list editing commands. // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorMouse.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorMouse.cs index c07ef63b7f8..b53f2c9937e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorMouse.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorMouse.cs @@ -2,33 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Input; +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase +using System.Windows.Media; +using System.Windows.Media.Media3D; + // // Description: A Component of TextEditor supporting mouse gestures. // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Media.Media3D; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorParagraphs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorParagraphs.cs index d896875d552..577382921eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorParagraphs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorParagraphs.cs @@ -2,32 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Input; +using MS.Internal.Commands; // CommandHelpers + // // Description: A component of TextEditor supporting paragraph formating commands // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSelection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSelection.cs index f9746267b01..638c13d3a0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSelection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSelection.cs @@ -2,33 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Input; +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase +using MS.Internal.Commands; // CommandHelpers + // // Description: A component of TextEditor supporting selection and navigation // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - using System.Security; // SecurityCritical attribute. - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSpelling.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSpelling.cs index c5a111595e9..4cae5782180 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSpelling.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorSpelling.cs @@ -2,19 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Input; +using MS.Internal.Commands; +using System.Windows.Controls; +using System.Windows.Markup; // XmlLanguage + // // Description: A Component of TextEditor supporting spelling. // namespace System.Windows.Documents { - using MS.Internal; - using System.Windows; - using System.Windows.Input; - using MS.Internal.Commands; - using System.Windows.Controls; - using System.Windows.Markup; // XmlLanguage - // A Component of TextEditor supporting spelling. internal static class TextEditorSpelling { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTables.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTables.cs index 8eabe8f25df..102467f3c2f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTables.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTables.cs @@ -2,32 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Input; +using MS.Internal.Commands; // CommandHelpers + // // Description: A Component of TextEditor supporting Table editing commands // namespace System.Windows.Documents { - using MS.Internal; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Text editing service for controls. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorThreadLocalStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorThreadLocalStore.cs index 8e4ef172c72..f31c5797e14 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorThreadLocalStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorThreadLocalStore.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; + // // Description: Thread local state for the TextEditor. // namespace System.Windows.Documents { - using System.Collections; - using System.Collections.Specialized; - using System.Diagnostics; - // Thread local state for the TextEditor. internal class TextEditorThreadLocalStore { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTyping.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTyping.cs index 5084564a256..4e230ede6dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTyping.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTyping.cs @@ -2,34 +2,25 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Interop; +using System.Collections; // ArrayList +using System.Runtime.InteropServices; + +using System.Windows.Threading; +using System.Windows.Input; +using System.Windows.Controls; // ScrollChangedEventArgs +using System.Windows.Interop; +using MS.Win32; +using MS.Internal.Documents; +using MS.Internal.Commands; // CommandHelpers + // // Description: Text editing service for controls. // namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.Interop; - using System.Globalization; - using System.Threading; - using System.ComponentModel; - using System.Text; - using System.Collections; // ArrayList - using System.Runtime.InteropServices; - - using System.Windows.Threading; - using System.Windows.Input; - using System.Windows.Controls; // ScrollChangedEventArgs - using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase - using System.Windows.Media; - using System.Windows.Markup; - using System.Security; - using System.Windows.Interop; - using MS.Utility; - using MS.Win32; - using MS.Internal.Documents; - using MS.Internal.Commands; // CommandHelpers - /// /// Subcomponent of TextEditor class - Support for Typing /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEffectResolver.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEffectResolver.cs index 5fb5eaffe54..0dc9fc1bff2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEffectResolver.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEffectResolver.cs @@ -6,16 +6,12 @@ // Description: Text Effect Setter // -using System.Collections.Generic; - -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; using MS.Internal.Text; namespace System.Windows.Documents -{ +{ /// /// Helper class to help set text effects into the Text container /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs index fb4171eea01..e81140b3227 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs @@ -11,7 +11,6 @@ using System.Collections; using System.ComponentModel; -using System.Windows.Controls; using System.Windows.Markup; using System.Windows.Media; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementCollection.cs index 18fdad77226..e6fd5a43dca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementCollection.cs @@ -2,18 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; // IList +using System.Windows.Controls; // TextBlock, ContentControl and AccessText +using MS.Internal; // Invariant + // // Description: Generic type for TextElement collections // namespace System.Windows.Documents { - using System.Collections; // IList - using System.Collections.Generic; // ICollection - using System.Windows.Controls; // TextBlock, ContentControl and AccessText - using MS.Internal; // Invariant - using MS.Internal.Documents; // FlowDocumentView - /// /// public class TextElementCollection : IList, ICollection where TextElementType : TextElement diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEditingBehaviorAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEditingBehaviorAttribute.cs index ad3c1d55577..e028fab2d2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEditingBehaviorAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEditingBehaviorAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEnumerator.cs index 901b4bf35fa..24cb9e82943 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElementEnumerator.cs @@ -7,13 +7,7 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; using MS.Internal; -using System.Text; -using MS.Utility; -using System.Windows.Controls; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextFindEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextFindEngine.cs index ee742ec5f32..5a160a65444 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextFindEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextFindEngine.cs @@ -10,16 +10,8 @@ // using MS.Internal; -using MS.Utility; using MS.Win32; - -using System; -using System.Collections; -using System.Diagnostics; using System.Globalization; -using System.Security; -using System.Text; -using System.Windows; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextMapOffsetErrorLogger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextMapOffsetErrorLogger.cs index bc6e922aa9a..67092fc1712 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextMapOffsetErrorLogger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextMapOffsetErrorLogger.cs @@ -10,7 +10,6 @@ // respect to user opt-in for CEIP. // -using MS.Internal.Telemetry; using System.Collections; using System.Diagnostics.Tracing; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextParentUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextParentUndoUnit.cs index a4dd42a7af2..072b0d8d825 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextParentUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextParentUndoUnit.cs @@ -8,17 +8,6 @@ // See spec at Undo spec.htm // -using System; -using MS.Internal; -using System.Windows.Input; -using System.Windows.Controls; -using System.Windows.Documents.Internal; -using System.Windows.Threading; -using System.ComponentModel; -using System.Windows.Media; -using System.Windows.Markup; -using System.Text; -using MS.Utility; using MS.Internal.Documents; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointer.cs index 9fdc81aa671..df3402f0edb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointer.cs @@ -6,12 +6,7 @@ // Description: TextPointer object representing a location in formatted text. // -using System; using MS.Internal; -using System.Threading; -using System.Windows; -using System.Windows.Media; -using System.Collections; using System.Windows.Controls; // doc comments namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointerBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointerBase.cs index 8d335bf8383..781e24ed1db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointerBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextPointerBase.cs @@ -2,19 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using System.Globalization; +using System.Windows.Media; // Matrix + // // Description: ITextPointer helper methods. // namespace System.Windows.Documents { - using System; - using MS.Internal; - using MS.Internal.Documents; - using System.Globalization; - using System.Windows.Media; // Matrix - using System.Windows.Controls; // TextBlock - // ITextPointer helper methods. internal static class TextPointerBase { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRange.cs index 24773446287..455c0441d07 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRange.cs @@ -7,9 +7,6 @@ // using MS.Internal; -using System.Collections.Generic; -using System.Windows.Threading; -using System.Globalization; using System.Xml; using System.IO; using System.Windows.Markup; // Parser diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeBase.cs index 3e77598f6d1..6bb2b812d96 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeBase.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Collections; +using System.Globalization; +using System.Text; +using System.Xml; +using System.IO; +using System.Windows.Controls; // TextBlock + // // Description: Provides an abstract level of TextRange implementation // Implemented as a static class containing a set of methods @@ -23,17 +31,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Globalization; - using System.Text; - using System.Xml; - using System.IO; - using MS.Internal.Documents; - using System.Windows.Controls; // TextBlock - /// /// A class a portion of text content. /// Can be contigous or disjoint; supports rectangular table ranges. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEdit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEdit.cs index 91e798f9f3c..f562d3361fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEdit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEdit.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions to obtain TextIndent valid value range. + // // Description: Static internal class providing a set of // helpoer methods for text editing operations @@ -9,11 +12,6 @@ namespace System.Windows.Documents { - using System; - using MS.Internal; - using System.Windows.Controls; - using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions to obtain TextIndent valid value range. - /// /// The TextRange class represents a pair of TextPositions, with many /// rich text editing operations exposed. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditLists.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditLists.cs index 8f362a6e6d6..4e845e850d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditLists.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditLists.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: Internal static class representing a group of methods // for list editing @@ -9,10 +11,6 @@ namespace System.Windows.Documents { - using System; - using MS.Internal; - using System.Windows.Controls; - /// /// The TextRange class represents a pair of TextPositions, with many /// rich text editing operations exposed. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditTables.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditTables.cs index 79b3d789263..1314710ed97 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditTables.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeEditTables.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using MS.Internal.Documents; +using System.Windows.Documents.Internal; // ColumnResizeAdorner + // // Description: Internal static class representing a group of methods // for list editing @@ -9,12 +13,6 @@ namespace System.Windows.Documents { - using System; - using MS.Internal; - using MS.Internal.Documents; - using System.Collections.Generic; - using System.Windows.Documents.Internal; // ColumnResizeAdorner - /// /// Internal static class representing a group of methods for table editing /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeSerialization.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeSerialization.cs index c5ca982a0db..33cec3afdd2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeSerialization.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextRangeSerialization.cs @@ -2,24 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Xml; +using System.Windows.Markup; // TypeConvertContext, ParserContext +using System.Windows.Controls; +using System.Globalization; + // // Description: Set of static methods implementing text range serialization // namespace System.Windows.Documents { - using MS.Internal; - using System.Text; - using System.Xml; - using System.IO; - using System.Windows.Markup; // TypeConvertContext, ParserContext - using System.Windows.Controls; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; - using System.Globalization; - using System.Security; - /// /// TextRangeSerialization is a static class containing /// an implementation for TextRange serialization functionality. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSchema.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSchema.cs index 077a11fdc01..13c36c23cc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSchema.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSchema.cs @@ -2,17 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Windows.Controls; // TextBox, TextBlock +using System.Windows.Media; // Brush + // // Description: A static class providing information about text content schema // namespace System.Windows.Documents { - using MS.Internal; - using System.Collections.Generic; - using System.Windows.Controls; // TextBox, TextBlock - using System.Windows.Media; // Brush - /// /// Provides an information about text structure schema. /// The schema is used in editing operations for maintaining diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSegment.cs index 565b212e5e6..fac40dad1cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSegment.cs @@ -2,15 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; + // // Description: A pair of TextPositions used to denote a run of TextContainer content. // namespace System.Windows.Documents { - using MS.Internal; - using System.Collections; - /// /// A pair of TextPositions used to denote a run of TextContainer content. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelection.cs index dfbe236adf6..4729eef70af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelection.cs @@ -2,25 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; +using System.Globalization; +using System.Windows.Controls.Primitives; // TextBoxBase +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; +using System.IO; +using MS.Win32; +using System.Windows.Controls; + // // Description: Holds and manipulates the text selection state for TextEditor. // namespace System.Windows.Documents { - using MS.Internal; - using System.Collections.Generic; - using System.Globalization; - using System.Windows.Controls.Primitives; // TextBoxBase - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; - using System.Threading; - using System.Security; - using System.IO; - using MS.Win32; - using System.Windows.Controls; - /// /// The TextSelection class encapsulates selection state for the RichTextBox /// control. It has no public constructor, but is exposed via a public diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelectionHighlightLayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelectionHighlightLayer.cs index bfdc95f7d39..1ff77f8548b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelectionHighlightLayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextSelectionHighlightLayer.cs @@ -6,10 +6,8 @@ // Description: Highlight rendering for the TextSelection. // -using System; using MS.Internal; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttribute.cs index aa672b97a00..f7cb40fa7d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttribute.cs @@ -6,19 +6,10 @@ // Description: TextServicesDisplayAttribute // -using System.Runtime.InteropServices; -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Documents; using MS.Win32; using MS.Internal; -using System; - namespace System.Windows.Documents { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttributePropertyRanges.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttributePropertyRanges.cs index 4ea86c7aa77..0f33d489085 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttributePropertyRanges.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesDisplayAttributePropertyRanges.cs @@ -3,15 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Security; using System.Collections; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Documents; using MS.Win32; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesHost.cs index 8ff2f18e88d..331747a924e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesHost.cs @@ -6,19 +6,11 @@ // Description: TextServicesHost implementation. // -using System; using System.Runtime.InteropServices; using System.Windows.Threading; using System.Threading; -using System.Collections; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Documents; using MS.Win32; using MS.Internal; -using MS.Internal.PresentationFramework; // SecurityHelper -using System.Security; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesProperty.cs index 54cfdf56bf7..13cc392490a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesProperty.cs @@ -6,19 +6,8 @@ // Description: TextServicesProperty implementation. // -using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Security; - -using System.Collections; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Documents; using MS.Win32; -using System; - namespace System.Windows.Documents { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesPropertyRanges.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesPropertyRanges.cs index ab7fb6a7d1b..64eeeb0793a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesPropertyRanges.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextServicesPropertyRanges.cs @@ -3,16 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Windows.Threading; -using System.Security; - -using System.Collections; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Documents; using MS.Win32; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextStore.cs index b2b7bb43580..0e8e7b0257c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextStore.cs @@ -7,31 +7,20 @@ // -using System; using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; using System.Windows.Threading; using System.Threading; using System.Globalization; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.IO; using MS.Internal; -using System.Windows.Controls; using System.Windows.Markup; // for XmlLanguage using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.Input; using System.Windows.Interop; -using System.Windows.Documents; using MS.Internal.Documents; -using System.Security; using MS.Win32; -using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - namespace System.Windows.Documents { // The TextStore class is a managed implementation of a Text Services diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDeleteContentUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDeleteContentUndoUnit.cs index d1fbcd7c4c5..c1870186919 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDeleteContentUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDeleteContentUndoUnit.cs @@ -7,12 +7,10 @@ // using MS.Internal; -using System; using System.IO; using System.Windows.Controls; using System.Windows.Markup; using System.Xml; -using System.Security; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDumper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDumper.cs index b1ee0f60b8b..7ebdc459724 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDumper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeDumper.cs @@ -6,9 +6,6 @@ // Description: Debug-only helper class, dumps TextContainer state to debugger. // -using System; -using System.Diagnostics; - namespace System.Windows.Documents { #if DEBUG diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeExtractElementUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeExtractElementUndoUnit.cs index 6be7a54f6d8..f2af94a5864 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeExtractElementUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeExtractElementUndoUnit.cs @@ -6,9 +6,6 @@ // Description: Undo unit for TextContainer.ExtractElement calls. // -using System; -using MS.Internal; - namespace System.Windows.Documents { // Undo unit for TextContainer.ExtractElement calls. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeFixupNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeFixupNode.cs index 76f3a87702f..49dfd58c899 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeFixupNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeFixupNode.cs @@ -6,7 +6,6 @@ // Description: A special TextContainer node used to parent deleted nodes. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertElementUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertElementUndoUnit.cs index 5c855f3455d..a19ce0e535a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertElementUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertElementUndoUnit.cs @@ -6,7 +6,6 @@ // Description: Undo unit for TextContainer.InsertElement calls. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertUndoUnit.cs index 31aefd1f631..4c198170bbc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeInsertUndoUnit.cs @@ -6,7 +6,6 @@ // Description: Undo unit for TextContainer.InsertText and InsertEmbeddedObject calls. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeNode.cs index 7b669b3cda8..dab9e6d5a4f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeNode.cs @@ -7,7 +7,6 @@ // // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeObjectNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeObjectNode.cs index 512e6b35403..825f4051476 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeObjectNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeObjectNode.cs @@ -6,7 +6,6 @@ // Description: A TextContainer node representing a UIElement. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreePropertyUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreePropertyUndoUnit.cs index 0f2f21278ff..a00926b1372 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreePropertyUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreePropertyUndoUnit.cs @@ -6,7 +6,6 @@ // Description: Undo unit for TextContainer.SetValue, etc. calls. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootNode.cs index 742617339d0..d09b708e6e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootNode.cs @@ -6,9 +6,7 @@ // Description: The root node of a TextContainer. // -using System; using MS.Internal; -using System.Collections; using System.Windows.Threading; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootTextBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootTextBlock.cs index 4437eca6629..dd82e39d4e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootTextBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeRootTextBlock.cs @@ -6,9 +6,7 @@ // Description: The root node of a TextBlock splay tree. // -using System; using MS.Internal; -using System.Collections; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeText.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeText.cs index b63276cb0e8..5bb79d6161d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeText.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeText.cs @@ -7,8 +7,6 @@ // Description: A static class that manipulates an array TextTreeTextBlocks. // -using System; -using System.Collections; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextBlock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextBlock.cs index ceebc9f8d2b..c1f63166e0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextBlock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextBlock.cs @@ -7,7 +7,6 @@ // // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextElementNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextElementNode.cs index a1c323cc7ae..3834e8d77a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextElementNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextElementNode.cs @@ -6,7 +6,6 @@ // Description: A TextContainer node representing a TextElement. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextNode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextNode.cs index 47e654e1457..e0ca96eb4fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeTextNode.cs @@ -6,7 +6,6 @@ // Description: A TextContainer node representing a run of text. // -using System; using MS.Internal; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeUndoUnit.cs index 789bd33802e..92e3878cf71 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextTreeUndoUnit.cs @@ -6,10 +6,8 @@ // Description: Base class for all TextContainer undo units. // -using System; using MS.Internal; using MS.Internal.Documents; -using System.Windows.Data; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs index 03a3ae2cbf6..f5bfed336f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs @@ -11,8 +11,6 @@ // using MS.Internal; -using MS.Internal.Telemetry; -using System.Collections.Generic; using System.Diagnostics.Tracing; namespace System.Windows.Documents.Tracing diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Typography.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Typography.cs index 20a41d61c60..129dd2e4454 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Typography.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Typography.cs @@ -7,20 +7,7 @@ // Text, FlowDocument, TextRange // -using System.Windows.Threading; - -using System.Collections; -using System.Diagnostics; -using System.Windows; -using System.Windows.Media; -using System.Windows.Documents; -using System.Windows.Controls; -using System.ComponentModel; - using MS.Internal.Text; -using MS.Utility; - -using System; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/UIElementPropertyUndoUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/UIElementPropertyUndoUnit.cs index 64964911674..c4539d49b2f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/UIElementPropertyUndoUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/UIElementPropertyUndoUnit.cs @@ -9,8 +9,6 @@ // 2. HorizontalAlignmentProperty sets on UIElement child of BlockUIContainer. // -using System; -using System.Windows; using MS.Internal; using MS.Internal.Documents; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ValidationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ValidationHelper.cs index 6eba3913fc9..8b59878e1d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ValidationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ValidationHelper.cs @@ -2,17 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; // Invariant.Assert +using System.ComponentModel; + // // Description: Helpers for TOM parameter validation. // namespace System.Windows.Documents { - using MS.Internal; // Invariant.Assert - using System.ComponentModel; - using System.Windows; - using System.Windows.Media; - internal static class ValidationHelper { //------------------------------------------------------ diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinEventHandler.cs index 1a34ad9cce7..451094ddaa1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinEventHandler.cs @@ -6,13 +6,7 @@ // Description: WinEventHandler implementation. // -using System; -using System.Collections; using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Diagnostics; -using System.Security; -using System.Windows.Threading; using MS.Win32; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInterop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInterop.cs index b4c6f08f650..1804c56c48c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInterop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInterop.cs @@ -2,6 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal.WindowsRuntime.Windows.Data.Text; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; +using System.Security; +using System.Text.RegularExpressions; +using System.Threading; +using System.Windows.Controls; +using System.Windows.Documents.Tracing; +using System.Windows.Input; +using System.Windows.Threading; + +using System.Windows.Documents.MsSpellCheckLib; + // // Description: Custom COM marshalling code and interfaces for interaction // with the WinRT wordbreaker API and ISpellChecker @@ -10,29 +25,6 @@ namespace System.Windows.Documents { - using MS.Internal; - using MS.Internal.WindowsRuntime.Windows.Data.Text; - - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.IO; - using System.Runtime.InteropServices; - using System.Runtime.CompilerServices; - using System.Security; - using System.Text.RegularExpressions; - using System.Threading; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Documents.Tracing; - using System.Windows.Input; - using System.Windows.Threading; - - using System.Windows.Documents.MsSpellCheckLib; - internal partial class WinRTSpellerInterop: SpellerInteropBase { #region Constructors diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInteropExtensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInteropExtensions.cs index 75f4eab8339..847c9b91810 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInteropExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WinRTSpellerInteropExtensions.cs @@ -3,10 +3,8 @@ // See the LICENSE file in the project root for more information. using MS.Internal.WindowsRuntime.Windows.Data.Text; -using System.Collections.Generic; using System.Windows.Documents.MsSpellCheckLib; -using System.Windows.Documents.Tracing; using static System.Windows.Documents.WinRTSpellerInterop; namespace System.Windows.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WpfPayload.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WpfPayload.cs index 15a1bf77365..68380a1e1f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WpfPayload.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/WpfPayload.cs @@ -2,6 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Internal; // Invariant +using MS.Internal.IO.Packaging; +using System.Xml; +using System.Windows.Markup; // TypeConvertContext, ParserContext +using System.Windows.Controls; // Image +using System.Globalization; // CultureInfo + +using System.Windows.Media; // ImageSource +using System.Windows.Media.Imaging; // BitmapEncoder +using System.IO; // MemoryStream +using System.IO.Packaging; // Package +using System.Threading; // Interlocked.Increment + // // Description: Helper class for creating and accessing WPF Payloads in packages // This file contains the definition and implementation @@ -20,25 +33,6 @@ namespace System.Windows.Documents { - using MS.Internal; // Invariant - using MS.Internal.IO.Packaging; - using System; - using System.Xml; - using System.Windows.Markup; // TypeConvertContext, ParserContext - using System.Windows.Controls; // Image - using System.Collections.Generic; // List - using System.ComponentModel; // TYpeDescriptor - using System.Globalization; // CultureInfo - - using System.Windows.Media; // ImageSource - using System.Windows.Media.Imaging; // BitmapEncoder - using System.IO; // MemoryStream - using System.IO.Packaging; // Package - using System.Threading; // Interlocked.Increment - using System.Security; // SecurityCritical, SecurityTreatAsSafe attributes - using MS.Internal.PresentationFramework; // SecurityHelper - - using InternalPackUriHelper = MS.Internal.IO.Packaging.PackUriHelper; // An object supporting flow content packaging with images and other resources. /// /// WpfPayload is a class providing services for creating, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XPSS0ValidatingLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XPSS0ValidatingLoader.cs index ba880c87dfb..c2b3b4e1425 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XPSS0ValidatingLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XPSS0ValidatingLoader.cs @@ -4,19 +4,11 @@ #region Using directives -using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Windows.Markup; using System.Xml; using System.IO; using System.IO.Packaging; -using System.Xml.Schema; -using System.Net; -using System.Resources; -using System.Reflection; -using System.Security; using MS.Internal; using MS.Internal.IO.Packaging; @@ -27,7 +19,6 @@ using Package = System.IO.Packaging.Package; using PackageRelationship = System.IO.Packaging.PackageRelationship; using PackUriHelper = System.IO.Packaging.PackUriHelper; -using InternalPackUriHelper = MS.Internal.IO.Packaging.PackUriHelper; namespace System.Windows.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlRtfConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlRtfConverter.cs index de659515395..a37fa9a238b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlRtfConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlRtfConverter.cs @@ -6,9 +6,6 @@ // Description: Xaml-Rtf Converter. // -using System.IO; -using System.Text; - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlToRtfWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlToRtfWriter.cs index a489eb12287..039ffcf8f83 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlToRtfWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlToRtfWriter.cs @@ -7,7 +7,6 @@ // using System.Collections; -using System.Diagnostics; using System.Text; using System.Windows.Media; // Color using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ZoomPercentageConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ZoomPercentageConverter.cs index c7b54ec5ecd..07a21fc4e79 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ZoomPercentageConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/ZoomPercentageConverter.cs @@ -10,16 +10,15 @@ // Used to support the warnings disabled below #pragma warning disable 1634, 1691 -using System; using System.Globalization; using System.Windows.Data; namespace System.Windows.Documents { -/// -/// ValueConverter for DocumentViewer's ZoomPercentage property -/// -public sealed class ZoomPercentageConverter : IValueConverter + /// + /// ValueConverter for DocumentViewer's ZoomPercentage property + /// + public sealed class ZoomPercentageConverter : IValueConverter { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtension.cs index cb680b41681..14af08528c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtension.cs @@ -9,11 +9,8 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; -using System.Windows; using System.Windows.Markup; -using System.Reflection; using MS.Internal; // Helper namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtensionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtensionConverter.cs index f055e49bbf7..ae55908ecff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtensionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DynamicResourceExtensionConverter.cs @@ -10,12 +10,8 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Collections; -using System.Security; -using System.Text; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetter.cs index 8e158f21946..d1a23747257 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetter.cs @@ -9,7 +9,6 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; // EditorBrowsableAttribute namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetterHandlerConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetterHandlerConverter.cs index 7649f7339e9..f94a3693064 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetterHandlerConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetterHandlerConverter.cs @@ -6,9 +6,6 @@ using System.ComponentModel; using System.Globalization; using System.Reflection; - -using System.Windows; -using System.Collections.Generic; using System.Xaml; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventTrigger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventTrigger.cs index 7a72fc34809..c4be64fcfd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventTrigger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventTrigger.cs @@ -10,10 +10,7 @@ * * \***************************************************************************/ -using System.Collections; -using System.Diagnostics; using System.Windows.Markup; -using System.Collections.Specialized; using System.ComponentModel; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLength.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLength.cs index df6f8df001d..498c6ade451 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLength.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLength.cs @@ -10,7 +10,6 @@ // // -using MS.Internal; using System.ComponentModel; using System.Globalization; using MS.Internal.PtsHost.UnsafeNativeMethods; // PTS restrictions diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLengthConverter.cs index 43c885c15a8..b7b2a30cd5a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FigureLengthConverter.cs @@ -9,14 +9,8 @@ // // -using MS.Internal; -using MS.Utility; using System.ComponentModel; -using System.Windows; -using System; -using System.Security; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FluentThemeState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FluentThemeState.cs index e28a0cd0994..778330708bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FluentThemeState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FluentThemeState.cs @@ -1,5 +1,3 @@ -using System; -using System.Windows; using System.Windows.Media; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FontSizeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FontSizeConverter.cs index c685cca0781..b1328caa9e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FontSizeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FontSizeConverter.cs @@ -7,22 +7,10 @@ // // Description: Converter for FontSize to Double // -using System; -using System.IO; -using System.Diagnostics; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Reflection; // for ConstructorInfo using System.Globalization; // for CultureInfo -using MS.Utility; // For ExceptionStringTable -using System.Windows.Media; // for Typeface -using System.Windows.Controls; // for ReadingPanel -using System.Windows.Documents; -using System.Windows.Markup; -using MS.Internal; -using MS.Internal.Text; -using MS.Internal.Documents; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs index 03a71179e9b..a5eff982682 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Specialized; // NameValueCollection using System.Configuration; // ConfigurationManager -using System.Runtime.Versioning; -using MS.Internal; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContentElement.cs index 7e32c120d79..e1bc3b3ce63 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContentElement.cs @@ -2,33 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Windows.Threading; -using System.Threading; - using System.Windows.Controls; using System.Windows.Data; using System.Windows.Diagnostics; -using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; -using System.Windows.Media.TextFormatting; using System.Windows.Markup; #if DEBUG -using System.Reflection; #endif -using MS.Internal.Text; using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContextData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContextData.cs index 089b17d7f2b..21666023bff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContextData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkContextData.cs @@ -5,12 +5,6 @@ using System.Windows.Threading; -using MS.Utility; - -using System; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows { internal class FrameworkContextData diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs index d29ba997760..4298c27703b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Threading; -using System.Threading; -using System.Reflection; using System.Windows.Data; using System.Windows.Diagnostics; using System.Windows.Documents; @@ -20,19 +14,14 @@ using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; using System.Windows.Navigation; using System.Windows.Markup; using System.Windows.Controls; -using System.Windows.Automation; using MS.Internal; using MS.Internal.KnownBoxes; using MS.Internal.PresentationFramework; // SafeSecurityHelper using MS.Utility; -using MS.Internal.Automation; -using MS.Internal.PtsTable; // BodyContainerProxy -using System.Security; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs index 976192d48a5..4ec233c2e91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs @@ -2,21 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Reflection; -using System.Windows.Threading; using System.Threading; using System.Windows.Baml2006; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Documents; using System.Collections; // For ArrayList -using System.Collections.Generic; using System.Collections.Specialized; // HybridDictionary -using System.Diagnostics; // For Debug.Assert using System.Globalization; using System.Windows.Media.Media3D; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkPropertyMetadata.cs index 6958326b22f..fcbe8a25f16 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkPropertyMetadata.cs @@ -5,8 +5,6 @@ // // -using MS.Utility; -using System; using System.ComponentModel; // InvalidEnumArgumentException using System.Windows.Data; // UpdateSourceTrigger diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkReadOnlyPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkReadOnlyPropertyMetadata.cs index 61562cba7be..bb4da5e2369 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkReadOnlyPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkReadOnlyPropertyMetadata.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows { internal class ReadOnlyFrameworkPropertyMetadata : FrameworkPropertyMetadata diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkTemplate.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkTemplate.cs index f442907fc29..05e38ce055f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkTemplate.cs @@ -13,22 +13,13 @@ using MS.Utility; // ChildValueLookupList using System.ComponentModel; // DesignerSerializationVisibility, DefaultValueAttribute using System.Collections; // Hashtable -using System.Collections.Generic; // List using System.Collections.Specialized; // HybridDictionary -using System.Diagnostics; // Debug using System.Runtime.CompilerServices; // ConditionalWeakTable -using System.Security; // SecurityCriticalAttribute, SecurityTreatAsSafe -using System.Threading; // Interlocked -using System.Windows.Media.Animation; // Timeline using System.Windows.Markup; // XamlTemplateSerializer, ContentPropertyAttribute using System.Windows.Diagnostics; -using System.Windows.Media; -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Threading; // DispatcherObject using System.Xaml; using System.Windows.Data; -using System.Globalization; using MS.Internal.Xaml.Context; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs index a3ca854d9b0..16ba3ee0c26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs @@ -13,18 +13,12 @@ using MS.Internal; using MS.Utility; - -using System; using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows.Controls; using System.Windows.Diagnostics; using System.Windows.Media; using System.Windows.Markup; -using SR=System.Windows.SR; - namespace System.Windows { [RuntimeNamePropertyAttribute("Name")] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs index 9a032c9aaff..3b682b33bf8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs @@ -13,18 +13,12 @@ using MS.Internal; using MS.Utility; - -using System; using System.Collections; -using System.Diagnostics; -using System.Security; using System.Windows.Controls; using System.Windows.Diagnostics; using System.Windows.Media; using System.Windows.Markup; -using SR=System.Windows.SR; - namespace System.Windows { [RuntimeNamePropertyAttribute("Name")] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLength.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLength.cs index c1b72776bea..d542d988a43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLength.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLength.cs @@ -11,7 +11,6 @@ // // -using MS.Internal; using System.ComponentModel; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLengthConverter.cs index ff36002f4b1..37e70a2eeb6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/GridLengthConverter.cs @@ -12,13 +12,8 @@ // using MS.Internal; -using MS.Utility; using System.ComponentModel; -using System.Windows; -using System; -using System.Security; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IFrameworkInputElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IFrameworkInputElement.cs index 484f84120a0..b9c8afc4d51 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IFrameworkInputElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IFrameworkInputElement.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Input; - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IWindowService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IWindowService.cs index a4a2abbd7d7..6f4d38451bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IWindowService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/IWindowService.cs @@ -8,17 +8,8 @@ // // -using System; -using System.ComponentModel; - -using System.Windows; -using System.Windows.Controls.Primitives; - -using System.Windows.Navigation; -using System.Windows.Media; - -namespace System.Windows -{ +namespace System.Windows +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/InheritablePropertyChangeInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/InheritablePropertyChangeInfo.cs index 5593d20b70e..9c10a6931e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/InheritablePropertyChangeInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/InheritablePropertyChangeInfo.cs @@ -11,8 +11,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/EditingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/EditingMode.cs index 3093f1988f5..9e851568dc0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/EditingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/EditingMode.cs @@ -7,10 +7,8 @@ // Defines InkCanvasEditingMode for InkCanvas // -using System; - namespace System.Windows.Controls -{ +{ /// /// Defines the InkCanvasEditingMode for the InkEditor /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/Events.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/Events.cs index f31357505da..596c5f63b8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/Events.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Ink/Events.cs @@ -7,17 +7,10 @@ // Defined our Delegates, EventHandlers and EventArgs // -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Windows; -using System.Windows.Media; -using System.Windows.Documents; using System.Windows.Ink; using Swi = System.Windows.Ink; -using MS.Utility; namespace System.Windows.Controls { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandConverter.cs index 5042a12fec0..68ee34a2471 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandConverter.cs @@ -8,18 +8,13 @@ // For type converter spec please reference typeconverter.asp // -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo using System.Reflection; -using MS.Utility; -using MS.Internal; -using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Markup; using System.Windows.Documents; // EditingCommands -using System.ComponentModel.Design.Serialization; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandValueSerializer.cs index c42cf895110..74cb6a5695b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/Command/CommandValueSerializer.cs @@ -2,19 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Markup; +using System.Reflection; + // // Contents: ValueSerializer for the ICommand interface // namespace System.Windows.Input { - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Markup; - using System.Windows.Documents; // EditingCommands - using System.Reflection; - internal class CommandValueSerializer : ValueSerializer { public override bool CanConvertToString(object value, IValueSerializerContext context) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/KeyboardNavigation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/KeyboardNavigation.cs index d36fe70a151..01898f6d6c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/KeyboardNavigation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Input/KeyboardNavigation.cs @@ -3,28 +3,18 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; using System.Windows.Threading; -using System.Threading; -using System.Windows; using System.Windows.Documents; using System.Windows.Interop; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Media3D; -using System.Security; -using MS.Utility; -using MS.Internal.Controls; using MS.Internal; using MS.Internal.KnownBoxes; -using Microsoft.Win32; -using CommonDependencyProperty=MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; +using CommonDependencyProperty = MS.Internal.PresentationFramework.CommonDependencyPropertyAttribute; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/ActiveXHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/ActiveXHost.cs index 1d15cd774f3..c66b388311c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/ActiveXHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/ActiveXHost.cs @@ -21,26 +21,16 @@ // The classid of the ActiveX control is specified in the constructor. // -using System; using System.Collections; using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.Threading; - -using System.Windows; -using System.Windows.Interop; using System.Windows.Controls; using System.Windows.Input; -using System.Windows.Markup; using MS.Internal; using MS.Internal.Controls; -using MS.Internal.Utility; using MS.Win32; -using System.Security; // Since we disable PreSharp warnings in this file, PreSharp warning is unknown to C# compiler. // We first need to disable warnings about unknown message numbers and unknown pragmas. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/HwndHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/HwndHost.cs index a9f204d6a49..27083fbf49c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/HwndHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/HwndHost.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Windows.Automation.Peers; using System.Windows.Automation.Provider; using System.Windows.Input; @@ -11,13 +9,9 @@ using MS.Win32; using MS.Internal; using MS.Internal.Interop; -using System.Security; -using Microsoft.Win32; using System.Windows.Media; -using System.Windows.Interop; using System.Runtime.InteropServices; using System.Windows.Threading; -using System.Diagnostics.CodeAnalysis; // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 @@ -71,15 +65,19 @@ public void Dispose() /// /// The Win32 handle of the hosted window. /// - /// - /// Callers must have UnmanagedCode permission to call this API. - /// public IntPtr Handle { get { + if (_hwnd.Handle != IntPtr.Zero) + { + if (!UnsafeNativeMethods.IsWindow(_hwnd)) + { + _hwnd = new HandleRef(null, IntPtr.Zero); + } + } - return CriticalHandle; + return _hwnd.Handle; } } @@ -341,7 +339,7 @@ public void UpdateWindowPos() PresentationSource source = null; CompositionTarget vt = null; - if (( CriticalHandle != IntPtr.Zero) && IsVisible) + if (( Handle != IntPtr.Zero) && IsVisible) { source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */); if(source != null) @@ -638,7 +636,7 @@ private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) { // get the element proxy IRawElementProviderSimple el = containerPeer.GetInteropChild(); - result = AutomationInteropProvider.ReturnRawElementProvider(CriticalHandle, wparam, lparam, el); + result = AutomationInteropProvider.ReturnRawElementProvider(Handle, wparam, lparam, el); } return result; } @@ -698,7 +696,7 @@ protected override Size MeasureOverride(Size constraint) // Measure to our desired size. If we have a 0-length dimension, // the system will assume we don't care about that dimension. - if(CriticalHandle != IntPtr.Zero) + if(Handle != IntPtr.Zero) { desiredSize.Width = Math.Min(_desiredSize.Width, constraint.Width); desiredSize.Height = Math.Min(_desiredSize.Height, constraint.Height); @@ -935,7 +933,7 @@ private void BuildOrReparentWindow() HwndSource hwndSource = source as HwndSource ; if(hwndSource != null) { - hwndParent = hwndSource.CriticalHandle; + hwndParent = hwndSource.Handle; } } else @@ -1081,7 +1079,7 @@ private void BuildWindow(HandleRef hwndParent) private void DestroyWindow() { // Destroy the window if we are hosting one. - if( CriticalHandle == IntPtr.Zero) + if( Handle == IntPtr.Zero) return; if(!CheckAccess()) @@ -1108,22 +1106,6 @@ private object AsyncDestroyWindow(object arg) return null; } - internal IntPtr CriticalHandle - { - get - { - if(_hwnd.Handle != IntPtr.Zero) - { - if(!UnsafeNativeMethods.IsWindow(_hwnd)) - { - _hwnd = new HandleRef(null, IntPtr.Zero); - } - } - - return _hwnd.Handle; - } - } - private IntPtr SubclassWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { IntPtr result = IntPtr.Zero ; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IErrorPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IErrorPage.cs index cb09e0104e1..70b891d507f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IErrorPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IErrorPage.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Threading; namespace System.Windows.Interop diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IProgressPage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IProgressPage.cs index c75e4898e95..9630a17d3a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IProgressPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/IProgressPage.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows.Threading; namespace System.Windows.Interop diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/WindowInteropHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/WindowInteropHelper.cs index 2e20bf02879..ca05c154608 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/WindowInteropHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Interop/WindowInteropHelper.cs @@ -8,13 +8,7 @@ // -using System; -using System.Windows; -using System.Windows.Interop; -using System.Security; -using System.Diagnostics; using MS.Internal; -using MS.Win32; namespace System.Windows.Interop { @@ -55,23 +49,12 @@ public WindowInteropHelper(Window window) /// /// Get the Handle of the window /// - /// - /// Callers must have UIPermission(UIPermissionWindow.AllWindows) to call this API. - /// public IntPtr Handle - { - get - { - return CriticalHandle; - } - } - - internal IntPtr CriticalHandle { get { Invariant.Assert(_window != null, "Cannot be null since we verify in the constructor"); - return _window.CriticalHandle; + return _window.Handle; } } @@ -111,12 +94,12 @@ public IntPtr Owner public IntPtr EnsureHandle() { - if (CriticalHandle == IntPtr.Zero) + if (Handle == IntPtr.Zero) { _window.CreateSourceWindow(false /*create hwnd during show*/); } - return CriticalHandle; + return Handle; } #endregion Public Methods diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LengthConverter.cs index f4e560809cd..4055e6d6535 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LengthConverter.cs @@ -9,18 +9,12 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Runtime.CompilerServices; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Windows; -using System.Windows.Markup; -using System.Security; using MS.Internal; -using MS.Utility; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Localization.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Localization.cs index 92204d43baa..f8ba0429db0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Localization.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Localization.cs @@ -9,8 +9,6 @@ // // -using System.Collections; -using System.Diagnostics; using System.Runtime.CompilerServices; // ConditionalWeakTable using MS.Internal.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LogicalTreeHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LogicalTreeHelper.cs index a6f9a4ca25f..62050354247 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LogicalTreeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LogicalTreeHelper.cs @@ -11,22 +11,19 @@ // // -using System; using System.Collections; // In order to use IEnumerator -using System.Diagnostics; -using MS.Utility; // In order to use SR namespace System.Windows { -/* - public delegate bool ParentTraversalCallback(FrameworkElement parentFE, FrameworkContentElement parentFCE, object data); - public delegate bool ChildTraversalCallback(FrameworkElement childFE, FrameworkContentElement childFCE, object child, object data); -*/ - -/// -/// Static helper functions for dealing with the logical tree -/// -public static class LogicalTreeHelper + /* + public delegate bool ParentTraversalCallback(FrameworkElement parentFE, FrameworkContentElement parentFCE, object data); + public delegate bool ChildTraversalCallback(FrameworkElement childFE, FrameworkContentElement childFCE, object child, object data); + */ + + /// + /// Static helper functions for dealing with the logical tree + /// + public static class LogicalTreeHelper { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LostFocusEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LostFocusEventManager.cs index 0d74516ee24..576a8344f8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LostFocusEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LostFocusEventManager.cs @@ -8,8 +8,6 @@ // pattern. See WeakEventTable.cs for an overview. // -using System; -using System.Windows; // WeakEventManager using MS.Internal; // Helper namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/AttributeData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/AttributeData.cs index cab84c378c9..569ffac077c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/AttributeData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/AttributeData.cs @@ -9,21 +9,6 @@ \***************************************************************************/ using System; -using System.Xml; -using System.Xml.Serialization; -using System.IO; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Globalization; -using MS.Utility; -using System.Collections.Specialized; -using Microsoft.Win32; -using System.Runtime.InteropServices; -using MS.Internal; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KeyRecord.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KeyRecord.cs index bfda94aa7b3..86ce5951313 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KeyRecord.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KeyRecord.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Xaml; -using System.Windows.Markup; -using System.Diagnostics; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KnownTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KnownTypes.cs index 8848d13601b..744cc278604 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KnownTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006KnownTypes.cs @@ -21,9 +21,7 @@ using System.Windows.Navigation; using System.Windows.Resources; using System.Windows.Shapes; -using System.Windows; using System.Xaml; -using System; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006Reader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006Reader.cs index ae97d57b8ff..5bf598028fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006Reader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006Reader.cs @@ -2,18 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Buffers; -using System.Collections.Generic; using System.IO; using System.Xaml; -using System.Diagnostics; using System.ComponentModel; using System.Reflection; using System.Windows.Diagnostics; -using System.Windows.Media.Media3D; using System.Windows.Media; -using MS.Internal; using System.Globalization; using XamlReaderHelper = System.Windows.Markup.XamlReaderHelper; using System.Runtime.CompilerServices; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderContext.cs index 74d8d8bb996..81215a9eb1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderContext.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Xaml; using MS.Internal.Xaml.Context; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderFrame.cs index 9fc57a467a5..6de85535566 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderFrame.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Xaml; -using System.Diagnostics; using MS.Internal.Xaml.Context; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderInternal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderInternal.cs index 73b753525c3..3fcb932335a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderInternal.cs @@ -2,19 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.IO; using System.Xaml; -using System.Diagnostics; using System.ComponentModel; using System.Reflection; -using System.Windows.Diagnostics; -using System.Windows.Media.Media3D; -using System.Windows.Media; using MS.Internal; -using System.Globalization; -using XamlReaderHelper = System.Windows.Markup.XamlReaderHelper; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderSettings.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderSettings.cs index 9f18256f766..b17b0f6fcb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderSettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006ReaderSettings.cs @@ -2,12 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.IO; using System.Xaml; -using System.Diagnostics; -using System.ComponentModel; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006RecordType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006RecordType.cs index 3ae7c8bafff..6a004fc3a3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006RecordType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006RecordType.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Baml2006 { internal enum Baml2006RecordType : byte diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs index 9de8511738d..b95a231f7d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs @@ -2,22 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.IO; using System.Reflection; -using System.Diagnostics; using System.Xaml; using System.Xaml.Schema; -using System.ComponentModel; -using System.Reflection.Emit; -using System.Windows.Markup; -using System.Windows.Media.Media3D; -using System.Windows.Media; -using System.Runtime.Serialization; -using KnownTypesV3 = System.Windows.Markup.KnownTypes; -using System.Threading; -using MS.Internal.WindowsBase; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6Assembly.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6Assembly.cs index 8926714692c..0e63e403222 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6Assembly.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6Assembly.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Reflection; using MS.Internal.WindowsBase; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6ConstructorInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6ConstructorInfo.cs index 6b501d64159..5dcd4f3583f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6ConstructorInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml6ConstructorInfo.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Windows.Baml2006 { struct Baml6ConstructorInfo diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/DeferredBinaryDeserializerExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/DeferredBinaryDeserializerExtension.cs index 123924ca84f..9badaf6a085 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/DeferredBinaryDeserializerExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/DeferredBinaryDeserializerExtension.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Windows.Markup; using System.IO; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/SharedStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/SharedStream.cs index ba78a7feaa5..ffef40193b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/SharedStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/SharedStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.ComponentModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/ThemeKnownTypeHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/ThemeKnownTypeHelper.cs index 67e53f42d81..527be31840c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/ThemeKnownTypeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/ThemeKnownTypeHelper.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Xaml; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/TypeConverterMarkupExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/TypeConverterMarkupExtension.cs index ff02cab7ae2..68c096a4067 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/TypeConverterMarkupExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/TypeConverterMarkupExtension.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs index 2fd51dff509..ab6e970a51b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Xaml; -using System.Reflection; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs index 0b2c324ad85..35989c58ae1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Xaml; using System.Xaml.Schema; -using System.Collections.Generic; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMember.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMember.cs index 5bbf44bce4a..e4e5bb17340 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMember.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMember.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Reflection; using System.Xaml; using System.Xaml.Schema; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMemberInvoker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMemberInvoker.cs index 7cec13f35a0..9c8b0839ded 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMemberInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownMemberInvoker.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Xaml.Schema; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownType.cs index edc7d305442..91421760e01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownType.cs @@ -2,14 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Windows.Markup; using System.Xaml; using System.Xaml.Schema; -using System.Diagnostics; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownTypeInvoker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownTypeInvoker.cs index 5ba67018060..99476982232 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownTypeInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfKnownTypeInvoker.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Xaml; using System.Xaml.Schema; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfMemberInvoker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfMemberInvoker.cs index 110ca27b412..b29fc926e17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfMemberInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfMemberInvoker.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Xaml.Schema; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedBamlSchemaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedBamlSchemaContext.cs index 8851c19b847..1fd94eea054 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedBamlSchemaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedBamlSchemaContext.cs @@ -2,15 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Xaml; using System.Xaml.Schema; -using System.Diagnostics; -using System.Reflection; -using MS.Internal; namespace System.Windows.Baml2006 { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs index 74c6a52a165..bd550e79161 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Xaml; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlMember.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlMember.cs index 33bd6592724..ce89364e85f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlMember.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlMember.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Xaml; using System.Xaml.Schema; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlType.cs index 4c314600994..65b5d93b34e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfXamlType.cs @@ -2,12 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Xaml; using System.Xaml.Schema; using System.Collections; -using System.Diagnostics; using System.Reflection; using System.Collections.Concurrent; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryReader.cs index d25f5694755..6dd9e06896d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryReader.cs @@ -9,7 +9,6 @@ * * \***************************************************************************/ -using System; using System.IO; using System.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryWriter.cs index 457570ca387..43a4425a71a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlBinaryWriter.cs @@ -8,7 +8,6 @@ * \***************************************************************************/ -using System; using System.IO; using System.Text; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlCollectionHolder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlCollectionHolder.cs index f7fc44ab4fb..a18402e095b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlCollectionHolder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlCollectionHolder.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlMapTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlMapTable.cs index f96d6597d40..18316c87680 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlMapTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlMapTable.cs @@ -9,20 +9,12 @@ \***************************************************************************/ using System; -using System.Xml; using System.IO; -using System.Globalization; -using System.Text; using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Runtime.InteropServices; using System.Diagnostics; using System.Reflection; -using MS.Utility; -using MS.Internal; - #if PBTCOMPILER using MS.Internal.Markup; #else diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlReader.cs index 675f6294527..14a6829033d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlReader.cs @@ -9,24 +9,14 @@ * \***************************************************************************/ -using System; using System.Xml; using System.IO; -using System.Windows; -using System.Windows.Navigation; using System.Text; using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; using System.ComponentModel; - -using System.Diagnostics; using System.Reflection; -using System.Windows.Threading; using System.Globalization; -using MS.Utility; -using MS.Internal; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordHelper.cs index 46946c6ffa4..925d1a6060a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordReader.cs index dc690cadd0c..1a67f73f0b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordReader.cs @@ -9,26 +9,17 @@ * \***************************************************************************/ -using System; using System.Xml; using System.Xml.Serialization; using System.IO; -using System.Text; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Threading; using System.Globalization; using MS.Utility; using MS.Internal; -using System.Runtime.InteropServices; using MS.Internal.Utility; -using System.Windows; using System.Windows.Navigation; -using System.Windows.Documents; -using System.Windows.Controls; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordWriter.cs index 3320dfc83e3..ecfa9fa3884 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecordWriter.cs @@ -9,15 +9,12 @@ \***************************************************************************/ using System; -using System.Xml; using System.IO; -using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; -using System.Reflection; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecords.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecords.cs index 48e4e0899c7..3fc6a6a7a40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecords.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlRecords.cs @@ -9,17 +9,13 @@ \***************************************************************************/ using System; -using System.Xml; using System.IO; -using System.Text; -using System.Collections.Generic; using System.Collections; using System.Globalization; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Collections.Specialized; -using MS.Internal.IO.Packaging.CompoundFile; #if !PBTCOMPILER using System.Windows; @@ -29,9 +25,7 @@ using MS.Internal.PresentationFramework; // SafeSecurityHelper #endif -using System.Runtime.InteropServices; using MS.Utility; -using MS.Internal; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlVersionHeader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlVersionHeader.cs index 9bd191991dd..53a6a1f7b77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlVersionHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlVersionHeader.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.Globalization; using System.Diagnostics; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlWriter.cs index e793b638607..1cd8f15c3ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlWriter.cs @@ -7,23 +7,9 @@ * Purpose: Public api for writing baml records to a stream * \***************************************************************************/ -using System; -using System.Xml; using System.IO; -using System.Windows; -using System.Text; using System.Collections; -using System.ComponentModel; -using MS.Internal.Utility; -using MS.Internal; - -using System.Diagnostics; using System.Reflection; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Threading; - -using MS.Utility; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/DependencyPropertyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/DependencyPropertyConverter.cs index 1d76ee3b234..4c9bf5273fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/DependencyPropertyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/DependencyPropertyConverter.cs @@ -7,20 +7,11 @@ * Class for converting a given DependencyProperty to and from a string * \***************************************************************************/ -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo -using System.Reflection; -using MS.Utility; -using MS.Internal; -using System.Windows; -using System.ComponentModel.Design.Serialization; -using System.Windows.Documents; -using System.Diagnostics; using System.Xaml; using System.IO; using System.Windows.Controls; -using System.Collections.Generic; using System.Windows.Baml2006; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/FilteredXmlReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/FilteredXmlReader.cs index b3ebd9a0d15..ad371250bd8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/FilteredXmlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/FilteredXmlReader.cs @@ -37,15 +37,11 @@ // prefix within this chunk of XML is not allowed. // -using System; // InvalidOperationException -using System.IO; // TextReader using System.Xml; // XmlTextReader -using MS.Utility; // ExceptionStringTable - namespace System.Windows.Markup { -internal class FilteredXmlReader : XmlTextReader + internal class FilteredXmlReader : XmlTextReader { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IHaveResources.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IHaveResources.cs index 5ad23677945..2b688a31f69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IHaveResources.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IHaveResources.cs @@ -10,11 +10,6 @@ // lookup in the parser stack. // -using System; -using System.Windows; -using System.Reflection; -using System.Globalization; - namespace System.Windows.Markup { internal interface IHaveResources diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStreamInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStreamInfo.cs index b7632a23e70..fe02b22e924 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStreamInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStreamInfo.cs @@ -9,7 +9,6 @@ // and consumed by the parser\Baml Loader. // -using System; using System.Reflection; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStyleConnector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStyleConnector.cs index fef9f89fc5a..89876df9d42 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStyleConnector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/IStyleConnector.cs @@ -6,9 +6,6 @@ // Description: // Provides methods used internally by the StyleBamlReader // -using System; -using System.Windows; - namespace System.Windows.Markup { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypesHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypesHelper.cs index 767f8225ef3..77909750578 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypesHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypesHelper.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using System.IO; -using System.Collections.Generic; using System.Reflection; -using System.Diagnostics; // These are the non-generated parts of the KnownTypes and TypeIndexer classes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResource.cs index dfa69a82ae5..fdd6702bcad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResource.cs @@ -6,11 +6,6 @@ // Contents: BamlLocalizableResource class, part of Baml Localization API // -using System; -using System.Windows; -using MS.Internal; -using System.Diagnostics; - namespace System.Windows.Markup.Localizer { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResourceKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResourceKey.cs index 3cebf46cdbb..9414aba2e24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResourceKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizableResourceKey.cs @@ -6,8 +6,6 @@ // Description: BamlLocalizableResourceKey class // -using System; - namespace System.Windows.Markup.Localizer { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizationDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizationDictionary.cs index b8ee63e4e69..ed15bf29f65 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizationDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizationDictionary.cs @@ -6,17 +6,7 @@ // Contents: BamlLocalizationDictionary and BamlLocalizationDictionaryEnumerator // -using System; -using System.IO; -using System.Globalization; -using System.Runtime.InteropServices; using System.Collections; -using System.Collections.Generic; -using System.Windows.Markup; -using System.Diagnostics; -using System.Text; -using System.Windows; -using System.Windows.Input; namespace System.Windows.Markup.Localizer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizer.cs index 2cb99ea4713..0d5500f2875 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizer.cs @@ -6,16 +6,7 @@ // Contents: BamlLocalizer class, part of Baml Localization API // -using System; using System.IO; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Collections; -using System.Windows.Markup; -using System.Diagnostics; -using System.Text; -using System.Reflection; -using System.Windows; using MS.Internal.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizerErrorNotifyEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizerErrorNotifyEventArgs.cs index d8a19bccb09..ad37023beb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizerErrorNotifyEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Localizer/BamlLocalizerErrorNotifyEventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Markup.Localizer { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/MarkupExtensionParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/MarkupExtensionParser.cs index 83affcc2425..b955603bea4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/MarkupExtensionParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/MarkupExtensionParser.cs @@ -3,20 +3,13 @@ // See the LICENSE file in the project root for more information. using System; -using System.Xml; -using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Diagnostics; using System.Reflection; -using System.Threading; using System.Globalization; -using System.Security; using MS.Utility; -using System.Collections.Specialized; -using System.Runtime.InteropServices; using MS.Internal.Xaml.Parser; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserContext.cs index 79e3d3358ef..c798fcf1a2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserContext.cs @@ -11,11 +11,8 @@ using System.Reflection; using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.ComponentModel; using System.Xml; -using MS.Utility; -using System.Diagnostics; using MS.Internal.Xaml.Parser; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserHooks.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserHooks.cs index 8c9e87ebbec..acd501d9672 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserHooks.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserHooks.cs @@ -8,13 +8,6 @@ * \***************************************************************************/ -using System.ComponentModel; - -using System.ComponentModel.Design.Serialization; -using System.Reflection; -using System; -using System.Xml; - #if PBTCOMPILER namespace MS.Internal.Markup #else diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserStack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserStack.cs index ef112050f53..694d59e5669 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ParserStack.cs @@ -8,22 +8,7 @@ * \***************************************************************************/ -using System; -using System.Xml; -using System.Xml.Serialization; -using System.IO; -using System.Text; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Globalization; -using MS.Utility; -using System.Collections.Specialized; -using Microsoft.Win32; -using System.Runtime.InteropServices; -using MS.Internal; #if !PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs index b085f19df65..91caa0b9c94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs @@ -24,23 +24,12 @@ // ElementStringValueProperty // -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.Reflection; -using System.Security; -using System.Text; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; -using System.Windows.Documents; - -namespace System.Windows.Markup.Primitives +namespace System.Windows.Markup.Primitives { /// /// An implementation of MarkupObject for DependencyObjects that works also for CLR only objects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ExtensionSimplifierMarkupObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ExtensionSimplifierMarkupObject.cs index 657b8e473cc..31c6654d037 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ExtensionSimplifierMarkupObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ExtensionSimplifierMarkupObject.cs @@ -3,14 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Text; -using System.Windows.Markup; -using System.Globalization; namespace System.Windows.Markup.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/FrameworkElementFactoryMarkupObject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/FrameworkElementFactoryMarkupObject.cs index 7b17328963f..d0c384516cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/FrameworkElementFactoryMarkupObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/FrameworkElementFactoryMarkupObject.cs @@ -7,16 +7,10 @@ // FrameworkElementFactory // -using System; using System.ComponentModel; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows; -using System.Windows.Markup; - -using MS.Utility; +using MS.Utility; namespace System.Windows.Markup.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs index 9a4b66d7ced..62a20c7e320 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs @@ -6,19 +6,12 @@ // Contents: XAML writer // -using System; using System.ComponentModel; using System.Reflection; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; -using System.Windows.Markup; -using MS.Internal; namespace System.Windows.Markup.Primitives { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ProvideValueServiceProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ProvideValueServiceProvider.cs index 44c85bc8064..fc6bdc92be1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ProvideValueServiceProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ProvideValueServiceProvider.cs @@ -10,10 +10,7 @@ * * \***************************************************************************/ -using System; -using System.Windows; using System.Windows.Media; -using System.Diagnostics; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ReaderContextStackData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ReaderContextStackData.cs index 0ed76331b7b..b258f7ac4e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ReaderContextStackData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/ReaderContextStackData.cs @@ -7,11 +7,6 @@ * * \***************************************************************************/ -using System; -using System.Collections; -using System.Reflection; -using System.Diagnostics; - namespace System.Windows.Markup { // Data maintained on the reader's context stack. The root of the tree is at the bottom diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RestrictiveXamlXmlReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RestrictiveXamlXmlReader.cs index 2ad86375d6e..5a4f7d06160 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RestrictiveXamlXmlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RestrictiveXamlXmlReader.cs @@ -8,7 +8,6 @@ // using Microsoft.Win32; -using System.Collections.Generic; using System.Xaml; using System.Xml; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventConverter.cs index 880854623f2..c6b3e02fe1c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventConverter.cs @@ -5,7 +5,6 @@ using System.Xaml; using System.ComponentModel; using System.Globalization; -using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventValueSerializer.cs index 3b973ef10ff..0a0becb7e14 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/RoutedEventValueSerializer.cs @@ -6,7 +6,6 @@ // Contents: Value serializer for the RoutedEvent class // -using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/SetterTriggerConditionValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/SetterTriggerConditionValueConverter.cs index 8210fb4c2f5..90f0de3a639 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/SetterTriggerConditionValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/SetterTriggerConditionValueConverter.cs @@ -7,19 +7,9 @@ * Class for converting a given value (for Setter/Trigger/Condition) to and from a string * \***************************************************************************/ -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo -using System.Reflection; -using MS.Utility; -using MS.Internal; -using System.Windows; -using System.ComponentModel.Design.Serialization; -using System.Windows.Documents; using System.Xaml; -using System.Xaml.Schema; -using System.Collections.Generic; -using System.Diagnostics; using System.IO; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleModeStack.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleModeStack.cs index 9fd209be7cd..a5623fbc2d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleModeStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleModeStack.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Xml; -using System.IO; using System.Collections.Generic; using System.Diagnostics; -using System.Reflection; #if PBTCOMPILER namespace MS.Internal.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs index 17a7c5f1671..1180fbf627d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs @@ -10,11 +10,6 @@ \***************************************************************************/ using System; -using System.Xml; -using System.IO; -using System.Text; -using System.Collections; -using System.ComponentModel; using System.Diagnostics; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateComponentConnector.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateComponentConnector.cs index 87d6bc9eedd..3c1dc59f724 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateComponentConnector.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateComponentConnector.cs @@ -12,27 +12,6 @@ * * \***************************************************************************/ -using System; -using System.Xml; -using System.IO; -using System.Windows; -using System.Windows.Media; -using System.Windows.Navigation; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media.Animation; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; -using System.Windows.Data; - -using System.Globalization; -using MS.Utility; - namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateKeyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateKeyConverter.cs index 989f6518693..efd085174b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateKeyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateKeyConverter.cs @@ -7,15 +7,8 @@ * Class for converting a given TemplateKey to a string * \***************************************************************************/ -using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo -using System.Reflection; -using MS.Utility; -using MS.Internal; -using System.Windows; -using System.ComponentModel.Design.Serialization; -using System.Windows.Documents; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateXamlParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateXamlParser.cs index e82a4c6f635..eebc5cd516c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateXamlParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TemplateXamlParser.cs @@ -10,11 +10,7 @@ \***************************************************************************/ using System; -using System.Xml; -using System.IO; -using System.Text; using System.Collections; -using System.ComponentModel; using System.Diagnostics; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TreeBuilder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TreeBuilder.cs index c291a0c1bdc..0e2711ffd9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TreeBuilder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TreeBuilder.cs @@ -8,18 +8,7 @@ * \***************************************************************************/ -using System; -using System.Xml; -using System.IO; -using System.Text; -using System.Collections; -using System.ComponentModel; - using System.Diagnostics; -using System.Reflection; - -using System.Runtime.InteropServices; -using MS.Utility; #if PBTCOMPILER namespace MS.Internal.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TypeContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TypeContext.cs index 4137a2082af..3c4d14010a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TypeContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/TypeContext.cs @@ -9,7 +9,6 @@ using System; using System.ComponentModel; -using System.Xml; #if PBTCOMPILER namespace MS.Internal.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/WpfXamlLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/WpfXamlLoader.cs index fbba48f7182..c9f39eda86c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/WpfXamlLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/WpfXamlLoader.cs @@ -7,7 +7,6 @@ using System.Collections; using System.Windows.Baml2006; using System.Windows.Diagnostics; -using System.Windows.Media; using System.Xaml; using System.Xaml.Permissions; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlBrushSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlBrushSerializer.cs index 24c406b56fe..151cefb90d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlBrushSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlBrushSerializer.cs @@ -8,16 +8,7 @@ // using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; -using MS.Internal; #if PBTCOMPILER using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlDesignerSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlDesignerSerializationManager.cs index ada3d01050e..804a5e35fe8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlDesignerSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlDesignerSerializationManager.cs @@ -7,11 +7,7 @@ // Manages the ContextStack for a particular run of Serialization. // -using System; -using System.Collections; using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Reflection; using System.Xml; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlFigureLengthSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlFigureLengthSerializer.cs index 6f864371bfb..9bd952db366 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlFigureLengthSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlFigureLengthSerializer.cs @@ -7,17 +7,8 @@ // XamlSerializer used to persist FigureLength structures in Baml // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.IO; -using System.Xml; -using System.Windows; -using MS.Utility; using MS.Internal; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlGridLengthSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlGridLengthSerializer.cs index b9b1816c1fa..05aaf88a850 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlGridLengthSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlGridLengthSerializer.cs @@ -7,18 +7,8 @@ // XamlSerializer used to persist GridLength structures in Baml // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.IO; -using System.Xml; -using System.Windows; -using System.Windows.Markup; -using MS.Utility; using MS.Internal; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInstanceCreator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInstanceCreator.cs index d9ee861b81f..5620a495b67 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInstanceCreator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInstanceCreator.cs @@ -7,9 +7,7 @@ // A base class that allows storing parser records for later instantiation. // -using System; - -namespace System.Windows.Markup +namespace System.Windows.Markup { /// /// A base class that allows storing parser records for later instantiation. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInt32CollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInt32CollectionSerializer.cs index f1b148ea2b0..b70fa3d584d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInt32CollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlInt32CollectionSerializer.cs @@ -8,20 +8,11 @@ // using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; -using MS.Internal; #if PBTCOMPILER using System.Reflection; -using System.Collections.Generic; +using System.Collections.Generic; using TypeConverterHelper = MS.Internal.Markup.TypeConverterHelper; namespace MS.Internal.Markup @@ -29,8 +20,8 @@ namespace MS.Internal.Markup using System.Windows; using System.Windows.Media; -using System.Windows.Media.Media3D; -using MS.Internal.Media; +using System.Windows.Media.Media3D; +using MS.Internal.Media; using TypeConverterHelper = System.Windows.Markup.TypeConverterHelper; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlNodes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlNodes.cs index 76ece2c69a9..effce8a3d73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlNodes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlNodes.cs @@ -12,9 +12,6 @@ using System; using System.Xml; -using System.IO; -using System.Collections; -using System.ComponentModel; using System.Diagnostics; using System.Reflection; @@ -26,20 +23,19 @@ #endif -using MS.Utility; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif -{ - #region XamlNodeTypeDefitions +{ + #region XamlNodeTypeDefitions - /// - /// Identifier for XamlNodes - /// - internal enum XamlNodeType + /// + /// Identifier for XamlNodes + /// + internal enum XamlNodeType { /// /// Unknown Node diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParseException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParseException.cs index 58385215dc7..858a4e0443b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParseException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParseException.cs @@ -8,17 +8,9 @@ // using System; -using System.Xml; -using System.IO; -using System.Collections; -using System.Diagnostics; using System.Reflection; using System.Text; -using System.Globalization; -using System.ComponentModel; -using System.Security; using System.Runtime.Serialization; -using MS.Utility; using MS.Internal; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParser.cs index 28f9a947804..936b0487adb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlParser.cs @@ -12,15 +12,11 @@ using System; using System.Xml; using System.IO; -using System.Text; using System.Collections; -using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Globalization; using MS.Utility; -using System.Runtime.InteropServices; -using MS.Internal; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPathDataSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPathDataSerializer.cs index bce4c6a2884..3f41ce907c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPathDataSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPathDataSerializer.cs @@ -7,29 +7,20 @@ // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; using MS.Internal; #if PBTCOMPILER using System.Reflection; -using System.Collections.Generic; +using System.Collections.Generic; namespace MS.Internal.Markup #else using System.Windows; using System.Windows.Media; -using System.Windows.Media.Media3D; -using MS.Internal.Media; +using System.Windows.Media.Media3D; +using MS.Internal.Media; namespace System.Windows.Markup #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPoint3DCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPoint3DCollectionSerializer.cs index 664114bee3f..8bfaa6c51f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPoint3DCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPoint3DCollectionSerializer.cs @@ -7,17 +7,7 @@ // XamlSerializer used to persist collections of 3D points in Baml // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; -using MS.Internal; #if PBTCOMPILER using System.Reflection; @@ -27,7 +17,7 @@ namespace MS.Internal.Markup using System.Windows; using System.Windows.Media; -using System.Windows.Media.Media3D; +using System.Windows.Media.Media3D; using MS.Internal.Media; namespace System.Windows.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPointCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPointCollectionSerializer.cs index 5d3d4376aba..02ac5c373be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPointCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlPointCollectionSerializer.cs @@ -7,17 +7,7 @@ // XamlSerializer used to persist collections of 3D points in Baml // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; -using MS.Internal; #if PBTCOMPILER using System.Reflection; @@ -27,8 +17,8 @@ namespace MS.Internal.Markup using System.Windows; using System.Windows.Media; -using System.Windows.Media.Media3D; -using MS.Internal.Media; +using System.Windows.Media.Media3D; +using MS.Internal.Media; namespace System.Windows.Markup #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReader.cs index f5abd77bdd8..89757eea51b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReader.cs @@ -7,27 +7,14 @@ // base Parser class that parses XML markup into an Avalon Element Tree // -using System; using System.Xml; using System.IO; -using System.IO.Packaging; -using System.Windows; using System.ComponentModel; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Reflection; using MS.Utility; using System.Text; -using System.ComponentModel.Design.Serialization; -using System.Globalization; -using System.Windows.Markup.Primitives; using MS.Internal; - -using MS.Internal.IO.Packaging; using System.Windows.Baml2006; -using System.Threading; using System.Windows.Threading; using System.Xaml; using System.Xaml.Permissions; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderConstants.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderConstants.cs index db12ce0a897..bab5d1ec03a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderConstants.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderConstants.cs @@ -11,6 +11,9 @@ // set this flag to turn on whitespace collapse rules. // #define UseValidatingReader + +/* Unmerged change from project 'PresentationFramework' +Removed: using System; using System.Xml; using System.Xml.Serialization; @@ -27,7 +30,7 @@ using Microsoft.Win32; using System.Runtime.InteropServices; using MS.Internal; - +*/ // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and // unknown pragmas when compiling C# source code with the C# compiler, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderHelper.cs index 02290ef67c3..9348fae75f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlReaderHelper.cs @@ -14,20 +14,14 @@ using System; using System.Xml; -using System.Xml.Serialization; -using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Globalization; using MS.Utility; using System.Collections.Specialized; -using Microsoft.Win32; -using System.Runtime.InteropServices; -using MS.Internal; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializer.cs index e744cfc5df7..8cdc5f52742 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializer.cs @@ -8,14 +8,7 @@ // using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.IO; -using System.Reflection; -using System.Xml; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializerUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializerUtil.cs index 33e029d917f..5e02bcf2596 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializerUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlSerializerUtil.cs @@ -8,20 +8,6 @@ // and during actual Serialization. // -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Reflection; -using System.Security; -using System.Windows; -using System.Globalization; -using System.Windows.Data; -using MS.Utility; -using MS.Internal; - #if PBTCOMPILER namespace MS.Internal.Markup #else diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStream.cs index d97d78b73e8..11e22f46a09 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStream.cs @@ -8,19 +8,10 @@ * Doing async parsing on a separate thread. * \***************************************************************************/ -using System; -using System.Xml; using System.IO; -using System.Windows; using System.Collections; -using System.ComponentModel; - -using System.Diagnostics; -using System.Reflection; using System.Threading; -using MS.Utility; - #if PBTCOMPILER namespace MS.Internal.Markup diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStyleSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStyleSerializer.cs index 89d8173434d..6d57d6f6d8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStyleSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStyleSerializer.cs @@ -8,18 +8,7 @@ // Class that serializes and deserializes Styles. // -using System; -using System.ComponentModel; - -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Collections; using System.Globalization; -using System.IO; -using System.Reflection; -using System.Text; -using System.Xml; -using MS.Utility; #if !PBTCOMPILER using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTemplateSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTemplateSerializer.cs index a14cba6d2ff..cd8c55ee097 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTemplateSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTemplateSerializer.cs @@ -7,18 +7,7 @@ // Class that serializes and deserializes Templates. // -using System; -using System.ComponentModel; - -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Collections; using System.Globalization; -using System.IO; -using System.Reflection; -using System.Text; -using System.Xml; -using MS.Utility; #if !PBTCOMPILER using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapper.cs index 96179b4b13e..3b46b06a617 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapper.cs @@ -8,10 +8,8 @@ // using System; -using System.Xml; using System.IO; using MS.Utility; -using System.Text; using System.Collections; using System.Collections.Generic; using System.Globalization; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs index bd63b3c0f76..b5f4ba486b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; -using System.Threading; using System.Windows.Baml2006; using System.Xaml; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlVector3DCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlVector3DCollectionSerializer.cs index f5ea798bcbe..4bb25bb1088 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlVector3DCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlVector3DCollectionSerializer.cs @@ -7,17 +7,7 @@ // XamlSerializer used to persist collections of 3D points in Baml // -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; using System.IO; -using System.Xml; -using MS.Utility; -using MS.Internal; #if PBTCOMPILER using System.Reflection; @@ -27,8 +17,8 @@ namespace MS.Internal.Markup using System.Windows; using System.Windows.Media; -using System.Windows.Media.Media3D; -using MS.Internal.Media; +using System.Windows.Media.Media3D; +using MS.Internal.Media; namespace System.Windows.Markup #endif diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriter.cs index 6fafa331c9b..426d8911944 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriter.cs @@ -7,26 +7,11 @@ // base Parser class that parses XML markup into an Avalon Element Tree // -using System; using System.Xml; using System.IO; -using System.IO.Packaging; -using System.Windows; -using System.Collections; -using System.Diagnostics; -using System.Reflection; -using System.Windows.Threading; - -using MS.Utility; -using System.Security; using System.Text; -using System.ComponentModel.Design.Serialization; -using System.Globalization; using System.Windows.Markup.Primitives; -using MS.Internal.IO.Packaging; -using MS.Internal.PresentationFramework; - namespace System.Windows.Markup { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterMode.cs index bf58b1d20ba..4556f42ab40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterMode.cs @@ -7,8 +7,6 @@ // Xaml Writer Modes for values that are of type Expression. // -using System; - namespace System.Windows.Markup { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterState.cs index 3b21a184bcd..5025d249e0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlWriterState.cs @@ -7,8 +7,6 @@ // Xaml Writer States for values that are of type Expression. // -using System; - namespace System.Windows.Markup { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs index 1bdf1ad81af..932db60961c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs @@ -7,18 +7,10 @@ // Attributes used by parser for Avalon // -using System; -using System.Xml; -using System.IO; using System.Collections; using System.ComponentModel; -using System.Globalization; - -using System.Diagnostics; using System.Reflection; -using MS.Utility; - #if !PBTCOMPILER using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs index ba6d0688c2c..c5a5d06532a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs @@ -14,13 +14,7 @@ using System.Collections.Specialized; using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using MS.Internal; using MS.Utility; -using Microsoft.Win32; -using System.Globalization; #if PBTCOMPILER using MS.Internal.PresentationBuildTasks; #else diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsDictionary.cs index 63024eac54b..cb686bb766b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsDictionary.cs @@ -8,12 +8,9 @@ // using System; -using System.Xml; -using System.IO; using System.Collections; using System.Collections.Specialized; using System.Diagnostics; -using System.Reflection; using MS.Utility; #if PBTCOMPILER diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/BeginStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/BeginStoryboard.cs index 1f6d0c5a0bf..fb950b38208 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/BeginStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/BeginStoryboard.cs @@ -11,18 +11,15 @@ * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute -using System.Diagnostics; // Debug.Assert -using System.Windows; // SR.Get -using System.Windows.Documents; // TableTemplate using System.Windows.Markup; // IAddChild namespace System.Windows.Media.Animation { -/// -/// BeginStoryboard will call begin on its Storyboard reference when -/// it is triggered. -/// -[RuntimeNameProperty("Name")] // Enables INameScope.FindName to find BeginStoryboard objects. + /// + /// BeginStoryboard will call begin on its Storyboard reference when + /// it is triggered. + /// + [RuntimeNameProperty("Name")] // Enables INameScope.FindName to find BeginStoryboard objects. [ContentProperty("Storyboard")] // Enables child without explicit tag. public sealed class BeginStoryboard : TriggerAction { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ControllableStoryboardAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ControllableStoryboardAction.cs index b63aa0aecf4..6cbc515a72a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ControllableStoryboardAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ControllableStoryboardAction.cs @@ -12,19 +12,16 @@ * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute -using System.Diagnostics; // Debug.Assert - -using System.Windows.Documents; // TableTemplate using System.Windows.Markup; // INameScope namespace System.Windows.Media.Animation { -/// -/// A controllable storyboard action associates a trigger action with a -/// Storyboard. The association from this object is a string that is the name -/// of the Storyboard in a resource dictionary. -/// -public abstract class ControllableStoryboardAction : TriggerAction + /// + /// A controllable storyboard action associates a trigger action with a + /// Storyboard. The association from this object is a string that is the name + /// of the Storyboard in a resource dictionary. + /// + public abstract class ControllableStoryboardAction : TriggerAction { /// /// Internal constructor - nobody is supposed to ever create an instance diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs index 44be8a067d3..103d840151b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs @@ -8,17 +8,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationFramework; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs index 0ca7052a93f..52f36ad25d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs @@ -8,15 +8,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Media3D; - using MS.Internal.PresentationFramework; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs index e85b181841d..3ce3c036bc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs @@ -8,17 +8,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationFramework; - namespace System.Windows.Media.Animation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs index 9fec96ecd2c..2274980c87d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs @@ -8,15 +8,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Media3D; - using MS.Internal.PresentationFramework; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs index 8498263b4a2..372f79d71d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs @@ -8,15 +8,6 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Media3D; - using MS.Internal.PresentationFramework; namespace System.Windows.Media.Animation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimation.cs index ac733c2abfd..d5b8e560273 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimation.cs @@ -8,24 +8,13 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; -using MS.Utility; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; -using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using MS.Internal.PresentationFramework; namespace System.Windows.Media.Animation -{ +{ /// /// Animates the value of a Thickness property using linear interpolation /// between two values. The values are determined by the combination of diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationBase.cs index 364143c9e3f..47fbe053e8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationBase.cs @@ -11,21 +11,8 @@ // Allow use of presharp: #pragma warning suppress #pragma warning disable 1634, 1691 -using MS.Internal; - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using MS.Internal.PresentationFramework; - -using SR=System.Windows.SR; - namespace System.Windows.Media.Animation -{ +{ /// /// /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs index 5696931a8a9..fd992bae808 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs @@ -8,20 +8,10 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; using MS.Internal.KnownBoxes; - -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Windows; using System.Windows.Markup; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; - -using SR=System.Windows.SR; using MS.Internal.PresentationFramework; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs index 53a25391275..a633a25b8c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs @@ -8,16 +8,8 @@ // Please see MilCodeGen.html for more information. // -using MS.Internal; - -using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Globalization; -using System.Windows.Media.Animation; -using System.Windows.Media.Media3D; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/PauseStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/PauseStoryboard.cs index a6a5b8525ce..31ab97e3589 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/PauseStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/PauseStoryboard.cs @@ -10,15 +10,13 @@ * * \***************************************************************************/ -using System.Diagnostics; // Debug.Assert - namespace System.Windows.Media.Animation { -/// -/// PauseStoryboard will call pause on its Storyboard reference when -/// it is triggered. -/// -public sealed class PauseStoryboard : ControllableStoryboardAction + /// + /// PauseStoryboard will call pause on its Storyboard reference when + /// it is triggered. + /// + public sealed class PauseStoryboard : ControllableStoryboardAction { /// /// Called when it's time to execute this storyboard action diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/RemoveStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/RemoveStoryboard.cs index 9e1f360c583..747491dcdb9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/RemoveStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/RemoveStoryboard.cs @@ -10,15 +10,13 @@ * * \***************************************************************************/ -using System.Diagnostics; // Debug.Assert - namespace System.Windows.Media.Animation { -/// -/// RemoveStoryboard will call remove on its Storyboard reference when -/// it is triggered. -/// -public sealed class RemoveStoryboard : ControllableStoryboardAction + /// + /// RemoveStoryboard will call remove on its Storyboard reference when + /// it is triggered. + /// + public sealed class RemoveStoryboard : ControllableStoryboardAction { /// /// Called when it's time to execute this storyboard action diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ResumeStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ResumeStoryboard.cs index 4df772aaff0..c234b15a610 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ResumeStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/ResumeStoryboard.cs @@ -10,15 +10,13 @@ * * \***************************************************************************/ -using System.Diagnostics; // Debug.Assert - namespace System.Windows.Media.Animation { -/// -/// ResumeStoryboard will call resume on its Storyboard reference when -/// it is triggered. -/// -public sealed class ResumeStoryboard : ControllableStoryboardAction + /// + /// ResumeStoryboard will call resume on its Storyboard reference when + /// it is triggered. + /// + public sealed class ResumeStoryboard : ControllableStoryboardAction { /// /// Called when it's time to execute this storyboard action diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SeekStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SeekStoryboard.cs index e7cd09e3cb0..50f3ad70f07 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SeekStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SeekStoryboard.cs @@ -11,15 +11,14 @@ * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute -using System.Diagnostics; // Debug.Assert namespace System.Windows.Media.Animation { -/// -/// SeekStoryboard will call seek on its Storyboard reference when -/// it is triggered. -/// -public sealed class SeekStoryboard : ControllableStoryboardAction + /// + /// SeekStoryboard will call seek on its Storyboard reference when + /// it is triggered. + /// + public sealed class SeekStoryboard : ControllableStoryboardAction { /// /// A time offset to use for this action. If it is never explicitly diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SetStoryboardSpeedRatio.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SetStoryboardSpeedRatio.cs index b98c4c531a2..12b4cf04590 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SetStoryboardSpeedRatio.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SetStoryboardSpeedRatio.cs @@ -11,15 +11,14 @@ * \***************************************************************************/ using System.ComponentModel; // DefaultValueAttribute -using System.Diagnostics; // Debug.Assert namespace System.Windows.Media.Animation { -/// -/// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when -/// it is triggered. -/// -public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction + /// + /// SetStoryboardSpeedRatio will set the speed for its Storyboard reference when + /// it is triggered. + /// + public sealed class SetStoryboardSpeedRatio : ControllableStoryboardAction { /// /// A speed ratio to use for this action. If it is never explicitly diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SkipStoryboardToFill.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SkipStoryboardToFill.cs index e96e7569a1d..4a18754ce7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SkipStoryboardToFill.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/SkipStoryboardToFill.cs @@ -10,15 +10,13 @@ * * \***************************************************************************/ -using System.Diagnostics; // Debug.Assert - namespace System.Windows.Media.Animation { -/// -/// SkipStoryboardToFill will call SkipToFill on its Storyboard reference when -/// it is triggered. -/// -public sealed class SkipStoryboardToFill : ControllableStoryboardAction + /// + /// SkipStoryboardToFill will call SkipToFill on its Storyboard reference when + /// it is triggered. + /// + public sealed class SkipStoryboardToFill : ControllableStoryboardAction { /// /// Called when it's time to execute this storyboard action diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/StopStoryboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/StopStoryboard.cs index 6a720e455f5..b56fb398236 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/StopStoryboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/StopStoryboard.cs @@ -10,15 +10,13 @@ * * \***************************************************************************/ -using System.Diagnostics; // Debug.Assert - namespace System.Windows.Media.Animation { -/// -/// StopStoryboard will call stop on its Storyboard reference when -/// it is triggered. -/// -public sealed class StopStoryboard : ControllableStoryboardAction + /// + /// StopStoryboard will call stop on its Storyboard reference when + /// it is triggered. + /// + public sealed class StopStoryboard : ControllableStoryboardAction { /// /// Called when it's time to execute this storyboard action diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs index 9b16b94cd96..ab70e42c175 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Storyboard.cs @@ -11,24 +11,21 @@ * \***************************************************************************/ using System.Collections; // DictionaryEntry -using System.Collections.Generic; // List using System.Collections.Specialized; // HybridDictionary using System.ComponentModel; // PropertyDescriptor -using System.Diagnostics; // Debug.Assert using System.Reflection; // PropertyInfo using System.Windows.Controls; // MediaElement -using System.Windows.Documents; // TableTemplate using System.Windows.Markup; // INameScope using MS.Internal; // Helper using MS.Utility; // FrugalMap namespace System.Windows.Media.Animation { -/// -/// A Storyboard coordinates a set of actions in a time-dependent manner. -/// -public class Storyboard : ParallelTimeline + /// + /// A Storyboard coordinates a set of actions in a time-dependent manner. + /// + public class Storyboard : ParallelTimeline { static Storyboard() { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/TextOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/TextOptions.cs index b9999d0129a..7cd42b1bac2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/TextOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/TextOptions.cs @@ -8,7 +8,6 @@ // and TextRenderingMode. // -using System.Windows; using MS.Internal.Media; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MessageBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MessageBox.cs index 4bad89ce1c9..e6d7c5ab835 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MessageBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MessageBox.cs @@ -3,17 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; using System.ComponentModel; - - -using System.Windows; using System.Windows.Interop; -using MS.Utility; using MS.Win32; -using MS.Internal.PresentationFramework; namespace System.Windows { @@ -251,7 +244,7 @@ public static MessageBoxResult Show( MessageBoxImage icon, MessageBoxResult defaultResult, MessageBoxOptions options) { - return ShowCore((new WindowInteropHelper(owner)).CriticalHandle, messageBoxText, caption, button, icon, defaultResult, options); + return ShowCore((new WindowInteropHelper(owner)).Handle, messageBoxText, caption, button, icon, defaultResult, options); } /// @@ -267,7 +260,7 @@ public static MessageBoxResult Show( MessageBoxImage icon, MessageBoxResult defaultResult) { - return ShowCore((new WindowInteropHelper (owner)).CriticalHandle, messageBoxText, caption, button, icon, defaultResult, 0); + return ShowCore((new WindowInteropHelper (owner)).Handle, messageBoxText, caption, button, icon, defaultResult, 0); } /// @@ -282,7 +275,7 @@ public static MessageBoxResult Show( MessageBoxButton button, MessageBoxImage icon) { - return ShowCore((new WindowInteropHelper (owner)).CriticalHandle, messageBoxText, caption, button, icon, 0, 0); + return ShowCore((new WindowInteropHelper (owner)).Handle, messageBoxText, caption, button, icon, 0, 0); } /// @@ -296,7 +289,7 @@ public static MessageBoxResult Show( string caption, MessageBoxButton button) { - return ShowCore((new WindowInteropHelper (owner)).CriticalHandle, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); + return ShowCore((new WindowInteropHelper (owner)).Handle, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); } /// @@ -306,7 +299,7 @@ public static MessageBoxResult Show( /// public static MessageBoxResult Show(Window owner, string messageBoxText, string caption) { - return ShowCore((new WindowInteropHelper (owner)).CriticalHandle, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); + return ShowCore((new WindowInteropHelper (owner)).Handle, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); } /// @@ -316,7 +309,7 @@ public static MessageBoxResult Show(Window owner, string messageBoxText, string /// public static MessageBoxResult Show(Window owner, string messageBoxText) { - return ShowCore((new WindowInteropHelper (owner)).CriticalHandle, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); + return ShowCore((new WindowInteropHelper (owner)).Handle, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiDataTrigger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiDataTrigger.cs index 749a1b03fbf..929511cc152 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiDataTrigger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiDataTrigger.cs @@ -8,13 +8,8 @@ // gets values from data. // -using MS.Utility; - -using System; -using System.Diagnostics; using System.Collections.Specialized; using System.ComponentModel; -using System.Windows.Data; using System.Windows.Markup; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiTrigger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiTrigger.cs index 8d6368e52bf..7fc34b8aa29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiTrigger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/MultiTrigger.cs @@ -4,14 +4,8 @@ using System.Collections.Specialized; using System.ComponentModel; -using System.IO; using System.Windows.Markup; -using MS.Utility; - -using System; -using System.Diagnostics; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/FragmentNavigationEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/FragmentNavigationEventArgs.cs index d7f66098cef..1a8e60fbaa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/FragmentNavigationEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/FragmentNavigationEventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Navigation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/Journal.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/Journal.cs index 420efbc7f1a..41803f2a1a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/Journal.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/Journal.cs @@ -21,18 +21,10 @@ // // -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.Serialization; -using System.Windows.Threading; -using System.Security; using MS.Internal; using MS.Internal.AppModel; -using MS.Utility; -using System.ComponentModel; // Since we disable PreSharp warnings in this file, we first need to disable warnings about unknown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntry.cs index 83f1bdd7ee5..fab008f08ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntry.cs @@ -11,23 +11,13 @@ // // -using System; -using System.Collections; -using System.Diagnostics; -using System.IO; using System.IO.Packaging; -using System.Globalization; using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Security ; -using System.Windows.Markup; using MS.Internal.AppModel; using MS.Internal; using MS.Internal.Utility; -using System.Windows.Controls.Primitives; - //In order to avoid generating warnings about unknown message numbers and //unknown pragmas when compiling your C# source code with the actual C# compiler, //you need to disable warnings 1634 and 1691. (Presharp Documentation) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntryListConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntryListConverter.cs index b810bb84f92..ae370e3b49b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntryListConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/JournalEntryListConverter.cs @@ -12,15 +12,11 @@ // Disable unknown #pragma warning for pragmas we use to exclude certain PreSharp violations #pragma warning disable 1634, 1691 -using System; using System.Collections; using System.Collections.Specialized; using System.Globalization; -using System.ComponentModel; using System.Windows.Data; -using MS.Internal; - namespace System.Windows.Navigation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationFailedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationFailedEventArgs.cs index f6b98dc147b..3edba644a7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationFailedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationFailedEventArgs.cs @@ -15,7 +15,6 @@ // This event is fired on navigation container and refired on the NavigationApplication // -using System.ComponentModel; using System.Net; namespace System.Windows.Navigation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationMode.cs index 2f5cf306721..c51f4bd608c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationMode.cs @@ -10,8 +10,6 @@ // Refresh method (or corresponding UI button). // -using System; - namespace System.Windows.Navigation { #region NavigationMode Enum diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationService.cs index ae5879e15e1..4196face476 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationService.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationService.cs @@ -7,28 +7,19 @@ // Description: Implements the Avalon basic Navigation unit class // -using System; -using System.Timers; using System.IO; using System.IO.Packaging; -using System.Globalization; using System.Windows.Threading; using System.Collections; using System.ComponentModel; -using System.Reflection; -using System.Diagnostics; using System.Security; -using System.Runtime.Serialization.Formatters.Binary; using System.Net; using System.Net.Cache; using MS.Internal; using MS.Internal.Navigation; using MS.Internal.Utility; using MS.Internal.AppModel; -using MS.Internal.Controls; using MS.Utility; - -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationWindow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationWindow.cs index c4f824d6b41..68f2e691d0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationWindow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/NavigationWindow.cs @@ -14,33 +14,17 @@ // of the window. // -using System; using System.Collections; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; using MS.Internal.AppModel; using MS.Internal.KnownBoxes; using MS.Internal.Utility; -using MS.Utility; -using MS.Win32; -using MS.Internal.PresentationFramework; - -using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Navigation; using System.Windows.Markup; -using System.Windows.Threading; -using System.Windows.Documents; namespace System.Windows.Navigation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/PageFunction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/PageFunction.cs index eeccb900bfb..f1b2c375369 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/PageFunction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/PageFunction.cs @@ -9,8 +9,6 @@ // this is the base element class from which the developer derives // from to enable returning results to a caller. // -using System; -using System.Diagnostics; using System.Windows.Controls; using MS.Internal.AppModel; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/RequestNavigateEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/RequestNavigateEventArgs.cs index baa83cc0925..494b0579581 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/RequestNavigateEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/RequestNavigateEventArgs.cs @@ -5,13 +5,7 @@ // // -using System; -using System.Net; -using System.Windows; - -using MS.Internal.Utility; - -namespace System.Windows.Navigation +namespace System.Windows.Navigation { /// /// EventArgs for RequestNavigate diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/ReturnEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/ReturnEventArgs.cs index 9b6a656d85d..d77f5c22c93 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/ReturnEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Navigation/ReturnEventArgs.cs @@ -9,8 +9,6 @@ // that enable setting, getting a typed value that's // passed between Pagefunctions. // -using System; - namespace System.Windows.Navigation { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs index a56a34277a0..1041588be6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs @@ -3,9 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Collections; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPath.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPath.cs index ae20d0f97d2..2a464e263de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPath.cs @@ -14,15 +14,12 @@ // using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Text; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Windows.Data; -using System.Windows.Threading; using System.Windows.Markup; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPathConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPathConverter.cs index d73cf24c5ee..a7facd2de44 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPathConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/PropertyPathConverter.cs @@ -7,18 +7,12 @@ // and saving PropertyPath to string // -using System; using System.ComponentModel; using System.Collections.ObjectModel; using System.Text; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Windows; using System.Windows.Markup; -using MS.Internal; -using MS.Utility; using MS.Internal.Data; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventArgs.cs index bfd5e32ee4b..4867510af1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventHandler.cs index b1db42c6273..3b3d9452380 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RequestBringIntoViewEventHandler.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionary.cs index 540bb073281..b22e28f6662 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionary.cs @@ -9,30 +9,20 @@ * * \***************************************************************************/ -using System; using System.IO; using System.Net; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.Diagnostics; using System.ComponentModel; -using System.Security; using System.Windows.Threading; using System.Windows.Media; using System.Windows.Diagnostics; -using System.IO.Packaging; -using MS.Internal.IO.Packaging; // for PackageCacheEntry -using System.Globalization; -using System.Windows.Navigation; using MS.Internal; using MS.Internal.Utility; using MS.Internal.AppModel; -using MS.Utility; using System.Xaml; -using System.Xaml.Permissions; using System.Windows.Baml2006; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryCollection.cs index f11d49bd414..421f5dcb5c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryCollection.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Collections.ObjectModel; -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryLocation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryLocation.cs index 09e00408901..93db7aa0264 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryLocation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceDictionaryLocation.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceKey.cs index 4685c83a04f..97a73c75c95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceKey.cs @@ -9,7 +9,6 @@ * * \***************************************************************************/ -using System; using System.Reflection; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpression.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpression.cs index 10dfc6c86e1..7f410ca4403 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpression.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpression.cs @@ -9,9 +9,7 @@ // // -using System; using System.ComponentModel; -using System.Diagnostics; using System.Windows.Markup; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpressionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpressionConverter.cs index 6a92eaac81a..4af0f1bcc47 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpressionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceExpressionConverter.cs @@ -9,13 +9,8 @@ // // -using System; using System.ComponentModel; using System.Globalization; -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; - -using System.Windows; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceKeyNotFoundException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceKeyNotFoundException.cs index 43a899cf797..525dd178fa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceKeyNotFoundException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourceReferenceKeyNotFoundException.cs @@ -9,9 +9,7 @@ // // -using System; using System.Runtime.Serialization; -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Resources/StreamResourceInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Resources/StreamResourceInfo.cs index 2286634fa4f..2c47e6f867d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Resources/StreamResourceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Resources/StreamResourceInfo.cs @@ -15,8 +15,6 @@ using System.IO; -using System; - namespace System.Windows.Resources { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourcesChangeInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourcesChangeInfo.cs index 199369d8358..a503ce0d323 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourcesChangeInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ResourcesChangeInfo.cs @@ -11,10 +11,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RoutedPropertyChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RoutedPropertyChangedEventArgs.cs index e92eee3e1a4..15db1282be9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RoutedPropertyChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/RoutedPropertyChangedEventArgs.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Windows; -using System.Windows.Input; - // Disable CS3001, CS3003, CS3024: Warning as Error: not CLS-compliant #pragma warning disable 3001, 3003, 3024 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs index 9eb6e476f5c..0259d755b00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs @@ -9,7 +9,6 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; using System.Windows.Markup; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SetterBaseCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SetterBaseCollection.cs index 441be77702a..4ef8aab3942 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SetterBaseCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SetterBaseCollection.cs @@ -11,10 +11,6 @@ * \***************************************************************************/ using System.Collections.ObjectModel; // Collection -using System.Diagnostics; // Debug.Assert -using System.Windows.Data; // Binding knowledge -using System.Windows.Media; // Visual knowledge -using System.Windows.Markup; // MarkupExtension namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Ellipse.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Ellipse.cs index a93585c4861..30a180ad3f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Ellipse.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Ellipse.cs @@ -8,16 +8,7 @@ // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; -using MS.Internal; -using System.ComponentModel; - -using System; namespace System.Windows.Shapes { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Line.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Line.cs index e692c91baec..fa3ad272d4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Line.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Line.cs @@ -7,16 +7,8 @@ // Implementation of Line shape element. // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; using System.ComponentModel; -using MS.Internal; - -using System; namespace System.Windows.Shapes { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Path.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Path.cs index 2781b2ac50f..9c0e0ae60d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Path.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Path.cs @@ -7,14 +7,7 @@ // Implementation of Path shape element. // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; -using System.Security; -using System.Windows; using System.Windows.Media; - -using System; using MS.Internal.PresentationFramework; namespace System.Windows.Shapes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polygon.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polygon.cs index 4a412980476..3e3c79b1523 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polygon.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polygon.cs @@ -8,16 +8,9 @@ // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; using MS.Internal; -using System; - namespace System.Windows.Shapes { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polyline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polyline.cs index 0584ba3da93..1980e0e6021 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polyline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Polyline.cs @@ -8,16 +8,9 @@ // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; using MS.Internal; -using System; - namespace System.Windows.Shapes { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Rectangle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Rectangle.cs index 4c51eb7482b..95ea689c885 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Rectangle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Rectangle.cs @@ -8,17 +8,9 @@ // -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; -using MS.Internal; using System.ComponentModel; -using System; - namespace System.Windows.Shapes { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Shape.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Shape.cs index fa7f247b604..1fe6897f4e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Shape.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shapes/Shape.cs @@ -10,15 +10,10 @@ // -using System.Diagnostics; -using System.Windows.Threading; - -using System.Windows; using System.Windows.Media; using System.ComponentModel; using MS.Internal; using MS.Internal.PresentationFramework; -using System; namespace System.Windows.Shapes { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SharedDp.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SharedDp.cs index 04684bb8d59..2279fe1e5a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SharedDp.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SharedDp.cs @@ -14,10 +14,6 @@ * \***************************************************************************/ - -using System; -using System.Windows; - namespace System.Windows { internal class SharedDp diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs index a23f6b9925f..3822e12022a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs @@ -2,30 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - +using System.ComponentModel; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Windows.Markup; +using MS.Internal; +using MS.Internal.AppModel; +using MS.Internal.Interop; +using MS.Win32; + +using HRESULT = MS.Internal.Interop.HRESULT; namespace System.Windows.Shell { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using System.Reflection; - using System.Runtime.InteropServices; - using System.Security; - using System.Text; - using System.Threading; - using System.Windows; - using System.Windows.Markup; - using MS.Internal; - using MS.Internal.AppModel; - using MS.Internal.PresentationFramework; - using MS.Internal.Interop; - using MS.Win32; - - using HRESULT = MS.Internal.Interop.HRESULT; - /// /// The list of possible reasons why a JumpItem would be rejected from a JumpList when applied. /// @@ -73,7 +64,7 @@ public JumpItemsRejectedEventArgs(IList rejectedItems, IList(rejectedItems).AsReadOnly(); @@ -212,7 +203,7 @@ public static void ReleaseShellObjects(List<_ShellObjectPair> list) } } } - + } #region Attached Property Methods @@ -279,7 +270,7 @@ public static JumpList GetJumpList(Application application) public JumpList() : this(null, false, false) - { + { // Restore the ability to use ISupportInitialize. _initializing = null; } @@ -290,7 +281,7 @@ public JumpList(IEnumerable items, bool showFrequent, bool showRecent) { _jumpItems = new List(items); } - else + else { _jumpItems = new List(); } @@ -326,7 +317,7 @@ public bool ShowFrequentCategory { public bool ShowRecentCategory { get; - set; + set; } /// @@ -400,11 +391,11 @@ public void EndInit() /// for what taskbar item an HWND should be associated with, e.g. you can put /// windows from multiple processes into the same group, or you can prevent glomming /// of HWNDs that would otherwise be shown together. - /// + /// /// Even though this property isn't exposed on the public WPF OM /// we still want to make sure that the jump list gets associated with /// the current running app even if the client has explicitly changed the id. - /// + /// /// It's straightforward to p/invoke to set these for the running application or /// the HWND. Not so much for this object. /// @@ -617,8 +608,8 @@ private void ApplyList() // For common use patterns there isn't really any user code on the stack, so there isn't // an opportunity to catch this in the app. // We can instead handle this. - - // Try to notify the developer if they're hitting this. + + // Try to notify the developer if they're hitting this. if (TraceShell.IsEnabled) { TraceShell.Trace(TraceEventType.Error, TraceShell.RejectingJumpItemsBecauseCatastrophicFailure); @@ -722,7 +713,7 @@ private static bool ListContainsShellObject(List<_ShellObjectPair> removedList, { var removedLink = shellMap.ShellObject as IShellLinkW; if (removedLink != null) - { + { // There's no intrinsic comparison function for ShellLinks. // Talking to the Shell guys, the way they compare these is to catenate a string with // a normalized version of the app path and the unmodified args. @@ -759,7 +750,7 @@ private static object GetShellObjectForJumpItem(JumpItem jumpItem) return CreateItemFromJumpPath(jumpPath); } else if (jumpTask != null) - { + { return CreateLinkFromJumpTask(jumpTask, true); } @@ -880,7 +871,7 @@ private static void AddCategory(ICustomDestinationList cdl, string category, Lis } private static readonly string _FullName; - + #region Converter methods private static IShellLinkW CreateLinkFromJumpTask(JumpTask jumpTask, bool allowSeparators) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/TaskbarItemInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/TaskbarItemInfo.cs index ebbe683ac61..dc2e1bb0bbd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/TaskbarItemInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/TaskbarItemInfo.cs @@ -3,13 +3,11 @@ // See the LICENSE file in the project root for more information. +using System.Windows.Media; +using MS.Internal; + namespace System.Windows.Shell { - using System; - using System.Windows; - using System.Windows.Media; - using MS.Internal; - /// /// The values of TaskbarItemInfo's ProgressState dependency property. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfo.cs index 0fff2d729c2..ef07cf1a56b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfo.cs @@ -4,14 +4,11 @@ +using System.Windows.Input; +using System.Windows.Media; + namespace System.Windows.Shell { - using System; - using System.Diagnostics; - using System.Windows; - using System.Windows.Input; - using System.Windows.Media; - public sealed class ThumbButtonInfo : Freezable, ICommandSource { protected override Freezable CreateInstanceCore() diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfoCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfoCollection.cs index 3648b7aa56e..57cd7583b9d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfoCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/ThumbButtonInfoCollection.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - namespace System.Windows.Shell { - using System.Windows; - public class ThumbButtonInfoCollection : FreezableCollection { protected override Freezable CreateInstanceCore() diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs index 6d6ab8f24f5..eaae5f94939 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs @@ -4,19 +4,16 @@ +using System.Diagnostics.CodeAnalysis; +using System.Windows.Data; +using Standard; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Shell #else namespace Microsoft.Windows.Shell #endif { - using System; - using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; - using System.Windows; - using System.Windows.Data; - using Standard; - public enum ResizeGripDirection { None, diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs index 205d10aa13d..963f9be94e4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs @@ -4,26 +4,21 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Windows.Interop; +using System.Windows.Media; +using System.Windows.Threading; +using Standard; + +using HANDLE_MESSAGE = System.Collections.Generic.KeyValuePair; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Shell #else namespace Microsoft.Windows.Shell #endif { - using System; - using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - using System.Threading; - using System.Windows; - using System.Windows.Interop; - using System.Windows.Media; - using System.Windows.Threading; - using Standard; - - using HANDLE_MESSAGE = System.Collections.Generic.KeyValuePair; - internal class WindowChromeWorker : DependencyObject { // Delegate signature used for Dispatcher.BeginInvoke. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventArgs.cs index 2b5f418b47a..4c30ce2d12a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventHandler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventHandler.cs index 6efc6828ca9..1245f4a44a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventHandler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SizeChangedEventHandler.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SourceUriTypeConverterMarkupExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SourceUriTypeConverterMarkupExtension.cs index a7ff3c36cda..36327d477fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SourceUriTypeConverterMarkupExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SourceUriTypeConverterMarkupExtension.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; -using System.Globalization; using System.Reflection; -using System.Windows; using System.Windows.Navigation; namespace System.Windows.Baml2006 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Debug.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Debug.cs index 364902aa474..ed5ad2f5a40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Debug.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Debug.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - // Conditional to use more aggressive fail-fast behaviors when debugging. #define DEV_DEBUG +using System.Threading; + // This file contains general utilities to aid in development. // It is distinct from unit test Assert classes. // Classes here generally shouldn't be exposed publicly since @@ -16,10 +16,6 @@ namespace Standard { - using System; - using System.Diagnostics; - using System.Threading; - /// A static class for verifying assumptions. internal static class Assert { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DoubleUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DoubleUtil.cs index 6651c54a374..a1b0ab2380a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DoubleUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DoubleUtil.cs @@ -5,9 +5,6 @@ namespace Standard { - using System; - using System.Diagnostics.CodeAnalysis; - /// /// DoubleUtil uses fixed eps to provide fuzzy comparison functionality for doubles. /// Note that FP noise is a big problem and using any of these compare diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DpiHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DpiHelper.cs index 3a405af30b2..43ae804fc29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DpiHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/DpiHelper.cs @@ -4,13 +4,11 @@ +using System.Windows; +using System.Windows.Media; + namespace Standard { - using System; - using System.Diagnostics.CodeAnalysis; - using System.Windows; - using System.Windows.Media; - internal static class DpiHelper { [ThreadStatic] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ErrorCodes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ErrorCodes.cs index 51f40ab19d8..b72e0e80252 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ErrorCodes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ErrorCodes.cs @@ -2,18 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; +using System.Runtime.InteropServices; namespace Standard { - using System; - using System.ComponentModel; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Reflection; - using System.Runtime.InteropServices; - using System.Security; - /// /// Wrapper for common Win32 status codes. /// @@ -66,6 +62,10 @@ internal struct Win32Error public static readonly Win32Error ERROR_CLASS_ALREADY_EXISTS = new Win32Error(1410); /// The specified datatype is invalid. public static readonly Win32Error ERROR_INVALID_DATATYPE = new Win32Error(1804); + /// Invalid window handle. + public static readonly Win32Error ERROR_INVALID_WINDOW_HANDLE = new Win32Error(1400); + /// This operation returned because the timeout period expired. + public static readonly Win32Error ERROR_TIMEOUT = new Win32Error(1460); /// /// Create a new Win32 error. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/MessageWindow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/MessageWindow.cs index 21229c2fb64..78e2a3cfb0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/MessageWindow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/MessageWindow.cs @@ -4,17 +4,14 @@ +using System.Runtime.ConstrainedExecution; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Threading; +using System.Diagnostics.CodeAnalysis; + namespace Standard { - using System; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System.Security; - using System.Windows; - using System.Windows.Threading; - using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; - internal sealed class MessageWindow : CriticalFinalizerObject { static MessageWindow() diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs index 05391593a14..39e54e1e89f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs @@ -4,26 +4,21 @@ +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Text; +using Microsoft.Win32.SafeHandles; + +// Some COM interfaces and Win32 structures are already declared in the framework. +// Interesting ones to remember in System.Runtime.InteropServices.ComTypes are: +using IStream = System.Runtime.InteropServices.ComTypes.IStream; +using NativeMethodsSetLastError = MS.Internal.WindowsBase.NativeMethodsSetLastError; + namespace Standard { - using System; - using System.ComponentModel; - using System.Diagnostics.CodeAnalysis; - using System.IO; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Security; - using System.Text; - using Microsoft.Win32.SafeHandles; - - // Some COM interfaces and Win32 structures are already declared in the framework. - // Interesting ones to remember in System.Runtime.InteropServices.ComTypes are: - using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; - using IPersistFile = System.Runtime.InteropServices.ComTypes.IPersistFile; - using IStream = System.Runtime.InteropServices.ComTypes.IStream; - using NativeMethodsSetLastError = MS.Internal.WindowsBase.NativeMethodsSetLastError; - #region Native Values internal static class Win32Value diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ShellProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ShellProvider.cs index 7e334379fc8..2cd2c598680 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ShellProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/ShellProvider.cs @@ -4,17 +4,15 @@ -namespace Standard -{ - using System; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Security; - using System.Text; - using MS.Internal.Interop; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Text; +using MS.Internal.Interop; - using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; +using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; +namespace Standard +{ #region Enums and Static Property Classes /// ShellItem attribute flags. SIATTRIBFLAGS_* diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Utilities.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Utilities.cs index f80df469060..d752318687c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Utilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Utilities.cs @@ -4,6 +4,12 @@ +using System.ComponentModel; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Imaging; + // This file contains general utilities to aid in development. // Classes here generally shouldn't be exposed publicly since // they're not particular to any library functionality. @@ -12,21 +18,6 @@ namespace Standard { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.IO; - using System.Reflection; - using System.Runtime.InteropServices; - using System.Security; - using System.Security.Cryptography; - using System.Text; - using System.Windows; - using System.Windows.Media; - using System.Windows.Media.Imaging; - internal static partial class Utility { private static readonly Version _osVersion = Environment.OSVersion.Version; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs index 6f8a03bd2b6..3810bff579f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs @@ -4,6 +4,11 @@ +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Threading; + // This file contains general utilities to aid in development. // Classes here generally shouldn't be exposed publicly since // they're not particular to any library functionality. @@ -12,13 +17,6 @@ namespace Standard { - using System; - using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.IO; - using System.Threading; - /// /// A static class for retail validated assertions. /// Instead of breaking into the debugger an exception is thrown. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StartupEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StartupEventArgs.cs index c708171ee45..825bae58c5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StartupEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StartupEventArgs.cs @@ -11,13 +11,7 @@ // The developer will typically hook this event if they want to take action at startup time // -using System.ComponentModel; - -using System.Windows.Interop; -using MS.Internal.PresentationFramework; -using System.Runtime.CompilerServices; using MS.Internal; -using MS.Internal.AppModel; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StaticResourceExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StaticResourceExtension.cs index 42bd197df78..0bd351d6ebf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StaticResourceExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StaticResourceExtension.cs @@ -9,17 +9,9 @@ * * \***************************************************************************/ -using System; -using System.Collections; -using System.Diagnostics; -using System.Windows; using System.Windows.Diagnostics; -using System.Windows.Documents; using System.Windows.Markup; -using System.Reflection; -using MS.Internal; using System.Xaml; -using System.Collections.Generic; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Style.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Style.cs index 851d3421f86..33eb9da1b09 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Style.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Style.cs @@ -11,20 +11,10 @@ \***************************************************************************/ using System.Collections; using System.Collections.Specialized; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; // For Debug.Assert using System.Windows.Threading; -using System.Threading; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Media; -using System.Windows.Media.Animation; // For Storyboard support using System.Windows.Markup; -using System.IO; using MS.Utility; -using MS.Internal; -using System; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleHelper.cs index 22b59038cb1..fb2d6049ba6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleHelper.cs @@ -12,22 +12,16 @@ using MS.Internal; // Helper using MS.Utility; // ItemStructList using System.Collections; // Hashtable -using System.Collections.Generic; // List using System.Collections.Specialized; // HybridDictionary using System.ComponentModel; // TypeConverter, TypeDescriptor -using System.Diagnostics; // Debug.Assert using System.Runtime.CompilerServices; // ConditionalWeakTable using System.Windows.Controls; // Control, ContentPresenter using System.Windows.Data; // BindingExpression -using System.Windows.Documents; // TableRowGroup,TableRow using System.Windows.Media; // VisualCollection using System.Windows.Media.Animation; // Storyboard using System.Windows.Markup; // MarkupExtension -using System.Windows.Threading; // DispatcherObject using System.Threading; // Interlocked using MS.Internal.Data; // BindingValueChangedEventArgs -using System.Globalization; -using System.Reflection; // Disabling 1634 and 1691: // In order to avoid generating warnings about unknown message numbers and diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleTypedPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleTypedPropertyAttribute.cs index 72d51a8b0a6..ad8ee3634c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleTypedPropertyAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/StyleTypedPropertyAttribute.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemColors.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemColors.cs index 4f58e6adb16..bf270633b3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemColors.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemColors.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Windows.Media; -using Microsoft.Win32; using MS.Win32; using UISettingsRCW = MS.Internal.WindowsRuntime.Windows.UI.ViewManagement.UISettingsRCW; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs index 365abcf1b73..052d84f902a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs @@ -3,14 +3,12 @@ // See the LICENSE file in the project root for more information. +using System.Windows.Input; +using System.Windows.Interop; +using Standard; + namespace System.Windows { - using System; - using System.Security; - using System.Windows.Input; - using System.Windows.Interop; - using Standard; - public static class SystemCommands { public static RoutedCommand CloseWindowCommand { get; private set; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs index 2034e9141a3..f76d65ca79a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs @@ -2,16 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.ComponentModel; -using System.Runtime.InteropServices; using System.Windows.Media; -using System.Security; -using System.Windows.Controls.Primitives; -using Microsoft.Win32; -using MS.Win32; -using MS.Internal; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemKeyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemKeyConverter.cs index fc369fe7cfd..332b7a6329b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemKeyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemKeyConverter.cs @@ -9,10 +9,8 @@ // // -using System; using System.ComponentModel; using System.Globalization; -using System.ComponentModel.Design.Serialization; using System.Windows.Controls; using System.Windows.Controls.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemParameters.cs index e179d9e637f..707ce891695 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemParameters.cs @@ -2,19 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Controls.Primitives; using System.Windows.Media; -using Microsoft.Win32; using MS.Win32; using MS.Internal; using MS.Internal.Interop; -using MS.Internal.KnownBoxes; // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResourceHost.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResourceHost.cs index aaa1f574449..519eede3fa6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResourceHost.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResourceHost.cs @@ -6,8 +6,6 @@ // // Description: Object supplied as the source when the resource is fetched from the SystemResources // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResources.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResources.cs index 0252f614fba..1746f86fc5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResources.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemResources.cs @@ -5,18 +5,14 @@ // // -using System; -using System.Diagnostics; using System.IO; using System.Reflection; using System.Resources; using System.Runtime.InteropServices; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; using System.Linq; -using System.Security; using System.Windows.Threading; using System.Text; using MS.Utility; @@ -24,11 +20,8 @@ using System.Windows.Markup; using System.Windows.Diagnostics; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Input; using System.Windows.Interop; -using System.Windows.Resources; -using System.Windows.Appearance; using MS.Win32; using MS.Internal; using MS.Internal.Ink; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemThemeKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemThemeKey.cs index c4273e026f8..402abd630d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemThemeKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemThemeKey.cs @@ -5,13 +5,8 @@ // // -using System; using System.Reflection; -using System.Text; -using System.Windows; -using System.Windows.Markup; using System.ComponentModel; -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpression.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpression.cs index 96a2cb95493..ee3deafdf5f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpression.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpression.cs @@ -10,11 +10,7 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpressionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpressionConverter.cs index 2ab8c56b01c..0ba2c36a76c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpressionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExpressionConverter.cs @@ -9,10 +9,7 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; -using System.Windows; -using System.Windows.Data; using System.Windows.Markup; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtension.cs index e864b0f2b9f..e0a773f0924 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtension.cs @@ -10,9 +10,7 @@ * * \***************************************************************************/ -using System; using System.ComponentModel; -using System.Windows; using System.Windows.Data; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtensionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtensionConverter.cs index ac1e7976e0a..14741b6d537 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtensionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateBindingExtensionConverter.cs @@ -10,12 +10,9 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; -using System.Windows; -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContent.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContent.cs index ac08d96250f..a161353245c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContent.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContent.cs @@ -5,9 +5,7 @@ using System.Xaml; using System.Xaml.Schema; using System.Xaml.Permissions; -using System.Collections.Generic; using System.Windows.Controls; -using System.Diagnostics; using System.Windows.Data; using System.Windows.Diagnostics; using System.Windows.Markup; @@ -16,7 +14,6 @@ using System.ComponentModel; using System.Collections; using System.Collections.Specialized; -using System.Security; using MS.Internal.Xaml.Context; using System.Windows.Baml2006; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContentLoader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContentLoader.cs index 10b8b54bcb5..84ef9362679 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContentLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateContentLoader.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; using System.Xaml; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateKey.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateKey.cs index 6d448cfb744..ad9c7479ea7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateKey.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateKey.cs @@ -7,11 +7,9 @@ // Description: Base class for DataTemplateKey, TableTemplateKey. // -using System; using System.Reflection; using System.ComponentModel; using System.Windows.Markup; -using MS.Internal.Data; // DataBindEngine.EnglishUSCulture namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateNameScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateNameScope.cs index 679d9774729..b042497646c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateNameScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateNameScope.cs @@ -10,11 +10,7 @@ * * \***************************************************************************/ -using System; -using System.Diagnostics; using MS.Internal; -using MS.Utility; -using System.Collections.Generic; using System.Collections.Specialized; using System.Collections; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplatePartAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplatePartAttribute.cs index 481e43dd9a2..a63dd83b5ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplatePartAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplatePartAttribute.cs @@ -5,8 +5,6 @@ // // -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateVisualStateAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateVisualStateAttribute.cs index c101550c3bd..36170e80f59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateVisualStateAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TemplateVisualStateAttribute.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TextPanelProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TextPanelProperties.cs index 983a9579787..dd430ec14f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TextPanelProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TextPanelProperties.cs @@ -9,10 +9,6 @@ // // -using System; -using System.Windows; -using System.Windows.Media; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeDictionaryExtension.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeDictionaryExtension.cs index 768066c22bb..3c63d98d8aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeDictionaryExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeDictionaryExtension.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Text; -using System.Windows; -using System.Windows.Data; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeInfoAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeInfoAttribute.cs index a98212d6102..8b696f32163 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeInfoAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeInfoAttribute.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Windows; using System.Reflection; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs index cf2af8ff911..98840099d56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs @@ -1,12 +1,5 @@ -using Standard; using Microsoft.Win32; -using System.Collections; -using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Windows.Interop; -using System.Windows.Media; using System.Windows.Appearance; -using System.Diagnostics; namespace System.Windows; @@ -28,13 +21,11 @@ internal static void OnSystemThemeChanged() FluentThemeState newFluentThemeState = new FluentThemeState(Application.Current.ThemeMode.Value, useLightColors); - if (s_currentFluentThemeState == newFluentThemeState) + if (s_currentFluentThemeState != newFluentThemeState) { - return; + AddOrUpdateThemeResources(Application.Current.Resources, GetThemeDictionary(Application.Current.ThemeMode)); } - - AddOrUpdateThemeResources(Application.Current.Resources, GetThemeDictionary(Application.Current.ThemeMode)); - + foreach (Window window in Application.Current.Windows) { if (window.ThemeMode == ThemeMode.None) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeMode.cs index eafa4be7811..7c4f64f1c38 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeMode.cs @@ -2,18 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.ComponentModel; - -using System.ComponentModel.Design.Serialization; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Windows; -using System.Windows.Markup; -using System.Security; -using MS.Internal; -using MS.Utility; using System.Diagnostics.CodeAnalysis; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeModeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeModeConverter.cs index bc6c90f113f..d6242e05486 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeModeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeModeConverter.cs @@ -2,18 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Windows; -using System.Windows.Markup; -using System.Security; -using MS.Internal; -using MS.Utility; using System.Diagnostics.CodeAnalysis; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThicknessConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThicknessConverter.cs index 8ff96de5cb4..b01564f01b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThicknessConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThicknessConverter.cs @@ -9,17 +9,12 @@ // // -using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Runtime.CompilerServices; using System.Globalization; using System.Reflection; -using System.Text; -using System.Windows; -using System.Security; using MS.Internal; -using MS.Utility; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeChangeInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeChangeInfo.cs index 7e12f8e63d1..7827d2e5549 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeChangeInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeChangeInfo.cs @@ -11,12 +11,6 @@ // // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Controls; -using System.Windows.Documents; using MS.Internal; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeWalkHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeWalkHelper.cs index 7eeee1fa005..14ac293fdc0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeWalkHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TreeWalkHelper.cs @@ -11,12 +11,8 @@ \***************************************************************************/ using MS.Internal; using MS.Utility; -using System; -using System.Diagnostics; -using System.Security; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Documents; using System.Windows.Media; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Trigger.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Trigger.cs index fd8b733e404..06d06a49883 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Trigger.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Trigger.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System.IO; using System.Collections.Specialized; using System.ComponentModel; using System.Windows.Markup; - -using System; -using System.Diagnostics; using System.Globalization; -using MS.Internal; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerAction.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerAction.cs index 97ab927d9d8..c4286c403b8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerAction.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerAction.cs @@ -13,7 +13,6 @@ * * \***************************************************************************/ -using System; using MS.Internal; namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerActionCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerActionCollection.cs index 2428b0f6fb8..230e7927fa2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerActionCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerActionCollection.cs @@ -11,9 +11,7 @@ * \***************************************************************************/ using System.Collections; // IList -using System.Collections.Generic; // IList using MS.Internal; -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs index 226bcab846b..b0d497d134b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs @@ -3,15 +3,10 @@ // See the LICENSE file in the project root for more information. using System.Collections.Specialized; -using System.IO; -using System.Windows.Markup; using MS.Utility; using MS.Internal; - -using System; using System.ComponentModel; // DesignerSerializationVisibilityAttribute & DefaultValue -using System.Diagnostics; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerCollection.cs index 43a074318b4..c4803eb847e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerCollection.cs @@ -10,8 +10,6 @@ * * \***************************************************************************/ -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.ObjectModel; // Collection using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualState.cs index d19531b0dd9..227f70aee9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualState.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System.Windows; using System.Windows.Markup; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateChangedEventArgs.cs index 52c81b1904c..2413b2317d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateChangedEventArgs.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Controls; - namespace System.Windows { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateGroup.cs index c17a2185855..3d6ddb939e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateGroup.cs @@ -3,12 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows; -using System.Windows.Controls; using System.Windows.Markup; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateManager.cs index 54e3ce0fd5d..0c3017b7d2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateManager.cs @@ -3,16 +3,11 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Animation; using MS.Internal; // ObservableCollectionDefaultValueFactory -using System.Security; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualTransition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualTransition.cs index 5d846aa1c48..66ae6fb270f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualTransition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualTransition.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.ComponentModel; -using System.Windows; using System.Windows.Markup; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Window.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Window.cs index dc4729fca43..911aa7f94de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Window.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Window.cs @@ -2,20 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// Description: Implements the base Avalon Window class -// - -using System; - using System.Collections; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Appearance; using System.Windows.Automation.Peers; using System.Windows.Controls; @@ -29,12 +19,12 @@ using MS.Internal.Interop; using MS.Internal.KnownBoxes; using MS.Win32; -using Microsoft.Win32; using System.Diagnostics.CodeAnalysis; -using HRESULT = MS.Internal.Interop.HRESULT; using BuildInfo = MS.Internal.PresentationFramework.BuildInfo; using SNM = Standard.NativeMethods; +using HRESULT = MS.Internal.Interop.HRESULT; +using Win32Error = MS.Internal.Interop.Win32Error; //In order to avoid generating warnings about unknown message numbers and //unknown pragmas when compiling your C# source code with the actual C# compiler, @@ -43,9 +33,6 @@ namespace System.Windows { - /// - /// - /// [Localizability(LocalizationCategory.Ignore)] public class Window : ContentControl, IWindowService { @@ -268,8 +255,8 @@ public void DragMove() // and WM_LBUTTONUP return value just signify whether the WndProc handled the // message or not, so they are not interesting #pragma warning disable 6523 - UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); - UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); + UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); + UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); #pragma warning restore 6523 } } @@ -516,7 +503,7 @@ public bool Activate() return false; } - return UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, CriticalHandle)); + return UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, Handle)); } #region LogicalTree /// @@ -566,28 +553,28 @@ public static Window GetWindow(DependencyObject dependencyObject) /// Gets or sets the Fluent theme mode of the window. /// /// - /// Setting this property controls if Fluent theme is loaded in Light, Dark or System mode. + /// Setting this property controls if Fluent theme is loaded in Light, Dark or System mode. /// It also controls the application of backdrop and darkmode on window. /// The four values for the ThemeMode enum are : - /// - No Fluent theme is loaded. However, if is not None, + /// - No Fluent theme is loaded. However, if is not None, /// then the window will appear as defined in . /// - Fluent theme is loaded based on the system theme. /// - Fluent theme is loaded in Light mode. /// - Fluent theme is loaded in Dark mode. - /// + /// /// These values are predefined in struct. - /// + /// /// The default value is . - /// + /// /// and are designed to be in sync with each other. - /// Syncing is done in order to avoid UI inconsistencies, for example, if the application is in dark mode - /// but the windows are in light mode or vice versa. - /// + /// Syncing is done in order to avoid UI inconsistencies, for example, if the application is in dark mode + /// but the windows are in light mode or vice versa. + /// /// Setting this property loads the Fluent theme dictionaries in the window resources. /// So, if you set this property, it is preferrable to not include Fluent theme dictionaries /// in the window resources manually. If you do, the Fluent theme dictionaries added in the window /// resources will take precedence over the ones added by setting this property. - /// + /// /// This property is experimental and may be removed in future versions. /// [Experimental("WPF0001")] @@ -607,10 +594,10 @@ public ThemeMode ThemeMode { throw new ArgumentException(string.Format("ThemeMode value {0} is invalid. Use None, System, Light or Dark", value)); } - + ThemeMode oldTheme = _themeMode; _themeMode = value; - + if(!AreResourcesInitialized) { ThemeManager.OnWindowThemeChanged(this, oldTheme, value); @@ -1097,7 +1084,7 @@ public Rect RestoreBounds return Rect.Empty; } - return GetNormalRectLogicalUnits(CriticalHandle); + return GetNormalRectLogicalUnits(Handle); } } @@ -1314,7 +1301,7 @@ public Window Owner return; } - SetOwnerHandle(_ownerWindow != null ? _ownerWindow.CriticalHandle: IntPtr.Zero); + SetOwnerHandle(_ownerWindow != null ? _ownerWindow.Handle: IntPtr.Zero); // Update OwnerWindows of the new owner if (_ownerWindow != null) @@ -1980,7 +1967,7 @@ protected virtual void OnSourceInitialized(EventArgs e) { VerifyContextAndObjectState(); - // Setting WindowBackdrop + // Setting WindowBackdrop WindowBackdropManager.SetBackdrop(this, WindowBackdropType); EventHandler handler = (EventHandler)Events[EVENT_SOURCEINITIALIZED]; @@ -2162,7 +2149,7 @@ internal void AddFluentDictionary(ResourceDictionary value, out bool invalidateR if(_reloadFluentDictionary && !AreResourcesInitialized) { - if(value != null && ThemeMode != ThemeMode.None) + if(value != null && ThemeMode != ThemeMode.None) { value.MergedDictionaries.Insert(0, ThemeManager.GetThemeDictionary(ThemeMode)); invalidateResources = true; @@ -2276,7 +2263,7 @@ internal void InternalClose(bool shutdown, bool ignoreCancel) // return value just signify whether the WndProc handled the // message or not, so it is not interesting #pragma warning disable 6523 - UnsafeNativeMethods.UnsafeSendMessage(CriticalHandle, WindowMessage.WM_CLOSE, new IntPtr(), new IntPtr()); + UnsafeNativeMethods.UnsafeSendMessage(Handle, WindowMessage.WM_CLOSE, new IntPtr(), new IntPtr()); #pragma warning enable 6523 } } @@ -2604,8 +2591,8 @@ internal void CreateSourceWindow(bool duringShow) // SECURITY_MANDATORY_LOW_RID, so don't propagate failed error codes. // It's not the end of the world if this fails: Shell integration simply won't work. MSGFLTINFO info; - UnsafeNativeMethods.ChangeWindowMessageFilterEx(_swh.CriticalHandle, WM_TASKBARBUTTONCREATED, MSGFLT.ALLOW, out info); - UnsafeNativeMethods.ChangeWindowMessageFilterEx(_swh.CriticalHandle, WindowMessage.WM_COMMAND, MSGFLT.ALLOW, out info); + UnsafeNativeMethods.ChangeWindowMessageFilterEx(_swh.Handle, WM_TASKBARBUTTONCREATED, MSGFLT.ALLOW, out info); + UnsafeNativeMethods.ChangeWindowMessageFilterEx(_swh.Handle, WindowMessage.WM_COMMAND, MSGFLT.ALLOW, out info); } if (Standard.Utility.IsOSWindows10OrNewer) @@ -2636,7 +2623,7 @@ internal void SetImmersiveDarkMode(bool useDarkMode) if(_useDarkMode == useDarkMode) return; - IntPtr handle = CriticalHandle; + IntPtr handle = Handle; if (handle != IntPtr.Zero) { bool succeeded = SNM.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode); @@ -2863,7 +2850,7 @@ internal virtual void SetupInitialState(double requestedTop, double requestedLef { if (WindowState == WindowState.Normal) { - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), new HandleRef(null, IntPtr.Zero), DoubleUtil.DoubleToInt(xDeviceUnits), DoubleUtil.DoubleToInt(yDeviceUnits), @@ -2946,7 +2933,7 @@ internal void SetRootVisualAndUpdateSTC() { if (WindowState == WindowState.Normal) { - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), new HandleRef(null, IntPtr.Zero), DoubleUtil.DoubleToInt(xDeviceUnits), DoubleUtil.DoubleToInt(yDeviceUnits), @@ -3034,7 +3021,7 @@ internal virtual void UpdateTitle(string title) // Adding check for IsCompositionTargetInvalid if ( IsSourceWindowNull == false && IsCompositionTargetInvalid == false) { - UnsafeNativeMethods.SetWindowText(new HandleRef(this, CriticalHandle), title); + UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), title); } } @@ -3047,7 +3034,7 @@ private void UpdateHwndSizeOnWidthHeightChange(double widthLogicalUnits, double Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when calling this function"); Point ptDeviceUnits = LogicalToDeviceUnits(new Point(widthLogicalUnits, heightLogicalUnits)); - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), new HandleRef(null, IntPtr.Zero), 0, 0, @@ -3159,7 +3146,7 @@ internal WindowBackdropType WindowBackdropType typeof(WindowBackdropType), typeof(Window), new PropertyMetadata( - WindowBackdropType.MainWindow, + WindowBackdropType.MainWindow, new PropertyChangedCallback(OnBackdropTypeChanged))); private static void OnBackdropTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) @@ -3212,14 +3199,14 @@ internal bool IsVisibilitySet /// Exposes the hwnd of the window. This property is used by the WindowInteropHandler /// class /// - internal IntPtr CriticalHandle + internal IntPtr Handle { get { VerifyContextAndObjectState(); if (_swh != null) { - return _swh.CriticalHandle; + return _swh.Handle; } else return IntPtr.Zero; @@ -3851,7 +3838,7 @@ private bool CalculateWindowLocation(ref double leftDeviceUnits, ref double topD // because it is possible that the hwnd is created (WIH.EnsureHandle) but it is not shown yet; layout has not // happen; ActualWidth/Height is not calculated yet. // If the owner hwnd is not yet created, we use Owner.Width/Height. - if (Owner.CriticalHandle == IntPtr.Zero) + if (Owner.Handle == IntPtr.Zero) { ownerSizeDeviceUnits = Owner.LogicalToDeviceUnits(new Point(Owner.Width, Owner.Height)); } @@ -4135,7 +4122,7 @@ private void UpdateIcon() // We'll keep track of the true count separately. var iconWindows = new HandleRef[] { - new HandleRef(this, CriticalHandle), + new HandleRef(this, Handle), default(HandleRef) }; int iconWindowsCount = 1; @@ -4209,7 +4196,7 @@ private void SetOwnerHandle(IntPtr ownerHandle) if (IsSourceWindowNull == false) { - UnsafeNativeMethods.SetWindowLong(new HandleRef(null, CriticalHandle), + UnsafeNativeMethods.SetWindowLong(new HandleRef(null, Handle), NativeMethods.GWL_HWNDPARENT, _ownerHandle); @@ -4217,7 +4204,7 @@ private void SetOwnerHandle(IntPtr ownerHandle) // We want to do this because once we are passed in the IntPtr for // the parent window, the Owner window is not the parent anymore. - if ((_ownerWindow != null) && (_ownerWindow.CriticalHandle != _ownerHandle)) + if ((_ownerWindow != null) && (_ownerWindow.Handle != _ownerHandle)) { _ownerWindow.OwnedWindowsInternal.Remove(this); _ownerWindow = null; @@ -5168,7 +5155,7 @@ private void OnShowInTaskbarChanged() // It is recommended to hide the window, chnage the style bits and then show it again. if (_isVisible) { - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | @@ -5185,7 +5172,7 @@ private void OnShowInTaskbarChanged() // it won't break this code. if (fHideWindow) { - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | @@ -5226,7 +5213,7 @@ private void OnWindowStateChanged(WindowState windowState) { if (_isVisible == true) { - HandleRef hr = new HandleRef(this, CriticalHandle); + HandleRef hr = new HandleRef(this, Handle); int style = _Style; @@ -5367,7 +5354,7 @@ private void OnTopmostChanged(bool topmost) if (IsSourceWindowNull == false && IsCompositionTargetInvalid == false) { HandleRef hWnd = topmost ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; - UnsafeNativeMethods.SetWindowPos(new HandleRef(null, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), hWnd, 0, 0, 0, 0, NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOACTIVATE); @@ -5586,14 +5573,14 @@ private object ShowHelper(object booleanBox) (nCmd == NativeMethods.SW_SHOW || nCmd == NativeMethods.SW_SHOWNA)) { int flags = (nCmd == NativeMethods.SW_SHOWNA) ? NativeMethods.SWP_NOACTIVATE : 0; - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 0, 0, 0, 0, flags | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOOWNERZORDER | NativeMethods.SWP_SHOWWINDOW); } else { - UnsafeNativeMethods.ShowWindow(new HandleRef(this, CriticalHandle), nCmd); + UnsafeNativeMethods.ShowWindow(new HandleRef(this, Handle), nCmd); } // We already did a ShowWindow upabove and then because of the using, we will flush which @@ -5946,7 +5933,7 @@ private void UpdateHwndRestoreBounds(double newValue, BoundsSpecified specifiedR NativeMethods.WINDOWPLACEMENT wp = new NativeMethods.WINDOWPLACEMENT(); wp.length = Marshal.SizeOf(typeof(NativeMethods.WINDOWPLACEMENT)); - UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); + UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); double convertedValue = (LogicalToDeviceUnits(new Point(newValue, 0))).X; switch (specifiedRestoreBounds) @@ -6012,7 +5999,7 @@ private void UpdateHwndRestoreBounds(double newValue, BoundsSpecified specifiedR } - UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); + UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, Handle), ref wp); } // deltaX = workAreaOriginValue - screenOriginValue (both in virtual co-ods) @@ -6025,7 +6012,7 @@ private Point TransformWorkAreaScreenArea(Point pt, TransformType transformType) // First we get the monitor on which the window is on. [Get/Set]WindowPlacement // co-ods are dependent on the monitor on which the window is on. - IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL); + IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, Handle), NativeMethods.MONITOR_DEFAULTTONULL); if (hMonitor != IntPtr.Zero) { @@ -6267,7 +6254,7 @@ private void UpdateHwndPositionOnTopLeftChange(double leftLogicalUnits, double t Point ptDeviceUnits = LogicalToDeviceUnits(new Point(leftLogicalUnits, topLogicalUnits)); - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), new HandleRef(null, IntPtr.Zero), DoubleUtil.DoubleToInt(ptDeviceUnits.X), DoubleUtil.DoubleToInt(ptDeviceUnits.Y), @@ -6441,7 +6428,7 @@ private void SetTaskbarStatus() private void OnTaskbarRetryTimerTick(object sender, EventArgs e) { - UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); + UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); } private void ApplyTaskbarItemInfo() @@ -6580,7 +6567,7 @@ private HRESULT UpdateTaskbarProgressState() } } - HRESULT hr = _taskbarList.SetProgressState(CriticalHandle, tbpf); + HRESULT hr = _taskbarList.SetProgressState(Handle, tbpf); if (hr.Succeeded) { // Explicitly update this in case this property being set @@ -6610,7 +6597,7 @@ private HRESULT UpdateTaskbarProgressValue() Debug.Assert(0 <= taskbarInfo.ProgressValue && taskbarInfo.ProgressValue <= 1); var intValue = (ulong)(taskbarInfo.ProgressValue * precisionValue); - return _taskbarList.SetProgressValue(CriticalHandle, intValue, precisionValue); + return _taskbarList.SetProgressValue(Handle, intValue, precisionValue); } private HRESULT UpdateTaskbarOverlay() @@ -6630,7 +6617,7 @@ private HRESULT UpdateTaskbarOverlay() hicon = IconHelper.CreateIconHandleFromImageSource(taskbarInfo.Overlay, _overlaySize); } - return _taskbarList.SetOverlayIcon(CriticalHandle, hicon, null); + return _taskbarList.SetOverlayIcon(Handle, hicon, null); } finally { @@ -6650,7 +6637,7 @@ private HRESULT UpdateTaskbarDescription() tooltip = taskbarInfo.Description ?? ""; } - return _taskbarList.SetThumbnailTooltip(CriticalHandle, tooltip); + return _taskbarList.SetThumbnailTooltip(Handle, tooltip); } @@ -6670,7 +6657,7 @@ private HRESULT UpdateTaskbarThumbnailClipping() // Don't count on Window properties being in sync at the time of this call. // Just use native methods to check - if (UnsafeNativeMethods.IsIconic(CriticalHandle)) + if (UnsafeNativeMethods.IsIconic(Handle)) { // If the window is minimized then don't try to update the clip. return HRESULT.S_FALSE; @@ -6685,7 +6672,7 @@ private HRESULT UpdateTaskbarThumbnailClipping() Thickness margin = taskbarInfo.ThumbnailClipMargin; // Use the native GetClientRect. Window.ActualWidth and .ActualHeight include the non-client areas. NativeMethods.RECT physicalClientRc = default(NativeMethods.RECT); - SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref physicalClientRc); + SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref physicalClientRc); var logicalClientRc = new Rect( DeviceToLogicalUnits(new Point(physicalClientRc.left, physicalClientRc.top)), DeviceToLogicalUnits(new Point(physicalClientRc.right, physicalClientRc.bottom))); @@ -6706,7 +6693,7 @@ private HRESULT UpdateTaskbarThumbnailClipping() } } - return _taskbarList.SetThumbnailClip(CriticalHandle, interopRc); + return _taskbarList.SetThumbnailClip(Handle, interopRc); } private HRESULT RegisterTaskbarThumbButtons() @@ -6729,7 +6716,7 @@ private HRESULT RegisterTaskbarThumbButtons() // If this gets called (successfully) more than once it usually returns E_INVALIDARG. It's not really // a failure and we potentially want to retry this operation. - HRESULT hr = _taskbarList.ThumbBarAddButtons(CriticalHandle, (uint)nativeButtons.Length, nativeButtons); + HRESULT hr = _taskbarList.ThumbBarAddButtons(Handle, (uint)nativeButtons.Length, nativeButtons); if (hr == HRESULT.E_INVALIDARG) { hr = HRESULT.S_FALSE; @@ -6840,7 +6827,7 @@ private HRESULT UpdateTaskbarThumbButtons() } // Finally, apply the update. - return _taskbarList.ThumbBarUpdateButtons(CriticalHandle, (uint)nativeButtons.Length, nativeButtons); + return _taskbarList.ThumbBarUpdateButtons(Handle, (uint)nativeButtons.Length, nativeButtons); } finally { @@ -6893,12 +6880,12 @@ internal void Flush() // this instance of the Manager. // HwndStyleManager manager = Manager; - if (manager.Dirty && CriticalHandle != IntPtr.Zero) + if (manager.Dirty && Handle != IntPtr.Zero) { - UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse); - UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse); + UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse); + UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse); - UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, + UnsafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | @@ -7272,7 +7259,7 @@ private EventHandlerList Events private Window _ownerWindow; // owner window private bool _reloadFluentDictionary = false; private bool _resourcesInitialized = false; - + // keeps track of the owner hwnd // we need this one b/c a owner/parent // can be set through the WindowInteropHandler @@ -7423,13 +7410,13 @@ internal bool IsCompositionTargetInvalid } } - internal IntPtr CriticalHandle + internal IntPtr Handle { get { if (_sourceWindow != null) { - return _sourceWindow.CriticalHandle; + return _sourceWindow.Handle; } else { @@ -7449,7 +7436,7 @@ internal NativeMethods.RECT WorkAreaBoundsForNearestMonitor NativeMethods.MONITORINFOEX monitorInfo = new NativeMethods.MONITORINFOEX(); monitorInfo.cbSize = Marshal.SizeOf(typeof(NativeMethods.MONITORINFOEX)); - monitor = SafeNativeMethods.MonitorFromWindow( new HandleRef( this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONEAREST ); + monitor = SafeNativeMethods.MonitorFromWindow( new HandleRef( this, Handle), NativeMethods.MONITOR_DEFAULTTONEAREST ); if ( monitor != IntPtr.Zero ) { SafeNativeMethods.GetMonitorInfo( new HandleRef ( this, monitor ) , monitorInfo); @@ -7464,7 +7451,7 @@ private NativeMethods.RECT ClientBounds get { NativeMethods.RECT rc = new NativeMethods.RECT(0,0,0,0); - SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); + SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rc); return rc; } @@ -7475,7 +7462,7 @@ internal NativeMethods.RECT WindowBounds get { NativeMethods.RECT rc = new NativeMethods.RECT(0,0,0,0); - SafeNativeMethods.GetWindowRect(new HandleRef(this, CriticalHandle), ref rc); + SafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref rc); return rc; } @@ -7491,12 +7478,12 @@ private NativeMethods.POINT GetWindowScreenLocation(FlowDirection flowDirection) NativeMethods.RECT rc = new NativeMethods.RECT(0, 0, 0, 0); // with RTL window, GetClientRect returns reversed coordinates - SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); + SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rc); // note that we use rc.right here for the RTL case and client to screen that point pt = new NativeMethods.POINT(rc.right, rc.top); } - UnsafeNativeMethods.ClientToScreen(new HandleRef(this, _sourceWindow.CriticalHandle), ref pt); + UnsafeNativeMethods.ClientToScreen(new HandleRef(this, _sourceWindow.Handle), ref pt); return pt; } @@ -7526,7 +7513,7 @@ internal bool IsActiveWindow { get { - return (_sourceWindow.CriticalHandle == UnsafeNativeMethods.GetActiveWindow()); + return (_sourceWindow.Handle == UnsafeNativeMethods.GetActiveWindow()); } } @@ -7576,7 +7563,7 @@ internal int StyleExFromHwnd { // Should never be called when Handle is non-null Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" ); - return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE); + return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_EXSTYLE); } } @@ -7586,7 +7573,7 @@ internal int StyleFromHwnd { // Should never be called when Handle is non-null Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" ); - return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE); + return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_STYLE); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/WindowCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/WindowCollection.cs index 77d63fd5205..c094eaa5081 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/WindowCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/WindowCollection.cs @@ -9,12 +9,11 @@ // that have been opened in the current application. // using System.Collections; -using System.Diagnostics; namespace System.Windows { #region WindowCollection class - + /// /// WindowCollection can be used to interate over all the windows that have been /// opened in the current application. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/InstallationError.xaml.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/InstallationError.xaml.cs index 16ea9d18176..e73abc94bd8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/InstallationError.xaml.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/InstallationError.xaml.cs @@ -3,16 +3,12 @@ // See the LICENSE file in the project root for more information. using System; -using System.Reflection; using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; using System.Windows.Threading; using System.Windows.Input; using System.Diagnostics; using System.IO; using System.Windows.Interop; -using System.Security; namespace Microsoft.Internal.DeploymentUI { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/AccountType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/AccountType.cs index 9d6046c6047..f8e4f412001 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/AccountType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/AccountType.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CommandEnforcer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CommandEnforcer.cs index e866a3cc0de..8cdbacdcf99 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CommandEnforcer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CommandEnforcer.cs @@ -4,13 +4,10 @@ // Description: Manager for Enforcing RM Permissions on DocumentApplication-specific RoutedUICommands. -using MS.Internal.Documents; using System; using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Security; using System.Windows.Input; -using System.Windows.TrustUI; namespace MS.Internal.Documents.Application { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CriticalFileToken.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CriticalFileToken.cs index f58bdecc06a..7b0d2fada6a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CriticalFileToken.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/CriticalFileToken.cs @@ -7,29 +7,28 @@ // user has authorized us to manipulate. using System; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// The CriticalFileToken class ensures file represented is the one the -/// user has authorized us to manipulate. -/// -/// -/// Responsibility: -/// Allow XpsViewer to safely pass around information on which file the user -/// has authorized us to manipulate on thier behalf. Ensure that the creator -/// of the object has the privledge to manipulate the file represented. -/// -/// Design Comments: -/// Many classes need to perform privledged operations files on behalf of the -/// user. However only DocObjHost and FilePresentation can assert it is user -/// sourced data. -/// -/// As such we need them to create this 'token' which will will use as the only -/// source of authoritative information for which files we are manipulating. -/// -internal sealed class CriticalFileToken + /// + /// The CriticalFileToken class ensures file represented is the one the + /// user has authorized us to manipulate. + /// + /// + /// Responsibility: + /// Allow XpsViewer to safely pass around information on which file the user + /// has authorized us to manipulate on thier behalf. Ensure that the creator + /// of the object has the privledge to manipulate the file represented. + /// + /// Design Comments: + /// Many classes need to perform privledged operations files on behalf of the + /// user. However only DocObjHost and FilePresentation can assert it is user + /// sourced data. + /// + /// As such we need them to create this 'token' which will will use as the only + /// source of authoritative information for which files we are manipulating. + /// + internal sealed class CriticalFileToken { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Document.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Document.cs index f43554e4839..57ba6277df8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Document.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Document.cs @@ -7,49 +7,48 @@ using System; using System.IO; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Defines the common contract for all underlying documents in XpsViewer. -/// -/// -/// Responsibility: -/// This class imposes a contract which provides for: -/// -/// - chaining dependencies -/// - expose stream which providers may manipulate at each level -/// - disposing of resources in order of dependency -/// -/// Design Comments: -/// Packages are dependent on EncryptedPackages who are dependent on FileStreams -/// however all these classes are very different in function. However they -/// share a need for understanding dependencies and all use streams (some -/// consuming, some publshing and others both). -/// -/// Providing a chain ensures dependent operations are executed in order. -/// -/// The design of exsiting components also requires us to define three common -/// types of streams (Source - the original data, Workspace - a type of change -/// log, Destination - the place to save changes). -/// -/// Examples: -/// - FileController need to substitue streams as as we can not edit in -/// place and may not be able to re-open files on some OSes (hence -/// IsRebindNeed). -/// -/// - Protected documents need to decrypt the underlying FileStream before -/// passing them up to the PackageDocument. (hence Source). -/// -/// - As Package does not allow us to discard changes we need a seperate stream -/// for working on packages (hence Workspace). -/// -/// - When Protected documents have a key change (PublishLicense) they need -/// to read from the source, and write to the destination at the same time -/// (hence Destination & IsFileCopySafe). -/// -internal abstract class Document : IChainOfDependenciesNode, IDisposable + /// + /// Defines the common contract for all underlying documents in XpsViewer. + /// + /// + /// Responsibility: + /// This class imposes a contract which provides for: + /// + /// - chaining dependencies + /// - expose stream which providers may manipulate at each level + /// - disposing of resources in order of dependency + /// + /// Design Comments: + /// Packages are dependent on EncryptedPackages who are dependent on FileStreams + /// however all these classes are very different in function. However they + /// share a need for understanding dependencies and all use streams (some + /// consuming, some publshing and others both). + /// + /// Providing a chain ensures dependent operations are executed in order. + /// + /// The design of exsiting components also requires us to define three common + /// types of streams (Source - the original data, Workspace - a type of change + /// log, Destination - the place to save changes). + /// + /// Examples: + /// - FileController need to substitue streams as as we can not edit in + /// place and may not be able to re-open files on some OSes (hence + /// IsRebindNeed). + /// + /// - Protected documents need to decrypt the underlying FileStream before + /// passing them up to the PackageDocument. (hence Source). + /// + /// - As Package does not allow us to discard changes we need a seperate stream + /// for working on packages (hence Workspace). + /// + /// - When Protected documents have a key change (PublishLicense) they need + /// to read from the source, and write to the destination at the same time + /// (hence Destination & IsFileCopySafe). + /// + internal abstract class Document : IChainOfDependenciesNode, IDisposable { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentApplicationJournalEntryEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentApplicationJournalEntryEventArgs.cs index beac7046cde..7ba6518e738 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentApplicationJournalEntryEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentApplicationJournalEntryEventArgs.cs @@ -5,10 +5,6 @@ // Description: Used as a custom journal entry for changes in the DocumentApplication's UI state. using System; -using System.Runtime.Serialization; -using System.Windows; -using System.Windows.Documents; -using System.Windows.Navigation; namespace MS.Internal.Documents.Application { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentManager.cs index 4cee39f7662..aa052231ecc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentManager.cs @@ -9,30 +9,29 @@ using System; using System.Collections.Generic; using System.IO; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Exposes the basic operations that can be performed on documents. (Open, -/// EnableEdit, Save) -/// -/// -/// Responsibility: -/// The class is responsible for delegating the work to the appropriate -/// controller(s) in the order needed based on document dependencies. -/// -/// Design Comments: -/// Packages are dependent on EncryptedPackages who are dependent on FileStreams -/// however all these classes are very different in function. -/// -/// By design once a controller has reported handling a document it will not be -/// given to other controllers. A controller should not see documents they are -/// not in the dependency chain for. -/// -/// Example: FileController should never see RightsDocument. -/// -internal sealed class DocumentManager + /// + /// Exposes the basic operations that can be performed on documents. (Open, + /// EnableEdit, Save) + /// + /// + /// Responsibility: + /// The class is responsible for delegating the work to the appropriate + /// controller(s) in the order needed based on document dependencies. + /// + /// Design Comments: + /// Packages are dependent on EncryptedPackages who are dependent on FileStreams + /// however all these classes are very different in function. + /// + /// By design once a controller has reported handling a document it will not be + /// given to other controllers. A controller should not see documents they are + /// not in the dependency chain for. + /// + /// Example: FileController should never see RightsDocument. + /// + internal sealed class DocumentManager : ChainOfResponsiblity { #region Constructors diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentProperties.cs index 9939274c6e4..641a55b8a58 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentProperties.cs @@ -7,12 +7,8 @@ using System; using System.Drawing; -using System.Globalization; using System.IO; using System.IO.Packaging; // For Package -using System.Security; // For CriticalData -using System.Windows.TrustUI; // For string resources -using System.Windows.Xps.Packaging; // For XpsDocument namespace MS.Internal.Documents.Application { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentPropertiesDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentPropertiesDialog.cs index 36a3561cd52..a7d94eb8aac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentPropertiesDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentPropertiesDialog.cs @@ -4,15 +4,8 @@ // Description: // DocumentPropertiesDialog - Dialog to view the current document properties. -using MS.Internal.Documents; using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; using System.Globalization; -using System.IO.Packaging; // For Package -using System.Security; -using System.Text; using System.Windows.Forms; using System.Windows.TrustUI; // For string resources diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentStream.cs index 7de9174e4a4..5b2c7b79fcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/DocumentStream.cs @@ -12,31 +12,30 @@ using System; using System.Globalization; using System.IO; -using System.Security; using System.Security.AccessControl; using System.Windows.TrustUI; namespace MS.Internal.Documents.Application { -/// -/// An XpsDocument stream represents the stream data for the document -/// regardless of implementation of the backing streams. It has logical -/// operations that allow elevating from Read to SafeWrite and editing in place. -/// -/// -/// Responsibility: -/// The class must hide the location and implemenation complexity of -/// performing simple logical operations needed by the system. -/// -/// Design Comments: -/// The need for this is primarly driven from two factors: -/// -/// - Package which does not allow use to discard changes -/// -/// - RightsManagement where key changes make it impossible to edit a -/// document in place -/// -internal sealed class DocumentStream : StreamProxy, IDisposable + /// + /// An XpsDocument stream represents the stream data for the document + /// regardless of implementation of the backing streams. It has logical + /// operations that allow elevating from Read to SafeWrite and editing in place. + /// + /// + /// Responsibility: + /// The class must hide the location and implemenation complexity of + /// performing simple logical operations needed by the system. + /// + /// Design Comments: + /// The need for this is primarly driven from two factors: + /// + /// - Package which does not allow use to discard changes + /// + /// - RightsManagement where key changes make it impossible to edit a + /// document in place + /// + internal sealed class DocumentStream : StreamProxy, IDisposable { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileController.cs index be156a5abd9..e1a42043268 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileController.cs @@ -8,17 +8,16 @@ using System; using System.IO; -using System.Security; using MS.Internal.Security; // AttachmentService namespace MS.Internal.Documents.Application { -/// -/// Responsible for the lifecycle of the FileDocument and the actions that can -/// be performed on it. -/// -/// -internal class FileController : IDocumentController + /// + /// Responsible for the lifecycle of the FileDocument and the actions that can + /// be performed on it. + /// + /// + internal class FileController : IDocumentController { #region IDocumentController Members //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileDocument.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileDocument.cs index e634db58e73..56a028e02b8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FileDocument.cs @@ -6,17 +6,15 @@ // Extends StreamDocument with CriticalFileTokens for use by FileController // FilePresentation and DocumentStream. -using System; using System.IO; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Extends StreamDocument with CriticalFileTokens for use by FileController -/// FilePresentation and DocumentStream. -/// -internal class FileDocument : StreamDocument + /// + /// Extends StreamDocument with CriticalFileTokens for use by FileController + /// FilePresentation and DocumentStream. + /// + internal class FileDocument : StreamDocument { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FilePresentation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FilePresentation.cs index 26411c56128..4a6911f72d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FilePresentation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/FilePresentation.cs @@ -7,21 +7,20 @@ using System; using System.IO; -using System.Security; using System.Windows.Forms; using System.Windows.TrustUI; namespace MS.Internal.Documents.Application { -/// -/// Interacts with user on file based information for XpsViewer. -/// -/// -/// Responsibility: -/// Should be the only class that interacts with the user with or for file -/// location information. -/// -internal static class FilePresentation + /// + /// Interacts with user on file based information for XpsViewer. + /// + /// + /// Responsibility: + /// Should be the only class that interacts with the user with or for file + /// location information. + /// + internal static class FilePresentation { #region Internal Methods //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/HostedController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/HostedController.cs index 796e2c7d800..1d8cd695f05 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/HostedController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/HostedController.cs @@ -5,20 +5,14 @@ // Description: // Responsible for the lifecycle of the Document when hosted in a browser. -using System; -using System.Security; -using System.Windows.TrustUI; -using System.Windows.Interop; -using MS.Internal; - namespace MS.Internal.Documents.Application { -/// -/// Responsible for the lifecycle of the Document when hosted in a browser. -/// -/// + /// + /// Responsible for the lifecycle of the Document when hosted in a browser. + /// + /// -internal class HostedController : IDocumentController + internal class HostedController : IDocumentController { #region IDocumentController Members //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/IDocumentController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/IDocumentController.cs index c20f053fc67..5da91e5f4b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/IDocumentController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/IDocumentController.cs @@ -4,16 +4,13 @@ // Description: Defines the interface for participating in the document lifecycle. -using System; -using System.Collections.Generic; - namespace MS.Internal.Documents.Application { -/// -/// Defines the interface for participating in the document lifecycle. -/// -/// -internal interface IDocumentController : IChainOfResponsibiltyNode + /// + /// Defines the interface for participating in the document lifecycle. + /// + /// + internal interface IDocumentController : IChainOfResponsibiltyNode { /// /// Implementors should prepare Document.Workspace for editing purposes diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/NavigationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/NavigationHelper.cs index a009d82a75e..f984588d67a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/NavigationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/NavigationHelper.cs @@ -7,10 +7,6 @@ // with Uri navigations. using System; -using System.Security; -using System.Windows.Interop; -using System.Windows.TrustUI; -using MS.Internal; namespace MS.Internal.Documents.Application { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageController.cs index 45c8c2bde24..cad56e2ce45 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageController.cs @@ -7,19 +7,16 @@ // be performed on it. using System; -using System.IO.Packaging; -using System.Security; using System.Windows.TrustUI; -using System.Windows.Xps.Packaging; namespace MS.Internal.Documents.Application { -/// -/// Responsible for the lifecycle of the PackageDocument and the actions that can -/// be performed on it. -/// -/// -internal class PackageController : IDocumentController + /// + /// Responsible for the lifecycle of the PackageDocument and the actions that can + /// be performed on it. + /// + /// + internal class PackageController : IDocumentController { #region IDocumentController Members //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageDocument.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageDocument.cs index 74e1521fc42..3fa2f52526d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PackageDocument.cs @@ -4,17 +4,14 @@ // Description: Extends Document with a single member TrancationalPackage. -using System; using System.IO; -using System.IO.Packaging; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Extends Document with a single member TrancationalPackage. -/// -internal class PackageDocument : Document + /// + /// Extends Document with a single member TrancationalPackage. + /// + internal class PackageDocument : Document { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PageTextBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PageTextBox.cs index 8e733ef4777..68a537357ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PageTextBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/PageTextBox.cs @@ -7,14 +7,12 @@ // DocumentApplicationUI. using System; -using System.ComponentModel; using System.Globalization; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Data; using System.Windows.Input; // For event args using System.Windows.TrustUI; // For string resources diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RestrictedTransactionalPackage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RestrictedTransactionalPackage.cs index 00ab3a60dfe..f09b6512af0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RestrictedTransactionalPackage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RestrictedTransactionalPackage.cs @@ -8,18 +8,15 @@ using System; using System.IO; using System.IO.Packaging; -using System.Security; using System.Windows.TrustUI; -using MS.Internal; - namespace MS.Internal.Documents.Application { -/// -/// This class wraps TransactionalPackage, ensuring that only approved -/// part content types can be written. -/// -internal sealed class RestrictedTransactionalPackage : TransactionalPackage + /// + /// This class wraps TransactionalPackage, ensuring that only approved + /// part content types can be written. + /// + internal sealed class RestrictedTransactionalPackage : TransactionalPackage { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsController.cs index 66020d164bd..a1070430696 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsController.cs @@ -6,29 +6,24 @@ // be performed on it. using System; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; -using System.Security; using System.Security.RightsManagement; -using System.Windows; -using System.Windows.TrustUI; // for SR -using MS.Internal.IO.Packaging.CompoundFile; namespace MS.Internal.Documents.Application { -/// -/// Responsible for the lifecycle of the RightsDocument and the actions that can -/// be performed on it. -/// -/// -/// -/// All IDocumentController methods are expected to throw if provided -/// a document that is not a RightsDocument. Users of the IDocumentController -/// interface are expected to use the IChainOfResponsibiltyNode method before -/// calling into the IDocumentController methods to avoid runtime errors. -/// -class RightsController : IDocumentController, IDisposable + /// + /// Responsible for the lifecycle of the RightsDocument and the actions that can + /// be performed on it. + /// + /// + /// + /// All IDocumentController methods are expected to throw if provided + /// a document that is not a RightsDocument. Users of the IDocumentController + /// interface are expected to use the IChainOfResponsibiltyNode method before + /// calling into the IDocumentController methods to avoid runtime errors. + /// + class RightsController : IDocumentController, IDisposable { #region IDocumentController Members //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsDocument.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsDocument.cs index cdcc7adba7f..7ca1b2256c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsDocument.cs @@ -3,15 +3,13 @@ // See the LICENSE file in the project root for more information. using System.IO; using System.IO.Packaging; -using System.Security; -using System.Security.RightsManagement; namespace MS.Internal.Documents.Application { -/// -/// Extends StreamDocument with EncryptedPackageEnvelope for use by RightsController. -/// -internal class RightsDocument : StreamDocument + /// + /// Extends StreamDocument with EncryptedPackageEnvelope for use by RightsController. + /// + internal class RightsDocument : StreamDocument { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsManagementSuppressedStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsManagementSuppressedStream.cs index 37aa8d548bb..c47392eccc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsManagementSuppressedStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/RightsManagementSuppressedStream.cs @@ -6,15 +6,13 @@ using System; using System.IO; -using System.Security; -using System.Windows.TrustUI; -using SR=System.Windows.TrustUI.SR; +using SR = System.Windows.TrustUI.SR; namespace MS.Internal.Documents.Application { -internal sealed class RightsManagementSuppressedStream : StreamProxy + internal sealed class RightsManagementSuppressedStream : StreamProxy { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StatusInfoItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StatusInfoItem.cs index 61b8665f39f..62f428dad00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StatusInfoItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StatusInfoItem.cs @@ -5,13 +5,10 @@ // Description: Used to control an (RM or DigSig) InfoBar and ToolBar item in MongooseUI -using MS.Internal.Documents; using System; -using System.Globalization; using System.Windows; using System.Windows.Controls; using System.Windows.Shapes; -using System.Windows.TrustUI; namespace MS.Internal.Documents.Application { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamDocument.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamDocument.cs index d62034da8e1..9ae966bf0ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamDocument.cs @@ -6,16 +6,15 @@ using System.IO; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Extends Document with a support for StreamProxy versus simply stream. -/// -/// The type of stream to back the document with. -/// -internal class StreamDocument : Document where T : StreamProxy + /// + /// Extends Document with a support for StreamProxy versus simply stream. + /// + /// The type of stream to back the document with. + /// + internal class StreamDocument : Document where T : StreamProxy { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamHelper.cs index c64350b8009..cf36d901d5b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamHelper.cs @@ -4,15 +4,14 @@ // Description: A static utilitly class for stream related functions. -using System; using System.IO; namespace MS.Internal.Documents.Application { -/// -/// A static utilitly class for stream related functions. -/// -internal static class StreamHelper + /// + /// A static utilitly class for stream related functions. + /// + internal static class StreamHelper { #region Internal Methods //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamProxy.cs index 3629144f021..1a4fa7159cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/StreamProxy.cs @@ -10,18 +10,17 @@ using System; using System.IO; -using System.Security; using System.Windows.TrustUI; namespace MS.Internal.Documents.Application { -/// -/// Implements the Proxy pattern from Design Patterns for Stream. The intended -/// usage is to control access to the Stream; specifically to allow one to -/// replace the underlying stream. The StreamProxy can also ensure, if -/// desired, that the underlying stream is readonly. -/// -internal class StreamProxy : Stream + /// + /// Implements the Proxy pattern from Design Patterns for Stream. The intended + /// usage is to control access to the Stream; specifically to allow one to + /// replace the underlying stream. The StreamProxy can also ensure, if + /// desired, that the underlying stream is readonly. + /// + internal class StreamProxy : Stream { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/SuppressedPackageProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/SuppressedPackageProperties.cs index c1039d43e77..4c2768807b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/SuppressedPackageProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/SuppressedPackageProperties.cs @@ -8,23 +8,22 @@ using System; using System.IO.Packaging; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Responsible for suppressing the Assert for unmanaged code permission and -/// replacing it with SecurityCritical attribute. -/// -/// -/// This is implemented as a decorating proxy where all calls are passed to -/// a target PackageProperties object. The primary mitigation for the -/// asserts is that the class sets the target from EncryptedPackageEnvelope -/// the known good source for the target; as well the entire class is -/// SecurityCritical. -/// -internal class SuppressedProperties : PackageProperties + /// + /// Responsible for suppressing the Assert for unmanaged code permission and + /// replacing it with SecurityCritical attribute. + /// + /// + /// This is implemented as a decorating proxy where all calls are passed to + /// a target PackageProperties object. The primary mitigation for the + /// asserts is that the class sets the target from EncryptedPackageEnvelope + /// the known good source for the target; as well the entire class is + /// SecurityCritical. + /// + internal class SuppressedProperties : PackageProperties { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Trace.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Trace.cs index c8e5e334740..42d76eaa8b5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Trace.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/Trace.cs @@ -4,17 +4,15 @@ // Description: Utility class for Trace switches and methods for XpsViewer. -using System; using System.Diagnostics; using System.Globalization; -using System.Security; namespace MS.Internal.Documents.Application { -/// -/// Utility class for Trace switches and methods for XpsViewer. -/// -internal static class Trace + /// + /// Utility class for Trace switches and methods for XpsViewer. + /// + internal static class Trace { #region Internal Methods //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/TransactionalPackage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/TransactionalPackage.cs index 47e40abf3f5..8e0e9311b29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/TransactionalPackage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/TransactionalPackage.cs @@ -18,32 +18,27 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.IO; using System.IO.Packaging; -using System.Text; -using System.Security; using System.Windows.TrustUI; -using MS.Internal; - namespace MS.Internal.Documents.Application { -/// -/// This class represents a Package which does not alter the original -/// and writes the changes to a temporary package (when provided) as a -/// type of change log; leaving the original untouched. -/// -/// -/// In the descriptions below the following terms are used: -/// -/// Proxy: This is the reference being given to callers that -/// contains underlying objects. -/// Active: The underlying object that the proxy should pass calls to. -/// Temp: This is the writeable object that contains changes. -/// Original: This is the read only object that has the source data. -/// -internal class TransactionalPackage : Package, IDisposable + /// + /// This class represents a Package which does not alter the original + /// and writes the changes to a temporary package (when provided) as a + /// type of change log; leaving the original untouched. + /// + /// + /// In the descriptions below the following terms are used: + /// + /// Proxy: This is the reference being given to callers that + /// contains underlying objects. + /// Active: The underlying object that the proxy should pass calls to. + /// Temp: This is the writeable object that contains changes. + /// Original: This is the read only object that has the source data. + /// + internal class TransactionalPackage : Package, IDisposable { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/WriteableOnDemandPackagePart.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/WriteableOnDemandPackagePart.cs index 649cb8a23f9..90c0fd44a13 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/WriteableOnDemandPackagePart.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/WriteableOnDemandPackagePart.cs @@ -10,40 +10,36 @@ // replaced with one provided by a delegate. using System; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; -using System.Text; using System.Windows.TrustUI; -using MS.Internal.IO; - namespace MS.Internal.Documents.Application { -/// -/// This class acts as a type of proxy; it is responsible for forwarding all -/// PackagePart requests to the active PackagePart. Unlike a proxy it is -/// controls which part is active. Initially the active part is the stream -/// provided on construction, at the time of the first write operation the -/// active part is replaced with one provided by a delegate.The class will -/// get a writing PackagePart only when needed. -/// -/// -/// When GetStreamCore is called instead of returning the stream directly we -/// return a WriteableOnDemandStream a proxy. We provide this stream proxy -/// a read only stream from the active part and a factory method for -/// creating a writeable stream. -/// -/// When the WriteableStreamFactory method is called, if our active part is -/// writable we simply forward a GetStream request to our active part. -/// -/// Our active part becomes writeable on the first call to our -/// WriteableStreamFactory method, we use the delegate provide at our -/// construction to get a writeable part and set it as the active part. -/// -/// Currently this is the only way our active part becomes writeable. -/// -internal sealed class WriteableOnDemandPackagePart : PackagePart + /// + /// This class acts as a type of proxy; it is responsible for forwarding all + /// PackagePart requests to the active PackagePart. Unlike a proxy it is + /// controls which part is active. Initially the active part is the stream + /// provided on construction, at the time of the first write operation the + /// active part is replaced with one provided by a delegate.The class will + /// get a writing PackagePart only when needed. + /// + /// + /// When GetStreamCore is called instead of returning the stream directly we + /// return a WriteableOnDemandStream a proxy. We provide this stream proxy + /// a read only stream from the active part and a factory method for + /// creating a writeable stream. + /// + /// When the WriteableStreamFactory method is called, if our active part is + /// writable we simply forward a GetStream request to our active part. + /// + /// Our active part becomes writeable on the first call to our + /// WriteableStreamFactory method, we use the delegate provide at our + /// construction to get a writeable part and set it as the active part. + /// + /// Currently this is the only way our active part becomes writeable. + /// + internal sealed class WriteableOnDemandPackagePart : PackagePart { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/ZoomComboBox.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/ZoomComboBox.cs index 524a8a6c5ad..229872c2b15 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/ZoomComboBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/Application/ZoomComboBox.cs @@ -7,14 +7,12 @@ #pragma warning disable 1634, 1691 using System; -using System.ComponentModel; using System.Globalization; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Automation.Provider; using System.Windows.Controls; -using System.Windows.Data; using System.Windows.Input; // For event args using System.Windows.TrustUI; // For string resources diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CertificatePriorityStatus.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CertificatePriorityStatus.cs index 31ab69a72d2..0300c6c6ad7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CertificatePriorityStatus.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CertificatePriorityStatus.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CredentialManagerDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CredentialManagerDialog.cs index 2120fed3957..3e2b159f593 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CredentialManagerDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/CredentialManagerDialog.cs @@ -6,15 +6,8 @@ // CredentialManagerDialog is the Forms dialog that allows users to select RM Creds. using System; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Windows.Forms; using System.Windows.TrustUI; -using System.Security; - -using System.Security.RightsManagement; namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogBaseForm.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogBaseForm.cs index a866f325ffa..09f9a085ac1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogBaseForm.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogBaseForm.cs @@ -4,9 +4,7 @@ // Description: // DialogBaseForm: Base class for all DRP dialogs -using System; using System.Windows.Forms; -using System.Drawing; using System.Globalization; using System.Windows.TrustUI; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogDivider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogDivider.cs index 1900e454dba..dd4418e7b59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogDivider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DialogDivider.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Drawing; -using System.Security; using System.Windows.Forms; -using System.IO.Packaging; -using System.Windows.TrustUI; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignature.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignature.cs index 1aa2d0bda2e..81bbc21e8f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignature.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignature.cs @@ -7,10 +7,7 @@ // request. using System; -using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; -using System.IO.Packaging; -using System.Security; // for SecurityCritical attributes using System.Windows.Xps.Packaging; // for XpsDigitalSignature namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignatureProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignatureProvider.cs index d215f5bd654..f0fb16c314d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignatureProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DigitalSignatureProvider.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.IO; using System.IO.Packaging; -using System.Net; -using System.Security; // For elevations using System.Security.Cryptography.X509Certificates; using System.Windows.TrustUI; using System.Windows.Xps.Packaging; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentApplicationDocumentViewer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentApplicationDocumentViewer.cs index d0a2e44f370..f1d0e47e1f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentApplicationDocumentViewer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentApplicationDocumentViewer.cs @@ -9,24 +9,17 @@ #pragma warning disable 1634, 1691 using MS.Internal.Documents.Application; -using MS.Internal.IO.Packaging; // For PreloadedPackages using System; -using System.Collections.Generic; -using System.ComponentModel; // For IValueConverter using System.Globalization; // For localization of string conversion using System.IO; -using System.IO.Packaging; // For Packages using System.Printing; // For PrintQueue -using System.Security; using System.Windows; using System.Windows.Controls; // For Page Ranges -using System.Windows.Controls.Primitives; // For ToggleButton using System.Windows.Data; // For data binding using System.Windows.Documents; // For PresentationUIStyleResources using System.Windows.Documents.Serialization; // For WritingCompletedEventArgs using System.Windows.Input; // For focus / input based events using System.Windows.Interop; // For WindowInteropHelper -using System.Windows.Navigation; // For NavigationWindow using System.Windows.Markup; // For MarkupExtension using System.Windows.Threading; // For DispatcherPriority using System.Windows.TrustUI; // For string resources diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentSignatureManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentSignatureManager.cs index e64cf0cdb82..ffeb863c1ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentSignatureManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentSignatureManager.cs @@ -5,18 +5,14 @@ // DocumentSignatureManager is an internal API for Mongoose to deal with Digital Signatures. using System; -using System.Collections; using System.Collections.Generic; using System.Globalization; -using System.IO.Packaging; using System.Reflection; -using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Windows.TrustUI; using System.Windows.Forms; -using System.Windows.Interop; using System.Windows.Threading; using MS.Internal.Documents.Application; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentStatusResources.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentStatusResources.cs index ddc344cb85b..2bbc7cca2e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentStatusResources.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/DocumentStatusResources.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/FindToolBar.xaml.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/FindToolBar.xaml.cs index ca63a8f34df..e88a8e38246 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/FindToolBar.xaml.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/FindToolBar.xaml.cs @@ -4,25 +4,13 @@ // Description: Code behind file for the DocumentViewer FindToolBar. -using System.Security; - using System.Windows.Threading; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.TrustUI; using System; -using System.Reflection; -using System.Text; -using System.Globalization; - -using MS.Internal.Documents.Application; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IDigitalSignatureProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IDigitalSignatureProvider.cs index ef12895b63a..cfc2f508aa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IDigitalSignatureProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IDigitalSignatureProvider.cs @@ -5,21 +5,20 @@ // Description: IDigSigProvider is a facade to the XPS Document signature implementation. using System; -using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Security.Cryptography.X509Certificates; namespace MS.Internal.Documents { -/// -/// IDigSigProvider is a facade to the XPS Document signature implementation. -/// -/// -/// The responsiblity of the facade in this case is to simplify implementation -/// and encapsulate changes. -/// -internal interface IDigitalSignatureProvider + /// + /// IDigSigProvider is a facade to the XPS Document signature implementation. + /// + /// + /// The responsiblity of the facade in this case is to simplify implementation + /// and encapsulate changes. + /// + internal interface IDigitalSignatureProvider { #region Methods //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IRightsManagementProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IRightsManagementProvider.cs index cad607e48ab..5a11401e9af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IRightsManagementProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/IRightsManagementProvider.cs @@ -5,15 +5,11 @@ // Description: // IRightsManagementProvider is interface that defines the DRP's RM API adapter. -using System; -using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Security.RightsManagement; using System.IO; using System.IO.Packaging; -using MS.Internal.Security.RightsManagement; -using System.Security; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage1.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage1.cs index ad4985b20a3..32d8bb05922 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage1.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage1.cs @@ -4,11 +4,6 @@ // Description: // RMEnrollmentPage1 is page 1 of the RM enrollment wizard. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; using System.Windows.TrustUI; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage2.cs index 8a904a6e81b..d80982c591c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage2.cs @@ -5,11 +5,6 @@ // Description: // RMEnrollmentPage2 is page 2 of the RM enrollment wizard. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; using System.Windows.TrustUI; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage3.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage3.cs index 62204c76ca1..5ab84481c64 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage3.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMEnrollmentPage3.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; using System.Windows.TrustUI; namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPermissions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPermissions.cs index f739e328363..f82f0b360b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPermissions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPermissions.cs @@ -4,14 +4,8 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; using System.Windows.Forms; -using System.Collections; using System.Windows.TrustUI; -using System.Security; -using System.Security.RightsManagement; using MS.Internal.Documents.Application; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.RightsTable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.RightsTable.cs index 72e683e0f81..905abe98bc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.RightsTable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.RightsTable.cs @@ -9,8 +9,6 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Globalization; -using System.Security; using System.Windows.Forms; using System.Windows.TrustUI; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.cs index 829a3fec8f3..9da3eac5ba5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RMPublishingDialog.cs @@ -6,17 +6,12 @@ using Microsoft.Win32; using System; -using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; using System.Drawing; using System.Globalization; using System.IO; -using System.Security; using System.Security.RightsManagement; -using System.Text; -using System.Text.RegularExpressions; using System.Windows; using System.Windows.Forms; using System.Windows.TrustUI; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RequestedSignatureDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RequestedSignatureDialog.cs index 9e6a4b4ab2f..9ca8c58a902 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RequestedSignatureDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RequestedSignatureDialog.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; using System.Windows.TrustUI; namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementLicense.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementLicense.cs index 5f37777acc3..7946607b12a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementLicense.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementLicense.cs @@ -3,10 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections; -using System.IO.Packaging; -using System.Security.RightsManagement; -using System.Security; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementManager.cs index 728b96d01ac..6ebc8c7aae1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementManager.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.IO; using System.IO.Packaging; -using System.Security; using System.Security.RightsManagement; using System.Text; using System.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementProvider.cs index da7fe05244d..e3f176d20d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementProvider.cs @@ -7,26 +7,24 @@ using System.Collections.ObjectModel; using System.IO; using System.IO.Packaging; -using System.Security; using System.Security.RightsManagement; -using System.Windows.TrustUI; using MS.Internal.Documents.Application; using Microsoft.Win32; -using SR=System.Windows.TrustUI.SR; +using SR = System.Windows.TrustUI.SR; namespace MS.Internal.Documents { -/// -/// RightsManagementProvider is used to connect DRP to RM APIs -/// -/// -/// This class is a facade for the RM APIs. It is the model between the Manager -/// and the EncryptedPackageEnvelope and System.Security.RightsManagement classes. -/// -internal class RightsManagementProvider : IRightsManagementProvider, IDisposable + /// + /// RightsManagementProvider is used to connect DRP to RM APIs + /// + /// + /// This class is a facade for the RM APIs. It is the model between the Manager + /// and the EncryptedPackageEnvelope and System.Security.RightsManagement classes. + /// + internal class RightsManagementProvider : IRightsManagementProvider, IDisposable { #region Constructors //-------------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementResourceHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementResourceHelper.cs index 83333b6b12e..d4e3c835f35 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementResourceHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementResourceHelper.cs @@ -2,19 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; -using System.Collections; -using System.Drawing; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.TrustUI; using System.Globalization; // For localization of string conversion -using System.Security.Cryptography.X509Certificates; using System.Security.RightsManagement; -using System.Security; namespace MS.Internal.Documents { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementStatus.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementStatus.cs index a41f4ba6325..880192a8f3f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementStatus.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementStatus.cs @@ -4,8 +4,6 @@ // Description: // RMStatus enum for overall status of document RM. -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementUser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementUser.cs index 642d522ea39..a5dbf2068ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementUser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/RightsManagementUser.cs @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; using System.Security.RightsManagement; using System.Windows.TrustUI; -namespace MS.Internal.Documents +namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureResourceHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureResourceHelper.cs index c108647ee4b..cd4e430f3c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureResourceHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureResourceHelper.cs @@ -5,18 +5,13 @@ // Description: // SignatureResourceHelper is a helper class used to get resources. using System; -using System.Collections; using Drawing = System.Drawing; using System.Globalization; -using System.IO; -using System.Security.Cryptography.X509Certificates; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.TrustUI; -using System.Security; using MS.Internal.Documents.Application; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureStatus.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureStatus.cs index 5e2f593c301..4b75b71a4a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureStatus.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureStatus.cs @@ -4,8 +4,6 @@ // Description: // SignatureStatus enum for status of applied signatures. -using System; - namespace MS.Internal.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureSummaryDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureSummaryDialog.cs index 279f5e00a82..97403453bda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureSummaryDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SignatureSummaryDialog.cs @@ -9,12 +9,9 @@ // dialog types and others are only used in one or the other. using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.Drawing; -using System.Security; using System.Windows.Forms; -using System.IO.Packaging; using System.Windows.TrustUI; namespace MS.Internal.Documents diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningDialog.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningDialog.cs index 376ebdbec3d..1c87bf5af85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningDialog.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningDialog.cs @@ -5,9 +5,7 @@ // Description: // SigningDialog is the Forms dialog that allows users to select signing parameters. using System; -using System.ComponentModel; using System.Drawing; -using System.Windows.Forms; using System.Windows.TrustUI; using System.Security.Cryptography.X509Certificates; using System.Globalization; // For localization of string conversion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningProgress.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningProgress.cs index 89f4dbf878a..1d65ea97a91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningProgress.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/MS/Internal/Documents/SigningProgress.cs @@ -8,17 +8,11 @@ // users when a long, blocking operation on XPSViewer's main thread is // running (and blocking). using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Security; using System.Threading; using System.Windows.Forms; -using System.Windows.TrustUI; -using MS.Internal.Documents.Application; namespace MS.Internal.Documents -{ +{ internal sealed partial class ProgressDialog : DialogBaseForm { #region Constructors diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/OtherAssemblyAttrs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/OtherAssemblyAttrs.cs index c045475c30c..afd889d5f81 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/OtherAssemblyAttrs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/OtherAssemblyAttrs.cs @@ -1,14 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -using System.Security; - using Microsoft.Internal; using System.Runtime.CompilerServices; -[assembly:InternalsVisibleTo(BuildInfo.PresentationFramework)] +[assembly: InternalsVisibleTo(BuildInfo.PresentationFramework)] // Add references for the themes. This will only add support for generic.xaml // This will have to be edited to add support for regular theme files (if required). diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUIStyleResources.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUIStyleResources.cs index a930bae7fae..320f2229003 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUIStyleResources.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUIStyleResources.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using System.Windows; -using System.Windows.Controls; - - - namespace System.Windows.Documents { /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationError.xaml.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationError.xaml.cs index 2452a654878..ca9086a48fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationError.xaml.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationError.xaml.cs @@ -3,16 +3,12 @@ // See the LICENSE file in the project root for more information. using System; -using System.Reflection; using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; using System.Windows.Threading; using System.Windows.Input; using System.Diagnostics; using System.IO; using System.Windows.Interop; -using System.Security; namespace Microsoft.Internal.DeploymentUI { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationProgress.xaml.cs b/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationProgress.xaml.cs index 238040cb845..f6694d3d828 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationProgress.xaml.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/TenFeetInstallationProgress.xaml.cs @@ -3,15 +3,11 @@ // See the LICENSE file in the project root for more information. using System; -using System.Reflection; using System.Windows; -using System.Windows.Controls; using System.Windows.Threading; using System.Windows.TrustUI; using System.Windows.Input; using System.Globalization; -using System.Resources; -using MS.Internal.AppModel; using System.Windows.Interop; namespace Microsoft.Internal.DeploymentUI diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/BrushProxy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/BrushProxy.cs index e35325a3760..8c68ec9750c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/BrushProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/BrushProxy.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; // for ArrayList -using System.Collections.Generic; -using System.Diagnostics; #if DEBUG_RASTERIZATION using System.IO; @@ -15,7 +12,6 @@ using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; -using System.Security; using System.Windows.Xps.Serialization; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/DrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/DrawingContext.cs index c5d6d6a883e..533c052dfa9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/DrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/DrawingContext.cs @@ -3,17 +3,13 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; // for ArrayList -using System.Diagnostics; using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; using System.Printing; -using System.Security; - namespace Microsoft.Internal.AlphaFlattener { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Flattener.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Flattener.cs index ffe259d19a2..5c427fb74e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Flattener.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Flattener.cs @@ -3,21 +3,16 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; // for ArrayList using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; -using System.Collections.Generic; using System.IO; using System.Xml; using System.Globalization; using System.Windows.Xps.Serialization; using System.Printing; - -using System.Security; using MS.Utility; namespace Microsoft.Internal.AlphaFlattener diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/ImageProxy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/ImageProxy.cs index 9817344d9a1..502870a161a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/ImageProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/ImageProxy.cs @@ -3,16 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; // for ArrayList -using System.Collections.Generic; -using System.Diagnostics; - using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageSource. PresentationCore.dll using System.Windows.Media.Imaging; - -using System.Security; //using System.Drawing.Printing; namespace Microsoft.Internal.AlphaFlattener diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Interfaces.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Interfaces.cs index ce668091688..6b1f07ef315 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Interfaces.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Interfaces.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Brush, ImageData, Geometry. PresentationCore.dll -using System.Windows.Media.Imaging; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/MetroDevice.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/MetroDevice.cs index 3e6acc4431c..3b5f035378c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/MetroDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/MetroDevice.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; // for ArrayList -using System.Collections.Generic; // for Dictionary -using System.IO; using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; @@ -15,8 +11,6 @@ using System.Windows.Xps.Serialization; using System.Printing; using System.Printing.Interop; -using System.Security; -using System.Text; using MS.Utility; namespace Microsoft.Internal.AlphaFlattener diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Optimizer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Optimizer.cs index 579a6f90d08..8d570c39b17 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Optimizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Optimizer.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Collections; // for ArrayList using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; -using System.Collections.Generic; using System.Windows.Xps.Serialization; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Primitive.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Primitive.cs index 4eaff72b863..dec4ba925a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Primitive.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Primitive.cs @@ -3,19 +3,14 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; // for ArrayList -using System.Diagnostics; using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, BitmapSource. PresentationCore.dll using System.Windows.Media.Effects; using System.Windows.Media.Imaging; -using System.Windows.Shapes; // for Glyphs using System.Globalization; -using System.Text; -using System.Collections.Generic; using System.Windows.Xps.Serialization; namespace Microsoft.Internal.AlphaFlattener diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveList.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveList.cs index 1181ca8bd4b..315037b9518 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveList.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveList.cs @@ -4,14 +4,9 @@ -using System; -using System.Diagnostics; -using System.Collections; // for ArrayList using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Globalization; -using System.Text; -using System.Collections.Generic; namespace Microsoft.Internal.AlphaFlattener { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveRenderer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveRenderer.cs index dbe2dae0d0d..da8e2a8e6c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveRenderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/PrimitiveRenderer.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; -using System.Collections; // for ArrayList using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll using System.Windows.Media.Imaging; // for BitmapSource -using System.Collections.Generic; namespace Microsoft.Internal.AlphaFlattener { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/SegmentTree.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/SegmentTree.cs index 2de3bd5cc85..4dfb9c78ad9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/SegmentTree.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/SegmentTree.cs @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; // for ArrayList -using System.Diagnostics; -using System.Collections.Generic; using System.Windows; // for Rect WindowsBase.dll diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Utility.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Utility.cs index 3e9708383b9..424afeb60fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Utility.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Utility.cs @@ -3,27 +3,16 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; // for ArrayList -using System.Collections.Generic; -using System.Diagnostics; - using System.Windows; // for Rect WindowsBase.dll using System.Windows.Media; // for Geometry, Brush, ImageData. PresentationCore.dll -using System.Windows.Media.Effects; using System.Windows.Media.Imaging; - -using Microsoft.Internal; using System.Runtime.CompilerServices; -using MS.Internal.ReachFramework; - -using System.Security; using System.Windows.Xps.Serialization; using MS.Utility; using BuildInfo = MS.Internal.ReachFramework.BuildInfo; -[assembly: InternalsVisibleTo( "System.Printing, PublicKey=" + BuildInfo.WCP_PUBLIC_KEY_STRING)] +[assembly: InternalsVisibleTo("System.Printing, PublicKey=" + BuildInfo.WCP_PUBLIC_KEY_STRING)] // This code is debug only until we decide to go all the way with enforcements. #if ENFORCEMENT @@ -32,7 +21,7 @@ namespace Microsoft.Internal.AlphaFlattener { #if DEBUG - internal static class StopWatch + internal static class StopWatch { static double s_total; // = 0; static DateTime s_startTime; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsException.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsException.cs index 0e72297a866..679524c222a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsException.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.Serialization; namespace System.Windows.Xps diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsPackagingException.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsPackagingException.cs index ef14cd390c0..54b87b4128f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsPackagingException.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsPackagingException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.Serialization; namespace System.Windows.Xps diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsSerializationException.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsSerializationException.cs index 5dce7eefd1e..53addd55593 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsSerializationException.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Exceptions/XpsSerializationException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.Serialization; namespace System.Windows.Xps diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/GlobalUsings.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/GlobalUsings.cs new file mode 100644 index 00000000000..f73ee7d808f --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/GlobalUsings.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +global using System; +global using System.Collections.Generic; +global using System.Diagnostics; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/COMPSTUISRID.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/COMPSTUISRID.cs index a7edc1a2c64..b0b49255d66 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/COMPSTUISRID.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/COMPSTUISRID.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Text; + /*++ * Abstract: @@ -12,10 +14,6 @@ Retrieves safe string resources from COMPSTUI.dll namespace MS.Internal.Printing.Configuration { - using System; - using System.Security; - using System.Text; - /// /// Resource manager for string resources in compstui.dll /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevMode.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevMode.cs index 075ab070d05..7f3c7a7e58a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevMode.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using System.Text; + /*++ All rights reserved. @@ -9,12 +12,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.IO; - using System.Runtime.InteropServices; - using System.Text; - using System.Security; - /// /// Helper class to interpret public DEVMODEA and DEVMODEW fields packed in a byte array /// This class only deals with DEVMODE fields relevant to printing diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevModeFields.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevModeFields.cs index 2a6f6ebe8d7..10821f48962 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevModeFields.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DevModeFields.cs @@ -9,8 +9,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - /// /// From http://msdn.microsoft.com/en-us/library/cc244659(PROT.13).aspx /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DeviceCapability.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DeviceCapability.cs index d2fffc24909..3e249e2c9d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DeviceCapability.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DeviceCapability.cs @@ -9,8 +9,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - internal enum DeviceCapability : short { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DocumentPropertiesFlags.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DocumentPropertiesFlags.cs index 2246c2f9f22..02eb8d9dd31 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DocumentPropertiesFlags.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/DocumentPropertiesFlags.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - namespace MS.Internal.Printing.Configuration { - using System; - /// /// From http://msdn.microsoft.com/en-us/library/dd183576(VS.85).aspx /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/HGlobalBuffer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/HGlobalBuffer.cs index 006fbe97e8d..59b2808bad9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/HGlobalBuffer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/HGlobalBuffer.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using MS.Internal.PrintWin32Thunk; + /*++ All rights reserved. @@ -9,12 +12,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.Runtime.InteropServices; - using System.Security; - using System.Diagnostics; - using MS.Internal.PrintWin32Thunk; - /// /// An HGlobal allocated buffer that knows its byte length /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/LoadLibraryExFlags.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/LoadLibraryExFlags.cs index 6f6d2dec1bc..9e655ffbb42 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/LoadLibraryExFlags.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/LoadLibraryExFlags.cs @@ -13,8 +13,6 @@ namespace MS.Internal.Printing.Configuration { - using System; - [Flags] internal enum LoadLibraryExFlags : uint { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_2.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_2.cs index c129fa67daf..c2b3f0621af 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_2.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_2.cs @@ -9,9 +9,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.Runtime.InteropServices; - internal struct PRINTER_INFO_2 { public string pPrinterName; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_8_AND_9.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_8_AND_9.cs index 15e3c3ff7fc..d2cfe429c62 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_8_AND_9.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/PRINTER_INFO_8_AND_9.cs @@ -9,9 +9,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.Runtime.InteropServices; - internal struct PRINTER_INFO_8_AND_9 { public DevMode pDevMode; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeModuleHandle.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeModuleHandle.cs index 829c48c3812..709ad6ddd35 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeModuleHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeModuleHandle.cs @@ -13,10 +13,6 @@ namespace MS.Internal.Printing.Configuration { - using System; - using System.Runtime.InteropServices; - using System.Security; - /// /// Represents a module handle (HMODULE) used in API's like LoadLibrary /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeWinSpoolPrinterHandle.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeWinSpoolPrinterHandle.cs index 595a5e50961..14e472b8a24 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeWinSpoolPrinterHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/SafeWinSpoolPrinterHandle.cs @@ -4,12 +4,10 @@ +using System.Runtime.InteropServices; + namespace MS.Internal.Printing.Configuration { - using System; - using System.Runtime.InteropServices; - using System.Security; - /// /// Represents a printer handle used in spooler API's like OpenPrinter /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/UnsafeNativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/UnsafeNativeMethods.cs index 9f41573ecb0..db494c5194f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/UnsafeNativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/UnsafeNativeMethods.cs @@ -2,6 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Printing; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Text; +using MS.Win32; +using MS.Internal.PrintWin32Thunk; + +using DllImport = MS.Internal.ReachFramework.DllImport; + /*++ All rights reserved. @@ -9,20 +18,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.Printing; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Security; - using System.Text; - using Microsoft.Internal; - using MS.Internal.ReachFramework; - using MS.Win32; - using MS.Internal.PrintWin32Thunk; - - using DllImport = MS.Internal.ReachFramework.DllImport; - /// /// Internal proxy class that makes P/Invoke calls into the unmanaged stub provider prntvpt.dll. /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/WinSpoolPrinterCapabilities.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/WinSpoolPrinterCapabilities.cs index e31bd3be18d..347710e3ac1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/WinSpoolPrinterCapabilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/Configuration/WinSpoolPrinterCapabilities.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using MS.Internal.PrintWin32Thunk; + /*++ All rights reserved. @@ -9,12 +12,6 @@ All rights reserved. namespace MS.Internal.Printing.Configuration { - using System; - using System.Collections.Generic; - using System.Runtime.InteropServices; - using System.Security; - using MS.Internal.PrintWin32Thunk; - /// /// Helper class to obtain printer capabilities from the WINSPOOL API /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/MostFrequentlyUsedCache.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/MostFrequentlyUsedCache.cs index 4ef362fdf80..675d8147c85 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/MostFrequentlyUsedCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/MostFrequentlyUsedCache.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - - namespace MS.Internal.Printing { - using System; - using System.Collections.Generic; - using System.Diagnostics; - internal class MostFrequentlyUsedCache { public MostFrequentlyUsedCache(int maxEntries) diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/TestHook.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/TestHook.cs index 14e76cab6b7..ba81d501a22 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/TestHook.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/MS/Internal/Printing/TestHook.cs @@ -11,8 +11,6 @@ All rights reserved. namespace MS.Internal.Printing { - using System; - /// /// Internal API for testing /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/DocumentStructureProvider.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/DocumentStructureProvider.cs index ac3b2381e50..668a8f02584 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/DocumentStructureProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/DocumentStructureProvider.cs @@ -11,12 +11,6 @@ --*/ -using System; -using System.Windows.Documents; -using System.IO.Packaging; -using System.Security.Cryptography.X509Certificates; -using System.Collections.Generic; - namespace System.Windows.Xps.Packaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/PartEditor.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/PartEditor.cs index c34ac5a20ab..547555715d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/PartEditor.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/PartEditor.cs @@ -16,18 +16,10 @@ are used as wrappers around the Metro package API part --*/ -using System; -using System.Diagnostics; using System.IO; -using System.Collections; -using System.Collections.Generic; using System.IO.Packaging; -using System.Windows; -using System.Windows.Markup; using System.Xml; -using MS.Internal.IO.Packaging.Extensions; - namespace System.Windows.Xps.Packaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs index ee4fc5b879d..1a98ae8f262 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs @@ -16,12 +16,6 @@ that will ultimately sign this document --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.IO; -using System.IO.Packaging; using System.Xml; using System.Globalization; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsColorContext.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsColorContext.cs index 5473848bdbd..d872067e337 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsColorContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsColorContext.cs @@ -13,9 +13,7 @@ XpsResource and controls colorContext specific aspects of --*/ -using System; using System.IO.Packaging; -using System.Windows.Media; namespace System.Windows.Xps.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDigitalSignature.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDigitalSignature.cs index 9a5268e9e83..816b1d7ab1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDigitalSignature.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDigitalSignature.cs @@ -11,20 +11,11 @@ such as what is the root objects signed and what are the signing restrictions --*/ -using MS.Internal; -using System; -using System.Windows.Documents; using System.IO.Packaging; -using System.Security; // for SecurityCritical tag -using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml; - -using PackUriHelper = System.IO.Packaging.PackUriHelper; namespace System.Windows.Xps.Packaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs index d335add4fe8..1df644c1197 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs @@ -14,25 +14,16 @@ reading and/or writing Xps packages. --*/ -using System; -using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.IO.Packaging; using System.Security.Cryptography.X509Certificates; using System.Windows.Documents; -using System.Windows.Media; -using System.Printing; -using System.Windows.Xps; using System.Windows.Xps.Serialization; using System.Windows.Markup; -using System.Threading; using System.Xml; -using System.Security; using MS.Internal; using MS.Internal.Security; -using MS.Internal.IO.Packaging; using MS.Internal.IO.Packaging.Extensions; using Package = System.IO.Packaging.Package; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentReaderWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentReaderWriter.cs index 28995bc2fa2..304ca0c25db 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentReaderWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentReaderWriter.cs @@ -16,14 +16,10 @@ parts to a Xps package. --*/ -using System; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; using System.Xml; -using System.Security.Cryptography.X509Certificates; using System.Printing; using MS.Internal.IO.Packaging.Extensions; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentSequenceReaderWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentSequenceReaderWriter.cs index cb1b2eba40a..a40b7cecda4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentSequenceReaderWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentSequenceReaderWriter.cs @@ -15,14 +15,10 @@ parts to a Xps package. --*/ -using System; using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; using System.IO.Packaging; using System.Xml; -using System.Security.Cryptography.X509Certificates; using System.Printing; using MS.Internal.IO.Packaging.Extensions; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedPageReaderWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedPageReaderWriter.cs index eb7bf69bf28..dffa09711c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedPageReaderWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedPageReaderWriter.cs @@ -14,15 +14,9 @@ parts to a Xps package. --*/ -using System; -using System.Collections; -using System.Collections.ObjectModel; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; using System.Xml; -using System.Globalization; -using System.Security.Cryptography.X509Certificates; using System.Printing; using System.Windows.Xps.Serialization; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFont.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFont.cs index 06e7046c5a5..0c47037b53d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFont.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFont.cs @@ -13,7 +13,6 @@ XpsResource and controls font specific aspects of a resource added to a fixed page. --*/ -using System; using System.IO.Packaging; namespace System.Windows.Xps.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsImage.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsImage.cs index 8f968f00b7e..6b114331570 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsImage.cs @@ -16,9 +16,7 @@ ReachResource and controls image specific aspects of Brian Adleberg (brianad ) 12-July-2005 Reach -> Xps ---*/ -using System; using System.IO.Packaging; -using System.Windows.Media; namespace System.Windows.Xps.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsInterleavingPolicy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsInterleavingPolicy.cs index a39b16df36f..e1f16510439 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsInterleavingPolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsInterleavingPolicy.cs @@ -11,11 +11,8 @@ This file contains the definition and implementation implementation. --*/ -using System; using System.Collections; -using System.Collections.Generic; using System.IO.Packaging; -using System.Windows.Xps.Serialization; namespace System.Windows.Xps.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsManager.cs index eb1515977de..a4285a3bf6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsManager.cs @@ -15,25 +15,12 @@ through this layer to talk to the Metro packaging APIs. --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.IO.Packaging; using System.Security.Cryptography.X509Certificates; -using System.Windows.Media; -using System.Windows.Xps.Serialization; -using System.Text; // for StringBuilder -using System.Windows; -using System.Windows.Xps; -using System.Globalization; using System.Printing; using MS.Internal; - -using MS.Internal.IO.Packaging.Extensions; using Package = System.IO.Packaging.Package; using PackUriHelper = System.IO.Packaging.PackUriHelper; using PackageRelationship = System.IO.Packaging.PackageRelationship; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsPartBase.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsPartBase.cs index dcb5d75b1ea..265247178fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsPartBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsPartBase.cs @@ -14,9 +14,6 @@ This file contains the definition and implementation --*/ -using System; -using System.IO.Packaging; - namespace System.Windows.Xps.Packaging { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResource.cs index d54a5f389ed..62a194ee2c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResource.cs @@ -14,8 +14,6 @@ Xps package. --*/ -using System; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourceDictionary.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourceDictionary.cs index 37531aec32d..3a270c6ced9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourceDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourceDictionary.cs @@ -14,9 +14,7 @@ XpsResource and controls ResourceDictionary specific aspects of --*/ -using System; using System.IO.Packaging; -using System.Windows.Media; namespace System.Windows.Xps.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourcePolicy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourcePolicy.cs index 3247606faa6..e198f61d80a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourcePolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsResourcePolicy.cs @@ -14,8 +14,6 @@ how resources are shared and serialized within the Xps --*/ -using System; -using System.Collections.Generic; using System.Windows.Xps.Serialization; namespace System.Windows.Xps.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsStructure.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsStructure.cs index 902a0eb14aa..963d229bd7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsStructure.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsStructure.cs @@ -13,7 +13,6 @@ XpsResource and controls font specific aspects of --*/ -using System; using System.IO.Packaging; namespace System.Windows.Xps.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsThumbnail.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsThumbnail.cs index 168808084af..0b0fa41ad37 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsThumbnail.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsThumbnail.cs @@ -13,9 +13,7 @@ XpsResource and controls thumbnail specific aspects of --*/ -using System; using System.IO.Packaging; -using System.Windows.Media; namespace System.Windows.Xps.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/DocumentNUp.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/DocumentNUp.cs index 6a07c3a9478..2a5f9d7ecce 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/DocumentNUp.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/DocumentNUp.cs @@ -14,17 +14,11 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/FallbackPTProvider.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/FallbackPTProvider.cs index fa89c631ce3..037ebe17ca8 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/FallbackPTProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/FallbackPTProvider.cs @@ -2,6 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.ComponentModel; +using System.Globalization; +using System.IO; +using System.Printing; +using System.Printing.Interop; +using System.Runtime.InteropServices; +using System.Windows.Xps.Serialization; +using System.Xml; +using MS.Utility; +using MS.Internal.PrintWin32Thunk; +using MS.Internal.ReachFramework; + /*++ @@ -17,22 +29,6 @@ of thunking into unmanaged component to get PrintTicket and PrintCapabilities pr namespace MS.Internal.Printing.Configuration { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Globalization; - using System.IO; - using System.Printing; - using System.Printing.Interop; - using System.Runtime.InteropServices; - using System.Security; - using System.Windows.Xps.Serialization; - using System.Xml; - using MS.Utility; - using MS.Internal.PrintWin32Thunk; - using MS.Internal.ReachFramework; - - /// /// Managed PrintTicket provider class that inter-ops with unmanaged DDI driver /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobCollate.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobCollate.cs index eb1a933bb86..ed88e60abdf 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobCollate.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobCollate.cs @@ -13,15 +13,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobDuplex.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobDuplex.cs index b5324cad5af..3b878eb2ace 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobDuplex.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobDuplex.cs @@ -13,15 +13,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobInputBins.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobInputBins.cs index e00457abcb5..88c4e276c12 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobInputBins.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobInputBins.cs @@ -13,17 +13,10 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobPageOrder.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobPageOrder.cs index ee5326f1dc4..7b29e70a1bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobPageOrder.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobPageOrder.cs @@ -13,15 +13,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobStaple.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobStaple.cs index b78ec5ca423..e4aaac37968 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobStaple.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/JobStaple.cs @@ -14,17 +14,10 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTConverter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTConverter.cs index 6fb88901561..c9afcebdf30 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTConverter.cs @@ -14,14 +14,9 @@ we don't want printing LAPI to have dependency on the legacy binary DEVMODE. --*/ -using System; using System.IO; using System.Runtime.InteropServices; -using System.Globalization; - -using System.Printing; using MS.Internal.Printing.Configuration; -using System.Security; //[assembly:System.Runtime.InteropServices.ComVisibleAttribute(false)] diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTManager.cs index eb6f36312aa..1c7ccec1e83 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTManager.cs @@ -14,19 +14,13 @@ access to PrintTicket and PrintCapabilities functions should be via printing LAP --*/ -using System; using System.IO; -using System.Collections.Specialized; using System.Runtime.InteropServices; -using System.Globalization; - -using System.Printing; using System.Printing.Interop; using MS.Internal.Printing.Configuration; using System.Windows.Xps.Serialization; // for Toolbox using MS.Utility; -using System.Security; namespace System.Printing { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProvider.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProvider.cs index 2e7c6f6a732..0ede968561d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProvider.cs @@ -15,28 +15,19 @@ of thunking into unmanaged component to get PrintTicket and PrintCapabilities pr --*/ -using System; using System.IO; -using System.Security; using System.Globalization; -using System.Collections.Specialized; using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using System.Runtime.ConstrainedExecution; using System.Printing.Interop; using System.Printing; -using Microsoft.Internal; using System.Windows.Xps; using System.Windows.Xps.Serialization; using MS.Utility; using System.Runtime.InteropServices.ComTypes; -using System.Windows.Threading; -using System.Collections.Generic; using System.Threading; -using System.Diagnostics; -using MS.Internal.PrintWin32Thunk; +using MS.Internal.PrintWin32Thunk; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProviderBase.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProviderBase.cs index c8b7f3b1b4a..b381caa2157 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProviderBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTProviderBase.cs @@ -13,11 +13,9 @@ of calling into the unmanaged component to get PrintTicket and PrintCapabilities --*/ -using System; using System.IO; using System.Printing; using System.Printing.Interop; -using System.Security; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTUtility.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTUtility.cs index 2466794aecb..14a295c4aec 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTUtility.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PTUtility.cs @@ -14,8 +14,6 @@ contains static utility functions used internally only. --*/ -using System; -using System.Collections.Specialized; using System.Resources; namespace MS.Internal.Printing.Configuration diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageBorderless.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageBorderless.cs index eb27c49cf19..fadfe960c92 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageBorderless.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageBorderless.cs @@ -14,15 +14,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCanvasSize.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCanvasSize.cs index 5809c4ca6a2..7f43cbbcdb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCanvasSize.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCanvasSize.cs @@ -13,14 +13,7 @@ Definition and implementation of this public property type. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; -using System.Diagnostics; - -using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCopyCount.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCopyCount.cs index e032af0620e..8c59c190804 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCopyCount.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageCopyCount.cs @@ -13,15 +13,8 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; -using System.Diagnostics; using System.Globalization; -using System.Printing; -using MS.Internal.Printing.Configuration; - namespace MS.Internal.Printing.Configuration { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageDeviceFont.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageDeviceFont.cs index 0ea4ee03a17..9056374fa44 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageDeviceFont.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageDeviceFont.cs @@ -14,15 +14,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaSize.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaSize.cs index 132c4923e0a..1a0c79ff81b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaSize.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaSize.cs @@ -14,17 +14,11 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaType.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaType.cs index fb90d0ab634..2ede05f80d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaType.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageMediaType.cs @@ -15,17 +15,10 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOrientation.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOrientation.cs index c02c4479192..225d12735ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOrientation.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOrientation.cs @@ -14,15 +14,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputColor.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputColor.cs index 26bdbfdf8ea..b8b8b666f55 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputColor.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputColor.cs @@ -14,17 +14,10 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputQuality.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputQuality.cs index ebaf6483adb..2ab9859e645 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputQuality.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageOutputQuality.cs @@ -15,15 +15,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageResolution.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageResolution.cs index 6e9dd096c29..bc81c4996ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageResolution.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageResolution.cs @@ -15,17 +15,11 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageScaling.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageScaling.cs index 949ae9e08f7..20dfe355dcf 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageScaling.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageScaling.cs @@ -13,18 +13,11 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Text; using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageTrueTypeFont.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageTrueTypeFont.cs index 602cb1b471d..d09360f4629 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageTrueTypeFont.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PageTrueTypeFont.cs @@ -13,15 +13,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/ParameterRefs.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/ParameterRefs.cs index 04f6d090f1d..1beca2c10c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/ParameterRefs.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/ParameterRefs.cs @@ -19,13 +19,6 @@ Feng Yue (fengy) 7/23/2003 --*/ -using System; -using System.IO; -using System.Collections; -using System.Diagnostics; - -using MS.Internal.Printing.Configuration; - namespace MS.Internal.Printing.Configuration { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PhotoPrintingIntent.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PhotoPrintingIntent.cs index 51aee0fc47c..972f451aac6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PhotoPrintingIntent.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PhotoPrintingIntent.cs @@ -13,15 +13,9 @@ Definition and implementation of this public feature/parameter related types. --*/ -using System; -using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintCapabilitesWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintCapabilitesWriter.cs index a542ca4f5b7..3c6740de7ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintCapabilitesWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintCapabilitesWriter.cs @@ -4,17 +4,14 @@ +using System.Globalization; +using System.IO; +using System.Printing; +using System.Text; +using System.Xml; + namespace MS.Internal.Printing.Configuration { - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Printing; - using System.Security; - using System.Text; - using System.Xml; - /// /// Xml Stream base API for writing print capability documents /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchema.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchema.cs index 555b7ffb4b4..cb340d13e61 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchema.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchema.cs @@ -12,9 +12,6 @@ Definition of public Print Schema types. --*/ -using System; -using System.Diagnostics; -using System.IO; using System.Xml; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchemaShim.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchemaShim.cs index 21aaf4172cf..669efa4bf67 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchemaShim.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrintSchemaShim.cs @@ -4,16 +4,12 @@ +using System.Printing; +using System.Xml; +using System.Xml.XPath; + namespace MS.Internal.Printing.Configuration { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Printing; - using System.Xml; - using System.Xml.XPath; - using System.Security; - /// /// Encapulates all the logic for marshaling PrintTicket documents to DEVMODE /// Based on the XPS Print Schema Specification v1.0 diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Base.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Base.cs index f95372e6e13..facea4686a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Base.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Base.cs @@ -12,15 +12,7 @@ Definition and implementation of PrintCapabilities base types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; -using System.Diagnostics; -using System.Runtime.InteropServices; - -using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Builder.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Builder.cs index 65322e1fda6..c6ff1c8f5dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Builder.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Builder.cs @@ -12,14 +12,10 @@ Definition and implementation of internal PrintCapBuilder class. --*/ -using System; using System.IO; using System.Xml; -using System.Collections; -using System.Diagnostics; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public.cs index 8a7233211c5..4e2307e3352 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public.cs @@ -13,17 +13,11 @@ Definition and implementation of public PrintCapabilities class. --*/ -using System; using System.IO; using System.Xml; -using System.Collections; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Diagnostics; using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public_Simple.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public_Simple.cs index 6424c0410cf..811d13ed828 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public_Simple.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Public_Simple.cs @@ -13,15 +13,9 @@ Definition and implementation of simple public PT/PC classes. --*/ -using System; -using System.Xml; using System.IO; -using System.Collections; using System.Collections.ObjectModel; -using System.Collections.Generic; using System.Globalization; - -using System.Printing; using MS.Internal.Printing.Configuration; namespace System.Printing diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Reader.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Reader.cs index 38b0350b34f..79ef6bf474f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Reader.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtCap_Reader.cs @@ -13,15 +13,10 @@ Definition and implementation of the private XmlPrintCapReader class. --*/ -using System; using System.Xml; using System.IO; -using System.Diagnostics; using System.Globalization; -using System.Printing; -using MS.Internal.Printing.Configuration; - #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages namespace MS.Internal.Printing.Configuration diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Base.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Base.cs index f5a601e165e..97616d6f50a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Base.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Base.cs @@ -13,16 +13,8 @@ Definition and implementation of PrintTicket base types. --*/ -using System; -using System.IO; using System.Xml; -using System.Collections; -using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; - -using System.Printing; -using MS.Internal.Printing.Configuration; #pragma warning disable 1634, 1691 // Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Editor.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Editor.cs index 2bd36dca593..227c517cd41 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Editor.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Editor.cs @@ -13,15 +13,8 @@ Definition and implementation of the internal PrintTicketEditor and XmlDocQName --*/ -using System; using System.Xml; -using System.IO; -using System.Collections; using System.Globalization; -using System.Runtime.InteropServices; - -using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public.cs index cafca712746..3520f55c295 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public.cs @@ -13,17 +13,11 @@ Definition and implementation of public PrintTicket class. --*/ -using System; using System.Xml; using System.IO; -using System.Collections; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Diagnostics; using System.Globalization; using System.Printing; -using MS.Internal.Printing.Configuration; namespace MS.Internal.Printing.Configuration { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public_Simple.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public_Simple.cs index 72808c2cd5e..99de88f9b78 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public_Simple.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintConfig/PrtTicket_Public_Simple.cs @@ -12,15 +12,8 @@ Definition and implementation of simple public PT/PC classes. --*/ -using System; -using System.Xml; using System.IO; -using System.Collections; -using System.Collections.ObjectModel; -using System.Collections.Generic; using System.Globalization; - -using System.Printing; using MS.Internal.Printing.Configuration; namespace System.Printing diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/InteropWin32ApiThunk.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/InteropWin32ApiThunk.cs index c01a57bf447..b6f3e722aae 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/InteropWin32ApiThunk.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/InteropWin32ApiThunk.cs @@ -10,18 +10,17 @@ PInvoke methods definition. --*/ -using System; using System.Runtime.InteropServices; namespace MS { -namespace Internal -{ -namespace PrintWin32Thunk -{ -namespace Win32ApiThunk -{ - static internal class NativeMethodsForPrintExceptions + namespace Internal + { + namespace PrintWin32Thunk + { + namespace Win32ApiThunk + { + static internal class NativeMethodsForPrintExceptions { [DllImport("Kernel32.dll", EntryPoint="FormatMessageW", CharSet=CharSet.Unicode, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/PrintSystemException.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/PrintSystemException.cs index 6c1bb52f9a8..ea2c5dbb684 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/PrintSystemException.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/PrintSystemExceptions/PrintSystemException.cs @@ -9,13 +9,8 @@ Print System exception objects declaration. --*/ -using System; -using System.Collections; -using System.Runtime.InteropServices; using System.Text; -using System.Security; //SecurityCritical using System.Collections.ObjectModel; -using System.Collections.Generic; using MS.Internal.PrintWin32Thunk.Win32ApiThunk; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/ReachFramework.csproj b/src/Microsoft.DotNet.Wpf/src/ReachFramework/ReachFramework.csproj index cf7bd9e5a3a..1f0244eb90b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/ReachFramework.csproj +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/ReachFramework.csproj @@ -54,6 +54,7 @@ + diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs index 1a7d314aceb..e75cae6695b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs @@ -10,15 +10,10 @@ This file implements the ColorTypeConverter colors to a Xps package. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Text; using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Windows.Xps.Packaging; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/Crc32.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/Crc32.cs index 127c3097c16..cac7f88e083 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/Crc32.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/Crc32.cs @@ -11,9 +11,6 @@ This file implements a Crc32 algorithm that can of bytes. --*/ -using System; -using System.Security; - namespace System.Windows.Xps.Serialization { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/DrawingContextFlattener.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/DrawingContextFlattener.cs index 4aeb7278d3a..ebc87333bf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/DrawingContextFlattener.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/DrawingContextFlattener.cs @@ -3,21 +3,11 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.Text; -using System.ComponentModel; - -using System.Windows; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Effects; using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.Animation; using Microsoft.Internal.AlphaFlattener; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/FontTypeConverter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/FontTypeConverter.cs index b6b5ebbf508..dabbd31b38e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/FontTypeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/FontTypeConverter.cs @@ -10,12 +10,8 @@ This file implements the FontTypeConverter used by to a Xps package. --*/ -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.IO; using System.Windows.Media; -using System.Windows.Xps.Packaging; using MS.Utility; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ImageSourceTypeConverter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ImageSourceTypeConverter.cs index 06935a14d25..36d9e719f0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ImageSourceTypeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ImageSourceTypeConverter.cs @@ -10,20 +10,12 @@ This file implements the ImageSourceTypeConverter images to a Xps package. --*/ -using System; using System.Net; -using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; using System.ComponentModel; using System.IO; -using System.IO.Packaging; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Xps.Packaging; -using System.Security; -using MS.Internal.ReachFramework; -using System.Windows.Markup; using MS.Internal.IO.Packaging; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcPartUri.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcPartUri.cs index dbcb1c90039..ce90db08898 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcPartUri.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcPartUri.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcUri.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcUri.cs index 29dbe5b0da3..4678a864bd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcUri.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IOpcUri.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageStatusEvent.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageStatusEvent.cs index 4d018222a52..d3368fff126 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageStatusEvent.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageStatusEvent.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageTarget.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageTarget.cs index 3e02a4665a6..46af8718c4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IPrintDocumentPackageTarget.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM documenttarget.dll /// - + [Guid("1B8EFEC4-3019-4C27-964E-367202156906"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IPrintDocumentPackageTarget diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/ISequentialStream.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/ISequentialStream.cs index d2c843e4cc5..1ccabbeae56 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/ISequentialStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/ISequentialStream.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IUri.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IUri.cs index 62a3504dc55..cfc16d01e35 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IUri.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IUri.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsDocumentPackageTarget.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsDocumentPackageTarget.cs index ef0463663ac..a12d62a396a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsDocumentPackageTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsDocumentPackageTarget.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("3B0B6D38-53AD-41DA-B212-D37637A6714E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsDocumentPackageTarget diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMBrush.cs index 5f9e9cd6723..f501ea60f2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCanvas.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCanvas.cs index e336f9d5d12..3b1f0275421 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCanvas.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCanvas.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResource.cs index 0b802b11a9e..8df3b0292d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -20,7 +18,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("67BD7D69-1EEF-4BB1-B5E7-6F4F87BE8ABE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMColorProfileResource : IXpsOMResource diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResourceCollection.cs index ace01ac3cbf..fdc39522ff2 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMColorProfileResourceCollection.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("12759630-5FBA-4283-8F7D-CCA849809EDB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMColorProfileResourceCollection diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCoreProperties.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCoreProperties.cs index 8ba68255a21..ed7158142d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCoreProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMCoreProperties.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDashCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDashCollection.cs index 37aad5d6f55..601e5eaa3f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDashCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDashCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDictionary.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDictionary.cs index 6d2d111dca8..1ea8057ed9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDictionary.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocument.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocument.cs index b7cae309d8d..c5e0839ec6a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocument.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentCollection.cs index 95ef712738e..7d5790f8065 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentSequence.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentSequence.cs index 42f0a1e3cc9..4d3e7b64de6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentSequence.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentSequence.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentStructureResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentStructureResource.cs index 19858d6b740..33ca93f2961 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentStructureResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMDocumentStructureResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResource.cs index fe33ad4100d..b253b4b5a02 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -20,7 +18,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("A8C45708-47D9-4AF4-8D20-33B48C9B8485"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMFontResource : IXpsOMResource diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResourceCollection.cs index aa0d88d0224..9e960fae998 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMFontResourceCollection.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("70B4A6BB-88D4-4FA8-AAF9-6D9C596FDBAD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMFontResourceCollection diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometry.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometry.cs index a5113eb1788..98f93a85753 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometry.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigure.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigure.cs index 0884c6ec3cc..64b2b143a26 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigure.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigureCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigureCollection.cs index d99948a61a1..fbb24098224 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGeometryFigureCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphs.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphs.cs index 4873d1a9a1f..c1ba8a3ede3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphs.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphs.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphsEditor.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphsEditor.cs index e3940b8e78b..3330c895bd7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphsEditor.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGlyphsEditor.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientBrush.cs index b719aca747a..14e82715d7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStop.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStop.cs index a29e49b828a..77b18e94fd1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStop.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStop.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStopCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStopCollection.cs index 469405c9f95..55c2cfad7c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStopCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMGradientStopCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageBrush.cs index 4a46d557dd3..7207f851fa4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResource.cs index cbb8254df5b..c37fea9f7e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -20,7 +18,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("3DB8417D-AE50-485E-9A44-D7758F78A23F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMImageResource : IXpsOMResource diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResourceCollection.cs index 2808e766ddd..3ec4a1dbff6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMImageResourceCollection.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("7A4A1A71-9CDE-4B71-B33F-62DE843EABFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMImageResourceCollection diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMLinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMLinearGradientBrush.cs index f38204bd73d..54dc8506ed4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMLinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMLinearGradientBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMMatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMMatrixTransform.cs index e9c49e8b251..48c9bd8046e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMMatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMMatrixTransform.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMNameCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMNameCollection.cs index 33094f39ac9..f7518218fe2 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMNameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMNameCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMObjectFactory.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMObjectFactory.cs index 7e9f99f8eff..d5fd30d6f22 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMObjectFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMObjectFactory.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -20,7 +18,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("F9B2A685-A50D-4FC2-B764-B56E093EA0CA"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMObjectFactory diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackage.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackage.cs index b38dc7783f3..0f87b20722d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackage.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackage.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackageWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackageWriter.cs index c316eefe428..4e16f26e9fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackageWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPackageWriter.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("4E2AA182-A443-42C6-B41B-4F8E9DE73FF9")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPage.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPage.cs index 316b094112f..c31fa992e71 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPage.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPage.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("D3E18888-F120-4FEE-8C68-35296EAE91D4"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMPage : IXpsOMPart diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReference.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReference.cs index f1f9bcd1f11..4b73b09f71f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReference.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReferenceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReferenceCollection.cs index 52633da9c57..9e8aa030334 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReferenceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPageReferenceCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPart.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPart.cs index 4154ba0db0a..931ae3be7a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPart.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPart.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("74EB2F0B-A91E-4486-AFAC-0FABECA3DFC6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMPart diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartResources.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartResources.cs index ae8b47a617a..b6c27839dc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartResources.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartResources.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("F4CF7729-4864-4275-99B3-A8717163ECAF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMPartResources diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartUriCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartUriCollection.cs index 0d5e2c38d90..6bbb73d49ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartUriCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPartUriCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPath.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPath.cs index 33ce3209175..5dbef0e21d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPath.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPrintTicketResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPrintTicketResource.cs index cc7a0638a53..703840d2a6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPrintTicketResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMPrintTicketResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRadialGradientBrush.cs index 6fb136acb05..399e66a2bb0 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRadialGradientBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResource.cs index 4ad80c198ef..2a276636823 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResource.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResourceCollection.cs index ddd133f535f..70027dc842f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMRemoteDictionaryResourceCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMResource.cs index 72b382e0228..fd9d9c86230 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMResource.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMShareable.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMShareable.cs index 7b94a0a4a13..32d2ec1bf96 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMShareable.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMShareable.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResource.cs index 0098cb39fe7..65fb8f201e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResourceCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResourceCollection.cs index 320b02ff3a4..b4f23779d49 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResourceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSignatureBlockResourceCollection.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSolidColorBrush.cs index 1f10124769c..5fb51d67346 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMSolidColorBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMStoryFragmentsResource.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMStoryFragmentsResource.cs index 99d4bd4d3da..57031f316e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMStoryFragmentsResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMStoryFragmentsResource.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMThumbnailGenerator.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMThumbnailGenerator.cs index 2669115775c..da395c98858 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMThumbnailGenerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMThumbnailGenerator.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMTileBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMTileBrush.cs index 3657452904e..5809e895da3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMTileBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMTileBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisual.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisual.cs index ecff91dcd37..4313cb0bbd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisual.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("BC3E7333-FB0B-4AF3-A819-0B4EAAD0D2FD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMVisual : IXpsOMShareable diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualBrush.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualBrush.cs index 30a72c76507..4a177758444 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualBrush.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualCollection.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualCollection.cs index fd02d916d17..d933c5a03f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/IXpsOMVisualCollection.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Security; namespace System.Windows.Xps.Serialization.RCW { @@ -19,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [Guid("94D8ABDE-AB91-46A8-82B7-F5B05EF01A96"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] internal interface IXpsOMVisualCollection diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageCompletion.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageCompletion.cs index 58e40085e0a..530996f6b21 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageCompletion.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageCompletion.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { internal enum PrintDocumentPackageCompletion diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatus.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatus.cs index adc7d3a9e05..d136459f293 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatus.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatus.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Windows.Xps.Serialization.RCW diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatusProvider.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatusProvider.cs index e1a52257316..3a159d14d58 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatusProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/PrintDocumentPackageStatusProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices.ComTypes; using System.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/Uri_PROPERTY.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/Uri_PROPERTY.cs index 7e3da26ba95..80bb1a008f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/Uri_PROPERTY.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/Uri_PROPERTY.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum Uri_PROPERTY { Uri_PROPERTY_ABSOLUTE_URI = 0, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR.cs index d06c6f388f8..55314ea6661 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Windows.Xps.Serialization.RCW @@ -17,7 +16,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [StructLayout(LayoutKind.Sequential, Pack = 4)] internal struct XPS_COLOR { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_INTERPOLATION.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_INTERPOLATION.cs index 63e9c904004..9f98e5b8cf5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_INTERPOLATION.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_INTERPOLATION.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_COLOR_INTERPOLATION { XPS_COLOR_INTERPOLATION_SCRGBLINEAR = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE.cs index 50458a8c1d3..d846b53af38 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_COLOR_TYPE { XPS_COLOR_TYPE_SRGB = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE_UNION.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE_UNION.cs index d9e84b32e7d..ddfa0aa9947 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE_UNION.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_COLOR_TYPE_UNION.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Windows.Xps.Serialization.RCW @@ -17,7 +16,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [ComConversionLoss] [StructLayout(LayoutKind.Explicit, Pack = 4, Size = 40)] internal struct XPS_COLOR_TYPE_UNION diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH.cs index a22d4808450..100b70667e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_DASH { internal float length; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH_CAP.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH_CAP.cs index d1b63580e52..c4828d2c1ce 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH_CAP.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DASH_CAP.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_DASH_CAP { XPS_DASH_CAP_FLAT = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DOCUMENT_TYPE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DOCUMENT_TYPE.cs index 1e8b899e01f..a91dd1e0449 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DOCUMENT_TYPE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_DOCUMENT_TYPE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_DOCUMENT_TYPE { XPS_DOCUMENT_TYPE_UNSPECIFIED = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FILL_RULE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FILL_RULE.cs index f0dd0636ae9..355fa7e4393 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FILL_RULE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FILL_RULE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_FILL_RULE { XPS_FILL_RULE_EVENODD = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FONT_EMBEDDING.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FONT_EMBEDDING.cs index 47bb2be1038..3b685c15acf 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FONT_EMBEDDING.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_FONT_EMBEDDING.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_FONT_EMBEDDING { XPS_FONT_EMBEDDING_NORMAL = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_INDEX.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_INDEX.cs index f3a22a3960a..c78a9c21b0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_INDEX.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_INDEX.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_GLYPH_INDEX { internal int index; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_MAPPING.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_MAPPING.cs index 47c872887b2..3c50c8a2af3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_MAPPING.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_GLYPH_MAPPING.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_GLYPH_MAPPING { internal uint unicodeStringStart; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_IMAGE_TYPE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_IMAGE_TYPE.cs index 403a28d19ec..186e5344b92 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_IMAGE_TYPE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_IMAGE_TYPE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_IMAGE_TYPE { XPS_IMAGE_TYPE_JPEG = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_INTERLEAVING.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_INTERLEAVING.cs index f5d57a3a75c..fccafd8bd93 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_INTERLEAVING.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_INTERLEAVING.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_INTERLEAVING { XPS_INTERLEAVING_OFF = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_CAP.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_CAP.cs index 31e64a0d107..8dc4e8e84fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_CAP.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_CAP.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_LINE_CAP { XPS_LINE_CAP_FLAT = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_JOIN.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_JOIN.cs index fb6c98c1db4..b5aa77d8231 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_JOIN.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_LINE_JOIN.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_LINE_JOIN { XPS_LINE_JOIN_MITER = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_MATRIX.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_MATRIX.cs index c20b59e035e..76976f442f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_MATRIX.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_MATRIX.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_MATRIX { internal float m11; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_OBJECT_TYPE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_OBJECT_TYPE.cs index c4134ff707e..eb16b05152a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_OBJECT_TYPE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_OBJECT_TYPE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_OBJECT_TYPE { XPS_OBJECT_TYPE_CANVAS = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_POINT.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_POINT.cs index e91991ad0df..4d4680fa741 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_POINT.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_POINT.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_POINT { internal float x; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_RECT.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_RECT.cs index cbc7c89eb5b..115d37e2879 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_RECT.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_RECT.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_RECT { internal float x; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SCRGB_COLOR.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SCRGB_COLOR.cs index 450dc367693..f6800a8cb73 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SCRGB_COLOR.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SCRGB_COLOR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Windows.Xps.Serialization.RCW @@ -17,7 +16,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [StructLayout(LayoutKind.Sequential, Pack = 4)] internal struct XPS_SCRGB_COLOR { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_STROKE_PATTERN.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_STROKE_PATTERN.cs index ab203eeecdd..b760a751ad2 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_STROKE_PATTERN.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_STROKE_PATTERN.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_SEGMENT_STROKE_PATTERN { XPS_SEGMENT_STROKE_PATTERN_ALL = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_TYPE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_TYPE.cs index 8c3b983c06d..daacbdb5627 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_TYPE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SEGMENT_TYPE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_SEGMENT_TYPE { XPS_SEGMENT_TYPE_ARC_LARGE_CLOCKWISE = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SIZE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SIZE.cs index 1ecdecf59be..f7447cb9540 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SIZE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SIZE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct XPS_SIZE { internal float width; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SPREAD_METHOD.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SPREAD_METHOD.cs index 44ad3fc6f42..060f5e5a5f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SPREAD_METHOD.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SPREAD_METHOD.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_SPREAD_METHOD { XPS_SPREAD_METHOD_PAD = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SRGB_COLOR.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SRGB_COLOR.cs index ca23abe3720..1df7b32f3c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SRGB_COLOR.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_SRGB_COLOR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Windows.Xps.Serialization.RCW @@ -17,7 +16,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct XPS_SRGB_COLOR { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_STYLE_SIMULATION.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_STYLE_SIMULATION.cs index 70f4a249140..d50900233b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_STYLE_SIMULATION.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_STYLE_SIMULATION.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_STYLE_SIMULATION { XPS_STYLE_SIMULATION_NONE = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_THUMBNAIL_SIZE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_THUMBNAIL_SIZE.cs index 6d666c942e2..7a46fe1f970 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_THUMBNAIL_SIZE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_THUMBNAIL_SIZE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_THUMBNAIL_SIZE { XPS_THUMBNAIL_SIZE_VERYSMALL = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_TILE_MODE.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_TILE_MODE.cs index 3c51cd6e216..c5051c96a3a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_TILE_MODE.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XPS_TILE_MODE.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal enum XPS_TILE_MODE { XPS_TILE_MODE_NONE = 1, diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XpsOMThumbnailGeneratorClass.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XpsOMThumbnailGeneratorClass.cs index 4aeec6b8fe4..86a832b65f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XpsOMThumbnailGeneratorClass.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/XpsOMThumbnailGeneratorClass.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -18,7 +17,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + [ClassInterface(ClassInterfaceType.None)] [Guid("7E4A23E2-B969-4761-BE35-1A8CED58E323")] [TypeLibType(TypeLibTypeFlags.FCanCreate)] diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_FILETIME.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_FILETIME.cs index bccb6008eff..7a361d0d480 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_FILETIME.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_FILETIME.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct _FILETIME { public uint dwLowDateTime; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_LARGE_INTEGER.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_LARGE_INTEGER.cs index a17ac4cb547..45471afa9b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_LARGE_INTEGER.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_LARGE_INTEGER.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct _LARGE_INTEGER { public long QuadPart; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SECURITY_ATTRIBUTES.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SECURITY_ATTRIBUTES.cs index 1760afc2810..8eaa8f24836 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SECURITY_ATTRIBUTES.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SECURITY_ATTRIBUTES.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct _SECURITY_ATTRIBUTES { public uint nLength; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SYSTEMTIME.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SYSTEMTIME.cs index c8dc43a5e1b..24f6489cd3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SYSTEMTIME.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_SYSTEMTIME.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct _SYSTEMTIME { public ushort wYear; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_ULARGE_INTEGER.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_ULARGE_INTEGER.cs index bdc00cc9e96..0280e95cbfe 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_ULARGE_INTEGER.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/_ULARGE_INTEGER.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct _ULARGE_INTEGER { public ulong QuadPart; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/tagSTATSTG.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/tagSTATSTG.cs index f5866892b07..da741d7325b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/tagSTATSTG.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/RCW/tagSTATSTG.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Windows.Xps.Serialization.RCW { /// @@ -16,7 +14,7 @@ namespace System.Windows.Xps.Serialization.RCW /// iii.Decompile the DLL and copy out the RCW by hand. /// ILDASM xpsobjectmodel.dll /// - + internal struct tagSTATSTG { internal string pwcsName; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/TreeWalkProgress.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/TreeWalkProgress.cs index 319402ffd35..ff89b7dd2ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/TreeWalkProgress.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/TreeWalkProgress.cs @@ -8,16 +8,7 @@ This file implements the TreeWalkProgress used by the Xps Serialization APIs for tracking cycles in a visual tree. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Text; using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Xps.Packaging; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualSerializer.cs index 6541ca105ca..7d26a89d356 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualSerializer.cs @@ -3,26 +3,18 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; -using System.Collections.Specialized; -using System.Collections.Generic; using System.Globalization; using System.Text; using System.IO; using System.Xml; using System.ComponentModel; - -using System.Windows; using System.Windows.Automation; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Xps.Packaging; using Microsoft.Internal.AlphaFlattener; - -using System.Security; using MS.Utility; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualTreeFlattener.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualTreeFlattener.cs index 10583b6d1f8..a1cf47842f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualTreeFlattener.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/VisualTreeFlattener.cs @@ -3,17 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.IO; using System.Xml; using System.ComponentModel; -using System.Security; - -using System.Windows; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.Effects; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSerializationService.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSerializationService.cs index 85c3704c47a..d42d50f394d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSerializationService.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSerializationService.cs @@ -11,7 +11,6 @@ fonts to a Xps package. --*/ -using System; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSubsetter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSubsetter.cs index 124b8a10345..acf1f5df59d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSubsetter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsFontSubsetter.cs @@ -9,15 +9,9 @@ This file implements the XpsFontSubsetter used by the Xps Serialization APIs for serializing fonts to a Xps package. --*/ -using System; -using System.Collections; using System.IO; using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Collections.Generic; -using System.IO.Packaging; using System.Windows.Xps.Packaging; -using System.Security; using MS.Internal.Utility; using MS.Internal.IO.Packaging; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsImageSerializationService.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsImageSerializationService.cs index f9dba4c6d93..53a2e628121 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsImageSerializationService.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/XpsImageSerializationService.cs @@ -10,11 +10,8 @@ This file implements the XpsImageSerializationService used by the Xps Serialization APIs for serializing images to a Xps package. --*/ -using System; using System.IO; -using System.Windows.Media; using System.Windows.Media.Imaging; -using System.Security; using System.Windows.Xps.Packaging; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManager.cs index 3d310aab9be..75798c1782e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManager.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManagerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManagerAsync.cs index a5dc5293cad..3ec848b54df 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManagerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/IXpsSerializationManagerAsync.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Printing; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/MetroSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/MetroSerializationManager.cs index 016a0b15033..5f523e4d201 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/MetroSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/MetroSerializationManager.cs @@ -12,22 +12,13 @@ tree of objects is being traversed to optimize the permormance of the serialization process --*/ -using System; using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Xml; -using System.IO; -using System.Security; using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; -using System.Windows.Xps.Serialization; -using System.Windows.Xps; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentCollectionSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentCollectionSerializerAsync.cs index 41b31c8f19e..8d9f720b6fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentCollectionSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentCollectionSerializerAsync.cs @@ -11,20 +11,7 @@ the common functionality required to serialize a PageContentCollection --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentSerializerAsync.cs index 43afa51abf9..2f1d9c5a271 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCPageContentSerializerAsync.cs @@ -8,20 +8,7 @@ This file contains the definition of a class that defines the common functionality required to serialize a PageContent. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManager.cs index 3fcd9622395..83b11e9a79f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManager.cs @@ -4,21 +4,9 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; using System.Printing; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManagerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManagerAsync.cs index bc9eac0ead6..520e3c43138 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManagerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializationManagerAsync.cs @@ -3,21 +3,10 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; using System.Printing; using System.Windows.Threading; using MS.Internal; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializer.cs index d46757b6c4e..eb6322d9365 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializer.cs @@ -4,21 +4,9 @@ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; -using System.Printing; using MS.Utility; // diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializerAsync.cs index d3763ab3378..01648adea2b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCSerializerAsync.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCUIElementCollectionSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCUIElementCollectionSerializerAsync.cs index a0ca8c75c17..30e41d0e24c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCUIElementCollectionSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NGCUIElementCollectionSerializerAsync.cs @@ -10,20 +10,8 @@ the common functionality required to serialize a UIElementCollection --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NullPackagingPolicy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NullPackagingPolicy.cs index bd1b7ffe1d5..b793ae525c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NullPackagingPolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/NullPackagingPolicy.cs @@ -11,22 +11,11 @@ process. the intension here is to be able to profile performance of different components in the system. --*/ -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; using System.IO; -using System.Security; using System.Globalization; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachBasicContext.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachBasicContext.cs index 8720afb8ac1..f5d7ff44d03 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachBasicContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachBasicContext.cs @@ -10,21 +10,6 @@ The file contains the definition of a class defining a context object which define the basic properties defining an object. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; - namespace System.Windows.Xps.Serialization { internal abstract class BasicContext diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializer.cs index 665f7dac9d7..5dc5a0a68fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializer.cs @@ -3,22 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializerAsync.cs index ddcb6282478..a97bb61b7e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentPageSerializerAsync.cs @@ -3,23 +3,12 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; -using System.Windows.Shapes; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializer.cs index c4494eb1990..8e4b5cf6b9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializer.cs @@ -3,20 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializerAsync.cs index 5276929ac25..4268afad7e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceCollectionSerializerAsync.cs @@ -3,20 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializer.cs index e44c501cf1c..e35c125c1b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializer.cs @@ -3,20 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; using System.Windows.Threading; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializerAsync.cs index dbca108d9ea..8770f133bcf 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentReferenceSerializerAsync.cs @@ -3,20 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; using System.Windows.Threading; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializer.cs index 26aea135014..874c547ed6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializer.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializerAsync.cs index 38ca303dda7..fc6ee846fc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachDocumentSequenceSerializerAsync.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializer.cs index afa5e93deb7..c8bb013554c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializer.cs @@ -7,21 +7,9 @@ This file contains the definition of a class that defines the common functionality required to serialize a FixedDocument --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializerAsync.cs index 16768d1df56..7693a45e70a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedDocumentSerializerAsync.cs @@ -8,21 +8,9 @@ This file contains the definition of a class that defines the common functionality required to serialize a FixedDocument --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs index 35b5488c919..9d486aacc0a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs @@ -10,18 +10,9 @@ defines the common functionality required to serialize a FixedPage --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializerAsync.cs index ab53940fd7c..fe2519f0925 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializerAsync.cs @@ -11,18 +11,9 @@ defines the common functionality required to serialize a FixedPage --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializer.cs index d214fe675ad..6490df13d0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializer.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializerAsync.cs index 05a5c1b3046..edf1f92c5c9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachIDocumentPaginatorSerializerAsync.cs @@ -3,20 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachNamespaceInfo.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachNamespaceInfo.cs index 35bde89b2a6..5a13d444066 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachNamespaceInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachNamespaceInfo.cs @@ -8,20 +8,7 @@ Contains the class definition of some classes that maintain the NameSpaces specific information. --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachObjectContext.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachObjectContext.cs index a927a35a7b0..640dd666ff5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachObjectContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachObjectContext.cs @@ -11,20 +11,7 @@ information about the object itself and all the properties contained within that object --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializer.cs index a3b003b9e19..999212fd6a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializer.cs @@ -9,20 +9,7 @@ This file contains the definition of a class that defines the common functionality required to serialize a PageContentCollection --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; using MS.Utility; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializerAsync.cs index 41035697d95..eafc8f8a973 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentCollectionSerializerAsync.cs @@ -9,20 +9,7 @@ This file contains the definition of a class that defines the common functionality required to serialize a PageContentCollection --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializer.cs index 5dcfe8bc8eb..dfe69c21b54 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializer.cs @@ -7,21 +7,8 @@ This file contains the definition of a class that defines the common functionality required to serialize a PageContent. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializerAsync.cs index 764996f8b6b..bfa3e9ebb7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPageContentSerializerAsync.cs @@ -7,21 +7,8 @@ This file contains the definition of a class that defines the common functionality required to serialize a PageContent. --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializer.cs index 066b9834bd3..512b9d6b80b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializer.cs @@ -10,21 +10,6 @@ This file contains the definition of a class that defines the common functionality required to serialize a PrintTicket. --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializerAsync.cs index d3312fcbe30..5893dc9d29b 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachPrintTicketSerializerAsync.cs @@ -9,21 +9,6 @@ This file contains the definition of a class that defines the common functionality required to serialize a PrintTicket. --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializableProperties.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializableProperties.cs index 22b4a2546b3..4dc260a8045 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializableProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializableProperties.cs @@ -10,19 +10,9 @@ serialization process --*/ -using System; using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationCacheItems.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationCacheItems.cs index a111a47b119..1db1e01551e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationCacheItems.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationCacheItems.cs @@ -3,19 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationUtils.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationUtils.cs index fa359560a59..e1bc50432aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationUtils.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializationUtils.cs @@ -3,24 +3,14 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; using System.IO; using System.IO.Packaging; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; using System.Globalization; -using System.Runtime.InteropServices; using System.Printing; using MS.Utility; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializer.cs index 5711f29be81..3dffaf48e83 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializer.cs @@ -9,19 +9,7 @@ the common functionality required to serialie on type in a graph of types rooted by some object instance --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializerAsync.cs index bea26039205..b9526c72c71 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachSerializerAsync.cs @@ -11,19 +11,7 @@ the common functionality required to serialie on type in a graph of types rooted by some object instance --*/ -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializer.cs index 3efea5b15d8..c955700bb21 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializer.cs @@ -12,20 +12,8 @@ the common functionality required to serialize a --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializerAsync.cs index 2cb8ab540b1..764965b2ff6 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachUIElementCollectionSerializerAsync.cs @@ -12,20 +12,8 @@ the common functionality required to serialize a --*/ -using System; using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializer.cs index f8dd90b3d36..363cc374c6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializer.cs @@ -3,22 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Media.Media3D; -using System.Windows.Markup; using MS.Utility; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializerAsync.cs index c36e13dedab..bdff4a67db0 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachVisualSerializerAsync.cs @@ -3,21 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsDocumentEvent.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsDocumentEvent.cs index 7e023dbab92..70dfa2d0790 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsDocumentEvent.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsDocumentEvent.cs @@ -3,23 +3,7 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Xps; using System.Printing; #pragma warning disable 1634, 1691 //Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsLiterals.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsLiterals.cs index 8163b614b83..f6c1e944dbb 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsLiterals.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsLiterals.cs @@ -13,16 +13,6 @@ named properties or attributes of the Xps Serialization --*/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.IO.Packaging; -using System.Security.Cryptography.X509Certificates; -using System.Windows.Media; -using System.Windows.Xps.Serialization; - using MS.Internal; namespace System.Windows.Xps.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializer.cs index 772a35c63a8..29b56385584 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializer.cs @@ -2,22 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializerAsync.cs index 034dfee0e54..7f24a696ff9 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPageSerializerAsync.cs @@ -2,22 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializer.cs index 6812cafaac2..0cce9f98dce 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializer.cs @@ -2,20 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializerAsync.cs index a0fa357e9ed..469d11e78be 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentPaginatorSerializerAsync.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializer.cs index 9e9d1e70c41..8878ed83417 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializer.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; - namespace System.Windows.Xps.Serialization { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializerAsync.cs index b5f733967f2..994d3bb6a2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMDocumentSequenceSerializerAsync.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; - namespace System.Windows.Xps.Serialization { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializer.cs index c64d363fe67..05c3692d9b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializer.cs @@ -2,22 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; - namespace System.Windows.Xps.Serialization { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializerAsync.cs index adb979e0981..afe7c116ac7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedDocumentSerializerAsync.cs @@ -2,22 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; - namespace System.Windows.Xps.Serialization { /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializer.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializer.cs index 92cb093a8ea..4ec28e16443 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializer.cs @@ -2,18 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializerAsync.cs index 8c242ae7d19..a3e51ed786e 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMFixedPageSerializerAsync.cs @@ -2,23 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Markup; -using MS.Utility; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMHierarchySimulator.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMHierarchySimulator.cs index e9b18f5b24f..c85405f3652 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMHierarchySimulator.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMHierarchySimulator.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Printing; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Xps.Packaging; using System.Xml; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMPackagingPolicy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMPackagingPolicy.cs index 51c4660cedf..298f3bb40c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMPackagingPolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMPackagingPolicy.cs @@ -5,7 +5,6 @@ using MS.Internal; using MS.Internal.PrintWin32Thunk; using System.Collections; -using System.Collections.Generic; using System.IO; using System.IO.Packaging; using System.Printing; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManager.cs index 2a829d39642..927b31c7b7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManager.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. using MS.Utility; -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Printing; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.Imaging; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManagerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManagerAsync.cs index 4491354688a..c1df90b3724 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManagerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsOMSerializationManagerAsync.cs @@ -2,25 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Markup; using System.Windows.Threading; using MS.Internal; -using System.Printing; namespace System.Windows.Xps.Serialization { diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsPackagingPolicy.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsPackagingPolicy.cs index 1a89f7bce5b..1b4f0eaa068 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsPackagingPolicy.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsPackagingPolicy.cs @@ -9,22 +9,10 @@ This file contains the definition of a theclass that controls the serialization packaging policy. It is the buffering layer between the serializer and the package --*/ -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; using System.IO; -using System.IO.Packaging; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; using System.Printing; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManager.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManager.cs index 92a0da6d7be..f7e4e9f9e48 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManager.cs @@ -4,24 +4,14 @@ -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; using System.Printing; -using System.Security; -using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.Imaging; -using System.Windows.Markup; -using System.Windows.Xps; using MS.Utility; #pragma warning disable 1634, 1691 //Allows suppression of certain PreSharp messages diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManagerAsync.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManagerAsync.cs index f00dc25d893..8961ca628af 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManagerAsync.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsSerializationManagerAsync.cs @@ -3,22 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Markup; using System.Windows.Threading; using MS.Internal; using System.Printing; diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsTokenContext.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsTokenContext.cs index 2ba4c1338ae..fe2438a188a 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsTokenContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/XpsTokenContext.cs @@ -3,19 +3,8 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Specialized; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Xml; -using System.IO; -using System.Security; -using System.ComponentModel.Design.Serialization; -using System.Windows.Xps.Packaging; -using System.Windows.Documents; -using System.Windows.Media; using System.Windows.Markup; namespace System.Windows.Xps.Serialization diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerFactory.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerFactory.cs index 208dad64a46..3bdd4f1163c 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerFactory.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; +using System.Windows.Documents.Serialization; + // // // @@ -12,13 +15,6 @@ namespace System.Windows.Xps.Serialization { - using System; - using System.IO; - using System.Printing; - using System.Windows.Xps; - using System.Windows.Documents.Serialization; - using System.Windows.Xps.Serialization; - /// /// SerializerFactory is the factory class for the SerializerWriter that wraps an XPSDocumentSerializer /// diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerWriter.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerWriter.cs index 68d525378c7..2e517078cb2 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/SerializerFactory/XpsSerializerWriter.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; +using System.IO.Packaging; +using System.Printing; +using System.Windows.Documents; +using System.Windows.Documents.Serialization; +using System.Windows.Media; +using System.Windows.Xps.Packaging; + // // // @@ -12,16 +20,6 @@ namespace System.Windows.Xps.Serialization { - using System; - using System.IO; - using System.IO.Packaging; - using System.Printing; - using System.Windows.Xps; - using System.Windows.Documents; - using System.Windows.Documents.Serialization; - using System.Windows.Media; - using System.Windows.Xps.Packaging; - /// /// XpsSerializerWriter is a concrete implementation for a plug-in SerializerWriter. It punts everything to XpsDocumentWriter /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/AppDomainShutdownMonitor.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/AppDomainShutdownMonitor.cs index 213842df614..63eb7a748cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/AppDomainShutdownMonitor.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/AppDomainShutdownMonitor.cs @@ -12,11 +12,6 @@ // //--------------------------------------------------------------------------- -using System; -using System.Diagnostics; // Assert -using System.Collections.Generic; // Dictionary -using System.Threading; // [ThreadStatic] - namespace MS.Internal { internal interface IAppDomainShutdownListener diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs index ac92ec12ec6..a9a764853c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs @@ -16,15 +16,9 @@ // //--------------------------------------------------------------------------- -using System; -using System.Windows; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Text; using System.Runtime.InteropServices; -using System.Security; -using SR=MS.Internal.PresentationCore.SR; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Commands/CommandLibraryHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Commands/CommandLibraryHelper.cs index 9499e5725e1..e93d59c12de 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Commands/CommandLibraryHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Commands/CommandLibraryHelper.cs @@ -14,9 +14,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.Security; -using System.Windows.Input; +using System.Windows.Input; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CommonDependencyPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CommonDependencyPropertyAttribute.cs index 438a6f72697..e69c3033f4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CommonDependencyPropertyAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CommonDependencyPropertyAttribute.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics; - #if WINDOWS_BASE namespace MS.Internal.WindowsBase #elif PRESENTATION_CORE diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CopyOnWriteList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CopyOnWriteList.cs index a698684e85c..ffe46eebd7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CopyOnWriteList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CopyOnWriteList.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Diagnostics; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CriticalExceptions.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CriticalExceptions.cs index 6ab04fe6f2d..2b470b8ed69 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CriticalExceptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CriticalExceptions.cs @@ -11,7 +11,6 @@ namespace MS.Internal.Markup #elif SYSTEM_XAML namespace System.Xaml #else - namespace MS.Internal #endif { @@ -48,7 +47,7 @@ internal static Exception Unwrap(Exception ex) { // for certain types of exceptions, we care more about the inner // exception - while (ex.InnerException != null && + while (ex.InnerException is not null && ( ex is System.Reflection.TargetInvocationException )) { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CulturePreservingExecutionContext.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CulturePreservingExecutionContext.cs index c2d5f901960..7f05010cb57 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CulturePreservingExecutionContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CulturePreservingExecutionContext.cs @@ -23,9 +23,7 @@ // during Run and Dispose. -using System; using System.Globalization; -using System.Security; using System.Threading; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/DoubleUtil.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/DoubleUtil.cs index f1e3116eb25..63892f7e33a 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/DoubleUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/DoubleUtil.cs @@ -14,21 +14,7 @@ // // -using System; using System.Windows; -using System.Runtime.InteropServices; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FixedPageInfo.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FixedPageInfo.cs index 78501ee98dc..8359cefdd1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FixedPageInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FixedPageInfo.cs @@ -9,8 +9,6 @@ // glyph run information from a fixed-format page. // -using System; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FloatUtil.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FloatUtil.cs index a41d1cc98df..f891c1d05d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FloatUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FloatUtil.cs @@ -18,8 +18,6 @@ // //--------------------------------------------------------------------------- -using System; - namespace MS.Internal { internal static class FloatUtil diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FreezableOperations.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FreezableOperations.cs index ce44bbd6d5f..4ffacd7950c 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FreezableOperations.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FreezableOperations.cs @@ -13,7 +13,6 @@ // //--------------------------------------------------------------------------- -using System; using System.Windows; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs index 3a9456383ff..4a49fda7b40 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs index 79fce7ec42e..a4e5471ab45 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs index cd2859a7e97..17fe72c9025 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs index 283d3b20d43..39cabcfb364 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs index 1548ee2ebdf..fa6e1c2e784 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs index 286faf64146..f62cb3105c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs index 76f959bc102..c55df07cf67 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs index ac394b6ca87..06d51eb4345 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs index f5f34efd9df..74c2a03a702 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs @@ -13,7 +13,6 @@ //--------------------------------------------------------------------------- #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs index dff9b440635..36251f23222 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs index 80f36295ea4..22240c497d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs index e4027a64d93..88abb1f1b4e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs index bf06aa1ae53..a74eff18967 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs @@ -13,7 +13,6 @@ //--------------------------------------------------------------------------- #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs index 04ef5019863..d35d85f7773 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs index e6d2bfd49c2..49a6373e866 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs index 19e37827887..19676512942 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs @@ -13,7 +13,6 @@ //--------------------------------------------------------------------------- #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs index a4a4d7ddceb..e2b3f98df20 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs index b8f0ffff882..e21517c156c 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs @@ -13,7 +13,6 @@ //--------------------------------------------------------------------------- #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs index 3933e2df0ef..6a835309307 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs index 1a0d75a5544..8c060db2cae 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs index 2b5285a46cc..681a5e2689c 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs index c943519f8bf..9fc9ad77db8 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs index 37a2fa74235..bcaead1e0eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs index 2f254df5f08..cc6456ff88d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs index adb354b0dc2..2c0dafa9cee 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs @@ -12,12 +12,7 @@ // //--------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.Internal.PresentationCore; #if PRESENTATION_CORE -using SR=MS.Internal.PresentationCore.SR; #else using SR=System.Windows.SR; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/HashHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/HashHelper.cs deleted file mode 100644 index b61ed460255..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/HashHelper.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// -// -// -// Description: Static class to help work around hashing-related bugs. -// - -using System; -using MS.Internal; // BaseHashHelper - -#if WINDOWS_BASE -namespace MS.Internal.Hashing.WindowsBase -#elif PRESENTATION_CORE -namespace MS.Internal.Hashing.PresentationCore -#elif PRESENTATIONFRAMEWORK -using System.ComponentModel; // ICustomTypeDescriptor - -namespace MS.Internal.Hashing.PresentationFramework -#else -#error Attempt to define HashHelper in an unknown assembly. -namespace MS.Internal.YourAssemblyName -#endif -{ - internal static class HashHelper - { - // The class cctor registers this assembly's exceptional types with - // the base helper. - static HashHelper() - { - Initialize(); // this makes FxCop happy - otherwise Initialize is "unused code" - -#if WINDOWS_BASE - Type[] types = Type.EmptyTypes; -#else - Type[] types = new Type[] { -#if PRESENTATION_CORE - typeof(System.Windows.Media.CharacterMetrics), // bug 1612093 - typeof(System.Windows.Ink.ExtendedProperty), // bug 1612101 - typeof(System.Windows.Media.FamilyTypeface), // bug 1612103 - typeof(System.Windows.Media.NumberSubstitution), // bug 1612105 -#elif PRESENTATIONFRAMEWORK - typeof(System.Windows.Markup.Localizer.BamlLocalizableResource), // bug 1612118 - typeof(System.Windows.ComponentResourceKey), // bug 1612119 -#endif - }; -#endif - BaseHashHelper.RegisterTypes(typeof(HashHelper).Assembly, types); - - // initialize lower-level assemblies -#if PRESENTATIONFRAMEWORK - MS.Internal.Hashing.PresentationCore.HashHelper.Initialize(); -#endif - } - - - // certain objects don't have reliable hashcodes, and cannot be used - // within a Hashtable, Dictionary, etc. - internal static bool HasReliableHashCode(object item) - { - return BaseHashHelper.HasReliableHashCode(item); - } - - // this method doesn't do anything, but calling it makes sure the static - // cctor gets called - internal static void Initialize() - { - } - } -} diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/CompoundFile/ContainerFlags.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/CompoundFile/ContainerFlags.cs index 46207efc052..9a58710abac 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/CompoundFile/ContainerFlags.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/CompoundFile/ContainerFlags.cs @@ -22,9 +22,6 @@ // // - -using System; - namespace MS.Internal.IO.Packaging.CompoundFile { #region ContainerFlags enumeration diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs index 5a2017e2740..f95650bc363 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs @@ -10,19 +10,11 @@ // // -using System; using System.IO; using System.IO.IsolatedStorage; -using MS.Internal.WindowsBase; -using System.Xml; // For XmlReader -using System.Diagnostics; // For Debug.Assert -using System.Text; // For Encoding -using System.Windows; // For Exception strings - SR -using System.Security; // for SecurityCritical -using Microsoft.Win32; // for Registry classes - - -using MS.Internal; +using System.Xml; +using System.Text; +using Microsoft.Win32; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/SynchronizingStream.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/SynchronizingStream.cs index bce4635b41b..7c942cb73f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/SynchronizingStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/SynchronizingStream.cs @@ -12,10 +12,7 @@ // //------------------------------------------------------------------------------ -using System; -using System.Diagnostics; using System.IO; -using System.Windows; namespace MS.Internal.IO.Packaging { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs index a62023b5c84..63d4cddaeea 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs @@ -2,16 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using MS.Utility; -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.Windows; -using System.Diagnostics; - -using SR=MS.Internal.PresentationCore.SR; - namespace MS.Internal.Ink { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/Native.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/Native.cs index 2616e023737..71ddd641dfa 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/Native.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/Native.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; using System.Runtime.CompilerServices; namespace MS.Internal.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Invariant.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Invariant.cs index 7481766eee6..19d33e3c124 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Invariant.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Invariant.cs @@ -2,27 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// -// Description: Provides methods that assert an application is in a valid state. -// - -#if WINDOWS_BASE -using MS.Internal.WindowsBase; -#elif DRT -using MS.Internal.Drt; -#else -#error There is an attempt to use this class from an unexpected assembly. -#endif +using Microsoft.Win32; + namespace MS.Internal { - using System; - using System.Security; - using Microsoft.Win32; - using System.Diagnostics; - using System.Windows; - /// /// Provides methods that assert an application is in a valid state. /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/LegacyPriorityQueue.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/LegacyPriorityQueue.cs index f7f80028056..d5ec357197b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/LegacyPriorityQueue.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/LegacyPriorityQueue.cs @@ -48,10 +48,6 @@ // (We have no reports of this actually happening, possibly because it might escape // notice by all but the most font-obsessed users.) -using System; -using System.Diagnostics; -using System.Collections.Generic; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MatrixUtil.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MatrixUtil.cs index ffdda697c65..00e53c80fad 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MatrixUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MatrixUtil.cs @@ -2,32 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: This file contains the implementation of MatrixUtil, which // provides matrix multiply code. -// -// -// -// -using System; using System.Windows; using System.Windows.Media; -using System.Diagnostics; -using System.Security; -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MimeTypeMapper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MimeTypeMapper.cs index 1c2d5e72a13..f83169d8695 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MimeTypeMapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/MimeTypeMapper.cs @@ -3,13 +3,9 @@ // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Security; -using System.Text; #if PRESENTATION_CORE using MS.Internal.PresentationCore; // for BindUriHelper.UriToString #else diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Pair.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Pair.cs deleted file mode 100644 index f263f59fda1..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Pair.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//--------------------------------------------------------------------------- -// - -// -// -// Description: Pair class is useful when one needs to treat a pair of objects as a singly key in a collection. -// -// -// -// -// -//--------------------------------------------------------------------------- - -using System; -using System.Diagnostics; - -namespace MS.Internal -{ - /// - /// Pair class is useful when one needs to treat a pair of objects as a singly key in a collection. - /// Apart from providing storage and accessors, the class forwards GetHashCode and Equals to the contained objects. - /// Both object are allowed to be null. - /// - internal class Pair - { - public Pair(object first, object second) - { - _first = first; - _second = second; - } - - public object First { get { return _first; } } - public object Second { get { return _second; } } - - public override int GetHashCode() - { - return (_first == null ? 0 : _first.GetHashCode()) ^ (_second == null ? 0 : _second.GetHashCode()); - } - - public override bool Equals(object o) - { - Pair other = o as Pair; - return other != null && - (_first != null ? _first.Equals(other._first) : other._first == null) && - (_second != null ? _second.Equals(other._second) : other._second == null); - } - - private object _first; - private object _second; - } -} - diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PartialList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PartialList.cs index fb6d9479938..6a2c1e20af4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PartialList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PartialList.cs @@ -16,10 +16,7 @@ // //--------------------------------------------------------------------------- -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PointUtil.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PointUtil.cs index a8e28e108c2..54f0bff99a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PointUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/PointUtil.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using System.Security; using System.Windows; using System.Windows.Media; using System.Windows.Interop; @@ -12,21 +10,20 @@ using MS.Win32; #if PRESENTATION_CORE -using MS.Internal.PresentationCore; #else #error There is an attempt to use this class from an unexpected assembly. #endif namespace MS.Internal { - /// - /// A utility class for converting Point and Rect data between co-ordinate spaces - /// - /// - /// To avoid confusion, Avalon based Point and Rect variables are prefixed with - /// "point" and "rect" respectively, whereas Win32 POINT and RECT variables are - /// prefixed with "pt" and "rc" respectively. - /// + /// + /// A utility class for converting Point and Rect data between co-ordinate spaces + /// + /// + /// To avoid confusion, Avalon based Point and Rect variables are prefixed with + /// "point" and "rect" respectively, whereas Win32 POINT and RECT variables are + /// prefixed with "pt" and "rc" respectively. + /// internal static class PointUtil { /// @@ -172,7 +169,7 @@ public static Point ClientToScreen(Point pointClient, PresentationSource present { return pointClient; } - HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); + HandleRef handleRef = new HandleRef(inputSource, inputSource.Handle); NativeMethods.POINT ptClient = FromPoint(pointClient); NativeMethods.POINT ptClientRTLAdjusted = AdjustForRightToLeft(ptClient, handleRef); @@ -195,7 +192,7 @@ internal static Point ScreenToClient(Point pointScreen, PresentationSource prese return pointScreen; } - HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); + HandleRef handleRef = new HandleRef(inputSource, inputSource.Handle); NativeMethods.POINT ptClient = FromPoint(pointScreen); diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockSlimWrapper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockSlimWrapper.cs index 0a159965445..4bc77449274 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockSlimWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockSlimWrapper.cs @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// // Description: Wrapper that allows ReaderWriterLockSlim to detect potential // error conditions like (i) calling into Dispose() of the lock object // when it is already held, and (ii) attempts to acquire the lock after // it has been disposed. - -using System; using System.Reflection; using System.Threading; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockWrapper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockWrapper.cs index 45dad4a42c3..2fcdb1b10aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ReaderWriterLockWrapper.cs @@ -2,23 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// -// // Description: // Wrapper that allows a ReaderWriterLock to work with C#'s using() clause -// -// -// -// - - -using System; -using System.Runtime.ConstrainedExecution; -using System.Security; using System.Threading; -using System.Windows.Threading; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Registry.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Registry.cs index f921da066b3..4d8865533be 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Registry.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Registry.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using MS.Internal; -using System.Security; using Microsoft.Win32; -//****** // Keep in sync with host\Inc\Registry.hxx namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ResourceIDHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ResourceIDHelper.cs index 31867691c1d..fb82e769adc 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ResourceIDHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/ResourceIDHelper.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Text; using System.Globalization; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelper.cs index 2bf33649141..ee7dc3e4b6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelper.cs @@ -6,11 +6,7 @@ // Purpose: Helper functions that require elevation but are safe to use. -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; -using System.Security; using System.Reflection; using System.Runtime.InteropServices; using System.Threading; @@ -22,8 +18,8 @@ using TypeConverterHelper = System.Windows.Markup.TypeConverterHelper; #endif #if PRESENTATIONFRAMEWORK - using System.Windows; - using System.Windows.Media; +using System.Windows; +using System.Windows.Media; #endif // The SafeSecurityHelper class differs between assemblies and could not actually be @@ -148,13 +144,14 @@ internal static Assembly GetLoadedAssembly(AssemblyName assemblyName) byte[] curKeyToken = curAsmName.GetPublicKeyToken(); if (string.Equals(curAsmName.Name, assemblyName.Name, StringComparison.InvariantCultureIgnoreCase) && - (reqVersion == null || reqVersion.Equals(curVersion)) && - (reqCulture == null || reqCulture.Equals(curCulture)) && - (reqKeyToken == null || IsSameKeyToken(reqKeyToken, curKeyToken))) + (reqVersion is null || reqVersion.Equals(curVersion)) && + (reqCulture is null || reqCulture.Equals(curCulture)) && + (reqKeyToken is null || IsSameKeyToken(reqKeyToken, curKeyToken))) { return assemblies[i]; } } + return null; } @@ -164,7 +161,7 @@ static AssemblyName GetAssemblyName(Assembly assembly) lock (syncObject) { AssemblyName result; - if (_assemblies == null) + if (_assemblies is null) { _assemblies = new Dictionary(); } @@ -175,6 +172,7 @@ static AssemblyName GetAssemblyName(Assembly assembly) return result; } } + // // We use AssemblyName ctor here because GetName demands FileIOPermission // and does load more than just the required information. @@ -189,6 +187,7 @@ static AssemblyName GetAssemblyName(Assembly assembly) GCNotificationToken.RegisterCallback(_cleanupCollectedAssemblies, null); _isGCCallbackPending = true; } + return result; } } @@ -203,10 +202,11 @@ static void CleanupCollectedAssemblies(object state) // dummy parameter required foreach (object key in _assemblies.Keys) { WeakReference weakRef = key as WeakReference; - if (weakRef == null) + if (weakRef is null) { continue; } + if (weakRef.IsAlive) { // There is a weak ref that is still alive, register another GC callback for next time @@ -215,20 +215,23 @@ static void CleanupCollectedAssemblies(object state) // dummy parameter required else { // The target has been collected, add it to our list of keys to remove - if (keysToRemove == null) + if (keysToRemove is null) { keysToRemove = new List(); } + keysToRemove.Add(key); } } - if (keysToRemove != null) + + if (keysToRemove is not null) { foreach (object key in keysToRemove) { _assemblies.Remove(key); } } + if (foundLiveDynamicAssemblies) { GCNotificationToken.RegisterCallback(_cleanupCollectedAssemblies, null); @@ -255,12 +258,12 @@ static bool IsSameKeyToken(byte[] reqKeyToken, byte[] curKeyToken) { bool isSame = false; - if (reqKeyToken == null && curKeyToken == null) + if (reqKeyToken is null && curKeyToken is null) { // Both Key Tokens are not set, treat them as same. isSame = true; } - else if (reqKeyToken != null && curKeyToken != null) + else if (reqKeyToken is not null && curKeyToken is not null) { // Both KeyTokens are set. if (reqKeyToken.Length == curKeyToken.Length) @@ -282,19 +285,6 @@ static bool IsSameKeyToken(byte[] reqKeyToken, byte[] curKeyToken) } #endif //!REACHFRAMEWORK -#if PRESENTATION_CORE - - /// - /// This function is a wrapper for CultureInfo.GetCultureInfoByIetfLanguageTag(). - /// The wrapper works around a bug in that routine, which causes it to throw - /// a SecurityException in Partial Trust. - /// - static internal CultureInfo GetCultureInfoByIetfLanguageTag(string languageTag) - { - return CultureInfo.GetCultureInfoByIetfLanguageTag(languageTag); - } -#endif //PRESENTATIONCORE - internal const string IMAGE = "image"; } @@ -306,7 +296,7 @@ class WeakRefKey : WeakReference public WeakRefKey(object target) :base(target) { - Debug.Assert(target != null); + Debug.Assert(target is not null); _hashCode = target.GetHashCode(); } @@ -318,16 +308,17 @@ public override int GetHashCode() public override bool Equals(object o) { WeakRefKey weakRef = o as WeakRefKey; - if (weakRef != null) + if (weakRef is not null) { object target1 = Target; object target2 = weakRef.Target; - if (target1 != null && target2 != null) + if (target1 is not null && target2 is not null) { return (target1 == target2); } } + return base.Equals(o); } @@ -337,6 +328,7 @@ public override bool Equals(object o) { return object.ReferenceEquals(right, null); } + return left.Equals(right); } diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelperAvalon.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelperAvalon.cs index 08d72580630..ba7e0a1fe53 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelperAvalon.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SafeSecurityHelperAvalon.cs @@ -10,12 +10,8 @@ \***************************************************************************/ -using System; -using System.Globalization; -using System.Security; -using System.Reflection; -using System.Windows.Media ; -using System.Windows; +using System.Windows.Media; +using System.Windows; //**************** // diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs index d11d1173075..98618c5151e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs @@ -8,6 +8,38 @@ * \***************************************************************************/ +using System.Security; +using System.ComponentModel; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +#if !PBTCOMPILER +using MS.Win32; +using System.IO.Packaging; +#endif + +#if PRESENTATION_CORE +using MS.Internal.AppModel; +#endif + +#if PRESENTATIONFRAMEWORK_ONLY +using System.Diagnostics; +using System.Windows; +using MS.Internal.Utility; // BindUriHelper +using MS.Internal.AppModel; +#endif + +#if REACHFRAMEWORK +using MS.Internal.Utility; +#endif +#if WINDOWS_BASE +// This existed originally to allow FontCache service to +// see the WindowsBase variant of this class. We no longer have +// a FontCache service, but over time other parts of WPF might +// have started to depend on this, so we leave it as-is for +// compat. +#endif + // The SecurityHelper class differs between assemblies and could not actually be // shared, so it is duplicated across namespaces to prevent name collision. // This duplication seems hardly necessary now. We should continue @@ -29,44 +61,7 @@ namespace MS.Internal.Drt #error Class is being used from an unknown assembly. #endif { - using System; - using System.Globalization; // CultureInfo - using System.Security; - using System.ComponentModel; - using System.Runtime.InteropServices; - using Microsoft.Win32; - using System.Diagnostics.CodeAnalysis; - - -#if !PBTCOMPILER - using MS.Win32; - using System.IO.Packaging; -#endif - -#if PRESENTATION_CORE -using MS.Internal.AppModel; -#endif - -#if PRESENTATIONFRAMEWORK_ONLY - using System.Diagnostics; - using System.Windows; - using MS.Internal.Utility; // BindUriHelper - using MS.Internal.AppModel; -#endif - -#if REACHFRAMEWORK - using MS.Internal.Utility; -#endif -#if WINDOWS_BASE - // This existed originally to allow FontCache service to - // see the WindowsBase variant of this class. We no longer have - // a FontCache service, but over time other parts of WPF might - // have started to depend on this, so we leave it as-is for - // compat. -#endif - - -internal static class SecurityHelper + internal static class SecurityHelper { #if PRESENTATION_CORE diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs index f7c805b1792..f8473765970 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs @@ -2,28 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//--------------------------------------------------------------------------- -// - -// -// // Description: A class that implements ICollection for a sequence of numbers [0..n-1]. -// -// -// -// -// -//--------------------------------------------------------------------------- - -using System; -using System.Windows; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Text; -using System.Runtime.InteropServices; -using SR=MS.Internal.PresentationCore.SR; +using System.Collections; namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SizeLimitedCache.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SizeLimitedCache.cs index 3b2ff572b4f..55f93b4fc56 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SizeLimitedCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SizeLimitedCache.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; - -using MS.Internal.PresentationCore; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TextServicesLoader.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TextServicesLoader.cs index c17c414f53e..fa5180a2c0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TextServicesLoader.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TextServicesLoader.cs @@ -12,17 +12,11 @@ // // -using System; -using System.Runtime.InteropServices; -using System.Security; using System.Threading; -using MS.Internal; using Microsoft.Win32; using MS.Win32; -using System.Diagnostics; #if WINDOWS_BASE - using MS.Internal.WindowsBase; #elif PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TokenizerHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TokenizerHelper.cs index dd578b04c13..d0ad4f5982e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TokenizerHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/TokenizerHelper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -7,32 +7,13 @@ // This class should be used by most - if not all - MIL parsers. // -using System; -using System.Collections; -using System.Diagnostics; -using System.ComponentModel; using System.Globalization; -#if !PBTCOMPILER -using System.Windows; -#endif - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif PBTCOMPILER - using MS.Utility ; - using MS.Internal.Markup; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif - #if PBTCOMPILER +using System; +using System.Diagnostics; +using MS.Utility; + namespace MS.Internal.Markup #else namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/UriComparer.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/UriComparer.cs index 04ace271d66..f098d8adcf6 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/UriComparer.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/UriComparer.cs @@ -15,10 +15,6 @@ This causes cache lookups in hash tables and dictionaries to fail --*/ -using System; -using System.Collections.Generic; -using System.Diagnostics; - namespace MS.Internal { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceEnumerator.cs index 607b1918609..5fa81ca594e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceEnumerator.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Windows; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceList.cs index f20ba648d7f..7ef64b69423 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WeakReferenceList.cs @@ -2,21 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; -using System.Diagnostics; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif namespace MS.Internal { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WindowsRuntime/ReflectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WindowsRuntime/ReflectionHelper.cs index 16e0b4cc6f9..3447ed98897 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WindowsRuntime/ReflectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/WindowsRuntime/ReflectionHelper.cs @@ -11,17 +11,20 @@ using MS.Internal.WindowsBase; #elif PRESENTATION_CORE using MS.Internal.PresentationCore; +using System; +using System.Reflection; + #elif PRESENTATIONFRAMEWORK using MS.Internal.WindowsRuntime; +using System; +using System.Reflection; + #elif REACHFRAMEWORK using MS.Internal.ReachFramework; #else using MS.Internal; #endif -using System; -using System.Runtime.InteropServices; -using System.Security; #if WINDOWS_BASE namespace MS.Internal.WindowsBase @@ -35,10 +38,6 @@ namespace MS.Internal { namespace WindowsRuntime { - using System; - using System.Collections.Generic; - using System.Reflection; - internal static class ReflectionHelper { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlContextStack.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlContextStack.cs index 55ce8179d7a..904a7e7b04e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlContextStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlContextStack.cs @@ -4,10 +4,7 @@ #nullable disable -using System; -using System.Collections.Generic; using System.Text; -using System.Diagnostics; using System.Globalization; namespace MS.Internal.Xaml.Context @@ -27,7 +24,7 @@ public XamlContextStack(Func creationDelegate) _creationDelegate = creationDelegate; Grow(); _depth = 0; - Debug.Assert(CurrentFrame != null); + Debug.Assert(CurrentFrame is not null); Debug.Assert(CurrentFrame.Depth == Depth); } @@ -43,17 +40,19 @@ public XamlContextStack(XamlContextStack source, bool copy) { T iteratorFrame = source.CurrentFrame; T lastFrameInNewStack = null; - while (iteratorFrame != null) + while (iteratorFrame is not null) { T newFrame = (T)iteratorFrame.Clone(); - if (_currentFrame == null) + if (_currentFrame is null) { _currentFrame = newFrame; } - if (lastFrameInNewStack != null) + + if (lastFrameInNewStack is not null) { lastFrameInNewStack.Previous = newFrame; } + lastFrameInNewStack = newFrame; iteratorFrame = (T)iteratorFrame.Previous; } @@ -86,11 +85,12 @@ public T PreviousPreviousFrame public T GetFrame(int depth) { T iteratorFrame = _currentFrame; - Debug.Assert(iteratorFrame != null); + Debug.Assert(iteratorFrame is not null); while (iteratorFrame.Depth > depth) { iteratorFrame = (T)iteratorFrame.Previous; } + return iteratorFrame; } @@ -98,7 +98,7 @@ public T GetFrame(int depth) // or we'll grab one from our recycled linked list. public void PushScope() { - if (_recycledFrame == null) + if (_recycledFrame is null) { Grow(); } @@ -109,6 +109,7 @@ public void PushScope() _recycledFrame = (T)_recycledFrame.Previous; _currentFrame.Previous = lastFrame; } + _depth++; Debug.Assert(CurrentFrame.Depth == Depth); } @@ -144,7 +145,7 @@ public string Frames { StringBuilder sb = new StringBuilder(); T iteratorFrame = _currentFrame; - sb.AppendLine(CultureInfo.InvariantCulture, $"Stack: {(_currentFrame == null ? -1 : _currentFrame.Depth + 1)} frames"); + sb.AppendLine(CultureInfo.InvariantCulture, $"Stack: {(_currentFrame is null ? -1 : _currentFrame.Depth + 1)} frames"); ShowFrame(sb, _currentFrame); return sb.ToString(); } @@ -152,9 +153,9 @@ public string Frames private void ShowFrame(StringBuilder sb, T iteratorFrame) { - if (iteratorFrame == null) + if (iteratorFrame is null) return; - if (iteratorFrame.Previous != null) + if (iteratorFrame.Previous is not null) ShowFrame(sb, (T)iteratorFrame.Previous); sb.AppendLine($" {iteratorFrame.Depth} {iteratorFrame}"); } diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlFrame.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlFrame.cs index bf983b4a22f..c9b96397031 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Context/XamlFrame.cs @@ -4,11 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Text; -using System.Diagnostics; - namespace MS.Internal.Xaml.Context { abstract class XamlFrame @@ -54,7 +49,7 @@ public XamlFrame Previous set { _previous = value; - _depth = (_previous == null) ? 0 : _previous._depth + 1; + _depth = (_previous is null) ? 0 : _previous._depth + 1; } } } diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Parser/SpecialBracketCharacters.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Parser/SpecialBracketCharacters.cs index c1132ef6832..3a62239dc12 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Parser/SpecialBracketCharacters.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Xaml/Parser/SpecialBracketCharacters.cs @@ -7,7 +7,6 @@ // Description: Data model for the Bracket characters specified on a Markup Extension property. using System; -using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Text; @@ -22,7 +21,7 @@ internal class SpecialBracketCharacters : ISupportInitialize { private string _startChars; private string _endChars; - private readonly static ISet _restrictedCharSet = new SortedSet((new char[] { '=', ',', '\'', '"', '{', '}', '\\' })); + private static readonly ISet _restrictedCharSet = new SortedSet((new char[] { '=', ',', '\'', '"', '{', '}', '\\' })); private bool _initializing; private StringBuilder _startCharactersStringBuilder; private StringBuilder _endCharactersStringBuilder; @@ -35,7 +34,7 @@ internal SpecialBracketCharacters() internal SpecialBracketCharacters(IReadOnlyDictionary attributeList) { BeginInit(); - if (attributeList != null && attributeList.Count > 0) + if (attributeList is not null && attributeList.Count > 0) { Tokenize(attributeList); } diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/BindUriHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/BindUriHelper.cs index f12a9233cdc..75e8674bb11 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/BindUriHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/BindUriHelper.cs @@ -2,18 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Net; // HttpWebRequest -using System.Net.Cache; // HttpRequestCachePolicy -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Text; +using System.Text; using System.Windows.Navigation; // BaseUriHelper #if !PBTCOMPILER -using MS.Win32; #endif // The functionality in this class is shared across framework and core. The functionality in core @@ -37,11 +29,11 @@ namespace MS.Internal.Utility #error Class is being used from an unknown assembly. #endif { - // - // Methods in this partial class are shared by PresentationFramework and PresentationBuildTasks. - // See also WpfWebRequestHelper. - // - internal static partial class BindUriHelper + // + // Methods in this partial class are shared by PresentationFramework and PresentationBuildTasks. + // See also WpfWebRequestHelper. + // + internal static partial class BindUriHelper { private const int MAX_PATH_LENGTH = 2048 ; private const int MAX_SCHEME_LENGTH = 32; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle+DpiUtil.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle+DpiUtil.cs index f0cbb1c069f..a7866b011ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle+DpiUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle+DpiUtil.cs @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Win32; namespace MS.Utility { - using MS.Utility; - using MS.Win32; - using System; - /// /// Contains inner class /// @@ -65,4 +62,4 @@ private static bool AreDpiAwarenessContextsTriviallyEqual(IntPtr dpiContextA, In } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle.cs index 143362bc9bb..06b35ebaae8 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/DpiAwarenessContext/DpiAwarenessContextHandle.cs @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MS.Win32; +using System.Runtime.InteropServices; namespace MS.Utility { - using MS.Win32; - using System; - using System.Collections.Generic; - using System.Runtime.InteropServices; - using System.Security; - /// /// A type representing DPI_AWARENESS_CONTEXT values /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs index 368cf96d679..7eb1b7b4369 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs @@ -1,13 +1,10 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable -using System; -using System.Diagnostics; using System.Collections; -using System.Collections.Generic; #if SYSTEM_XAML using System.Xaml; #else @@ -17,37 +14,37 @@ // using MS.Internal.PresentationCore; // using SR=MS.Internal.WindowsBase.SR; - // These classes implement a frugal storage model for lists of type . - // Performance measurements show that Avalon has many lists that contain - // a limited number of entries, and frequently zero or a single entry. - // Therefore these classes are structured to prefer a storage model that - // starts at zero, and employs a conservative growth strategy to minimize - // the steady state memory footprint. Also note that the list uses one - // fewer objects than ArrayList and List and does no allocations at all - // until an item is inserted into the list. - // - // The code is also structured to perform well from a CPU standpoint. Perf - // analysis shows that the reduced number of processor cache misses makes - // FrugalList faster than ArrayList or List, especially for lists of 6 - // or fewer items. Timing differ with the size of . - // - // FrugalList is appropriate for small lists or lists that grow slowly. - // Due to the slow growth, if you use it for a list with more than 6 initial - // entires is best to set the capacity of the list at construction time or - // soon after. If you must grow the list by a large amount, set the capacity - // or use Insert() method to force list growth to the final size. Choose - // your collections wisely and pay particular attention to the growth - // patterns and search methods. - - // FrugalList has all of the methods of the Ilist interface, but implements - // them as virtual methods of the class and not as Interface methods. This - // is to avoid the virtual stub dispatch CPU costs associated with Interfaces. - - // We suppress two FxCop warnings in this module because not all usages - // of FrugalList will instantiate all the storage classes and not all class instances - // will use every method. - // CA1812:AvoidUninstantiatedInternalClasses - // +// These classes implement a frugal storage model for lists of type . +// Performance measurements show that Avalon has many lists that contain +// a limited number of entries, and frequently zero or a single entry. +// Therefore these classes are structured to prefer a storage model that +// starts at zero, and employs a conservative growth strategy to minimize +// the steady state memory footprint. Also note that the list uses one +// fewer objects than ArrayList and List and does no allocations at all +// until an item is inserted into the list. +// +// The code is also structured to perform well from a CPU standpoint. Perf +// analysis shows that the reduced number of processor cache misses makes +// FrugalList faster than ArrayList or List, especially for lists of 6 +// or fewer items. Timing differ with the size of . +// +// FrugalList is appropriate for small lists or lists that grow slowly. +// Due to the slow growth, if you use it for a list with more than 6 initial +// entires is best to set the capacity of the list at construction time or +// soon after. If you must grow the list by a large amount, set the capacity +// or use Insert() method to force list growth to the final size. Choose +// your collections wisely and pay particular attention to the growth +// patterns and search methods. + +// FrugalList has all of the methods of the Ilist interface, but implements +// them as virtual methods of the class and not as Interface methods. This +// is to avoid the virtual stub dispatch CPU costs associated with Interfaces. + +// We suppress two FxCop warnings in this module because not all usages +// of FrugalList will instantiate all the storage classes and not all class instances +// will use every method. +// CA1812:AvoidUninstantiatedInternalClasses +// #if SYSTEM_XAML namespace System.Xaml.MS.Impl @@ -241,7 +238,7 @@ public override FrugalListStoreState Add(T value) { // If we don't have any entries or the existing entry is being overwritten, // then we can use this store. Otherwise we have to promote. - if (0 == _count) + if (_count == 0) { _loneEntry = value; ++_count; @@ -272,6 +269,7 @@ public override int IndexOf(T value) { return 0; } + return -1; } @@ -284,6 +282,7 @@ public override void Insert(int index, T value) ++_count; return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -322,7 +321,7 @@ public override T EntryAt(int index) public override void Promote(FrugalListBase oldList) { - if (SIZE == oldList.Count) + if (oldList.Count == SIZE) { SetCount(SIZE); SetAt(0, oldList.EntryAt(0)); @@ -343,7 +342,7 @@ public void Promote(SingleItemList oldList) public override T[] ToArray() { - T[] array = new T[1]; + T[] array = new T[SIZE]; array[0] = _loneEntry; return array; } @@ -373,7 +372,6 @@ private void SetCount(int value) private T _loneEntry; } - /// /// A simple class to handle a list with 3 items. Perf analysis showed /// that this yielded better memory locality and perf than an object and an array. @@ -409,6 +407,7 @@ public override FrugalListStoreState Add(T value) // We have to promote return FrugalListStoreState.SixItemList; } + ++_count; return FrugalListStoreState.Success; } @@ -424,7 +423,7 @@ public override void Clear() public override bool Contains(T value) { - return (-1 != IndexOf(value)); + return (IndexOf(value) != -1); } public override int IndexOf(T value) @@ -433,17 +432,20 @@ public override int IndexOf(T value) { return 0; } + if (_count > 1) { if (EqualityComparer.Default.Equals(_entry1, value)) { return 1; } - if ((3 == _count) && EqualityComparer.Default.Equals(_entry2, value)) + + if ((_count == 3) && EqualityComparer.Default.Equals(_entry2, value)) { return 2; } } + return -1; } @@ -472,9 +474,11 @@ public override void Insert(int index, T value) default: throw new ArgumentOutOfRangeException(nameof(index)); } + ++_count; return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -517,12 +521,13 @@ public override bool Remove(T value) RemoveAt(1); return true; } - else if ((3 == _count) && EqualityComparer.Default.Equals(_entry2, value)) + else if ((_count == 3) && EqualityComparer.Default.Equals(_entry2, value)) { RemoveAt(2); return true; } } + return false; } @@ -548,6 +553,7 @@ public override void RemoveAt(int index) default: throw new ArgumentOutOfRangeException(nameof(index)); } + _entry2 = default(T); --_count; } @@ -573,7 +579,7 @@ public override T EntryAt(int index) public override void Promote(FrugalListBase oldList) { int oldCount = oldList.Count; - if (SIZE >= oldCount) + if (oldCount <= SIZE) { SetCount(oldList.Count); @@ -659,6 +665,7 @@ public override T[] ToArray() array[2] = _entry2; } } + return array; } @@ -743,6 +750,7 @@ public override FrugalListStoreState Add(T value) // We have to promote return FrugalListStoreState.Array; } + ++_count; return FrugalListStoreState.Success; } @@ -761,7 +769,7 @@ public override void Clear() public override bool Contains(T value) { - return (-1 != IndexOf(value)); + return (IndexOf(value) != -1); } public override int IndexOf(T value) @@ -770,31 +778,36 @@ public override int IndexOf(T value) { return 0; } + if (_count > 1) { if (EqualityComparer.Default.Equals(_entry1, value)) { return 1; } + if (_count > 2) { if (EqualityComparer.Default.Equals(_entry2, value)) { return 2; } + if (_count > 3) { if (EqualityComparer.Default.Equals(_entry3, value)) { return 3; } + if (_count > 4) { if (EqualityComparer.Default.Equals(_entry4, value)) { return 4; } - if ((6 == _count) && EqualityComparer.Default.Equals(_entry5, value)) + + if ((_count == 6) && EqualityComparer.Default.Equals(_entry5, value)) { return 5; } @@ -802,6 +815,7 @@ public override int IndexOf(T value) } } } + return -1; } @@ -854,9 +868,11 @@ public override void Insert(int index, T value) default: throw new ArgumentOutOfRangeException(nameof(index)); } + ++_count; return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -932,7 +948,7 @@ public override bool Remove(T value) RemoveAt(4); return true; } - else if ((6 == _count) && EqualityComparer.Default.Equals(_entry5, value)) + else if ((_count == 6) && EqualityComparer.Default.Equals(_entry5, value)) { RemoveAt(5); return true; @@ -988,6 +1004,7 @@ public override void RemoveAt(int index) default: throw new ArgumentOutOfRangeException(nameof(index)); } + _entry5 = default(T); --_count; } @@ -1022,7 +1039,7 @@ public override T EntryAt(int index) public override void Promote(FrugalListBase oldList) { int oldCount = oldList.Count; - if (SIZE >= oldCount) + if (oldCount <= SIZE) { SetCount(oldList.Count); @@ -1085,7 +1102,7 @@ public override void Promote(FrugalListBase oldList) public void Promote(ThreeItemList oldList) { int oldCount = oldList.Count; - if (SIZE <= oldCount) + if (oldCount >= SIZE) { SetCount(oldList.Count); @@ -1203,6 +1220,7 @@ public override T[] ToArray() } } } + return array; } @@ -1326,6 +1344,7 @@ public override FrugalListStoreState Add(T value) _entries[_count] = value; ++_count; } + return FrugalListStoreState.Success; } @@ -1351,6 +1370,7 @@ public override void Insert(int index, T value) ++_count; return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -1396,10 +1416,11 @@ public override void Promote(FrugalListBase oldList) { for (int index = 0; index < oldList.Count; ++index) { - if (FrugalListStoreState.Success == Add(oldList.EntryAt(index))) + if (Add(oldList.EntryAt(index)) == FrugalListStoreState.Success) { continue; } + // this list is smaller than oldList throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); } @@ -1618,19 +1639,21 @@ public int Capacity { get { - if (null != _listStore) + if (_listStore is not null) { return _listStore.Capacity; } + return 0; } set { int capacity = 0; - if (null != _listStore) + if (_listStore is not null) { capacity = _listStore.Capacity; } + if (capacity < value) { // Need to move to a more complex storage @@ -1653,7 +1676,7 @@ public int Capacity newStore = new ArrayItemList(value); } - if (null != _listStore) + if (_listStore is not null) { // Move entries in the old store to the new one newStore.Promote(_listStore); @@ -1668,42 +1691,44 @@ public int Count { get { - if (null != _listStore) + if (_listStore is not null) { return _listStore.Count; } + return 0; } } - public T this[int index] { get { // If no entry, default(T) is returned - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { return _listStore.EntryAt(index); } + throw new ArgumentOutOfRangeException(nameof(index)); } set { // Ensure write success - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { _listStore.SetAt(index, value); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } } public int Add(T value) { - if (null != _listStore) + if (_listStore is not null) { // This is done because forward branches // default prediction is not to be taken @@ -1716,7 +1741,7 @@ public int Add(T value) } FrugalListStoreState myState = _listStore.Add(value); - if (FrugalListStoreState.Success == myState) + if (myState == FrugalListStoreState.Success) { } else @@ -1725,7 +1750,7 @@ public int Add(T value) // Allocate the store, promote, and add using the derived classes // to avoid virtual method calls - if (FrugalListStoreState.ThreeItemList == myState) + if (myState == FrugalListStoreState.ThreeItemList) { ThreeItemList newStore = new ThreeItemList(); @@ -1736,7 +1761,7 @@ public int Add(T value) newStore.Add(value); _listStore = newStore; } - else if (FrugalListStoreState.SixItemList == myState) + else if (myState == FrugalListStoreState.SixItemList) { SixItemList newStore = new SixItemList(); @@ -1748,7 +1773,7 @@ public int Add(T value) newStore.Add(value); _listStore = newStore; } - else if (FrugalListStoreState.Array == myState) + else if (myState == FrugalListStoreState.Array) { ArrayItemList newStore = new ArrayItemList(_listStore.Count + 1); @@ -1765,12 +1790,13 @@ public int Add(T value) throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray); } } + return _listStore.Count - 1; } public void Clear() { - if (null != _listStore) + if (_listStore is not null) { _listStore.Clear(); } @@ -1778,30 +1804,32 @@ public void Clear() public bool Contains(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.Contains(value); } + return false; } public int IndexOf(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.IndexOf(value); } + return -1; } public void Insert(int index, T value) { - if ((index == 0) || ((null != _listStore) && ((index <= _listStore.Count) && (index >= 0)))) + if ((index == 0) || ((_listStore is not null) && ((index <= _listStore.Count) && (index >= 0)))) { // Make sure we have a place to put the item int minCapacity = 1; - if ((null != _listStore) && (_listStore.Count == _listStore.Capacity)) + if ((_listStore is not null) && (_listStore.Count == _listStore.Capacity)) { // Store is full minCapacity = Capacity + 1; @@ -1813,25 +1841,28 @@ public void Insert(int index, T value) _listStore.Insert(index, value); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } public bool Remove(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.Remove(value); } + return false; } public void RemoveAt(int index) { - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { _listStore.RemoveAt(index); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -1857,16 +1888,17 @@ public void EnsureIndex(int index) public T[] ToArray() { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.ToArray(); } + return null; } public void CopyTo(T[] array, int index) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { _listStore.CopyTo(array, index); } @@ -1876,7 +1908,7 @@ public FrugalObjectList Clone() { FrugalObjectList myClone = new FrugalObjectList(); - if (null != _listStore) + if (_listStore is not null) { myClone._listStore = (FrugalListBase)_listStore.Clone(); } @@ -1907,7 +1939,7 @@ public Compacter(FrugalObjectList list, int newCount) _list = list; FrugalListBase store = _list._listStore; - _storeCompacter = (store != null) ? store.NewCompacter(newCount) : null; + _storeCompacter = (store is not null) ? store.NewCompacter(newCount) : null; } public void Include(int start, int end) @@ -1917,7 +1949,7 @@ public void Include(int start, int end) public void Finish() { - if (_storeCompacter != null) + if (_storeCompacter is not null) { _list._listStore = _storeCompacter.Finish(); } @@ -1990,19 +2022,21 @@ public int Capacity { get { - if (null != _listStore) + if (_listStore is not null) { return _listStore.Capacity; } + return 0; } set { int capacity = 0; - if (null != _listStore) + if (_listStore is not null) { capacity = _listStore.Capacity; } + if (capacity < value) { // Need to move to a more complex storage @@ -2025,7 +2059,7 @@ public int Capacity newStore = new ArrayItemList(value); } - if (null != _listStore) + if (_listStore is not null) { // Move entries in the old store to the new one newStore.Promote(_listStore); @@ -2040,42 +2074,44 @@ public int Count { get { - if (null != _listStore) + if (_listStore is not null) { return _listStore.Count; } + return 0; } } - public T this[int index] { get { // If no entry, default(T) is returned - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { return _listStore.EntryAt(index); } + throw new ArgumentOutOfRangeException(nameof(index)); } set { // Ensure write success - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { _listStore.SetAt(index, value); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } } public int Add(T value) { - if (null != _listStore) + if (_listStore is not null) { // This is done because forward branches // default prediction is not to be taken @@ -2088,7 +2124,7 @@ public int Add(T value) } FrugalListStoreState myState = _listStore.Add(value); - if (FrugalListStoreState.Success == myState) + if (myState == FrugalListStoreState.Success) { } else @@ -2097,7 +2133,7 @@ public int Add(T value) // Allocate the store, promote, and add using the derived classes // to avoid virtual method calls - if (FrugalListStoreState.ThreeItemList == myState) + if (myState == FrugalListStoreState.ThreeItemList) { ThreeItemList newStore = new ThreeItemList(); @@ -2108,7 +2144,7 @@ public int Add(T value) newStore.Add(value); _listStore = newStore; } - else if (FrugalListStoreState.SixItemList == myState) + else if (myState == FrugalListStoreState.SixItemList) { SixItemList newStore = new SixItemList(); @@ -2120,7 +2156,7 @@ public int Add(T value) newStore.Add(value); _listStore = newStore; } - else if (FrugalListStoreState.Array == myState) + else if (myState == FrugalListStoreState.Array) { ArrayItemList newStore = new ArrayItemList(_listStore.Count + 1); @@ -2137,12 +2173,13 @@ public int Add(T value) throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray); } } + return _listStore.Count - 1; } public void Clear() { - if (null != _listStore) + if (_listStore is not null) { _listStore.Clear(); } @@ -2150,30 +2187,32 @@ public void Clear() public bool Contains(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.Contains(value); } + return false; } public int IndexOf(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.IndexOf(value); } + return -1; } public void Insert(int index, T value) { - if ((index == 0) || ((null != _listStore) && ((index <= _listStore.Count) && (index >= 0)))) + if ((index == 0) || ((_listStore is not null) && ((index <= _listStore.Count) && (index >= 0)))) { // Make sure we have a place to put the item int minCapacity = 1; - if ((null != _listStore) && (_listStore.Count == _listStore.Capacity)) + if ((_listStore is not null) && (_listStore.Count == _listStore.Capacity)) { // Store is full minCapacity = Capacity + 1; @@ -2185,25 +2224,28 @@ public void Insert(int index, T value) _listStore.Insert(index, value); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } public bool Remove(T value) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.Remove(value); } + return false; } public void RemoveAt(int index) { - if ((null != _listStore) && ((index < _listStore.Count) && (index >= 0))) + if ((_listStore is not null) && ((index < _listStore.Count) && (index >= 0))) { _listStore.RemoveAt(index); return; } + throw new ArgumentOutOfRangeException(nameof(index)); } @@ -2229,16 +2271,17 @@ public void EnsureIndex(int index) public T[] ToArray() { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { return _listStore.ToArray(); } + return null; } public void CopyTo(T[] array, int index) { - if ((null != _listStore) && (_listStore.Count > 0)) + if ((_listStore is not null) && (_listStore.Count > 0)) { _listStore.CopyTo(array, index); } @@ -2248,7 +2291,7 @@ public FrugalStructList Clone() { FrugalStructList myClone = default(FrugalStructList); - if (null != _listStore) + if (_listStore is not null) { myClone._listStore = (FrugalListBase)_listStore.Clone(); } @@ -2259,4 +2302,3 @@ public FrugalStructList Clone() internal FrugalListBase _listStore; } } - diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalMap.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalMap.cs index 1c9cac96dda..55ac7effda2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalMap.cs @@ -2,14 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Collections; -using System.Collections.Generic; using System.Windows; #if WINDOWS_BASE -using MS.Internal.WindowsBase; #elif PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemList.cs index 3c8cb07a905..6f87c1a5a7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemList.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace MS.Utility { // diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemMap.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemMap.cs index c08903cec24..9861c42aaf6 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/ItemMap.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Diagnostics; - namespace MS.Utility { // @@ -16,7 +12,7 @@ namespace MS.Utility // This struct is designed to function with its fields starting at // their default values and without the need of surfacing a constructor // other than the deafult - #pragma warning disable 649 +#pragma warning disable 649 internal struct ItemStructMap { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Maps.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Maps.cs index 8adedf626a3..d60f108c944 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Maps.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Maps.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/PerfService.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/PerfService.cs index c58575730b5..55b196e66dc 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/PerfService.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/PerfService.cs @@ -4,15 +4,7 @@ // Description: Implements the Service class for perf diagnostics -using System; -using System.Text; -using System.Windows; -using System.Collections.Generic; using SRCS = System.Runtime.CompilerServices; - -using Microsoft.Win32; -using MS.Internal; -using MS.Utility; using MS.Win32.PresentationCore; using System.Reflection; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Trace.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Trace.cs index 04e218d9222..8d3281d3457 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Trace.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/Trace.cs @@ -6,16 +6,6 @@ #if !SILVERLIGHTXAML -using System.Collections; -using System.Diagnostics.Tracing; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security; -using System.Threading; -using System; -using MS.Internal.WindowsBase; - - #if SYSTEM_XAML namespace MS.Internal.Xaml #else diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/TraceProvider.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/TraceProvider.cs index 9a9b1ef9dec..7f9a0d5f7f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/TraceProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/TraceProvider.cs @@ -7,14 +7,10 @@ // Provides an internal Avalon API to replace Microsoft.Windows.EventTracing.dll #if !SILVERLIGHTXAML -using System; using MS.Win32; using MS.Internal; using System.Runtime.InteropServices; -using System.Security; using System.Globalization; //for CultureInfo -using System.Diagnostics; -using MS.Internal.WindowsBase; #pragma warning disable 1634, 1691 //disable warnings about unknown pragma diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ExternDll.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ExternDll.cs index 8a1e2fa785b..2bf2a65bcaa 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ExternDll.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ExternDll.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace MS.Win32 { internal static class ExternDll diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HandleCollector.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HandleCollector.cs index ace682daab9..5c6a94642f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HandleCollector.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HandleCollector.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using MS.Win32 ; using System.Runtime.InteropServices; namespace MS.Win32 diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndSubclass.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndSubclass.cs index 17dac0280e3..d17b78efeac 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndSubclass.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndSubclass.cs @@ -2,29 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -using MS.Internal; using MS.Internal.Interop; -using MS.Utility; -using System.Windows; using System.Windows.Threading; -using System.Security; // CAS -using System.Threading; // Thread - -// The SecurityHelper class differs between assemblies and could not actually be -// shared, so it is duplicated across namespaces to prevent name collision. -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -#error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. -#endif +using System.Threading; namespace MS.Win32 { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapper.cs index 4e38ac3c245..e804e29a57c 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapper.cs @@ -2,28 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using System.Collections.Generic; +using System.Globalization; +using System.Runtime.InteropServices; using System.Threading; using System.Windows.Threading; -using System.Runtime.InteropServices; -using System.Diagnostics; using MS.Internal; using MS.Internal.Interop; -using System.Globalization; // CultureInfo.InvariantCulture - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif // Disable pragma warnings to enable PREsharp pragmas #pragma warning disable 1634, 1691 diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapperHook.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapperHook.cs index 5cf212de164..8d92bb26602 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapperHook.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/HwndWrapperHook.cs @@ -2,21 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -using MS.Internal.YourAssemblyName; -#endif - namespace MS.Win32 { internal delegate IntPtr HwndWrapperHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled); diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/LoadLibraryHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/LoadLibraryHelper.cs index af0f153ff04..c52e6ae5223 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/LoadLibraryHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/LoadLibraryHelper.cs @@ -2,16 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Runtime.InteropServices; + // Description: Helper class for calling LoadLibrary using SEARCH_SYSTEM32 when possible namespace MS.Win32 { - using System; - using System.Security; - using System.Runtime.InteropServices; - - - internal static class LoadLibraryHelper { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs index 3bc5aa1c600..338db3bb8a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs @@ -4,28 +4,10 @@ //#define LOGGING -using System; using System.Collections; -using System.Threading; - using System.Runtime.InteropServices; using MS.Internal; using MS.Internal.Interop; -using System.Security; - -// The SecurityHelper class differs between assemblies and could not actually be -// shared, so it is duplicated across namespaces to prevent name collision. -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -#error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. -#endif namespace MS.Win32 { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/MessageOnlyHwndWrapper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/MessageOnlyHwndWrapper.cs index 2b2410d3366..1b6935763d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/MessageOnlyHwndWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/MessageOnlyHwndWrapper.cs @@ -2,11 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading; -using System.Security ; -using System.Runtime.InteropServices; - namespace MS.Win32 { // Specialized version of HwndWrapper for message-only windows. diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsCLR.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsCLR.cs index 5dbb847a9bd..96ce2a431e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsCLR.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsCLR.cs @@ -4,26 +4,17 @@ #pragma warning disable 649 // Disable CS0649: "field is never assigned to" -namespace MS.Win32 { - using Accessibility; - using System.Runtime.InteropServices; - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using System.Text; - using MS.Internal; +using System.Runtime.InteropServices; +using System; +using System.Text; #if !DRT && !UIAUTOMATIONTYPES - using MS.Internal.Interop; - using MS.Utility; +using MS.Internal.Interop; +using MS.Utility; #endif - using Microsoft.Win32; - using System.Security; - // The SecurityHelper class differs between assemblies and could not actually be - // shared, so it is duplicated across namespaces to prevent name collision. +// The SecurityHelper class differs between assemblies and could not actually be +// shared, so it is duplicated across namespaces to prevent name collision. #if WINDOWS_BASE - using MS.Internal.WindowsBase; +using MS.Internal.WindowsBase; #elif PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK @@ -36,6 +27,8 @@ namespace MS.Win32 { #error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. #endif +namespace MS.Win32 +{ internal partial class NativeMethods { #if !FRAMEWORK_NATIVEMETHODS [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsOther.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsOther.cs index a696c8bcd99..36439b4a808 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsOther.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsOther.cs @@ -2,35 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Runtime.InteropServices; +using System.Diagnostics; +using Microsoft.Win32.SafeHandles; + namespace MS.Win32 { - using Accessibility; - using System; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System.Security; - using System.Collections; - using System.Diagnostics; - using System.IO; - using System.Text; - using MS.Win32; - using Microsoft.Win32.SafeHandles; - - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif UIAUTOMATIONTYPES - using MS.Internal.UIAutomationTypes; -#elif DRT - using MS.Internal.Drt; -#else - using MS.Internal.YourAssemblyName; -#endif - internal partial class NativeMethods { // Translates Win32 error codes into HRESULTs. diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsSetLastError.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsSetLastError.cs index b6fbddab969..378430190b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsSetLastError.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsSetLastError.cs @@ -2,6 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Text; +using System.Runtime.InteropServices; +using MS.Win32; + // Description: P/Invokes for methods that need to call SetLastError(0) // The NativeMethodsSetLastError class differs between assemblies and could not actually be @@ -22,15 +27,6 @@ namespace MS.Internal.Drt #error Class is being used from an unknown assembly. #endif { - using System; - using System.Diagnostics.CodeAnalysis; - using System.IO; - using System.Security; - using System.Runtime.InteropServices; - using System.Text; - using System.Windows; - using MS.Win32; - internal static class NativeMethodsSetLastError { private const string PresentationNativeDll = "PresentationNative_cor3.dll"; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsCLR.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsCLR.cs index 8f05ebfcf27..02796299c16 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsCLR.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsCLR.cs @@ -2,37 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.ComponentModel; +using System.Runtime.InteropServices; +using MS.Utility; + namespace MS.Win32 { - using MS.Utility; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System; - using System.Security; - using System.Collections; - using System.IO; - using System.Text; - using System.ComponentModel; - - - // The SecurityHelper class differs between assemblies and could not actually be - // shared, so it is duplicated across namespaces to prevent name collision. -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#elif UIAUTOMATIONTYPES - using MS.Internal.UIAutomationTypes; -#else -#error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. -#endif - - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - internal static partial class SafeNativeMethods { public static int GetMessagePos() diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsOther.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsOther.cs index 3ff17b5b477..bf956da9f38 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsOther.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeNativeMethodsOther.cs @@ -2,34 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MS.Win32 { - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System; - using System.Security; - using System.Collections; - using System.IO; - using System.Text; - using System.ComponentModel; - using System.Diagnostics; - - - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else - using MS.Internal.YourAssemblyName; -#endif +using System.ComponentModel; +using System.Runtime.InteropServices; +namespace MS.Win32 +{ internal partial class SafeNativeMethods - { + { ////////////////////////////// // from Framework diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeSystemMetrics.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeSystemMetrics.cs index 4a9ac8ebd8c..59184b8d9d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeSystemMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/SafeSystemMetrics.cs @@ -10,14 +10,6 @@ // that were moved here do not rely on caching. If there is a percieved perf. problem // we can work on enabling this. -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Windows.Media; -using Microsoft.Win32; -using System.Security; -using MS.Win32; -using MS.Internal; using MS.Internal.Interop; namespace MS.Win32 diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCLR.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCLR.cs index 63b33f29acc..de69465b110 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCLR.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCLR.cs @@ -2,48 +2,45 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MS.Win32 -{ - using Accessibility; - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.ComTypes; - using System.Runtime.ConstrainedExecution; - using System; - using System.Collections; - using System.IO; - using System.Text; - using System.Security; - using System.Diagnostics; - using System.ComponentModel; - using MS.Internal; +using Accessibility; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System; +using System.Text; +using System.Diagnostics; +using System.ComponentModel; #if !DRT && !UIAUTOMATIONTYPES - using MS.Internal.Interop; - using MS.Utility; +using MS.Internal.Interop; +using MS.Utility; #endif - // DRTs cannot access MS.Internal +// DRTs cannot access MS.Internal #if !DRT && !UIAUTOMATIONTYPES - using HR = MS.Internal.Interop.HRESULT; +using HR = MS.Internal.Interop.HRESULT; #endif - //The SecurityHelper class differs between assemblies and could not actually be - // shared, so it is duplicated across namespaces to prevent name collision. +//The SecurityHelper class differs between assemblies and could not actually be +// shared, so it is duplicated across namespaces to prevent name collision. #if WINDOWS_BASE - using MS.Internal.WindowsBase; +using MS.Internal.WindowsBase; +using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; + #elif PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK using MS.Internal.PresentationFramework; #elif UIAUTOMATIONTYPES using MS.Internal.UIAutomationTypes; +using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; + #elif DRT using MS.Internal.Drt; #else #error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. #endif - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - +namespace MS.Win32 +{ internal partial class UnsafeNativeMethods { #if BASE_NATIVEMETHODS diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCompiler.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCompiler.cs index a33af718772..825249e89c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCompiler.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsCompiler.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Text; -using System.ComponentModel; -using System.Security; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsEventTrace.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsEventTrace.cs index bfeefaf5752..8499fd7c85b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsEventTrace.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsEventTrace.cs @@ -4,8 +4,6 @@ #if !SILVERLIGHTXAML -using System; -using System.Security; using System.Runtime.InteropServices; #if SYSTEM_XAML using MS.Internal.Xaml; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsOther.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsOther.cs index 9ef6cff2580..103d6736ea3 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsOther.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsOther.cs @@ -2,40 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Threading; using System.ComponentModel; -using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Text; +using Microsoft.Win32.SafeHandles; +using MS.Internal; +using MS.Internal.Interop; + +using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace MS.Win32 { - using Accessibility; - using SRCS = System.Runtime.CompilerServices; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System; - using System.Collections; - using System.IO; - using System.Text; - using System.Security; - using Microsoft.Win32.SafeHandles; - using MS.Internal; - using MS.Internal.Interop; - using MS.Utility; - -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else - using MS.Internal.YourAssemblyName; -#endif - - using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; - internal partial class UnsafeNativeMethods { [DllImport(ExternDll.Kernel32, CharSet=CharSet.Unicode, SetLastError=true, EntryPoint="GetTempFileName")] diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsTextServices.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsTextServices.cs index 389a273ea5b..7b333c760a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsTextServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/UnsafeNativeMethodsTextServices.cs @@ -2,37 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Threading; -using System.ComponentModel; -using System.Diagnostics; - -// The SecurityHelper class differs between assemblies and could not actually be -// shared, so it is duplicated across namespaces to prevent name collision. -#if WINDOWS_BASE - using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE - using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK - using MS.Internal.PresentationFramework; -#elif DRT - using MS.Internal.Drt; -#else -#error Attempt to use a class (duplicated across multiple namespaces) from an unknown assembly. -#endif +using System.Runtime.InteropServices; + namespace MS.Win32 { - using Accessibility; - using System.Runtime.CompilerServices; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System; - using System.Security; - using System.Collections; - using System.IO; - using System.Text; - using Microsoft.Win32.SafeHandles; - - internal partial class UnsafeNativeMethods { //------------------------------------------------------ // diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/WinInet.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/WinInet.cs index 6839d696e2b..6c907abb390 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/WinInet.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/WinInet.cs @@ -2,13 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; using System.Runtime.InteropServices; namespace MS.Win32 { -internal static class WinInet + internal static class WinInet { /// /// Will return the location of the internet cache folder. diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/RefAssemblyAttrs.cs b/src/Microsoft.DotNet.Wpf/src/Shared/RefAssemblyAttrs.cs index d431f7e94f1..0e2505fbb3e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/RefAssemblyAttrs.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/RefAssemblyAttrs.cs @@ -3,9 +3,6 @@ // The C++ version of these definitions is in inc\BuildInfo.hxx. -using System; -using System.Text; - #if WINDOWS_BASE namespace MS.Internal.WindowsBase #elif PRESENTATION_CORE diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/IO/FileHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/IO/FileHelper.cs index 07bccd574b1..847d30114e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/IO/FileHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/IO/FileHelper.cs @@ -12,10 +12,6 @@ // //--------------------------------------------------------------------------- -using System; -using System.IO; -using System.Security; - namespace System.IO { static internal class FileHelper diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Ink/KnownIds.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Ink/KnownIds.cs index 2681238acee..884b9b88ab0 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Ink/KnownIds.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Ink/KnownIds.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.IO; using MS.Internal.Ink.InkSerializedFormat; namespace System.Windows.Ink diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OSVersionHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OSVersionHelper.cs index 58d54558dcf..5db8b97629b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OSVersionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OSVersionHelper.cs @@ -2,23 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_BASE -using MS.Internal.WindowsBase; -#elif PRESENTATION_CORE -using MS.Internal.PresentationCore; -#elif PRESENTATIONFRAMEWORK -using MS.Internal.PresentationFramework; -#elif REACHFRAMEWORK -using MS.Internal.ReachFramework; -#elif UIAUTOMATIONTYPES -using MS.Internal.UIAutomationTypes; -#else -using MS.Internal; -#endif - using System; using System.Runtime.InteropServices; -using System.Security; #if WINDOWS_BASE namespace MS.Internal.WindowsBase.Interop diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OperatingSystemVersion.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OperatingSystemVersion.cs index 6fa9aa2c507..91e6328c474 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OperatingSystemVersion.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Interop/OperatingSystemVersion.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - #if WINDOWS_BASE namespace MS.Internal.WindowsBase.Interop #elif PRESENTATION_CORE diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs index 7ad98a609f4..93ff97928a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs @@ -4,11 +4,7 @@ #nullable disable -// -// -// -// Description: Specifies that the whitespace surrounding an element should be trimmed. -// +// Description: Specifies that the whitespace surrounding an element should be trimmed. using System; using System.IO; @@ -105,7 +101,7 @@ internal static Type GetQualifiedType(string typeName) } // If we can't load the assembly, just return null. - if (a == null) + if (a is null) { return null; } @@ -130,7 +126,7 @@ internal static bool IsNullableType(Type type) internal static bool IsInternalType(Type type) { Type origType = type; - Debug.Assert(null != type, "Type passed to IsInternalType is null"); + Debug.Assert(type is not null, "Type passed to IsInternalType is null"); // If this is an internal nested type or a parent nested public type, walk up the declaring types. while (type.IsNestedAssembly || type.IsNestedFamORAssem || (origType != type && type.IsNestedPublic)) @@ -151,7 +147,7 @@ internal static bool IsInternalType(Type type) /// True if type is public internal static bool IsPublicType(Type type) { - Debug.Assert(null != type, "Type passed to IsPublicType is null"); + Debug.Assert(type is not null, "Type passed to IsPublicType is null"); // If this is a nested internal type, walk up the declaring types. while (type.IsNestedPublic) @@ -234,7 +230,7 @@ private static string GetCustomAttributeData(MemberInfo mi, Type attrType, out T { IList list = CustomAttributeData.GetCustomAttributes(mi); string attrValue = GetCustomAttributeData(list, attrType, out typeValue, true, false); - return attrValue == null ? string.Empty : attrValue; + return attrValue is null ? string.Empty : attrValue; } #if PBTCOMPILER @@ -260,7 +256,7 @@ private static string GetCustomAttributeData(IList list, Ty for (int j = 0; j < list.Count; j++) { attrValue = GetCustomAttributeData(list[j], attrType, out typeValue, allowTypeAlso, false, allowZeroArgs); - if (attrValue != null) + if (attrValue is not null) { break; } @@ -286,7 +282,7 @@ internal static string GetCustomAttributeData(Type t, string attributeDataString = null; CustomAttributeData cad; - while (currentType != null && !attributeDataFound) + while (currentType is not null && !attributeDataFound) { IList list = CustomAttributeData.GetCustomAttributes(currentType); @@ -341,14 +337,14 @@ private static string GetCustomAttributeData(CustomAttributeData cad, #if PBTCOMPILER if (attrValue == null && allowTypeAlso && tca.ArgumentType == GetMscorlibType(typeof(Type))) #else - if (attrValue == null && allowTypeAlso && tca.ArgumentType == typeof(Type)) + if (attrValue is null && allowTypeAlso && tca.ArgumentType == typeof(Type)) #endif { typeValue = tca.Value as Type; attrValue = typeValue.AssemblyQualifiedName; } - if (attrValue == null) + if (attrValue is null) { throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); } @@ -419,9 +415,9 @@ private static Assembly LoadAssemblyHelper(string assemblyGivenName, string asse // Check if the assembly has already been loaded. Assembly retassem = (Assembly)_loadedAssembliesHash[assemblyShortName]; - if (retassem != null) + if (retassem is not null) { - if (assemblyName.Version != null) + if (assemblyName.Version is not null) { AssemblyName cachedName = new AssemblyName(retassem.FullName); if (!AssemblyName.ReferenceMatchesDefinition(assemblyName, cachedName)) @@ -440,7 +436,7 @@ private static Assembly LoadAssemblyHelper(string assemblyGivenName, string asse if (string.IsNullOrEmpty(assemblyPath)) retassem = SafeSecurityHelper.GetLoadedAssembly(assemblyName); - if (retassem == null) + if (retassem is null) { if (!string.IsNullOrEmpty(assemblyPath)) { @@ -451,6 +447,7 @@ private static Assembly LoadAssemblyHelper(string assemblyGivenName, string asse // LoadFile will only override your request only if it is in the GAC retassem = Assembly.LoadFile(assemblyPath); } + // // At compile time, the build task should always pass the full path of the referenced assembly, even if it // comes from GAC. But below code snippet can run if parser wants to try loading an assembly w/o a path. @@ -472,7 +469,7 @@ private static Assembly LoadAssemblyHelper(string assemblyGivenName, string asse } // Cache the assembly - if (retassem != null) + if (retassem is not null) { _loadedAssembliesHash[assemblyShortName] = retassem; } @@ -577,4 +574,3 @@ private static Assembly ReflectionOnlyLoadAssembly(string assemblyName, string f #endregion Assembly Loading } } - diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/TypeConverterHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/TypeConverterHelper.cs index c55b6fcd95c..936df76619b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/TypeConverterHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/TypeConverterHelper.cs @@ -124,7 +124,7 @@ internal static Type GetConverterType(MemberInfo memberInfo) { converterType = ReflectionHelper.GetQualifiedType(converterName); - if (converterType != null) + if (converterType is not null) { // Validate that this is an accessible type converter. if (!ReflectionHelper.IsPublicType(converterType)) @@ -445,10 +445,10 @@ internal static TypeConverter GetTypeConverter(Type type) TypeConverter? typeConverter = GetCoreConverterFromCoreType(type); - if (typeConverter == null) + if (typeConverter is null) { Type? converterType = GetConverterType(type); - if (converterType != null) + if (converterType is not null) { typeConverter = Activator.CreateInstance(converterType, BindingFlags.Instance | BindingFlags.CreateInstance | BindingFlags.Public, diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlCompatibilityReader.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlCompatibilityReader.cs index d04afd7c0bf..f79ef3e6315 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlCompatibilityReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlCompatibilityReader.cs @@ -6,11 +6,9 @@ using System; using System.Xml; -using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Diagnostics; -using System.Threading; #if SYSTEM_XAML using System.Xaml; @@ -178,8 +176,10 @@ public override bool Read() { continue; } + break; } + case XmlNodeType.EndElement: { // if the element read should be ignored, read the next element @@ -187,6 +187,7 @@ public override bool Read() { continue; } + break; } } @@ -232,8 +233,10 @@ private bool ReadStartElement(ref bool more) { Error(SR.XCRUnknownCompatElement, elementName); } + elementCB(elementDepth, ref more); } + // handle non-markup-compatibility elements else { @@ -252,6 +255,7 @@ private bool ReadStartElement(ref bool more) // note that for certain logic this scope's parent should be checked Scope.InProcessContent = true; } + _depthOffset++; more = Reader.Read(); } @@ -321,6 +325,7 @@ private bool ReadEndElement(ref bool more) Error(SR.XCRChoiceNotFound); } } + _depthOffset--; PopScope(); // we know we can pop, so no need to scan more = Reader.Read(); @@ -546,6 +551,7 @@ public override bool MoveToAttribute(string localName, string namespaceURI) RestoreReaderPosition(); } } + return result; } @@ -618,7 +624,7 @@ public override string LookupNamespace(string prefix) { string namespaceName = Reader.LookupNamespace(prefix); - if (namespaceName != null) + if (namespaceName is not null) { namespaceName = GetMappedNamespace(namespaceName); } @@ -644,6 +650,7 @@ public override string Value { return LookupNamespace(string.Empty); } + // Look for xmlns: ... else if (string.Equals(XmlnsDeclaration, Reader.Prefix, StringComparison.Ordinal)) { @@ -709,7 +716,7 @@ public bool Normalization XmlTextReader xmlTextReader = Reader as XmlTextReader; // review, what if not the XmlTextReader. - if (null != xmlTextReader) + if (xmlTextReader is not null) { xmlTextReader.Normalization = value; } @@ -725,7 +732,7 @@ internal System.Text.Encoding Encoding get { XmlTextReader textReader = Reader as XmlTextReader; - if (textReader == null) + if (textReader is null) { return new System.Text.UTF8Encoding(true, true); } @@ -779,7 +786,7 @@ private string GetMappedNamespace(string namespaceName) // if the namespace has not yet been mapped, map it mappedNamespace = MapNewNamespace(namespaceName); } - else if (mappedNamespace == null) + else if (mappedNamespace is null) { // if the mapped namespace is null, then the namespace was not supported, just return // the given namespace @@ -802,7 +809,7 @@ private string GetMappedNamespace(string namespaceName) /// private string MapNewNamespace(string namespaceName) { - if (_namespaceCallback != null) + if (_namespaceCallback is not null) { string mappedNamespace; @@ -863,7 +870,7 @@ private string MapNewNamespace(string namespaceName) /// private bool IsSubsumingNamespace(string namespaceName) { - return (_subsumingNamespaces == null ? false : _subsumingNamespaces.ContainsKey(namespaceName)); + return (_subsumingNamespaces is null ? false : _subsumingNamespaces.ContainsKey(namespaceName)); } /// @@ -874,7 +881,7 @@ private bool IsSubsumingNamespace(string namespaceName) /// private void AddSubsumingNamespace(string namespaceName) { - if (_subsumingNamespaces == null) + if (_subsumingNamespaces is null) _subsumingNamespaces = new Dictionary(); _subsumingNamespaces[namespaceName] = null; } @@ -890,7 +897,7 @@ private void AddSubsumingNamespace(string namespaceName) /// private bool IsNamespaceKnown(string namespaceName) { - return (_knownNamespaces == null ? false : _knownNamespaces.ContainsKey(namespaceName)); + return (_knownNamespaces is null ? false : _knownNamespaces.ContainsKey(namespaceName)); } /// @@ -901,7 +908,7 @@ private bool IsNamespaceKnown(string namespaceName) /// private void AddKnownNamespace(string namespaceName) { - if (_knownNamespaces == null) + if (_knownNamespaces is null) _knownNamespaces = new Dictionary(); _knownNamespaces[namespaceName] = null; } @@ -930,6 +937,7 @@ private bool ShouldIgnoreNamespace(string namespaceName) { result = Scope.CanIgnore(namespaceName); } + return result; } @@ -966,7 +974,7 @@ private IEnumerable ParseContentToNamespaceElementPair(str string elementName = pair.Substring(colonIndex + 1, length - 1 - colonIndex); string namespaceName = LookupNamespace(prefix); - if (namespaceName == null) + if (namespaceName is null) { // if a prefix does not map to a namespace, throw an exception Error(SR.XCRUndefinedPrefix, prefix); @@ -1002,7 +1010,7 @@ private IEnumerable PrefixesToNamespaces(string prefixes) { string namespaceUri = LookupNamespace(prefix); - if (namespaceUri == null) + if (namespaceUri is null) { // if a prefix does not map to a namespace, throw an exception Error(SR.XCRUndefinedPrefix, prefix); @@ -1028,6 +1036,7 @@ private bool SkipToKnownAttribute() { result = Reader.MoveToNextAttribute(); } + return result; } @@ -1076,6 +1085,7 @@ private void ScanForCompatibility(int elementDepth) { Error(SR.XCRUnknownCompatAttrib, attributeName); } + attributeCB(elementDepth); } @@ -1084,7 +1094,8 @@ private void ScanForCompatibility(int elementDepth) onAttribute = Reader.MoveToNextAttribute(); _attributePosition++; // we count the attribute index in case we see Ignorable - } while (onAttribute); + } + while (onAttribute); if (Scope.Depth == elementDepth) { @@ -1097,7 +1108,6 @@ private void ScanForCompatibility(int elementDepth) } } - /// /// pops a scope if the end of a compatibility region. /// @@ -1159,6 +1169,7 @@ private void HandleAlternateContent(int elementDepth, ref bool more) // Choice and Fallback Error(SR.Format(SR.XCRInvalidACChild, Reader.Name)); } + if (Reader.IsEmptyElement) { // AlternateContent blocks must have a Choice, so they can't be empty @@ -1194,6 +1205,7 @@ private void HandleChoice(int elementDepth, ref bool more) // Choice must be the child of AlternateContent Error(SR.XCRChoiceOnlyInAC); } + if (Scope.FallbackSeen) { // Choice cannot occur after Fallback @@ -1202,11 +1214,12 @@ private void HandleChoice(int elementDepth, ref bool more) string requiresValue = Reader.GetAttribute(Requires); - if (requiresValue == null) + if (requiresValue is null) { // Choice must have a requires attribute Error(SR.XCRRequiresAttribNotFound); } + if (string.IsNullOrEmpty(requiresValue)) { // Requires attribute may not be empty @@ -1227,6 +1240,7 @@ private void HandleChoice(int elementDepth, ref bool more) { MoveToNextAttribute(); } + string attributeName = Reader.LocalName; MoveToElement(); @@ -1307,11 +1321,13 @@ private void HandleFallback(int elementDepth, ref bool more) // Fallback must be the child of AlternateContent Error(SR.XCRFallbackOnlyInAC); } + if (!Scope.ChoiceSeen) { // AlternateContent block must contain a Choice element Error(SR.XCRChoiceNotFound); } + if (Scope.FallbackSeen) { // AlternateContent block may only contain one Fallback child @@ -1352,6 +1368,7 @@ private void HandleFallback(int elementDepth, ref bool more) PushScope(elementDepth); _depthOffset++; } + more = Reader.Read(); } } @@ -1464,8 +1481,8 @@ private void HandlePreserveAttributes(int elementDepth) private void Error(string message, params object[] args) { IXmlLineInfo info = Reader as IXmlLineInfo; - throw new XmlException(string.Format(CultureInfo.InvariantCulture, message, args), null, info == null ? 1 : info.LineNumber, - info == null ? 1 : info.LinePosition); + throw new XmlException(string.Format(CultureInfo.InvariantCulture, message, args), null, info is null ? 1 : info.LineNumber, + info is null ? 1 : info.LinePosition); } #endregion Private Methods @@ -1482,10 +1499,11 @@ private string AlternateContent { get { - if (_alternateContent == null) + if (_alternateContent is null) { _alternateContent = Reader.NameTable.Add("AlternateContent"); } + return _alternateContent; } } @@ -1494,10 +1512,11 @@ private string Choice { get { - if (_choice == null) + if (_choice is null) { _choice = Reader.NameTable.Add("Choice"); } + return _choice; } } @@ -1506,10 +1525,11 @@ private string Fallback { get { - if (_fallback == null) + if (_fallback is null) { _fallback = Reader.NameTable.Add("Fallback"); } + return _fallback; } } @@ -1518,10 +1538,11 @@ private string Requires { get { - if (_requires == null) + if (_requires is null) { _requires = Reader.NameTable.Add("Requires"); } + return _requires; } } @@ -1530,10 +1551,11 @@ private string Ignorable { get { - if (_ignorable == null) + if (_ignorable is null) { _ignorable = Reader.NameTable.Add("Ignorable"); } + return _ignorable; } } @@ -1542,10 +1564,11 @@ private string MustUnderstand { get { - if (_mustUnderstand == null) + if (_mustUnderstand is null) { _mustUnderstand = Reader.NameTable.Add("MustUnderstand"); } + return _mustUnderstand; } } @@ -1554,10 +1577,11 @@ private string ProcessContent { get { - if (_processContent == null) + if (_processContent is null) { _processContent = Reader.NameTable.Add("ProcessContent"); } + return _processContent; } } @@ -1566,10 +1590,11 @@ private string PreserveElements { get { - if (_preserveElements == null) + if (_preserveElements is null) { _preserveElements = Reader.NameTable.Add("PreserveElements"); } + return _preserveElements; } } @@ -1578,10 +1603,11 @@ private string PreserveAttributes { get { - if (_preserveAttributes == null) + if (_preserveAttributes is null) { _preserveAttributes = Reader.NameTable.Add("PreserveAttributes"); } + return _preserveAttributes; } } @@ -1590,10 +1616,11 @@ private string CompatibilityUri { get { - if (_compatibilityUri == null) + if (_compatibilityUri is null) { _compatibilityUri = Reader.NameTable.Add(MarkupCompatibilityURI); } + return _compatibilityUri; } } @@ -1659,7 +1686,7 @@ public bool FallbackSeen get { bool result; - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { result = _previous.FallbackSeen; } @@ -1667,11 +1694,12 @@ public bool FallbackSeen { result = _fallbackSeen; } + return result; } set { - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { _previous.FallbackSeen = value; } @@ -1687,7 +1715,7 @@ public bool InAlternateContent get { bool result; - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { result = _previous.InAlternateContent; } @@ -1695,6 +1723,7 @@ public bool InAlternateContent { result = _inAlternateContent; } + return result; } set @@ -1716,7 +1745,7 @@ public bool ChoiceTaken get { bool result; - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { result = _previous.ChoiceTaken; } @@ -1724,11 +1753,12 @@ public bool ChoiceTaken { result = _choiceTaken; } + return result; } set { - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { _previous.ChoiceTaken = value; } @@ -1744,7 +1774,7 @@ public bool ChoiceSeen get { bool result; - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { result = _previous.ChoiceSeen; } @@ -1752,11 +1782,12 @@ public bool ChoiceSeen { result = _choiceSeen; } + return result; } set { - if (_inProcessContent && _previous != null) + if (_inProcessContent && _previous is not null) { _previous.ChoiceSeen = value; } @@ -1771,7 +1802,7 @@ public bool CanIgnore(string namespaceName) { bool result = IsIgnorableAtCurrentScope(namespaceName); - if (!result && _previous != null) + if (!result && _previous is not null) { result = _previous.CanIgnore(namespaceName); } @@ -1781,18 +1812,18 @@ public bool CanIgnore(string namespaceName) public bool IsIgnorableAtCurrentScope(string namespaceName) { - return _ignorables != null && _ignorables.ContainsKey(namespaceName); + return _ignorables is not null && _ignorables.ContainsKey(namespaceName); } public bool ShouldProcessContent(string namespaceName, string elementName) { bool result = false; ProcessContentSet set; - if (_processContents != null && _processContents.TryGetValue(namespaceName, out set)) + if (_processContents is not null && _processContents.TryGetValue(namespaceName, out set)) { result = set.ShouldProcessContent(elementName); } - else if (_previous != null) + else if (_previous is not null) { result = _previous.ShouldProcessContent(namespaceName, elementName); } @@ -1802,55 +1833,62 @@ public bool ShouldProcessContent(string namespaceName, string elementName) public void Ignorable(string namespaceName) { - if (_ignorables == null) + if (_ignorables is null) { _ignorables = new Dictionary(); } + _ignorables[namespaceName] = null; // we don't care about value, just key } public void ProcessContent(string namespaceName, string elementName) { - if (_processContents == null) + if (_processContents is null) { _processContents = new Dictionary(); } + ProcessContentSet processContentSet; if (!_processContents.TryGetValue(namespaceName, out processContentSet)) { processContentSet = new ProcessContentSet(namespaceName, _reader); _processContents.Add(namespaceName, processContentSet); } + processContentSet.Add(elementName); } public void PreserveElement(string namespaceName, string elementName) { - if (_preserveElements == null) + if (_preserveElements is null) { _preserveElements = new Dictionary(); } + PreserveItemSet preserveElementSet; if (!_preserveElements.TryGetValue(namespaceName, out preserveElementSet)) { preserveElementSet = new PreserveItemSet(namespaceName, _reader); _preserveElements.Add(namespaceName, preserveElementSet); } + preserveElementSet.Add(elementName); } public void PreserveAttribute(string namespaceName, string attributeName) { - if (_preserveAttributes == null) + if (_preserveAttributes is null) { _preserveAttributes = new Dictionary(); } + PreserveItemSet preserveAttributeSet; if (!_preserveAttributes.TryGetValue(namespaceName, out preserveAttributeSet)) { preserveAttributeSet = new PreserveItemSet(namespaceName, _reader); _preserveAttributes.Add(namespaceName, preserveAttributeSet); } + preserveAttributeSet.Add(attributeName); } @@ -1873,7 +1911,7 @@ public bool ShouldPreserveAttribute(string namespaceName, string attributeName) public void Verify() { // Check process content - if (_processContents != null) + if (_processContents is not null) { foreach (string key in _processContents.Keys) { @@ -1883,8 +1921,9 @@ public void Verify() } } } + // Check preserve elements - if (_preserveElements != null) + if (_preserveElements is not null) { foreach (string key in _preserveElements.Keys) { @@ -1894,8 +1933,9 @@ public void Verify() } } } + // Check preserve attributes - if (_preserveAttributes != null) + if (_preserveAttributes is not null) { foreach (string key in _preserveAttributes.Keys) { @@ -1923,7 +1963,7 @@ public ProcessContentSet(string namespaceName, XmlCompatibilityReader reader) public bool ShouldProcessContent(string elementName) { - return _all || (_names != null && _names.Contains(elementName)); + return _all || (_names is not null && _names.Contains(elementName)); } public void Add(string elementName) @@ -1942,7 +1982,7 @@ public void Add(string elementName) if (elementName == "*") { - if (_names != null) + if (_names is not null) { _reader.Error(SR.XCRInvalidProcessContent, _namespaceName); } @@ -1953,7 +1993,7 @@ public void Add(string elementName) } else { - if (_names == null) + if (_names is null) { _names = new HashSet(); } @@ -1978,7 +2018,7 @@ public PreserveItemSet(string namespaceName, XmlCompatibilityReader reader) public bool ShouldPreserveItem(string itemName) { - return _all || (_names != null && _names.ContainsKey(itemName)); + return _all || (_names is not null && _names.ContainsKey(itemName)); } public void Add(string itemName) @@ -1997,7 +2037,7 @@ public void Add(string itemName) if (itemName == "*") { - if (_names != null) + if (_names is not null) { _reader.Error(SR.XCRInvalidPreserve, _namespaceName); } @@ -2008,7 +2048,7 @@ public void Add(string itemName) } else { - if (_names == null) + if (_names is null) { _names = new Dictionary(); } @@ -2049,7 +2089,8 @@ public void Add(string itemName) private const string XmlnsDeclaration = "xmlns"; private const string MarkupCompatibilityURI = "http://schemas.openxmlformats.org/markup-compatibility/2006"; - static private string[] _predefinedNamespaces = new string[4] { + private static string[] _predefinedNamespaces = new string[4] + { "http://www.w3.org/2000/xmlns/", "http://www.w3.org/XML/1998/namespace", "http://www.w3.org/2001/XMLSchema-instance", diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlWrappingReader.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlWrappingReader.cs index f665249b4ed..81667cc10fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlWrappingReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/XmlWrappingReader.cs @@ -18,7 +18,8 @@ namespace System.Xaml namespace System.Windows.Markup #endif { - internal class XmlWrappingReader : XmlReader, IXmlLineInfo, IXmlNamespaceResolver { + internal class XmlWrappingReader : XmlReader, IXmlLineInfo, IXmlNamespaceResolver + { // // Fields // @@ -29,8 +30,9 @@ internal class XmlWrappingReader : XmlReader, IXmlLineInfo, IXmlNamespaceResolve // // Constructor // - internal XmlWrappingReader( XmlReader baseReader ) { - Debug.Assert( baseReader != null ); + internal XmlWrappingReader( XmlReader baseReader ) + { + Debug.Assert( baseReader is not null); Reader = baseReader; } @@ -64,78 +66,96 @@ internal XmlWrappingReader( XmlReader baseReader ) { public override bool HasAttributes { get { return _reader.HasAttributes; } } public override XmlNameTable NameTable { get { return _reader.NameTable; } } - public override string GetAttribute( string name ) { + public override string GetAttribute( string name ) + { return _reader.GetAttribute( name ); } - public override string GetAttribute( string name, string namespaceURI ) { + public override string GetAttribute( string name, string namespaceURI ) + { return _reader.GetAttribute( name, namespaceURI ); } - public override string GetAttribute( int i ) { + public override string GetAttribute( int i ) + { return _reader.GetAttribute( i ); } - public override bool MoveToAttribute( string name ) { + public override bool MoveToAttribute( string name ) + { return _reader.MoveToAttribute( name ); } - public override bool MoveToAttribute( string name, string ns ) { + public override bool MoveToAttribute( string name, string ns ) + { return _reader.MoveToAttribute( name, ns ); } - public override void MoveToAttribute( int i ) { + public override void MoveToAttribute( int i ) + { _reader.MoveToAttribute( i ); } - public override bool MoveToFirstAttribute() { + public override bool MoveToFirstAttribute() + { return _reader.MoveToFirstAttribute(); } - public override bool MoveToNextAttribute() { + public override bool MoveToNextAttribute() + { return _reader.MoveToNextAttribute(); } - public override bool MoveToElement() { + public override bool MoveToElement() + { return _reader.MoveToElement(); } - public override bool Read() { + public override bool Read() + { return _reader.Read(); } - public override void Close() { + public override void Close() + { _reader.Close(); } - public override void Skip() { + public override void Skip() + { _reader.Skip(); } - public override string LookupNamespace( string prefix ) { + public override string LookupNamespace( string prefix ) + { return _reader.LookupNamespace( prefix ); } - string IXmlNamespaceResolver.LookupPrefix( string namespaceName ) { - return (_readerAsResolver == null) ? null : _readerAsResolver.LookupPrefix( namespaceName ); + string IXmlNamespaceResolver.LookupPrefix( string namespaceName ) + { + return (_readerAsResolver is null) ? null : _readerAsResolver.LookupPrefix( namespaceName ); } - IDictionary IXmlNamespaceResolver.GetNamespacesInScope ( XmlNamespaceScope scope ) { - return (_readerAsResolver == null) ? null : _readerAsResolver.GetNamespacesInScope( scope ); + IDictionary IXmlNamespaceResolver.GetNamespacesInScope ( XmlNamespaceScope scope ) + { + return (_readerAsResolver is null) ? null : _readerAsResolver.GetNamespacesInScope( scope ); } - public override void ResolveEntity() { + public override void ResolveEntity() + { _reader.ResolveEntity(); } - public override bool ReadAttributeValue() { + public override bool ReadAttributeValue() + { return _reader.ReadAttributeValue(); } // // IDisposable interface // - protected override void Dispose(bool disposing) { + protected override void Dispose(bool disposing) + { try { if(disposing) @@ -152,30 +172,38 @@ protected override void Dispose(bool disposing) { // // IXmlLineInfo members // - public virtual bool HasLineInfo() { - return ( _readerAsIXmlLineInfo == null ) ? false : _readerAsIXmlLineInfo.HasLineInfo(); + public virtual bool HasLineInfo() + { + return ( _readerAsIXmlLineInfo is null ) ? false : _readerAsIXmlLineInfo.HasLineInfo(); } - public virtual int LineNumber { - get { - return ( _readerAsIXmlLineInfo == null ) ? 0 : _readerAsIXmlLineInfo.LineNumber; + public virtual int LineNumber + { + get + { + return ( _readerAsIXmlLineInfo is null ) ? 0 : _readerAsIXmlLineInfo.LineNumber; } } - public virtual int LinePosition { - get { - return ( _readerAsIXmlLineInfo == null ) ? 0 : _readerAsIXmlLineInfo.LinePosition; + public virtual int LinePosition + { + get + { + return ( _readerAsIXmlLineInfo is null ) ? 0 : _readerAsIXmlLineInfo.LinePosition; } } // // Protected methods // - protected XmlReader Reader { - get { + protected XmlReader Reader + { + get + { return _reader; } - set { + set + { _reader = value; _readerAsIXmlLineInfo = value as IXmlLineInfo; _readerAsResolver = value as IXmlNamespaceResolver; @@ -183,5 +211,3 @@ protected XmlReader Reader { } } } - - diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Media/TypeConverterHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Media/TypeConverterHelper.cs index 0d835908239..cec80b0172b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Media/TypeConverterHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Media/TypeConverterHelper.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.ComponentModel; using System.Windows.Markup; using System.Runtime.InteropServices; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/EventSourceActivity.cs b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/EventSourceActivity.cs index 109a6be2fa3..244e2f0ee9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/EventSourceActivity.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/EventSourceActivity.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.Tracing; using Contract = System.Diagnostics.Contracts.Contract; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/ControlsTraceLogger.cs b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/ControlsTraceLogger.cs index 430b67ede68..55c0ad0a87f 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/ControlsTraceLogger.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/ControlsTraceLogger.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.Tracing; -using MS.Internal; -using MS.Internal.Telemetry; -using MS.Internal.Telemetry.PresentationFramework; namespace MS.Internal.Telemetry.PresentationFramework { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/XpsOMPrintingTraceLogger.cs b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/XpsOMPrintingTraceLogger.cs index e37dffcc8a5..6aba28a75fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/XpsOMPrintingTraceLogger.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggers/XpsOMPrintingTraceLogger.cs @@ -2,11 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.Tracing; -using MS.Internal; -using MS.Internal.Telemetry; -using MS.Internal.Telemetry.PresentationCore; namespace MS.Internal.Telemetry.PresentationCore { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs index 21aecbb81e8..cfcc4ef6967 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.Tracing; -using MS.Internal.Telemetry; // Use the naming convention MS.Internal.Telemetry. while adding assemblies to the provider #if WINDOWS_BASE diff --git a/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemAssemblyInfo.cpp b/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemAssemblyInfo.cpp index 88155d977c5..4cd9a83709b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemAssemblyInfo.cpp +++ b/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemAssemblyInfo.cpp @@ -1,7 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - #include "win32inc.hpp" @@ -10,6 +8,7 @@ using namespace System::Runtime::CompilerServices; //change to use PublicKey [assembly:InternalsVisibleTo("ReachFramework, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]; +[assembly:InternalsVisibleTo("System.Printing.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")]; // When objects that do not derive from System.Exception are thrown, diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/AssemblyAttrs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/AssemblyAttrs.cs index 1a2c92884a3..d57d8580b9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/AssemblyAttrs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/AssemblyAttrs.cs @@ -5,11 +5,10 @@ // This file specifies various assembly level attributes. -using System.Reflection; using System.Windows; using System.Windows.Markup; -[assembly:ThemeInfo( +[assembly: ThemeInfo( // Specifies the location of theme specific resources ResourceDictionaryLocation.SourceAssembly, // Specifies the location of non-theme specific resources: diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs index 540f2ec644c..e25b799683f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System; -using System.Runtime.InteropServices; using System.Windows; namespace MS.Internal diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonApplicationMenuAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonApplicationMenuAutomationPeer.cs index 5da5b3390d6..5fb8ad83c94 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonApplicationMenuAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonApplicationMenuAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections.Generic; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,13 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonAutomationPeer.cs index aac6e71284e..02dc44074b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonAutomationPeer.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +using System.Collections.Generic; +using System.Windows.Controls; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,20 +18,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Collections.Generic; - using System.Windows.Automation; - using System.Windows.Controls; - using System.Windows; - using System.Windows.Controls.Primitives; - using System.Diagnostics; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonButtonAutomationPeer.cs index e50f0a04bb6..7e532ed1842 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonButtonAutomationPeer.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,12 +14,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonCheckBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonCheckBoxAutomationPeer.cs index 99a9a13c6e1..e2f987a9882 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonCheckBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonCheckBoxAutomationPeer.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,12 +14,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs index 86edf5ee3db..c8f37932277 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs @@ -1,7 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Provider; +using System.Collections.Generic; +using System.Windows.Controls; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,21 +17,10 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using Microsoft.Windows.Controls; - using System; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Collections.Generic; - using System.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif - + #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextMenuAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextMenuAutomationPeer.cs index 5eadd9d2f4f..c6be523db43 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextMenuAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextMenuAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,18 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupAutomationPeer.cs index d3202e25930..41e9da76f41 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupDataAutomationPeer.cs index 20f81d56f9b..27242107ffa 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupDataAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,16 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows; - using System.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupItemsControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupItemsControlAutomationPeer.cs index 70c4f86d8e6..cf89888cd5d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupItemsControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonContextualTabGroupItemsControlAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlAutomationPeer.cs index 1a81887509d..f025889b5bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlAutomationPeer.cs @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,14 +11,7 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlDataAutomationPeer.cs index 8d3cf86c810..d573b9c4775 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlDataAutomationPeer.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,20 +9,12 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - using System; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif - using System.Windows.Controls; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlGroupAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlGroupAutomationPeer.cs index 314e75518e8..064d9547053 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlGroupAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonControlGroupAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,14 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryAutomationPeer.cs index 0ac7dc117d5..6585da0c851 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryAutomationPeer.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,18 +18,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryAutomationPeer.cs index 3570a238323..cc00098a443 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryAutomationPeer.cs @@ -1,7 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Controls; +using System.Collections.Generic; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,17 +17,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Controls; - using System.Collections.Generic; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryDataAutomationPeer.cs index 4472d4c9e7a..b043872b913 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryCategoryDataAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,13 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemAutomationPeer.cs index 658ef6f6d70..efba67362bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,16 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Media; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemDataAutomationPeer.cs index e7681dd6c2c..a917bc7c365 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGalleryItemDataAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,14 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupAutomationPeer.cs index 12ec9e31ae8..87c7474b12f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Collections.Generic; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,18 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Automation; - using System.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupDataAutomationPeer.cs index da66a5a3900..c33ef68af88 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupDataAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Collections.Generic; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; using System.Windows; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupHeaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupHeaderAutomationPeer.cs index 69ce468ee73..c47af43b39a 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupHeaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonGroupHeaderAutomationPeer.cs @@ -1,7 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +12,7 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs index fb005568d32..abc66854a40 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections.Generic; +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,16 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Automation; - using Microsoft.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemAutomationPeer.cs index 1531d0a74ff..27301155adb 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemAutomationPeer.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,13 +14,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs index bde6e26ca5e..dce304b00f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Provider; +using System.Windows.Controls; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,17 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Controls; - using Microsoft.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs index a72ace86fec..e4a0039474b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs @@ -1,7 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Collections.Generic; +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,18 +17,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using Microsoft.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonRadioButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonRadioButtonAutomationPeer.cs index 617b49ed856..85fc1afc415 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonRadioButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonRadioButtonAutomationPeer.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,12 +14,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSeparatorAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSeparatorAutomationPeer.cs index c8ce9cf186b..792a085ce0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSeparatorAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSeparatorAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,13 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs index 29d354af211..deac0e0ee63 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Provider; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,19 +15,10 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using Microsoft.Windows.Controls; - using System; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif - + #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabAutomationPeer.cs index d8a630b23b8..1f26b1b8695 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using delcarations + +using System.Collections.Generic; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,16 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using delcarations - - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Shapes; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs index 272808358e1..3c4d7b0b283 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs @@ -1,7 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Automation.Provider; +using System.Windows.Controls.Primitives; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,20 +17,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using Microsoft.Windows.Controls; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderAutomationPeer.cs index 78e9f3c1288..6c6d5e921d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderDataAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderDataAutomationPeer.cs index 9fb98ac33e9..5b7e2a05061 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderDataAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderDataAutomationPeer.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,19 +9,9 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Controls; - using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderItemsControlAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderItemsControlAutomationPeer.cs index c0354207c93..448159102be 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderItemsControlAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabHeaderItemsControlAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,16 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTextBoxAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTextBoxAutomationPeer.cs index 2c39fa20be7..80e092c18db 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTextBoxAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTextBoxAutomationPeer.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Provider; +using System.Windows.Input; +using System.Windows.Threading; +using Microsoft.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,17 +18,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Automation.Provider; - using System.Windows.Input; - using System.Windows.Threading; - using Microsoft.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTitleAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTitleAutomationPeer.cs index df9ded9560e..90d102adb8d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTitleAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTitleAutomationPeer.cs @@ -1,16 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows.Automation.Peers; -using System.Windows.Automation.Provider; + #if RIBBON_IN_FRAMEWORK -using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif -using System.Windows; using System.Windows.Controls; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToggleButtonAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToggleButtonAutomationPeer.cs index eba95cee231..defabbccf57 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToggleButtonAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToggleButtonAutomationPeer.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,12 +14,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - #region Using declarations - - using System; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToolTipAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToolTipAutomationPeer.cs index e1d34aef926..aa2127aeb46 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToolTipAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonToolTipAutomationPeer.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +15,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTwoLineTextAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTwoLineTextAutomationPeer.cs index 73153c2ce00..22d053d8604 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTwoLineTextAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTwoLineTextAutomationPeer.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Controls; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers @@ -9,15 +16,6 @@ namespace System.Windows.Automation.Peers namespace Microsoft.Windows.Automation.Peers #endif { - - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs index 1a4862b90b2..59524480ebf 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls @@ -9,14 +15,6 @@ namespace System.Windows.Controls namespace Microsoft.Windows.Controls #endif { - - #region Using declarations - - using System; - using System.Windows; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs index 73ff95d00dc..315f8618c32 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -namespace Microsoft.Windows.Controls -{ + #if RIBBON_IN_FRAMEWORK - using MS.Internal; +using MS.Internal; #endif - using System.Collections.Generic; - using System.Windows; +using System.Collections.Generic; +using System.Windows; +namespace Microsoft.Windows.Controls +{ internal static class PropertyHelper { public static bool IsDefaultValue(DependencyObject d, DependencyProperty dp) diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs index 129725c85bc..fea0d9ad046 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using System; +using System.Windows; +using System.Windows.Media; namespace Microsoft.Windows.Controls { - using System; - using System.Windows; - using System.Windows.Media; - internal static class TreeHelper { /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/GenericValueConverters.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/GenericValueConverters.cs index 8d4df7922b7..04c6535e22f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/GenericValueConverters.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/GenericValueConverters.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; + using System.Globalization; using System.Windows.Data; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAccessedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAccessedEventArgs.cs index 4b3236c586c..a2edfdc15d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAccessedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAccessedEventArgs.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAdorner.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAdorner.cs index b8bfe011ac3..49a41769b12 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAdorner.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipAdorner.cs @@ -1,12 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; + using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipControl.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipControl.cs index c065773b64d..7b3ced767c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipControl.cs @@ -1,12 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs index 9b2b22d6726..45391bf4528 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs @@ -1,31 +1,29 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Threading; +#if RIBBON_IN_FRAMEWORK +using MS.Internal; +using Microsoft.Windows.Controls; +using System.Windows.Controls.Ribbon; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls #else namespace Microsoft.Windows.Controls #endif { - #region Using declarations - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Documents; - using System.Windows.Input; - using System.Windows.Markup; - using System.Windows.Media; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using MS.Internal; - using Microsoft.Windows.Controls; - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs index 88e5f57455f..b1bde6c5d48 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using System.ComponentModel; +using System.Runtime.InteropServices; +using MS.Internal; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,14 +13,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.ComponentModel; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - using System.Windows; - using MS.Internal; - internal static class NativeMethods { public const int MONITOR_DEFAULTTONEAREST = 2; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IContainsStarLayoutManager.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IContainsStarLayoutManager.cs index 63a79ca0013..3962e393c48 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IContainsStarLayoutManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IContainsStarLayoutManager.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IProvideStarLayoutInfoBase.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IProvideStarLayoutInfoBase.cs index 0d0638be258..b7f9b51e4b6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IProvideStarLayoutInfoBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/IProvideStarLayoutInfoBase.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows; - #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonContextualTabGroupsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonContextualTabGroupsPanel.cs index a9b3a5f11db..cd8d91ae59b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonContextualTabGroupsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonContextualTabGroupsPanel.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using MS.Internal; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives @@ -9,17 +15,6 @@ namespace System.Windows.Controls.Ribbon.Primitives namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - using System.Windows; - using System.Windows.Controls; - using MS.Internal; - using System; - using System.Windows.Threading; - using System.Collections; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - using System.Windows.Data; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif public class RibbonContextualTabGroupsPanel : Panel diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryCategoriesPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryCategoriesPanel.cs index 56788112bd1..0271dfc1177 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryCategoriesPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryCategoriesPanel.cs @@ -2,31 +2,26 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon.Primitives -#else -namespace Microsoft.Windows.Controls.Ribbon.Primitives -#endif -{ - #region Using declarations +#region Using declarations - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Diagnostics; - using System.Windows.Media; +using System.ComponentModel; +using System.Windows.Controls.Primitives; +using System.Diagnostics; +using System.Windows.Media; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; - using Microsoft.Windows.Controls; +using Microsoft.Windows.Controls; #else using Microsoft.Windows.Controls.Ribbon; #endif - using MS.Internal; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +namespace System.Windows.Controls.Ribbon.Primitives +#else +namespace Microsoft.Windows.Controls.Ribbon.Primitives +#endif +{ #endregion public class RibbonGalleryCategoriesPanel : Panel, IProvideStarLayoutInfoBase, IContainsStarLayoutManager, IScrollInfo diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryItemsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryItemsPanel.cs index 3e13c707aec..8e5da1fa975 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryItemsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGalleryItemsPanel.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using Declarations + +using System.Diagnostics; +#if RIBBON_IN_FRAMEWORK #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives @@ -9,20 +15,9 @@ namespace System.Windows.Controls.Ribbon.Primitives namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - - #region Using Declarations - - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Controls; - using System.Diagnostics; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon; #else using Microsoft.Windows.Controls.Ribbon; #endif - using MS.Internal; #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupItemsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupItemsPanel.cs index ac526b2069a..27836587e76 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupItemsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupItemsPanel.cs @@ -2,19 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - using System; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Controls; - using MS.Internal; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs index 9c7ec2568d0..8047f71e964 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs @@ -2,24 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Collections.Generic; +using System.Diagnostics; +using System.Windows.Threading; +using MS.Internal; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - #region Using declarations - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Threading; - using MS.Internal; - using Microsoft.Windows.Controls; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonMenuItemsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonMenuItemsPanel.cs index bdc6f35f555..c45e090f327 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonMenuItemsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonMenuItemsPanel.cs @@ -2,21 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Controls.Primitives; +using System.Collections.Generic; +using MS.Internal; +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Collections.Generic; - using System; - using MS.Internal; - using Microsoft.Windows.Controls; - public class RibbonMenuItemsPanel : VirtualizingStackPanel, ISupportStarLayout { #region Constructor diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarOverflowPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarOverflowPanel.cs index 59c289549c3..fe1e14a2315 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarOverflowPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarOverflowPanel.cs @@ -1,12 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Controls; -using System.Windows; + using System.Diagnostics; -using System; -using System.Collections.Generic; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarPanel.cs index 163dec869cf..3cf24882a7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonQuickAccessToolBarPanel.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; -using System.ComponentModel; using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Data; using System.Windows.Media; using System.Windows.Threading; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonScrollButtonVisibilityConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonScrollButtonVisibilityConverter.cs index 63b37794aba..a16b07bcf36 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonScrollButtonVisibilityConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonScrollButtonVisibilityConverter.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Windows; -using System.Windows.Automation.Provider; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; using System.Windows.Data; -using System.Windows.Media; using MS.Internal; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabHeadersPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabHeadersPanel.cs index 6b6f8ebfa79..dabb93eb95b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabHeadersPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabHeadersPanel.cs @@ -2,21 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using System.Diagnostics; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using MS.Internal; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives #else namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - using MS.Internal; - /// /// The items panel for RibbonTabHeaderItemsControl /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabsPanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabsPanel.cs index fd69d2b670c..01a92a268b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabsPanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTabsPanel.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives @@ -9,19 +18,6 @@ namespace System.Windows.Controls.Ribbon.Primitives namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - using MS.Internal; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTitlePanel.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTitlePanel.cs index 336de7e6e66..f9f2b3e503a 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTitlePanel.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonTitlePanel.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using directives + +using MS.Internal; +using System.Windows.Controls.Primitives; +using System.Windows.Media; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon.Primitives @@ -9,16 +15,6 @@ namespace System.Windows.Controls.Ribbon.Primitives namespace Microsoft.Windows.Controls.Ribbon.Primitives #endif { - #region Using directives - - using MS.Internal; - using System; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonWindowSmallIconConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonWindowSmallIconConverter.cs index 3f17ef42b02..91c7efa09fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonWindowSmallIconConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonWindowSmallIconConverter.cs @@ -1,13 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; + using System.Collections.ObjectModel; using System.Diagnostics; using System.Runtime.InteropServices; -using System.Windows; using System.Windows.Data; using System.Windows.Media; using System.Windows.Media.Imaging; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/StarLayoutInfo.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/StarLayoutInfo.cs index 696c1b39a1a..299cdbd28ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/StarLayoutInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/StarLayoutInfo.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System.Collections; using System.Collections.Generic; -using System.Windows; using MS.Internal; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs index 12c383c2208..bedc891783d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs @@ -1,41 +1,38 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Interop; +using System.Windows.Media; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon -#else -namespace Microsoft.Windows.Controls.Ribbon -#endif -{ - #region Using declarations - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Runtime.InteropServices; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Interop; - using System.Windows.Media; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; #endif - using MS.Internal; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +namespace System.Windows.Controls.Ribbon +#else +namespace Microsoft.Windows.Controls.Ribbon +#endif +{ #endregion Using declarations /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs index 30f8af3a8e9..5bd58dca5f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs @@ -1,7 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,16 +17,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs index 157b4bc2403..2d2917144af 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Input; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,14 +13,7 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Input; #if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs index 6cff23ceef0..0ab80b5e166 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Input; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,14 +13,7 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Input; #if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonButton.cs index aeb56b1d7ac..064d2b7c9e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonButton.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Media; +using System.Collections.Specialized; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,18 +18,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Media; - using System.Collections.Specialized; - using System.Windows.Input; - using Microsoft.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonCheckBox.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonCheckBox.cs index c58f83a9ed2..347231316c0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonCheckBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonCheckBox.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Media; +using System.Collections.Specialized; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,17 +18,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Media; - using System.Collections.Specialized; - using System.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonComboBox.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonComboBox.cs index 10b4a27810e..987a8d04243 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonComboBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonComboBox.cs @@ -1,7 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections.Specialized; +using System.Diagnostics; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Shapes; +using System.Windows.Threading; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; +using MS.Internal; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,23 +24,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Specialized; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Documents; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Shapes; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; - using MS.Internal; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContentPresenter.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContentPresenter.cs index 29fc7f9cfb7..7a8e356a9e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContentPresenter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContentPresenter.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Media; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,15 +13,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Controls; - using System.Windows; - using System.Windows.Media; - #endregion Using declarations /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs index 5f49c03862f..15c36a62196 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs @@ -1,7 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Globalization; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Threading; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,21 +22,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - - #region Using declarations - - using System; - using System.Globalization; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroup.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroup.cs index d384500bd1c..64a47c80e51 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroup.cs @@ -1,7 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections; +using System.Collections.Generic; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Input; +using System.Windows.Markup; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,19 +20,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Markup; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroupItemsControl.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroupItemsControl.cs index 38d6b74e69f..06c758bc785 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroupItemsControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextualTabGroupItemsControl.cs @@ -1,7 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using System.Windows.Automation.Peers; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,18 +14,11 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; #endif - + /// /// The itemscontrol which host contextual tab group headers for Ribbon. /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControl.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControl.cs index f6bed5fdfc6..38dde887cda 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControl.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Media; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,20 +15,10 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows; - using System.Windows.Media; #if !RIBBON_IN_FRAMEWORK using Microsoft.Windows.Automation.Peers; #endif - + #endregion Using declarations /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlGroup.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlGroup.cs index 1522bcb9755..a88f5724f08 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlGroup.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,17 +13,10 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; #if !RIBBON_IN_FRAMEWORK using Microsoft.Windows.Automation.Peers; #endif - + #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs index df4298a50eb..167d935e0a1 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs @@ -1,7 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using System.ComponentModel; +using System.Globalization; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,12 +12,7 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.ComponentModel; - using System.Globalization; - using MS.Internal; #if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #endif /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLengthConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLengthConverter.cs index 063b98db80a..056e4959d2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLengthConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLengthConverter.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +using System.ComponentModel; +using System.Globalization; +using MS.Internal; +using System.Diagnostics; +using System.ComponentModel.Design.Serialization; +using System.Reflection; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,14 +16,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.ComponentModel; - using System.Globalization; - using MS.Internal; - using System.Diagnostics; - using System.ComponentModel.Design.Serialization; - using System.Reflection; - /// /// A class used for converting between RibbonControlLengths and strings/numbers. /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlService.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlService.cs index 45761248bdc..e93badbab93 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlService.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlService.cs @@ -1,7 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Media; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,20 +16,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.ComponentModel; - using System.Diagnostics; - using System.Reflection; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Controls.Ribbon.Primitives; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinition.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinition.cs index f7d13320f0e..781e73d9df6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinition.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using MS.Internal; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,12 +13,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System.Diagnostics; - using System.Windows; - using MS.Internal; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinitionCollection.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinitionCollection.cs index 15d604a860a..6249f4002b2 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinitionCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlSizeDefinitionCollection.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Collections.Specialized; -using System.Windows; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDismissPopupEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDismissPopupEventArgs.cs index 55bf04b74b0..3f4072d04b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDismissPopupEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDismissPopupEventArgs.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDropDownHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDropDownHelper.cs index 5192204243e..f04585c5a17 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDropDownHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonDropDownHelper.cs @@ -1,21 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Collections; -using System.Collections.Specialized; -using System.Windows.Controls; -using System.Windows; + #if RIBBON_IN_FRAMEWORK using System.Windows.Controls.Ribbon.Primitives; #else using Microsoft.Windows.Controls.Ribbon.Primitives; #endif using MS.Internal; -using System; using System.Runtime.InteropServices; -using System.Windows.Media; using System.Windows.Controls.Primitives; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonFilterMenuButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonFilterMenuButton.cs index 0fac3e50486..2ff1aa59779 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonFilterMenuButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonFilterMenuButton.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; + using System.Windows.Data; #if !RIBBON_IN_FRAMEWORK using System.Windows.Controls; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs index 0bdb3e3082b..5bbcc7808c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs @@ -1,7 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + + +#region Using declarations + +using System.Collections; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; +using System.Xml; +using Microsoft.Windows.Input; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,28 +29,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - - #region Using declarations - - using System; - using System.Collections; - using System.Collections.ObjectModel; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; - using System.Xml; - using Microsoft.Windows.Input; - using MS.Internal; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryCategory.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryCategory.cs index 0eb19efc021..9c1c3cb6e85 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryCategory.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryCategory.cs @@ -1,7 +1,21 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections; +using System.Collections.Specialized; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,25 +23,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Collections; - using System.Collections.Specialized; - using System.Collections.ObjectModel; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Media; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows.Automation; - using System.Windows.Automation.Peers; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryItem.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryItem.cs index 6bf4e07a36e..bad10a59d5d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGalleryItem.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections.Specialized; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,17 +18,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Specialized; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; #if !RIBBON_IN_FRAMEWORK using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroup.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroup.cs index 6f1c4185b20..8600c44dd1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroup.cs @@ -1,38 +1,35 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -#if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon -#else -namespace Microsoft.Windows.Controls.Ribbon -#endif -{ - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Documents; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Media.Animation; - using System.Windows.Threading; + +#region Using declarations + +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; #endif - using MS.Internal; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +namespace System.Windows.Controls.Ribbon +#else +namespace Microsoft.Windows.Controls.Ribbon +#endif +{ #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinition.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinition.cs index cd3acb2f93f..ca84f405dda 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinition.cs @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Markup; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,12 +13,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System.Collections.Specialized; - using System.Windows; - using System.Windows.Markup; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBase.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBase.cs index 4fc0d8b47a9..4b5866e56c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBase.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBaseCollection.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBaseCollection.cs index 169eaf041fe..8cb7deda3fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBaseCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupSizeDefinitionBaseCollection.cs @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,12 +11,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System.Collections.Specialized; - using System.Diagnostics; - using System.Windows; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupTemplateSizeDefinition.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupTemplateSizeDefinition.cs index 3334d78e4a2..17b6b9dd8ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupTemplateSizeDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGroupTemplateSizeDefinition.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows; + using System.Windows.Markup; #if RIBBON_IN_FRAMEWORK diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonHelper.cs index 67d10d4a339..58016862e48 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonHelper.cs @@ -3,41 +3,36 @@ // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Collections; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Interop; +using System.Windows.Markup; +using System.Windows.Markup.Primitives; +using System.Windows.Media; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #else -namespace Microsoft.Windows.Controls.Ribbon + using Microsoft.Windows.Controls.Ribbon.Primitives; #endif -{ - #region Using declarations - - using System; - using System.Collections; - using System.ComponentModel; - using System.Diagnostics; - using System.Globalization; - using System.Security; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Interop; - using System.Windows.Markup; - using System.Windows.Markup.Primitives; - using System.Windows.Media; - using System.Windows.Threading; +using MS.Internal; + #if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; +namespace System.Windows.Controls.Ribbon #else - using Microsoft.Windows.Controls.Ribbon.Primitives; +namespace Microsoft.Windows.Controls.Ribbon #endif - using MS.Internal; - - +{ #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonKeyTipAndContentSyncHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonKeyTipAndContentSyncHelper.cs index ec140fe8662..2a3c01d2a36 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonKeyTipAndContentSyncHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonKeyTipAndContentSyncHelper.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System.Diagnostics; using System.Globalization; -using System.Windows; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs index 789ae79a383..62556477efe 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs @@ -3,34 +3,31 @@ // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Collections.Specialized; +using System.Diagnostics; +using System.Reflection; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon -#else -namespace Microsoft.Windows.Controls.Ribbon -#endif -{ - #region Using declarations - - using System; - using System.Collections.Specialized; - using System.Diagnostics; - using System.Reflection; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; #endif - using MS.Internal; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +namespace System.Windows.Controls.Ribbon +#else +namespace Microsoft.Windows.Controls.Ribbon +#endif +{ #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs index 2323d4468ca..ab5cc1d646f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs @@ -1,35 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Collections.Specialized; +using System.Diagnostics; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; #if RIBBON_IN_FRAMEWORK -namespace System.Windows.Controls.Ribbon -#else -namespace Microsoft.Windows.Controls.Ribbon -#endif -{ - #region Using declarations - - using System; - using System.Collections.Specialized; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; #endif - using MS.Internal; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +namespace System.Windows.Controls.Ribbon +#else +namespace Microsoft.Windows.Controls.Ribbon +#endif +{ #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs index 2ce0cdd5e25..e1ba308c390 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs @@ -1,7 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,23 +21,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Markup; - using System.Windows.Media; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBarCloneEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBarCloneEventArgs.cs index cdf9fea718a..8b035449863 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBarCloneEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBarCloneEventArgs.cs @@ -1,10 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonRadioButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonRadioButton.cs index 79720b67923..66c60fa668d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonRadioButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonRadioButton.cs @@ -1,7 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Media; +using System.Collections.Specialized; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,17 +18,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Media; - using System.Collections.Specialized; - using System.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSeparator.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSeparator.cs index 8c35322ff40..73adf504a0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSeparator.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSeparator.cs @@ -1,22 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Data; +using System.Windows.Media; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.ComponentModel; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Data; - using System.Windows.Media; #if !RIBBON_IN_FRAMEWORK using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButton.cs index ee2a22020e4..bdbabf0a27b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButton.cs @@ -1,24 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Media; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButtonLabelPosition.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButtonLabelPosition.cs index 369cd9ce43c..6b07edbefa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButtonLabelPosition.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitButtonLabelPosition.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Data; -using System; -using System.Globalization; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitMenuItem.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitMenuItem.cs index 3af9bce4518..cade4dd464c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitMenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonSplitMenuItem.cs @@ -2,24 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Media; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Media; - #endregion - + /// /// A variation of RibbonMenuItem which shows Checked state differently. /// Its Submenu can be opened or closed independent of IsCheckable. diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTab.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTab.cs index aca7ec4d3da..cce47b68fcd 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTab.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTab.cs @@ -3,29 +3,27 @@ // See the LICENSE file in the project root for more information. + +#region Using declarations + +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - - #region Using declarations - - using System; - using System.Collections.ObjectModel; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeader.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeader.cs index ad6c9923bc2..d86627c693c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeader.cs @@ -3,23 +3,21 @@ // See the LICENSE file in the project root for more information. +using System.Windows.Automation; +using System.Windows.Automation.Peers; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Threading; +using MS.Internal; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.Windows; - using System.Windows.Automation; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Threading; - using MS.Internal; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeaderItemsControl.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeaderItemsControl.cs index 779c74a5699..6a7ecb12f3f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeaderItemsControl.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTabHeaderItemsControl.cs @@ -2,21 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Threading; +#if RIBBON_IN_FRAMEWORK +using System.Windows.Controls.Ribbon.Primitives; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Threading; -#if RIBBON_IN_FRAMEWORK - using System.Windows.Controls.Ribbon.Primitives; #else using Microsoft.Windows.Automation.Peers; using Microsoft.Windows.Controls.Ribbon.Primitives; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTextBox.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTextBox.cs index 284c109ca92..49118c107a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTextBox.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTextBox.cs @@ -3,24 +3,22 @@ // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Collections.Specialized; +using System.Windows.Automation.Peers; +using System.Windows.Input; +using System.Windows.Media; +using Microsoft.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Collections.Specialized; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Media; - using Microsoft.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToggleButton.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToggleButton.cs index 4e33ef289e2..ea7e3ce4704 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToggleButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToggleButton.cs @@ -3,24 +3,22 @@ // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using System.Collections.Specialized; +using System.Windows.Input; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Media; - using System.Collections.Specialized; - using System.Windows.Input; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTip.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTip.cs index 7a417eaaa33..16c4e0c85cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTip.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTip.cs @@ -1,7 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + + +#region Using declarations + +using System.Windows.Automation.Peers; +using System.Windows.Controls.Primitives; +using System.Windows.Media; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon @@ -9,15 +15,6 @@ namespace System.Windows.Controls.Ribbon namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Controls.Primitives; - using System.Windows.Input; - using System.Windows.Media; #if !RIBBON_IN_FRAMEWORK using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTipService.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTipService.cs index f939462ef35..3d5d1dc440e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTipService.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonToolTipService.cs @@ -1,18 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + +#region Using declarations + +using System.Windows.Input; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Windows.Input; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTwoLineText.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTwoLineText.cs index a7c7bdb37ff..cb807b26a1e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTwoLineText.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonTwoLineText.cs @@ -2,26 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.ComponentModel; +using System.Diagnostics; +using System.Windows.Automation.Peers; +using System.Windows.Documents; +using System.Windows.Media; +using System.Windows.Shapes; +#if RIBBON_IN_FRAMEWORK +using Microsoft.Windows.Controls; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.ComponentModel; - using System.Diagnostics; - using System.Windows; - using System.Windows.Automation.Peers; - using System.Windows.Controls; - using System.Windows.Data; - using System.Windows.Documents; - using System.Windows.Media; - using System.Windows.Shapes; -#if RIBBON_IN_FRAMEWORK - using Microsoft.Windows.Controls; #else using Microsoft.Windows.Automation.Peers; #endif diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonWindow.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonWindow.cs index c2f584bcee6..0b5ca02c31d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonWindow.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonWindow.cs @@ -2,22 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#region Using declarations + +using System.Windows.Input; +using System.Windows.Media; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - #region Using declarations - - using System; - using System.Diagnostics; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Data; - using System.Windows.Input; - using System.Windows.Media; - #endregion /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/StringCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/StringCollectionConverter.cs index 21b6f71d347..2b47a00887f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/StringCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/StringCollectionConverter.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Specialized; +using System.ComponentModel; +using System.Globalization; +using System.Text; + #if RIBBON_IN_FRAMEWORK namespace System.Windows.Controls.Ribbon #else namespace Microsoft.Windows.Controls.Ribbon #endif { - using System; - using System.Collections.Specialized; - using System.ComponentModel; - using System.Globalization; - using System.Text; - /// /// A class used to convert a comma separated list into /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/TextSearchInternal.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/TextSearchInternal.cs index f187d3b9f91..eb723edc9a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/TextSearchInternal.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/TextSearchInternal.cs @@ -1,11 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows; -using System.Windows.Controls; + using System.Windows.Data; using System.Globalization; using System.Windows.Markup; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Input/CommandHelpers.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Input/CommandHelpers.cs index 6e7a88eeaa0..259762d329c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Input/CommandHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Input/CommandHelpers.cs @@ -1,22 +1,13 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - + +using System.Windows; +using System.Windows.Input; namespace Microsoft.Windows.Input { - #region Using declarations - - using System.Windows; - using System.Windows.Input; - using System.Diagnostics; - - #endregion Using declarations - - #region CommandHelpers Class - /// - /// A helper class for executing Commands. + /// A helper class for executing Commands. /// internal static class CommandHelpers { @@ -123,6 +114,4 @@ internal enum CommandOperation CancelPreview, Execute } - - #endregion CommandHelpers Class } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/Manipulation2DStartedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/Manipulation2DStartedEventArgs.cs index fed3cf7d61a..cc33227e4e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/Manipulation2DStartedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/Manipulation2DStartedEventArgs.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; namespace System.Windows.Input.Manipulations diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/PointF.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/PointF.cs index c8230d99770..34af78c5909 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/PointF.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/PointF.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input.Manipulations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/VectorF.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/VectorF.cs index 6df1ab2b1b6..932bf197ef9 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/VectorF.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/VectorF.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; - namespace System.Windows.Input.Manipulations { /// diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/DispatcherExtensions.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/DispatcherExtensions.cs index a17039f3f2c..1350ed9c7d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/DispatcherExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/DispatcherExtensions.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; + using System.ComponentModel; // EditorBrowsableAttribute, BrowsableAttribute namespace System.Windows.Threading diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/TaskExtensions.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/TaskExtensions.cs index a984e9caa39..5aded36e8d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/TaskExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Presentation/System/Windows/Threading/TaskExtensions.cs @@ -1,11 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Windows.Threading; + using System.Threading.Tasks; -using System.Runtime.CompilerServices; namespace System.Windows.Threading { diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Primitives/System.Windows.Primitives.csproj b/src/Microsoft.DotNet.Wpf/src/System.Windows.Primitives/System.Windows.Primitives.csproj index 04d26172aab..b84ce21ef1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Primitives/System.Windows.Primitives.csproj +++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Primitives/System.Windows.Primitives.csproj @@ -29,6 +29,10 @@ + + + false + - \ No newline at end of file + diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs index 19a64169b3f..556df996d78 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs @@ -24,12 +24,12 @@ #endregion #region Microsoft.Performance suppressions -[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "MS.Internal.Xaml.Context.ObjectWriterFrame")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "MS.Internal.Xaml.Context.ObjectWriterFrame", Justification = "Non-Breaking")] // New since v4 RTM: // this is used by subclasses, bad FxCop detection -[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "System.Xaml.MS.Impl.FrugalObjectList`1+Compacter")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "System.Xaml.MS.Impl.FrugalObjectList`1+Compacter", Justification = "Non-Breaking")] #endregion #region Microsoft.Naming Suppressions @@ -42,39 +42,39 @@ [assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.ArrayExtension.#Type", Justification = "Kept for compatibility.")] [assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.TypeExtension.#Type", Justification = "Kept for compatibility.")] [assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.NameScopePropertyAttribute.#Type", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "type", Target = "System.Windows.Markup.UidPropertyAttribute")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "member", Target = "System.Xaml.XamlLanguage.#Uid")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Namescope", Scope = "member", Target = "System.Xaml.XamlObjectWriterSettings.#RegisterNamesOnExternalNamescope")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uids", Scope = "member", Target = "System.Xaml.XamlReaderSettings.#IgnoreUidsOnPropertyElements")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContext.#SupportMarkupExtensionsWithDuplicateArity")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContextSettings.#SupportMarkupExtensionsWithDuplicateArity")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "resource", Target = "ExceptionStringTable.resources")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#String")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Double")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int32")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Object")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Char")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Single")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int16")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int64")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Decimal")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "type", Target = "System.Windows.Markup.UidPropertyAttribute", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "member", Target = "System.Xaml.XamlLanguage.#Uid", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Namescope", Scope = "member", Target = "System.Xaml.XamlObjectWriterSettings.#RegisterNamesOnExternalNamescope", Justification ="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uids", Scope = "member", Target = "System.Xaml.XamlReaderSettings.#IgnoreUidsOnPropertyElements", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContext.#SupportMarkupExtensionsWithDuplicateArity", Justification ="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContextSettings.#SupportMarkupExtensionsWithDuplicateArity", Justification ="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "resource", Target = "ExceptionStringTable.resources", Justification="Alligns with other instances of same resource.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#String", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Double", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int32", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Object", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Char", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Single", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int16", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int64", Justification="Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Decimal", Justification="Will require changes in public API contract.")] #endregion #region Microsoft.Usage Suppressions -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.SetCount(System.Int32):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.SetCount(System.Int32):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SingleItemList`1.SetCount(System.Int32):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.SetCount(System.Int32):System.Void")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SingleItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void", Justification = "Kept for compatibility.")] #endregion #region Microsoft.Reliablity Suppressions [module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "System.Xaml.Schema.ClrNamespace.#ParseClrNamespaceUri(System.String)", MessageId = "System.Reflection.Assembly.LoadWithPartialName", Justification = "Back compat.")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFile", Scope = "member", Target = "System.Xaml.ReflectionHelper.#LoadAssemblyHelper(System.String,System.String)")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFile", Scope = "member", Target = "System.Xaml.ReflectionHelper.#LoadAssemblyHelper(System.String,System.String)", Justification = "Kept for compatibility.")] [module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadWithPartialName", Scope = "member", Target = "System.Xaml.XamlSchemaContext.#ResolveAssembly(System.String)", Justification = "Need to support load of assemblies from GAC by short name.")] #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalUsings.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalUsings.cs new file mode 100644 index 00000000000..f73ee7d808f --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalUsings.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +global using System; +global using System.Collections.Generic; +global using System.Diagnostics; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ArrayExtension.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ArrayExtension.cs index 73474e929db..083a7bf357d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ArrayExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ArrayExtension.cs @@ -80,7 +80,7 @@ public ArrayExtension(Array elements) /// The Array containing all the objects added to this extension. public override object ProvideValue(IServiceProvider serviceProvider) { - if (Type == null) + if (Type is null) { throw new InvalidOperationException(SR.MarkupExtensionArrayType); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DateTimeValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DateTimeValueSerializer.cs index 7df514c36c4..2208ff25086 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DateTimeValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DateTimeValueSerializer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -41,10 +40,11 @@ public DateTimeValueSerializer() /// public override object ConvertFromString(string value, IValueSerializerContext? context) { - if (value == null) + if (value is null) { throw GetConvertFromException(value); } + if (value.Length == 0) { return DateTime.MinValue; @@ -60,13 +60,12 @@ public override object ConvertFromString(string value, IValueSerializerContext? return DateTime.Parse(value, dateTimeFormatInfo, DateTimeStyles); } - /// /// Converts the given value object to a using the arguments. /// public override string ConvertToString(object? value, IValueSerializerContext? context) { - if (value == null || !(value is DateTime dateTime)) + if (value is null || !(value is DateTime dateTime)) { throw GetConvertToException(value, typeof(string)); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/INameScopeDictionary.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/INameScopeDictionary.cs index ecc591fb403..a27e40a9a01 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/INameScopeDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/INameScopeDictionary.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; - namespace System.Windows.Markup { public interface INameScopeDictionary : INameScope, IDictionary diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameReferenceConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameReferenceConverter.cs index 4621417dcd4..3440e6949c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameReferenceConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameReferenceConverter.cs @@ -27,7 +27,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c ArgumentNullException.ThrowIfNull(context); var nameResolver = (IXamlNameResolver)context.GetService(typeof(IXamlNameResolver)); - if (nameResolver == null) + if (nameResolver is null) { throw new InvalidOperationException(SR.MissingNameResolver); } @@ -37,18 +37,20 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c { throw new InvalidOperationException(SR.MustHaveName); } + object obj = nameResolver.Resolve(name); - if (obj == null) + if (obj is null) { string[] names = new string[] { name }; obj = nameResolver.GetFixupToken(names, true); } + return obj; } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - if (context == null || (context.GetService(typeof(IXamlNameProvider)) as IXamlNameProvider) == null) + if (context is null || (context.GetService(typeof(IXamlNameProvider)) as IXamlNameProvider) is null) { return false; } @@ -59,7 +61,6 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati } return base.CanConvertTo(context, destinationType); - } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) @@ -67,7 +68,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul ArgumentNullException.ThrowIfNull(context); var nameProvider = (IXamlNameProvider)context.GetService(typeof(IXamlNameProvider)); - if (nameProvider == null) + if (nameProvider is null) { throw new InvalidOperationException(SR.MissingNameProvider); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/PropertyDefinition.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/PropertyDefinition.cs index 8f78d1afcaf..52242fe80d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/PropertyDefinition.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/PropertyDefinition.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.ComponentModel; using System.Xaml; using System.Xaml.Schema; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/Reference.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/Reference.cs index 7fa8ef51120..e69cfe43cbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/Reference.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/Reference.cs @@ -27,20 +27,23 @@ public override object ProvideValue(IServiceProvider serviceProvider) { ArgumentNullException.ThrowIfNull(serviceProvider); IXamlNameResolver nameResolver = serviceProvider.GetService(typeof(IXamlNameResolver)) as IXamlNameResolver; - if (nameResolver == null) + if (nameResolver is null) { throw new InvalidOperationException(SR.MissingNameResolver); } + if (string.IsNullOrEmpty(Name)) { throw new InvalidOperationException(SR.MustHaveName); } + object obj = nameResolver.Resolve(Name); - if (obj == null) + if (obj is null) { string[] names = new string[] { Name }; obj = nameResolver.GetFixupToken(names, true); } + return obj; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtension.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtension.cs index 61eb01a76a0..ac809630501 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtension.cs @@ -47,7 +47,7 @@ public StaticExtension(string member) /// The object to set on this property. public override object ProvideValue(IServiceProvider serviceProvider) { - if (_member == null) + if (_member is null) { throw new InvalidOperationException(SR.MarkupExtensionStaticMember); } @@ -55,7 +55,7 @@ public override object ProvideValue(IServiceProvider serviceProvider) Type type = MemberType; string fieldString; string typeNameForError = null; - if (type != null) + if (type is not null) { fieldString = _member; typeNameForError = type.FullName; @@ -81,7 +81,7 @@ public override object ProvideValue(IServiceProvider serviceProvider) ArgumentNullException.ThrowIfNull(serviceProvider); IXamlTypeResolver xamlTypeResolver = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver; - if (xamlTypeResolver == null) + if (xamlTypeResolver is null) { throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); } @@ -122,27 +122,29 @@ private bool GetFieldOrPropertyValue(Type type, string name, out object value) do { FieldInfo field = currentType.GetField(name, BindingFlags.Public | BindingFlags.Static); - if (field != null) + if (field is not null) { value = field.GetValue(null); return true; } currentType = currentType.BaseType; - } while(currentType != null); + } + while(currentType is not null); currentType = type; do { PropertyInfo prop = currentType.GetProperty(name, BindingFlags.Public | BindingFlags.Static); - if (prop != null) + if (prop is not null) { value = prop.GetValue(null, null); return true; } currentType = currentType.BaseType; - } while(currentType != null); + } + while(currentType is not null); value = null; return false; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtensionsToInstanceDescriptorsConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtensionsToInstanceDescriptorsConverter.cs index ed2c10119e8..19b20cc3d89 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtensionsToInstanceDescriptorsConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/StaticExtensionsToInstanceDescriptorsConverter.cs @@ -7,7 +7,6 @@ using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; -using System.Security; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtension.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtension.cs index 94cdd6473f0..3f8b3fb5065 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtension.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtension.cs @@ -53,13 +53,13 @@ public TypeExtension(Type type) public override object ProvideValue(IServiceProvider serviceProvider) { // If a type was supplied, no context nor type name are needed - if (_type != null) + if (_type is not null) { return _type; } // Validate the initialization. - if (_typeName == null) + if (_typeName is null) { throw new InvalidOperationException(SR.MarkupExtensionTypeName); } @@ -68,14 +68,14 @@ public override object ProvideValue(IServiceProvider serviceProvider) ArgumentNullException.ThrowIfNull(serviceProvider); IXamlTypeResolver xamlTypeResolver = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver; - if( xamlTypeResolver == null) + if( xamlTypeResolver is null) { throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); } // Get the type _type = xamlTypeResolver.Resolve(_typeName); - if (_type == null) + if (_type is null) { throw new InvalidOperationException(SR.Format(SR.MarkupExtensionTypeNameBad, _typeName)); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtensionConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtensionConverter.cs index 1e80dc663ae..c9f58d7b744 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtensionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TypeExtensionConverter.cs @@ -7,7 +7,6 @@ using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; -using System.Security; namespace System.Windows.Markup { diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs index beb4e40bb01..078e8e8eae6 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Xaml; @@ -109,7 +108,7 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC ArgumentNullException.ThrowIfNull(type); object? value = s_valueSerializers[type]; - if (value != null) + if (value is not null) { // This uses s_valueSerializersLock's instance as a sentinal for null (as opposed to not attempted yet). return value == s_valueSerializersLock ? null : value as ValueSerializer; @@ -123,7 +122,7 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC result = (ValueSerializer?)Activator.CreateInstance(attribute.ValueSerializerType); } - if (result == null) + if (result is null) { if (type == typeof(string)) { @@ -148,6 +147,7 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC } } } + lock (s_valueSerializersLock) { // This uses s_valueSerializersLock's instance as a sentinal for null (as opposed to not attempted yet). @@ -176,7 +176,7 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC if (result is null or TypeConverterValueSerializer) { TypeConverter converter = descriptor.Converter; - if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)) && + if (converter is not null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)) && converter is not ReferenceConverter) { result = new TypeConverterValueSerializer(converter); @@ -196,10 +196,10 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC /// The value serializer associated with the given type public static ValueSerializer? GetSerializerFor(Type type, IValueSerializerContext? context) { - if (context != null) + if (context is not null) { ValueSerializer result = context.GetValueSerializerFor(type); - if (result != null) + if (result is not null) { return result; } @@ -218,10 +218,10 @@ public virtual IEnumerable TypeReferences(object? value, IValueSerializerC /// A value serializer associated with the given property public static ValueSerializer? GetSerializerFor(PropertyDescriptor descriptor, IValueSerializerContext? context) { - if (context != null) + if (context is not null) { ValueSerializer result = context.GetValueSerializerFor(descriptor); - if (result != null) + if (result is not null) { return result; } @@ -238,7 +238,7 @@ protected Exception GetConvertToException(object? value, Type destinationType) ArgumentNullException.ThrowIfNull(destinationType); string? text; - if (value == null) + if (value is null) { text = SR.ToStringNull; } @@ -246,6 +246,7 @@ protected Exception GetConvertToException(object? value, Type destinationType) { text = value.GetType().FullName; } + return new NotSupportedException(SR.Format(SR.ConvertToException, base.GetType().Name, text, destinationType.FullName)); } @@ -255,7 +256,7 @@ protected Exception GetConvertToException(object? value, Type destinationType) protected Exception GetConvertFromException(object? value) { string? text; - if (value == null) + if (value is null) { text = SR.ToStringNull; } @@ -263,6 +264,7 @@ protected Exception GetConvertFromException(object? value) { text = value.GetType().FullName; } + return new NotSupportedException(SR.Format(SR.ConvertFromException, base.GetType().Name, text)); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionEventArgs.cs index 91c46c208b1..a3cf912b8bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionEventArgs.cs @@ -32,13 +32,13 @@ internal XamlSetMarkupExtensionEventArgs(XamlMember member, public override void CallBase() { - if (CurrentType != null) + if (CurrentType is not null) { XamlType baseType = CurrentType.BaseType; - if (baseType != null) + if (baseType is not null) { CurrentType = baseType; - if (baseType.SetMarkupExtensionHandler != null) + if (baseType.SetMarkupExtensionHandler is not null) { baseType.SetMarkupExtensionHandler(TargetObject, this); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterEventArgs.cs index 4c8dff620a7..cd9255bba81 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterEventArgs.cs @@ -37,13 +37,13 @@ internal XamlSetTypeConverterEventArgs(XamlMember member, TypeConverter typeConv public override void CallBase() { - if (CurrentType != null) + if (CurrentType is not null) { XamlType baseType = CurrentType.BaseType; - if (baseType != null) + if (baseType is not null) { CurrentType = baseType; - if (baseType.SetTypeConverterHandler != null) + if (baseType.SetTypeConverterHandler is not null) { baseType.SetTypeConverterHandler(TargetObject, this); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachableMemberIdentifier.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachableMemberIdentifier.cs index 4a6aae27e35..08ea782afa3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachableMemberIdentifier.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachableMemberIdentifier.cs @@ -44,6 +44,7 @@ public Type DeclaringType { return right is null; } + return left.Equals(right); } @@ -54,7 +55,7 @@ public override bool Equals(object obj) public bool Equals(AttachableMemberIdentifier other) { - if (other == null) + if (other is null) { return false; } @@ -64,14 +65,14 @@ public bool Equals(AttachableMemberIdentifier other) public override int GetHashCode() { - int a = declaringType == null ? 0 : declaringType.GetHashCode(); - int b = memberName == null ? 0 : memberName.GetHashCode(); + int a = declaringType is null ? 0 : declaringType.GetHashCode(); + int b = memberName is null ? 0 : memberName.GetHashCode(); return ((a << 5) + a) ^ b; } public override string ToString() { - if (declaringType == null) + if (declaringType is null) { return memberName; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachablePropertyServices.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachablePropertyServices.cs index efdeaf838c4..0a5bbf33e95 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachablePropertyServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/AttachablePropertyServices.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -16,13 +15,13 @@ public static class AttachablePropertyServices public static int GetAttachedPropertyCount(object instance) { - if (instance == null) + if (instance is null) { return 0; } IAttachedPropertyStore ap = instance as IAttachedPropertyStore; - if (ap != null) + if (ap is not null) { return ap.PropertyCount; } @@ -32,13 +31,13 @@ public static int GetAttachedPropertyCount(object instance) public static void CopyPropertiesTo(object instance, KeyValuePair[] array, int index) { - if (instance == null) + if (instance is null) { return; } IAttachedPropertyStore ap = instance as IAttachedPropertyStore; - if (ap != null) + if (ap is not null) { ap.CopyPropertiesTo(array, index); } @@ -50,13 +49,13 @@ public static void CopyPropertiesTo(object instance, KeyValuePair(instance, name, out value); @@ -91,14 +90,14 @@ public static bool TryGetProperty(object instance, AttachableMemberIdentifier na public static bool TryGetProperty(object instance, AttachableMemberIdentifier name, out T value) { - if (instance == null) + if (instance is null) { value = default(T); return false; } IAttachedPropertyStore ap = instance as IAttachedPropertyStore; - if (ap != null) + if (ap is not null) { object obj; bool result = ap.TryGetProperty(name, out obj); @@ -110,6 +109,7 @@ public static bool TryGetProperty(object instance, AttachableMemberIdentifier return true; } } + value = default(T); return false; } @@ -154,6 +154,7 @@ public int GetPropertyCount(object instance) } } } + return 0; } @@ -173,6 +174,7 @@ public bool RemoveProperty(object instance, AttachableMemberIdentifier name) } } } + return false; } @@ -232,6 +234,7 @@ public bool TryGetProperty(object instance, AttachableMemberIdentifier name, } } } + value = default(T); return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ContextServices.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ContextServices.cs index f7f5d50aa61..0dd64851cf9 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ContextServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ContextServices.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using System.Windows.Markup; using System.Xaml; @@ -16,10 +15,10 @@ internal static class ContextServices public static object GetTargetProperty(ObjectWriterContext xamlContext) { // If the XamlMember implements IProvideValueTarget, ask it for the TargetProperty first - Debug.Assert(xamlContext.ParentProperty != null); + Debug.Assert(xamlContext.ParentProperty is not null); IProvideValueTarget ipvt = xamlContext.ParentProperty as IProvideValueTarget; - if (ipvt != null) + if (ipvt is not null) { return ipvt.TargetProperty; } @@ -28,7 +27,7 @@ public static object GetTargetProperty(ObjectWriterContext xamlContext) // // We should never have a null ParentProperty here but // protect against null refs since we are going to dereference it - if (parentProperty == null) + if (parentProperty is null) { return null; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupGraph.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupGraph.cs index 42515a6f996..3413098b74e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupGraph.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupGraph.cs @@ -4,13 +4,9 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text; using System.Xaml; using System.Xaml.MS.Impl; -using System.Xaml.Schema; namespace MS.Internal.Xaml.Context { @@ -56,12 +52,12 @@ public NameFixupGraph() public void AddDependency(NameFixupToken fixupToken) { // Need to special case a deferred ProvideValue at the root, because it has no parent - if (fixupToken.Target.Property == null) + if (fixupToken.Target.Property is null) { - Debug.Assert(fixupToken.Target.Instance == null && - fixupToken.Target.InstanceType == null && + Debug.Assert(fixupToken.Target.Instance is null && + fixupToken.Target.InstanceType is null && fixupToken.FixupType == FixupType.MarkupExtensionFirstRun); - Debug.Assert(_deferredRootProvideValue == null); + Debug.Assert(_deferredRootProvideValue is null); _deferredRootProvideValue = fixupToken; return; } @@ -71,11 +67,11 @@ public void AddDependency(NameFixupToken fixupToken) // - Initialization, in which case FixupTarget.Instance is the object whose property the // initialized object will be assigned to; and // - Key, in which case the FixupTarget.Instance is the dictionary - Debug.Assert(parentObject != null); + Debug.Assert(parentObject is not null); AddToMultiDict(_dependenciesByParentObject, parentObject, fixupToken); - if (fixupToken.ReferencedObject != null) + if (fixupToken.ReferencedObject is not null) { Debug.Assert(fixupToken.FixupType == FixupType.UnresolvedChildren || fixupToken.FixupType == FixupType.MarkupExtensionFirstRun); @@ -99,10 +95,11 @@ public void AddDependency(NameFixupToken fixupToken) public bool HasUnresolvedChildren(object parent) { - if (parent == null) + if (parent is null) { return false; } + return _dependenciesByParentObject.ContainsKey(parent); } @@ -112,6 +109,7 @@ public bool HasUnresolvedOrPendingChildren(object instance) { return true; } + foreach (NameFixupToken pendingToken in _resolvedTokensPendingProcessing) { if (pendingToken.Target.Instance == instance) @@ -119,6 +117,7 @@ public bool HasUnresolvedOrPendingChildren(object instance) return true; } } + return false; } @@ -138,6 +137,7 @@ public void GetDependentNames(object instance, List result) { return; } + for (int i = 0; i < dependencies.Count; i++) { NameFixupToken token = dependencies[i]; @@ -146,7 +146,7 @@ public void GetDependentNames(object instance, List result) { GetDependentNames(token.ReferencedObject, result); } - else if (token.NeededNames != null) + else if (token.NeededNames is not null) { foreach (string name in token.NeededNames) { @@ -166,7 +166,7 @@ public void ResolveDependenciesTo(object instance, string name) { // Remove any dependency on this instance NameFixupToken token = null; - if (instance != null) + if (instance is not null) { if (_dependenciesByChildObject.Remove(instance, out token)) { @@ -178,7 +178,7 @@ public void ResolveDependenciesTo(object instance, string name) // Remove any dependencies on this name, and return any tokens whose dependencies // have all been resolved. FrugalObjectList nameDependencies; - if (name != null && _dependenciesByName.TryGetValue(name, out nameDependencies)) + if (name is not null && _dependenciesByName.TryGetValue(name, out nameDependencies)) { int i = 0; while (i < nameDependencies.Count) @@ -199,12 +199,14 @@ public void ResolveDependenciesTo(object instance, string name) // For simple fixups, we need to return the resolved object token.ReferencedObject = instance; } + token.NeededNames.Remove(name); nameDependencies.RemoveAt(i); if (nameDependencies.Count == 0) { _dependenciesByName.Remove(name); } + if (token.NeededNames.Count == 0) { RemoveTokenByParent(token); @@ -273,11 +275,13 @@ public IEnumerable GetRemainingSimpleFixups() i++; continue; } + dependencies.RemoveAt(i); if (dependencies.Count == 0) { _dependenciesByName.Remove(name); } + RemoveTokenByParent(token); yield return token; } @@ -350,6 +354,7 @@ public IEnumerable GetRemainingObjectDependencies() markupExtensionTokens.Add(curToken); } } + while (markupExtensionTokens.Count > 0) { bool found = false; @@ -363,6 +368,7 @@ public IEnumerable GetRemainingObjectDependencies() i++; continue; } + // Iterate the list in backwards order, so we return the deepest first for (int j = dependencies.Count - 1; j >= 0; j--) { @@ -370,9 +376,11 @@ public IEnumerable GetRemainingObjectDependencies() RemoveTokenByParent(token); yield return token; } + found = true; markupExtensionTokens.RemoveAt(i); } + if (!found) { // We have MEs left, but they all have dependencies on other MEs. @@ -390,6 +398,7 @@ public IEnumerable GetRemainingObjectDependencies() startNodeOutEdges = list; break; } + for (int i = 0; i < startNodeOutEdges.Count; i++) { List dependencies = new List(); @@ -405,7 +414,7 @@ public IEnumerable GetRemainingObjectDependencies() } // Finally, if there was a deferred ProvideValue at the root, return it - if (_deferredRootProvideValue != null) + if (_deferredRootProvideValue is not null) { yield return _deferredRootProvideValue; } @@ -420,14 +429,16 @@ private bool FindDependencies(NameFixupToken inEdge, List alread // Cycle, skip it return true; } + alreadyTraversed.Add(inEdge); FrugalObjectList outEdges; - if (inEdge.ReferencedObject == null || + if (inEdge.ReferencedObject is null || !_dependenciesByParentObject.TryGetValue(inEdge.ReferencedObject, out outEdges)) { // No dependencies, we're done with this subgraph return true; } + for (int i = 0; i < outEdges.Count; i++) { NameFixupToken outEdge = outEdges[i]; @@ -435,12 +446,14 @@ private bool FindDependencies(NameFixupToken inEdge, List alread { return false; } + Debug.Assert(outEdge.FixupType == FixupType.UnresolvedChildren); if (!FindDependencies(outEdge, alreadyTraversed)) { return false; } } + return true; } @@ -469,6 +482,7 @@ private static void AddToMultiDict(Dictionary(1); dict.Add(key, tokenList); } + tokenList.Add(value); } @@ -496,6 +510,7 @@ private static void ThrowProvideValueCycle(IEnumerable markupExt exceptionMessage.Append(meName); } } + throw new XamlObjectWriterException(exceptionMessage.ToString()); } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupToken.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupToken.cs index 0c992b71acb..04f234936f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupToken.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/NameFixupToken.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; using MS.Internal.Xaml.Runtime; using XAML3 = System.Windows.Markup; @@ -20,7 +17,7 @@ internal enum FixupType PropertyValue, // A TC on a property that returned a FixupToken ObjectInitializationValue, // A TC on an object that returned a FixupToken UnresolvedChildren, // An object that can't be EndInited because it has pending fixups on its properties - }; + } internal class FixupTargetKeyHolder { @@ -96,6 +93,7 @@ XamlException IAddLineInfo.WithLineInfo(XamlException ex) { ex.SetLineInfo(EndInstanceLineNumber, EndInstanceLinePosition); } + return ex; } } @@ -128,7 +126,7 @@ public XamlRuntime Runtime get { return _runtime; } set { - Debug.Assert(_runtime == null); + Debug.Assert(_runtime is null); _runtime = value; } } @@ -138,10 +136,11 @@ public ObjectWriterContext TargetContext { get { - if (_targetContext == null) + if (_targetContext is null) { _targetContext = new ObjectWriterContext(SavedContext, null, null, Runtime); } + return _targetContext; } } @@ -180,7 +179,7 @@ internal object ResolveName(string name) foreach (XAML3.INameScopeDictionary nameScope in NameScopeDictionaryList) { namedObject = nameScope.FindName(name); - if (namedObject != null) + if (namedObject is not null) { break; } @@ -191,6 +190,7 @@ internal object ResolveName(string name) TargetContext.IsInitializedCallback = null; namedObject = TargetContext.ResolveName(name, out _); } + return namedObject; } @@ -200,6 +200,7 @@ XamlException IAddLineInfo.WithLineInfo(XamlException ex) { ex.SetLineInfo(LineNumber, LinePosition); } + return ex; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterContext.cs index db04692c1f0..0c851e12c0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterContext.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Xaml; using System.Xaml.Schema; @@ -33,10 +30,11 @@ public ObjectWriterContext(XamlSavedContext savedContext, : base(savedContext.SchemaContext) { _stack = new XamlContextStack(savedContext.Stack, false); - if (settings != null) + if (settings is not null) { _settings = settings.StripDelegates(); } + _runtime = runtime; BaseUri = savedContext.BaseUri; // If the bottom of the stack is a (no XamlType) Value (reparse) then back-up onto it. @@ -46,7 +44,7 @@ public ObjectWriterContext(XamlSavedContext savedContext, case SavedContextType.Template: // Templates always need a root namescope, to isolate them from the rest of the doc XAML3.INameScopeDictionary rootNameScopeDictionary = null; - if (rootNameScope == null) + if (rootNameScope is null) { rootNameScopeDictionary = new NameScope(); } @@ -54,7 +52,7 @@ public ObjectWriterContext(XamlSavedContext savedContext, { rootNameScopeDictionary = rootNameScope as XAML3.INameScopeDictionary; - if (rootNameScopeDictionary == null) + if (rootNameScopeDictionary is null) { rootNameScopeDictionary = new NameScopeDictionary(rootNameScope); } @@ -71,7 +69,7 @@ public ObjectWriterContext(XamlSavedContext savedContext, case SavedContextType.ReparseValue: case SavedContextType.ReparseMarkupExtension: - Debug.Assert(rootNameScope == null, "Cannot pass a new namescope in to a reparse context"); + Debug.Assert(rootNameScope is null, "Cannot pass a new namescope in to a reparse context"); _savedDepth = _stack.Depth - 1; break; } @@ -84,7 +82,7 @@ public ObjectWriterContext(XamlSchemaContext schemaContext, _stack = new XamlContextStack(() => new ObjectWriterFrame()); XAML3.INameScopeDictionary rootNameScopeDictionary = null; - if (rootNameScope == null) + if (rootNameScope is null) { rootNameScopeDictionary = new NameScope(); } @@ -92,17 +90,19 @@ public ObjectWriterContext(XamlSchemaContext schemaContext, { rootNameScopeDictionary = rootNameScope as XAML3.INameScopeDictionary; - if (rootNameScopeDictionary == null) + if (rootNameScopeDictionary is null) { rootNameScopeDictionary = new NameScopeDictionary(rootNameScope); } } + _stack.CurrentFrame.NameScopeDictionary = rootNameScopeDictionary; _stack.PushScope(); // put a blank sentinal frame on the stack. - if (settings != null) + if (settings is not null) { _settings = settings.StripDelegates(); } + _runtime = runtime; _savedDepth = 0; } @@ -112,11 +112,12 @@ public override Assembly LocalAssembly get { Assembly result = base.LocalAssembly; - if (result == null && _settings != null && _settings.AccessLevel != null) + if (result is null && _settings is not null && _settings.AccessLevel is not null) { result = Assembly.Load(_settings.AccessLevel.AssemblyAccessToAssemblyName); base.LocalAssembly = result; } + return result; } protected set { base.LocalAssembly = value; } @@ -155,12 +156,13 @@ internal Type ServiceProvider_Resolve(string qName) // As soon as we have the necessary setting on ObjectWriter, we need to start passing // the local assembly into the context; currently, this will only return publics. XamlType xamlType = ServiceProvider_ResolveXamlType(qName); - if (xamlType == null || xamlType.UnderlyingType == null) + if (xamlType is null || xamlType.UnderlyingType is null) { XamlTypeName name = XamlTypeName.Parse(qName, _serviceProviderContext); xamlType = GetXamlType(name, true, true); throw new XamlParseException(SR.Format(SR.TypeNotFound, xamlType.GetQualifiedName())); } + return xamlType.UnderlyingType; } @@ -171,7 +173,7 @@ internal XamlType ServiceProvider_ResolveXamlType(string qName) internal AmbientPropertyValue ServiceProvider_GetFirstAmbientValue(IEnumerable ceilingTypes, XamlMember[] properties) { - List valueList = FindAmbientValues(ceilingTypes, /*searchLiveStackOnly*/false, /*types*/null, properties, true); + List valueList = FindAmbientValues(ceilingTypes, searchLiveStackOnly: false, types: null, properties, true); return (valueList.Count == 0) ? null : valueList[0]; } @@ -183,7 +185,7 @@ internal object ServiceProvider_GetFirstAmbientValue(XamlType[] types) internal IEnumerable ServiceProvider_GetAllAmbientValues(IEnumerable ceilingTypes, XamlMember[] properties) { - List valueList = FindAmbientValues(ceilingTypes, /*searchLiveStackOnly*/false, /*types*/null, properties, /*stopAfterFirst*/ false); + List valueList = FindAmbientValues(ceilingTypes, searchLiveStackOnly: false, types: null, properties, stopAfterFirst: false); return valueList; } @@ -201,10 +203,11 @@ internal IEnumerable ServiceProvider_GetAllAmbientValues(I internal XamlObjectWriterSettings ServiceProvider_GetSettings() { - if (_settings == null) + if (_settings is null) { _settings = new XamlObjectWriterSettings(); } + return _settings; } @@ -228,8 +231,10 @@ public override string FindNamespaceByPrefix(string prefix) { return xamlNs; } + frame = (ObjectWriterFrame)frame.Previous; } + return null; } @@ -240,7 +245,7 @@ public override IEnumerable GetNamespacePrefixes() while (frame.Depth > 0) { - if (frame._namespaces != null) + if (frame._namespaces is not null) { foreach (NamespaceDeclaration namespaceDeclaration in frame.GetNamespacePrefixes()) { @@ -250,6 +255,7 @@ public override IEnumerable GetNamespacePrefixes() } } } + frame = (ObjectWriterFrame)frame.Previous; } } @@ -267,10 +273,11 @@ internal ServiceProviderContext ServiceProviderContext { get { - if (null == _serviceProviderContext) + if (_serviceProviderContext is null) { _serviceProviderContext = new ServiceProviderContext(this); } + return _serviceProviderContext; } } @@ -279,12 +286,12 @@ internal XamlType GetDestinationType() { ObjectWriterFrame frame = _stack.CurrentFrame; - if (frame == null) + if (frame is null) { return null; } - if (frame.Instance != null && frame.XamlType == null) + if (frame.Instance is not null && frame.XamlType is null) { // // Text/TypeConverter, we need to go up a frame @@ -295,6 +302,7 @@ internal XamlType GetDestinationType() { return frame.XamlType; } + return frame.Member.Type; } @@ -312,7 +320,7 @@ private List FindAmbientValues(IEnumerable ceili } } - List ceilingTypes = ceilingTypesEnumerable != null ? new List(ceilingTypesEnumerable) : null; + List ceilingTypes = ceilingTypesEnumerable is not null ? new List(ceilingTypesEnumerable) : null; List retList = new List(); @@ -329,13 +337,13 @@ private List FindAmbientValues(IEnumerable ceili object inst = frame.Instance; - if (types != null) + if (types is not null) { foreach (XamlType type in types) { - if (frame.XamlType != null && frame.XamlType.CanAssignTo(type)) + if (frame.XamlType is not null && frame.XamlType.CanAssignTo(type)) { - if (inst != null) + if (inst is not null) { AmbientPropertyValue apValue = new AmbientPropertyValue(null, inst); retList.Add(apValue); @@ -344,16 +352,16 @@ private List FindAmbientValues(IEnumerable ceili } } - if (properties != null) + if (properties is not null) { foreach (XamlMember prop in properties) { bool returnAmbientValue = false; object value = null; - if (frame.XamlType != null && frame.XamlType.CanAssignTo(prop.DeclaringType)) + if (frame.XamlType is not null && frame.XamlType.CanAssignTo(prop.DeclaringType)) { - if (inst != null) + if (inst is not null) { // If we are searching from inside the target Ambient property, // (like StaticResource inside a ResourceDictionary) @@ -361,8 +369,8 @@ private List FindAmbientValues(IEnumerable ceili // the object but will only exist on the parse stack. // If it is top-down it will be attached to the instance already // and the normal path will serve. - if (prop == frame.Member && lowerFrame.Instance != null - && lowerFrame.XamlType != null && !lowerFrame.XamlType.IsUsableDuringInitialization) + if (prop == frame.Member && lowerFrame.Instance is not null + && lowerFrame.XamlType is not null && !lowerFrame.XamlType.IsUsableDuringInitialization) { // One last thing to check: If the object we are inside is a ME // then we are inside a call to ProvideValue and we don't want to @@ -375,13 +383,12 @@ private List FindAmbientValues(IEnumerable ceili } else { // The Ambient Property is either Fully build or not set. - // FIRST: Ask the object (via IQueryAmbient interface) if it has a value for this property. // This is usefull to prevent needless creation of empty lazy properties. var ambientCtrl = inst as XAML3.IQueryAmbient; // If there is no ambientControl or if ambientControl says YES, then get the property value. - if (ambientCtrl == null || ambientCtrl.IsAmbientPropertyAvailable(prop.Name)) + if (ambientCtrl is null || ambientCtrl.IsAmbientPropertyAvailable(prop.Name)) { returnAmbientValue = true; value = _runtime.GetValue(inst, prop); @@ -403,7 +410,7 @@ private List FindAmbientValues(IEnumerable ceili break; } - if (ceilingTypes != null) + if (ceilingTypes is not null) { if (ceilingTypes.Contains(frame.XamlType)) { @@ -413,7 +420,7 @@ private List FindAmbientValues(IEnumerable ceili lowerFrame = frame; frame = (ObjectWriterFrame)frame.Previous; - Debug.Assert(frame != null); + Debug.Assert(frame is not null); } return retList; @@ -440,9 +447,9 @@ private List FindAmbientValues(XamlType[] types, bool stopAfterFirst) { object inst = frame.Instance; - if (frame.XamlType != null && frame.XamlType.CanAssignTo(type)) + if (frame.XamlType is not null && frame.XamlType.CanAssignTo(type)) { - if (inst != null) + if (inst is not null) { retList.Add(inst); if (stopAfterFirst) @@ -454,7 +461,7 @@ private List FindAmbientValues(XamlType[] types, bool stopAfterFirst) } frame = (ObjectWriterFrame)frame.Previous; - Debug.Assert(frame != null); + Debug.Assert(frame is not null); } return retList; @@ -521,7 +528,7 @@ public XamlType ParentType public XamlType GrandParentType { - get { return (_stack.PreviousPreviousFrame != null) ? _stack.PreviousPreviousFrame.XamlType : null; } + get { return (_stack.PreviousPreviousFrame is not null) ? _stack.PreviousPreviousFrame.XamlType : null; } } public XamlMember CurrentProperty @@ -553,7 +560,7 @@ public object ParentInstance public object GrandParentInstance { - get { return (_stack.PreviousPreviousFrame != null) ? _stack.PreviousPreviousFrame.Instance : null; } + get { return (_stack.PreviousPreviousFrame is not null) ? _stack.PreviousPreviousFrame.Instance : null; } } public object CurrentCollection @@ -586,7 +593,7 @@ public bool ParentIsObjectFromMember public bool GrandParentIsObjectFromMember { - get { return (_stack.PreviousPreviousFrame != null) ? _stack.PreviousPreviousFrame.IsObjectFromMember : false; } + get { return (_stack.PreviousPreviousFrame is not null) ? _stack.PreviousPreviousFrame.IsObjectFromMember : false; } } public bool CurrentIsPropertyValueSet @@ -652,7 +659,7 @@ public string ParentInstanceRegisteredName // Used only for BeginInitHandler, in place of BaseUri. public Uri SourceBamlUri { - get { return _settings != null ? _settings.SourceBamlUri : null; } + get { return _settings is not null ? _settings.SourceBamlUri : null; } } // This specifically stores the start line number for a start object for consistency @@ -762,11 +769,12 @@ public object RootInstance get { // evaluate if _rootInstance should just always look at _rootFrame.Instance instead of caching an instance - if (_rootInstance == null) + if (_rootInstance is null) { ObjectWriterFrame rootFrame = GetTopFrame(); _rootInstance = rootFrame.Instance; } + return _rootInstance; } } @@ -784,18 +792,20 @@ private ObjectWriterFrame GetTopFrame() { frame = frame.Previous; } + return (ObjectWriterFrame)frame; } private XAML3.INameScopeDictionary LookupNameScopeDictionary(ObjectWriterFrame frame) { - if (frame.NameScopeDictionary == null) + if (frame.NameScopeDictionary is null) { - if (frame.XamlType != null && frame.XamlType.IsNameScope) + if (frame.XamlType is not null && frame.XamlType.IsNameScope) { frame.NameScopeDictionary = frame.Instance as XAML3.INameScopeDictionary ?? new NameScopeDictionary(frame.Instance as XAML3.INameScope); } - if (frame.NameScopeDictionary == null) + + if (frame.NameScopeDictionary is null) { if (frame.Depth == 1) { @@ -804,7 +814,7 @@ private XAML3.INameScopeDictionary LookupNameScopeDictionary(ObjectWriterFrame f else if (frame.Depth > 1) { if (frame.Depth == SavedDepth + 1 && - _settings != null && !_settings.RegisterNamesOnExternalNamescope) + _settings is not null && !_settings.RegisterNamesOnExternalNamescope) { frame.NameScopeDictionary = new NameScope(); } @@ -816,8 +826,9 @@ private XAML3.INameScopeDictionary LookupNameScopeDictionary(ObjectWriterFrame f } } } + // We are sure to find a name scope at the root (at least). - Debug.Assert(frame.NameScopeDictionary != null || frame.Depth == 0); + Debug.Assert(frame.NameScopeDictionary is not null || frame.Depth == 0); return frame.NameScopeDictionary; } @@ -831,16 +842,18 @@ public IEnumerable StackWalkOfNameScopes while (frame.Depth > 0) { nameScopeDictionary = LookupNameScopeDictionary(frame); - Debug.Assert(nameScopeDictionary != null); + Debug.Assert(nameScopeDictionary is not null); if (frame.NameScopeDictionary != previousNameScopeDictionary) { previousNameScopeDictionary = nameScopeDictionary; yield return nameScopeDictionary; } + frame = (ObjectWriterFrame)frame.Previous; } + // return the provided root namescope if it's different from the document root namescope - if (frame.NameScopeDictionary != null && frame.NameScopeDictionary != previousNameScopeDictionary) + if (frame.NameScopeDictionary is not null && frame.NameScopeDictionary != previousNameScopeDictionary) { yield return frame.NameScopeDictionary; } @@ -856,8 +869,10 @@ public bool IsOnTheLiveStack(object instance) { return true; } + frame = (ObjectWriterFrame)frame.Previous; } + return false; } @@ -866,7 +881,7 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame Debug.Assert(rootFrame.Depth == 1); object inst = rootFrame.Instance; - if (inst == null && rootFrame.XamlType.IsNameScope) + if (inst is null && rootFrame.XamlType.IsNameScope) { throw new InvalidOperationException(SR.NameScopeOnRootInstance); } @@ -875,10 +890,10 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame nameScopeDictionary = inst as XAML3.INameScopeDictionary; - if (nameScopeDictionary == null) + if (nameScopeDictionary is null) { XAML3.INameScope nameScope = inst as XAML3.INameScope; - if (nameScope != null) + if (nameScope is not null) { nameScopeDictionary = new NameScopeDictionary(nameScope); } @@ -886,19 +901,19 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame // If the root instance isn't a name scope // then perhaps it designated a property as the name scope. - if (nameScopeDictionary == null) + if (nameScopeDictionary is null) { XamlType xamlType = rootFrame.XamlType; - if (xamlType.UnderlyingType != null) + if (xamlType.UnderlyingType is not null) { // Get the Name Scope Property (from attribute on the class) XamlMember nameScopeProperty = TypeReflector.LookupNameScopeProperty(xamlType); - if (nameScopeProperty != null) + if (nameScopeProperty is not null) { // Read the value of the property. If it is an object we are good. // if it is null create a stock name scope dictionary object and assign it back. XAML3.INameScope nameScope = (XAML3.INameScope)_runtime.GetValue(inst, nameScopeProperty, false); - if (nameScope == null) + if (nameScope is null) { nameScopeDictionary = new NameScope(); _runtime.SetValue(inst, nameScopeProperty, nameScopeDictionary); @@ -906,7 +921,7 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame else { nameScopeDictionary = nameScope as XAML3.INameScopeDictionary; - if (nameScopeDictionary == null) + if (nameScopeDictionary is null) { nameScopeDictionary = new NameScopeDictionary(nameScope); } @@ -915,7 +930,7 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame } } - if (nameScopeDictionary == null && _settings != null + if (nameScopeDictionary is null && _settings is not null && _settings.RegisterNamesOnExternalNamescope) { ObjectWriterFrame frameZero = (ObjectWriterFrame)rootFrame.Previous; @@ -924,7 +939,7 @@ private XAML3.INameScopeDictionary HuntAroundForARootNameScope(ObjectWriterFrame // Otherwise we still need a namescope at the root of the parse // for our own usage. For IXamlNameResolver() to use. - if (nameScopeDictionary == null) + if (nameScopeDictionary is null) { nameScopeDictionary = new NameScope(); } @@ -937,7 +952,7 @@ public XamlSavedContext GetSavedContext(SavedContextType savedContextType) { // Ensure that we have a root namescope before cloning the stack ObjectWriterFrame topFrame = GetTopFrame(); - if (topFrame.NameScopeDictionary == null) + if (topFrame.NameScopeDictionary is null) { topFrame.NameScopeDictionary = LookupNameScopeDictionary(topFrame); } @@ -955,19 +970,22 @@ public object ResolveName(string name, out bool isFullyInitialized) foreach (XAML3.INameScope nameScope in StackWalkOfNameScopes) { object obj = nameScope.FindName(name); - if (obj != null) + if (obj is not null) { - if (IsInitializedCallback != null) + if (IsInitializedCallback is not null) { isFullyInitialized = IsInitializedCallback.IsFullyInitialized(obj); } - if (NameResolutionComplete || isFullyInitialized || IsInitializedCallback == null) + + if (NameResolutionComplete || isFullyInitialized || IsInitializedCallback is null) { value = obj; } + break; } } + return value; } @@ -987,15 +1005,17 @@ public IEnumerable> GetAllNamesAndValuesInScope() { continue; } + allNamesAndValues.Add(nameValuePair); } } + return allNamesAndValues; } internal void AddNameScopeInitializationCompleteSubscriber(EventHandler handler) { - if (_nameScopeInitializationCompleteSubscribers == null) + if (_nameScopeInitializationCompleteSubscribers is null) { _nameScopeInitializationCompleteSubscribers = new List(); } @@ -1009,7 +1029,7 @@ internal void AddNameScopeInitializationCompleteSubscriber(EventHandler handler) internal void RemoveNameScopeInitializationCompleteSubscriber(EventHandler handler) { var subscriber = _nameScopeInitializationCompleteSubscribers.Find(o => o.Handler == handler); - if (subscriber != null) + if (subscriber is not null) { _nameScopeInitializationCompleteSubscribers.Remove(subscriber); } @@ -1017,7 +1037,7 @@ internal void RemoveNameScopeInitializationCompleteSubscriber(EventHandler handl internal void RaiseNameScopeInitializationCompleteEvent() { - if (_nameScopeInitializationCompleteSubscribers != null) + if (_nameScopeInitializationCompleteSubscribers is not null) { EventArgs e = new EventArgs(); foreach (var subscriber in _nameScopeInitializationCompleteSubscribers) @@ -1089,12 +1109,13 @@ public object Resolve(string name) foreach (XAML3.INameScopeDictionary nameScope in _nameScopeDictionaryList) { object obj = nameScope.FindName(name); - if (obj != null) + if (obj is not null) { value = obj; break; } } + return value; } @@ -1103,7 +1124,7 @@ public object Resolve(string name, out bool isFullyInitialized) // This resolver is only used after the parse is complete, including completing // name references. So all objects are fully initialized. object result = Resolve(name); - isFullyInitialized = (result != null); + isFullyInitialized = (result is not null); return result; } @@ -1119,9 +1140,11 @@ public IEnumerable> GetAllNamesAndValuesInScope() { continue; } + allNamesAndValues.Add(nameValuePair); } } + return allNamesAndValues; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterFrame.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterFrame.cs index 3f8c67ec7d7..975c29a1230 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ObjectWriterFrame.cs @@ -4,11 +4,7 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; -using System.Xaml.MS.Impl; using XAML3 = System.Windows.Markup; namespace MS.Internal.Xaml.Context @@ -25,21 +21,22 @@ public ObjectWriterFrame() : base() { } - public ObjectWriterFrame(ObjectWriterFrame source) : base(source) { // Calling the getter will instantiate new Dictionaries. // So we just check the field instead to verify that it isn't // being used. - if (source._preconstructionPropertyValues != null) + if (source._preconstructionPropertyValues is not null) { _preconstructionPropertyValues = new Dictionary(source.PreconstructionPropertyValues); } - if (source._assignedProperties != null) + + if (source._assignedProperties is not null) { _assignedProperties = new HashSet(source.AssignedProperties); } + _key = source._key; _flags = source._flags; Instance = source.Instance; @@ -72,10 +69,10 @@ public override XamlFrame Clone() public override string ToString() { - string type = (XamlType == null) ? string.Empty : XamlType.Name; - string prop = (Member == null) ? "-" : Member.Name; - string inst = (Instance == null) ? "-" : ((Instance is string) ? Instance.ToString() : "*"); - string coll = (Collection == null) ? "-" : "*"; + string type = (XamlType is null) ? string.Empty : XamlType.Name; + string prop = (Member is null) ? "-" : Member.Name; + string inst = (Instance is null) ? "-" : ((Instance is string) ? Instance.ToString() : "*"); + string coll = (Collection is null) ? "-" : "*"; string res = string.Create(TypeConverterHelper.InvariantEnglishUS, $"{type}.{prop} inst={inst} coll={coll}"); return res; } @@ -142,10 +139,11 @@ public object Key // We use a special KeyHolder in some x:Reference scenarios. // We need to unwrap this when returning. FixupTargetKeyHolder ftkh = _key as FixupTargetKeyHolder; - if (ftkh != null) + if (ftkh is not null) { return ftkh.Key; } + return _key; } set @@ -169,17 +167,18 @@ public Dictionary PreconstructionPropertyValues { get { - if (_preconstructionPropertyValues == null) + if (_preconstructionPropertyValues is null) { _preconstructionPropertyValues = new Dictionary(); } + return _preconstructionPropertyValues; } } public bool HasPreconstructionPropertyValuesDictionary { - get { return _preconstructionPropertyValues != null; } + get { return _preconstructionPropertyValues is not null; } } /// @@ -189,10 +188,11 @@ public HashSet AssignedProperties { get { - if (_assignedProperties == null) + if (_assignedProperties is null) { _assignedProperties = new HashSet(); } + return _assignedProperties; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/SavedContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/SavedContext.cs index b24a1062224..15b359cc283 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/SavedContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/SavedContext.cs @@ -28,6 +28,7 @@ public XamlSavedContext(SavedContextType savedContextType, ObjectWriterContext o { stack.CurrentFrame.Instance = null; } + BaseUri = owContext.BaseUri; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ServiceProviderContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ServiceProviderContext.cs index 6dd79d8e99d..064a3ade587 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ServiceProviderContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/ServiceProviderContext.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Windows.Markup; using System.Xaml; @@ -13,7 +11,7 @@ namespace MS.Internal.Xaml { -internal class ServiceProviderContext : ITypeDescriptorContext, // derives from IServiceProvider + internal class ServiceProviderContext : ITypeDescriptorContext, // derives from IServiceProvider IServiceProvider, IXamlTypeResolver, IUriContext, @@ -136,7 +134,7 @@ AmbientPropertyValue IAmbientProvider.GetFirstAmbientValue( foreach (var property in properties) { - if (property == null) + if (property is null) { // we don't allow any property to be null throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); @@ -152,16 +150,16 @@ object IAmbientProvider.GetFirstAmbientValue(params XamlType[] types) foreach (var type in types) { - if (type == null) + if (type is null) { // we don't allow any type to be null throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); } } + return _xamlContext.ServiceProvider_GetFirstAmbientValue(types); } - IEnumerable IAmbientProvider.GetAllAmbientValues( IEnumerable ceilingTypes, params XamlMember[] properties) @@ -170,7 +168,7 @@ IEnumerable IAmbientProvider.GetAllAmbientValues( foreach (var property in properties) { - if (property == null) + if (property is null) { // we don't allow any property to be null throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); @@ -186,7 +184,7 @@ IEnumerable IAmbientProvider.GetAllAmbientValues(params XamlType[] types foreach (var type in types) { - if (type == null) + if (type is null) { // we don't allow any type to be null throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); @@ -206,7 +204,7 @@ IEnumerable IAmbientProvider.GetAllAmbientValues( foreach (var property in properties) { - if (property == null) + if (property is null) { // we don't allow any property to be null throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); @@ -288,6 +286,7 @@ object IXamlNameResolver.GetFixupToken(IEnumerable names, bool canAssign { return null; } + var token = new NameFixupToken(); token.CanAssignDirectly = canAssignDirectly; token.NeededNames.AddRange(names); @@ -297,7 +296,7 @@ object IXamlNameResolver.GetFixupToken(IEnumerable names, bool canAssign } // TypeConverter case (aka "Initialization") - if (_xamlContext.CurrentType == null) + if (_xamlContext.CurrentType is null) { // If this is OBJECT Initialization if (_xamlContext.ParentProperty == XamlLanguage.Initialization) @@ -362,7 +361,6 @@ object IXamlNameResolver.GetFixupToken(IEnumerable names, bool canAssign return token; } - IEnumerable> IXamlNameResolver.GetAllNamesAndValuesInScope() { return _xamlContext.GetAllNamesAndValuesInScope(); @@ -376,7 +374,6 @@ event EventHandler IXamlNameResolver.OnNameScopeInitializationComplete } remove { - _xamlContext.RemoveNameScopeInitializationCompleteSubscriber(value); } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlCommonFrame.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlCommonFrame.cs index c448429cbc5..b2a9b74d85e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlCommonFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlCommonFrame.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Xaml; namespace MS.Internal.Xaml.Context @@ -17,7 +16,7 @@ public Dictionary Namespaces { get { - if (_namespaces == null) + if (_namespaces is null) _namespaces = new Dictionary(); return _namespaces; } @@ -32,7 +31,7 @@ public XamlCommonFrame(XamlCommonFrame source) : base(source) XamlType = source.XamlType; Member = source.Member; - if (source._namespaces != null) + if (source._namespaces is not null) { SetNamespaces(source._namespaces); } @@ -42,7 +41,7 @@ public override void Reset() { XamlType = null; Member = null; - if (_namespaces != null) + if (_namespaces is not null) { _namespaces.Clear(); } @@ -58,11 +57,12 @@ public void AddNamespace(string prefix, string xamlNs) public void SetNamespaces(Dictionary namespaces) { - if (_namespaces != null) + if (_namespaces is not null) { _namespaces.Clear(); } - if (namespaces != null) + + if (namespaces is not null) { foreach (KeyValuePair ns in namespaces) { @@ -73,10 +73,11 @@ public void SetNamespaces(Dictionary namespaces) public bool TryGetNamespaceByPrefix(string prefix, out string xamlNs) { - if (_namespaces != null && _namespaces.TryGetValue(prefix, out xamlNs)) + if (_namespaces is not null && _namespaces.TryGetValue(prefix, out xamlNs)) { return true; } + xamlNs = null; return false; } @@ -88,6 +89,7 @@ public IEnumerable GetNamespacePrefixes() { _namespaceDeclarations.Add(new NamespaceDeclaration(kvp.Value, kvp.Key)); } + return _namespaceDeclarations; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlContext.cs index 5f8a5b2b998..6fd0d12ed66 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlContext.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Xaml; using System.Xaml.Schema; @@ -49,6 +46,7 @@ public XamlMember GetXamlProperty(XamlType xamlType, string propertyName, XamlTy { return null; } + XamlMember member = xamlType.GetMember(propertyName); return IsVisible(member, rootObjectType) ? member : null; } @@ -59,6 +57,7 @@ public XamlMember GetXamlAttachableProperty(XamlType xamlType, string propertyNa { return null; } + XamlMember member = xamlType.GetAttachableMember(propertyName); return IsVisible(member, null) ? member : null; } @@ -76,17 +75,19 @@ public XamlMember GetXamlAttachableProperty(XamlType xamlType, string propertyNa /// public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot) { - if (tagType == null) + if (tagType is null) { throw new XamlInternalException(SR.Format(SR.ParentlessPropertyElement, propName.ScopedName)); } + XamlMember property = null; XamlType ownerType = null; string ns = ResolveXamlNameNS(propName); - if (ns == null) + if (ns is null) { throw new XamlParseException(SR.Format(SR.PrefixNotFound, propName.Prefix)); } + XamlType rootTagType = tagIsRoot ? tagType : null; // If we have we want foo in foo.bar to match the tag @@ -99,7 +100,7 @@ public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlP if (ownerTypeMatchesGenericTagType) { property = GetInstanceOrAttachableProperty(tagType, propName.Name, rootTagType); - if (property != null) + if (property is not null) { return property; } @@ -119,7 +120,8 @@ public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlP { property = GetXamlAttachableProperty(ownerType, propName.Name); } - if (property == null) + + if (property is null) { // This is an unknown property. // We don't know for sure whether or not it's attachable, so we go with our best guess. @@ -135,6 +137,7 @@ public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlP property = CreateUnknownAttachableMember(declaringType, propName.Name); } } + return property; } @@ -154,6 +157,7 @@ public string GetAttributeNamespace(XamlPropertyName propName, string tagNamespa { ns = ResolveXamlNameNS(propName); } + return ns; } @@ -165,7 +169,7 @@ public XamlMember GetNoDotAttributeProperty(XamlType tagType, XamlPropertyName p // Second line of if just handles tagNamespace always being null from MEScanner // Correct fix is to fix MEScanner and remove second line if ((propUsageNamespace == tagNamespace) - || (tagNamespace == null && propUsageNamespace != null && tagType.GetXamlNamespaces().Contains(propUsageNamespace))) + || (tagNamespace is null && propUsageNamespace is not null && tagType.GetXamlNamespaces().Contains(propUsageNamespace))) { XamlType rootTagType = tagIsRoot ? tagType : null; property = GetXamlProperty(tagType, propName.Name, rootTagType); @@ -173,28 +177,31 @@ public XamlMember GetNoDotAttributeProperty(XamlType tagType, XamlPropertyName p // Sometimes Attached properties look like normal properties. // [Attribute case] The above lookup fails and fall into here. // - if (property == null) + if (property is null) { property = GetXamlAttachableProperty(tagType, propName.Name); } } + // Not Simple, not Attachable, look for Directives. - if (property == null && propUsageNamespace != null) + if (property is null && propUsageNamespace is not null) { // A processing attribute like; x:Key x:Name XamlDirective directive = SchemaContext.GetXamlDirective(propUsageNamespace, propName.Name); - if (directive != null) + if (directive is not null) { - if (AllowedMemberLocations.None == (directive.AllowedLocation & AllowedMemberLocations.Attribute)) + if ((directive.AllowedLocation & AllowedMemberLocations.Attribute) == AllowedMemberLocations.None) { // Need a way to surface up this usage error now that // we don't have UnknownProperty.Exception directive = new XamlDirective(propUsageNamespace, propName.Name); } + property = directive; } } - if (property == null) + + if (property is null) { if (tagNamespace == propUsageNamespace) { @@ -207,13 +214,13 @@ public XamlMember GetNoDotAttributeProperty(XamlType tagType, XamlPropertyName p property = new XamlDirective(propUsageNamespace, propName.Name); } } + return property; } - abstract public void AddNamespacePrefix(string prefix, string xamlNamespace); - abstract public string FindNamespaceByPrefix(string prefix); - abstract public IEnumerable GetNamespacePrefixes(); - + public abstract void AddNamespacePrefix(string prefix, string xamlNamespace); + public abstract string FindNamespaceByPrefix(string prefix); + public abstract IEnumerable GetNamespacePrefixes(); // -------------------- internal ------------------------ @@ -236,10 +243,11 @@ internal XamlType GetXamlType(XamlName typeName, bool returnUnknownTypesOnFailur internal XamlTypeName GetXamlTypeName(XamlName typeName) { string xamlNs = ResolveXamlNameNS(typeName); - if (xamlNs == null) + if (xamlNs is null) { throw new XamlParseException(SR.Format(SR.PrefixNotFound, typeName.Prefix)); } + return new XamlTypeName(xamlNs, typeName.Name); } @@ -256,16 +264,16 @@ internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFa internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure, bool skipVisibilityCheck) { - Debug.Assert(typeName != null, "typeName cannot be null and should have been checked before now"); - Debug.Assert(typeName.Name != null, "typeName.Name cannot be null and should have been checked before now"); - Debug.Assert(typeName.Namespace != null); + Debug.Assert(typeName is not null, "typeName cannot be null and should have been checked before now"); + Debug.Assert(typeName.Name is not null, "typeName.Name cannot be null and should have been checked before now"); + Debug.Assert(typeName.Namespace is not null); XamlType xamlType = _schemaContext.GetXamlType(typeName); - if (xamlType != null && !skipVisibilityCheck && !xamlType.IsVisibleTo(LocalAssembly)) + if (xamlType is not null && !skipVisibilityCheck && !xamlType.IsVisibleTo(LocalAssembly)) { xamlType = null; } - if (xamlType == null && returnUnknownTypesOnFailure) + if (xamlType is null && returnUnknownTypesOnFailure) { XamlType[] typeArgs = null; if (typeName.HasTypeArgs) @@ -277,8 +285,10 @@ internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFa typeArgs[i] = GetXamlTypeOrUnknown(typeNames[i]); } } + xamlType = new XamlType(typeName.Namespace, typeName.Name, typeArgs, SchemaContext); } + return xamlType; } @@ -286,10 +296,11 @@ internal Func ResolvePrefixCachedDelegate { get { - if (_resolvePrefixCachedDelegate == null) + if (_resolvePrefixCachedDelegate is null) { _resolvePrefixCachedDelegate = new Func(FindNamespaceByPrefix); } + return _resolvePrefixCachedDelegate; } } @@ -303,19 +314,21 @@ internal XamlType ResolveXamlType(string qName, bool skipVisibilityCheck) { string error; XamlTypeName typeName = XamlTypeName.ParseInternal(qName, ResolvePrefixCachedDelegate, out error); - if (typeName == null) + if (typeName is null) { throw new XamlParseException(error); } + return GetXamlType(typeName, false, skipVisibilityCheck); } internal XamlMember ResolveDirectiveProperty(string xamlNS, string name) { - if (xamlNS != null) + if (xamlNS is not null) { return SchemaContext.GetXamlDirective(xamlNS, name); } + return null; } @@ -348,6 +361,7 @@ private bool PropertyTypeMatchesGenericTagType(XamlType tagType, string tagNs, s { return false; } + XamlType propertyType = GetXamlType(propNs, propTypeName, tagType.TypeArguments); return tagType == propertyType; } @@ -355,7 +369,7 @@ private bool PropertyTypeMatchesGenericTagType(XamlType tagType, string tagNs, s private XamlMember GetInstanceOrAttachableProperty(XamlType tagType, string propName, XamlType rootTagType) { XamlMember property = GetXamlProperty(tagType, propName, rootTagType); - if (property == null) + if (property is null) { // Sometimes Attached properties look like normal properties. // The above lookup fails and fall into here. @@ -363,6 +377,7 @@ private XamlMember GetInstanceOrAttachableProperty(XamlType tagType, string prop // or: property = GetXamlAttachableProperty(tagType, propName); } + return property; } @@ -371,10 +386,11 @@ private XamlType GetXamlType(string ns, string name, IList typeArgumen XamlType[] typeArgArray = new XamlType[typeArguments.Count]; typeArguments.CopyTo(typeArgArray, 0); XamlType xamlType = _schemaContext.GetXamlType(ns, name, typeArgArray); - if (xamlType != null && !xamlType.IsVisibleTo(LocalAssembly)) + if (xamlType is not null && !xamlType.IsVisibleTo(LocalAssembly)) { xamlType = null; } + return xamlType; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserContext.cs index 3d3acfd8f2b..41363e20fdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserContext.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; using System.Reflection; using System.Xaml; using MS.Internal.Xaml.Parser; @@ -40,7 +38,7 @@ public string FindNamespaceByPrefixInParseStack(string prefix) { string xamlNs; - if (null != _prescopeNamespaces) + if (_prescopeNamespaces is not null) { if (_prescopeNamespaces.TryGetValue(prefix, out xamlNs)) { @@ -55,8 +53,10 @@ public string FindNamespaceByPrefixInParseStack(string prefix) { return xamlNs; } + frame = (XamlParserFrame)frame.Previous; } + return null; } @@ -70,10 +70,11 @@ public override string FindNamespaceByPrefix(string prefix) // in the Xml node stream the XAML parser sees. // But for normal XAML the XmlNamespaceResolver does not need to be used. - if (XmlNamespaceResolver != null) + if (XmlNamespaceResolver is not null) { return XmlNamespaceResolver(prefix); } + return FindNamespaceByPrefixInParseStack(prefix); } @@ -83,7 +84,7 @@ public override IEnumerable GetNamespacePrefixes() HashSet keys = new HashSet(); while (frame.Depth > 0) { - if (frame._namespaces != null) + if (frame._namespaces is not null) { foreach (NamespaceDeclaration namespaceDeclaration in frame.GetNamespacePrefixes()) { @@ -93,10 +94,11 @@ public override IEnumerable GetNamespacePrefixes() } } } + frame = (XamlParserFrame)frame.Previous; } - if (_prescopeNamespaces != null) + if (_prescopeNamespaces is not null) { foreach (KeyValuePair kvp in _prescopeNamespaces) { @@ -111,13 +113,13 @@ public override IEnumerable GetNamespacePrefixes() // Only pass rootObjectType if the member is being looked up on the root object internal override bool IsVisible(XamlMember member, XamlType rootObjectType) { - if (member == null) + if (member is null) { return false; } Type allowProtectedForType = null; - if (AllowProtectedMembersOnRoot && rootObjectType != null) + if (AllowProtectedMembersOnRoot && rootObjectType is not null) { allowProtectedForType = rootObjectType.UnderlyingType; } @@ -130,7 +132,7 @@ internal override bool IsVisible(XamlMember member, XamlType rootObjectType) // If the property setter is not visible, but the property getter is, treat the property // as if it were read-only - if (member.IsReadOnly || (member.Type != null && member.Type.IsUsableAsReadOnly)) + if (member.IsReadOnly || (member.Type is not null && member.Type.IsUsableAsReadOnly)) { return member.IsReadVisibleTo(LocalAssembly, allowProtectedForType); } @@ -296,12 +298,13 @@ public bool CurrentMemberIsWriteVisible() { allowProtectedForType = CurrentType.UnderlyingType; } + return CurrentMember.IsWriteVisibleTo(LocalAssembly, allowProtectedForType); } public bool CurrentTypeIsRoot { - get { return _stack.CurrentFrame.XamlType != null && _stack.Depth == 1; } + get { return _stack.CurrentFrame.XamlType is not null && _stack.Depth == 1; } } } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserFrame.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserFrame.cs index 03ce0f30bc6..aa52efe0dff 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Context/XamlParserFrame.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Reflection; using System.Xaml; using MS.Internal.Xaml.Parser; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/EventConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/EventConverter.cs index 3f21432c9b3..8f43c1aaec3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/EventConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/EventConverter.cs @@ -4,7 +4,6 @@ using System.ComponentModel; using System.Globalization; -using System.Xaml.Schema; namespace System.Xaml { @@ -22,6 +21,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext? context, Type source { return true; } + return base.CanConvertFrom(context, sourceType); } @@ -31,11 +31,12 @@ public override bool CanConvertFrom(ITypeDescriptorContext? context, Type source { GetRootObjectAndDelegateType(context, out object? rootObject, out Type? delegateType); - if (rootObject != null && delegateType != null) + if (rootObject is not null && delegateType is not null) { return Delegate.CreateDelegate(delegateType, rootObject, valueString); } } + return base.ConvertFrom(context, culture, value); } @@ -44,23 +45,25 @@ internal static void GetRootObjectAndDelegateType(ITypeDescriptorContext? contex rootObject = null; delegateType = null; - if (context == null) + if (context is null) { return; } IRootObjectProvider? rootObjectService = context.GetService(typeof(IRootObjectProvider)) as IRootObjectProvider; - if (rootObjectService == null) + if (rootObjectService is null) { return; } + rootObject = rootObjectService.RootObject; IDestinationTypeProvider? targetService = context.GetService(typeof(IDestinationTypeProvider)) as IDestinationTypeProvider; - if (targetService == null) + if (targetService is null) { return; } + delegateType = targetService.GetDestinationType(); } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAmbientProvider.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAmbientProvider.cs index b5380dca81b..ae9e81e3a9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAmbientProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAmbientProvider.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; - namespace System.Xaml { public interface IAmbientProvider diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAttachedPropertyStore.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAttachedPropertyStore.cs index 39754272a46..61cacc48247 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAttachedPropertyStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IAttachedPropertyStore.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace System.Xaml @@ -29,7 +28,7 @@ int PropertyCount // this 'name' then returns false. If the value of the attached property // for this instance with this 'name' cannot be cast to T then returns // false. - [SuppressMessage("Microsoft.Design", "CA1007")] + [SuppressMessage("Microsoft.Design", "CA1007", Justification = "Kept for compatibility.")] bool TryGetProperty(AttachableMemberIdentifier attachableMemberIdentifier, out object value); } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlLineInfo.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlLineInfo.cs index c05edfeb747..a6c7702b775 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlLineInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlLineInfo.cs @@ -13,5 +13,4 @@ public interface IXamlLineInfo int LineNumber { get; } int LinePosition { get; } } - } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNameResolver.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNameResolver.cs index a8f5700cb80..0d085c3c080 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNameResolver.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNameResolver.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; - namespace System.Xaml { public interface IXamlNameResolver diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNamespaceResolver.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNamespaceResolver.cs index b4d3d30d09a..e37035f9871 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNamespaceResolver.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlNamespaceResolver.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; - namespace System.Xaml { public interface IXamlNamespaceResolver diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlSchemaContextProvider.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlSchemaContextProvider.cs index d02cc922e0b..759f4d241bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlSchemaContextProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/IXamlSchemaContextProvider.cs @@ -10,5 +10,4 @@ public interface IXamlSchemaContextProvider { XamlSchemaContext SchemaContext { get; } } - } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/DeferredWriter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/DeferredWriter.cs index 6490ae428ca..b86b9272ad2 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/DeferredWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/DeferredWriter.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using MS.Internal.Xaml.Context; namespace System.Xaml @@ -96,6 +95,7 @@ void WriteObject(XamlType xamlType, bool fromMember, string methodName) { _deferredWriter.WriteStartObject(xamlType); } + _deferredTreeDepth += 1; _handled = true; break; @@ -127,6 +127,7 @@ public override void WriteEndObject() _deferredWriter = null; _mode = DeferringMode.TemplateReady; } + break; default: @@ -140,13 +141,14 @@ public override void WriteStartMember(XamlMember property) switch (_mode) { case DeferringMode.Off: - if (property.DeferringLoader != null) + if (property.DeferringLoader is not null) { _mode = DeferringMode.TemplateStarting; // We assume in WriteValue that this property can never be multi-valued Debug.Assert(!property.IsDirective && !property.IsUnknown); } + break; case DeferringMode.TemplateReady: @@ -209,6 +211,7 @@ public override void WriteValue(object value) _mode = DeferringMode.TemplateDeferring; goto case DeferringMode.TemplateDeferring; } + break; case DeferringMode.TemplateDeferring: @@ -252,7 +255,7 @@ protected override void Dispose(bool disposing) { if (disposing && !IsDisposed) { - if (_deferredWriter != null) + if (_deferredWriter is not null) { _deferredWriter.Close(); _deferredWriter = null; @@ -291,10 +294,11 @@ public void SetLineInfo(int lineNumber, int linePosition) goto case DeferringMode.TemplateDeferring; case DeferringMode.TemplateDeferring: - if (_deferredLineInfoConsumer != null) + if (_deferredLineInfoConsumer is not null) { _deferredLineInfoConsumer.SetLineInfo(lineNumber, linePosition); } + break; default: @@ -312,7 +316,7 @@ public bool ShouldProvideLineInfo private void StartDeferredList() { // the list may have been created already by SetLineInfo - if (_deferredList == null) + if (_deferredList is null) { _deferredList = new XamlNodeList(_context.SchemaContext); _deferredWriter = _deferredList.Writer; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlNodes.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlNodes.cs index b199f8d0566..ed2a9b23262 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlNodes.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlNodes.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Diagnostics; - namespace System.Xaml { public enum XamlNodeType:byte @@ -18,7 +16,7 @@ public enum XamlNodeType:byte EndMember, Value, NamespaceDeclaration, - }; + } internal delegate void XamlNodeAddDelegate(XamlNodeType nodeType, object data); internal delegate void XamlLineInfoAddDelegate(int lineNumber, int linePosition); @@ -83,7 +81,7 @@ public XamlNode(XamlNodeType nodeType, object data) case XamlNodeType.EndObject: case XamlNodeType.EndMember: case XamlNodeType.GetObject: - Debug.Assert(data == null, "XamlNode ctor, Internal XamlNode data must be null for this Node type"); + Debug.Assert(data is null, "XamlNode ctor, Internal XamlNode data must be null for this Node type"); break; default: @@ -153,8 +151,10 @@ public override string ToString() str += $"LineInfo: {LineInfo}"; break; } + break; } + return str; } @@ -166,6 +166,7 @@ public NamespaceDeclaration NamespaceDeclaration { return (NamespaceDeclaration)_data; } + return null; } } @@ -178,6 +179,7 @@ public XamlType XamlType { return (XamlType)_data; } + return null; } } @@ -190,6 +192,7 @@ public object Value { return _data; } + return null; } } @@ -202,6 +205,7 @@ public XamlMember Member { return (XamlMember)_data; } + return null; } } @@ -214,6 +218,7 @@ public LineInfo LineInfo { return _data as LineInfo; // might be null for EOF and EOA. } + return null; } } @@ -226,6 +231,7 @@ internal bool IsEof { return true; } + return false; } } @@ -238,6 +244,7 @@ internal bool IsEndOfAttributes { return true; } + return false; } } @@ -250,6 +257,7 @@ internal bool IsLineInfo { return true; } + return false; } } @@ -260,6 +268,7 @@ internal static bool IsEof_Helper(XamlNodeType nodeType, object data) { return false; } + if (data is InternalNodeType) { InternalNodeType internalNodeType = (InternalNodeType)data; @@ -268,6 +277,7 @@ internal static bool IsEof_Helper(XamlNodeType nodeType, object data) return true; } } + return false; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlObjectWriter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlObjectWriter.cs index fbf254616aa..aeafe4514aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlObjectWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlObjectWriter.cs @@ -6,9 +6,7 @@ using System.Collections; using System.Collections.Concurrent; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Text; using System.Xaml.MS.Impl; using System.Xaml.Schema; @@ -17,7 +15,6 @@ using MS.Internal.Xaml.Runtime; using XAML3 = System.Windows.Markup; - namespace System.Xaml { public class XamlObjectWriter : XamlWriter, IXamlLineInfoConsumer, IAddLineInfo, ICheckIfInitialized @@ -61,10 +58,11 @@ public XamlObjectWriter(XamlSchemaContext schemaContext, XamlObjectWriterSetting internal XamlObjectWriter(XamlSavedContext savedContext, XamlObjectWriterSettings settings) { ArgumentNullException.ThrowIfNull(savedContext); - if (savedContext.SchemaContext == null) + if (savedContext.SchemaContext is null) { throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext)); } + Initialize(savedContext.SchemaContext, savedContext, settings); } @@ -74,12 +72,12 @@ void Initialize(XamlSchemaContext schemaContext, XamlSavedContext savedContext, // ObjectWriter must be passed in a non-null SchemaContext. We check that here, since the CreateContext method // will create one if a null SchemaContext was passed in. ArgumentNullException.ThrowIfNull(schemaContext); - if (savedContext != null && schemaContext != savedContext.SchemaContext) + if (savedContext is not null && schemaContext != savedContext.SchemaContext) { throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext)); } - if (settings != null) + if (settings is not null) { _afterBeginInitHandler = settings.AfterBeginInitHandler; _beforePropertiesHandler = settings.BeforePropertiesHandler; @@ -94,15 +92,15 @@ void Initialize(XamlSchemaContext schemaContext, XamlSavedContext savedContext, _preferUnconvertedDictionaryKeys = settings.PreferUnconvertedDictionaryKeys; } - XAML3.INameScope rootNameScope = (settings != null) ? settings.ExternalNameScope : null; + XAML3.INameScope rootNameScope = (settings is not null) ? settings.ExternalNameScope : null; XamlRuntime runtime = CreateRuntime(settings, schemaContext); - if (savedContext != null) + if (savedContext is not null) { _context = new ObjectWriterContext(savedContext, settings, rootNameScope, runtime); } - else if (schemaContext != null) + else if (schemaContext is not null) { _context = new ObjectWriterContext(schemaContext, settings, rootNameScope, runtime); _context.AddNamespacePrefix(KnownStrings.XmlPrefix, XamlLanguage.Xml1998Namespace); @@ -111,6 +109,7 @@ void Initialize(XamlSchemaContext schemaContext, XamlSavedContext savedContext, { throw _context.WithLineInfo(new XamlInternalException()); } + _context.IsInitializedCallback = this; _deferringWriter = new DeferringWriter(_context); @@ -121,31 +120,33 @@ private XamlRuntime CreateRuntime(XamlObjectWriterSettings settings, XamlSchemaC { XamlRuntime result = null; XamlRuntimeSettings runtimeSettings = null; - if (settings != null) + if (settings is not null) { runtimeSettings = new XamlRuntimeSettings { IgnoreCanConvert = settings.IgnoreCanConvert }; - if (settings.AccessLevel != null) + if (settings.AccessLevel is not null) { result = new PartialTrustTolerantRuntime(runtimeSettings, settings.AccessLevel, schemaContext); } } - if (result == null) + + if (result is null) { - result = new ClrObjectRuntime(runtimeSettings, true /*isWriter*/); + result = new ClrObjectRuntime(runtimeSettings, isWriter: true); } + result.LineInfo = this; return result; } protected virtual void OnAfterBeginInit(object value) { - if (_afterBeginInitHandler != null) + if (_afterBeginInitHandler is not null) { // Currently SourceBamlUri exists only to address pre .NET 4.6 compat issue. It is not // null only when we load system resources like themes\generic.xaml. And only for // resources located in RD itself (as opposite to nested RDs). Thus we should never see // different non-null base and source URIs. In any case base URI is preferred. - Debug.Assert(_context.SourceBamlUri == null || _context.BaseUri == null || _context.SourceBamlUri == _context.BaseUri, + Debug.Assert(_context.SourceBamlUri is null || _context.BaseUri is null || _context.SourceBamlUri == _context.BaseUri, "Source BAML URI and base URI do not agree"); _afterBeginInitHandler(this, new XamlObjectEventArgs(value, _context.BaseUri ?? _context.SourceBamlUri, _context.LineNumber_StartObject, _context.LinePosition_StartObject)); } @@ -153,7 +154,7 @@ protected virtual void OnAfterBeginInit(object value) protected virtual void OnBeforeProperties(object value) { - if (_beforePropertiesHandler != null) + if (_beforePropertiesHandler is not null) { _beforePropertiesHandler(this, new XamlObjectEventArgs(value)); } @@ -161,7 +162,7 @@ protected virtual void OnBeforeProperties(object value) protected virtual void OnAfterProperties(object value) { - if (_afterPropertiesHandler != null) + if (_afterPropertiesHandler is not null) { _afterPropertiesHandler(this, new XamlObjectEventArgs(value)); } @@ -169,7 +170,7 @@ protected virtual void OnAfterProperties(object value) protected virtual void OnAfterEndInit(object value) { - if (_afterEndInitHandler != null) + if (_afterEndInitHandler is not null) { _afterEndInitHandler(this, new XamlObjectEventArgs(value)); } @@ -177,12 +178,13 @@ protected virtual void OnAfterEndInit(object value) protected virtual bool OnSetValue(object eventSender, XamlMember member, object value) { - if (_xamlSetValueHandler != null) + if (_xamlSetValueHandler is not null) { var e = new XAML3.XamlSetValueEventArgs(member, value); _xamlSetValueHandler(eventSender, e); return e.Handled; } + return false; } @@ -190,20 +192,22 @@ private NameFixupGraph NameFixupGraph { get { - if (_nameFixupGraph == null) + if (_nameFixupGraph is null) { _nameFixupGraph = new NameFixupGraph(); } + return _nameFixupGraph; } } private bool HasUnresolvedChildren(object parent) { - if (_nameFixupGraph == null) + if (_nameFixupGraph is null) { return false; } + return _nameFixupGraph.HasUnresolvedChildren(parent); } @@ -211,7 +215,7 @@ private Dictionary> PendingCollectionAdds { get { - if (_pendingCollectionAdds == null) + if (_pendingCollectionAdds is null) _pendingCollectionAdds = new Dictionary>(); return _pendingCollectionAdds; } @@ -221,7 +225,7 @@ private Dictionary PendingKeyConversionContexts { get { - if (_pendingKeyConversionContexts == null) + if (_pendingKeyConversionContexts is null) _pendingKeyConversionContexts = new Dictionary(); return _pendingKeyConversionContexts; } @@ -234,7 +238,7 @@ private XamlRuntime Runtime private void TryCreateParentInstance(ObjectWriterContext ctx) { - if (ctx.ParentInstance == null && ctx.ParentProperty != XamlLanguage.Arguments) + if (ctx.ParentInstance is null && ctx.ParentProperty != XamlLanguage.Arguments) { ctx.LiftScope(); Logic_CreateAndAssignToParentStart(ctx); @@ -261,16 +265,17 @@ public override void WriteGetObject() string err = SR.ValueMustBeFollowedByEndMember; throw _context.WithLineInfo(new XamlObjectWriterException(err)); } - XamlMember parentProperty = (_context.CurrentType == null && _context.Depth > 1) + + XamlMember parentProperty = (_context.CurrentType is null && _context.Depth > 1) ? _context.ParentProperty : _context.CurrentProperty; // there is a push frame below making this the parent property. - if (parentProperty == null) + if (parentProperty is null) { - XamlType xamlType = (_context.CurrentType == null && _context.Depth > 1) + XamlType xamlType = (_context.CurrentType is null && _context.Depth > 1) ? _context.ParentType : _context.CurrentType; - string err = (xamlType != null) + string err = (xamlType is not null) ? SR.Format(SR.NoPropertyInCurrentFrame_GO, xamlType.ToString()) : SR.NoPropertyInCurrentFrame_GO_noType; @@ -284,7 +289,7 @@ public override void WriteGetObject() _lastInstance = null; // A Frame is pushed by either a AddNamespace or a WriteGet/StartObject - if (_context.CurrentType != null) + if (_context.CurrentType is not null) { _context.PushScope(); } @@ -330,13 +335,14 @@ public override void WriteStartObject(XamlType xamlType) string err = SR.ValueMustBeFollowedByEndMember; throw _context.WithLineInfo(new XamlObjectWriterException(err)); } + if (xamlType.IsUnknown) { string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName()); throw _context.WithLineInfo(new XamlObjectWriterException(err)); } - if (_context.CurrentType != null && _context.CurrentProperty == null) + if (_context.CurrentType is not null && _context.CurrentProperty is null) { string err = SR.Format(SR.NoPropertyInCurrentFrame_SO, xamlType.ToString(), _context.CurrentType.ToString()); @@ -350,7 +356,7 @@ public override void WriteStartObject(XamlType xamlType) _lastInstance = null; // A Frame is pushed by either a AddNamespace or a WriteGet/StartObject - if (_context.CurrentType != null) + if (_context.CurrentType is not null) { _context.PushScope(); } @@ -362,7 +368,7 @@ public override void WriteStartObject(XamlType xamlType) // in it's constructor. The instance is already created (that is how we got into // the constructor), now don't create the first StartObject use the existing instance. // - if ((_context.LiveDepth == 1) && (_rootObjectInstance != null)) + if ((_context.LiveDepth == 1) && (_rootObjectInstance is not null)) { XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); if (!rootType.CanAssignTo(_context.CurrentType)) @@ -370,14 +376,15 @@ public override void WriteStartObject(XamlType xamlType) throw new XamlParseException(SR.Format(SR.CantAssignRootInstance, rootType.GetQualifiedName(), xamlType.GetQualifiedName())); } + _context.CurrentInstance = _rootObjectInstance; if (_context.CurrentType.IsCollection || _context.CurrentType.IsDictionary) { _context.CurrentCollection = _rootObjectInstance; } + Logic_BeginInit(_context); } - } public override void WriteEndObject() @@ -391,11 +398,12 @@ public override void WriteEndObject() { if (_deferringWriter.Mode == DeferringMode.TemplateReady) { - Debug.Assert(_context.CurrentProperty.DeferringLoader != null); + Debug.Assert(_context.CurrentProperty.DeferringLoader is not null); XamlNodeList templateList = _deferringWriter.CollectTemplateList(); _context.PushScope(); _context.CurrentInstance = (XamlReader)templateList.GetReader(); } + return; } @@ -406,12 +414,14 @@ public override void WriteEndObject() string err = SR.ValueMustBeFollowedByEndMember; throw _context.WithLineInfo(new XamlObjectWriterException(err)); } - if (_context.CurrentType == null) + + if (_context.CurrentType is null) { string err = SR.NoTypeInCurrentFrame_EO; throw _context.WithLineInfo(new XamlObjectWriterException(err)); } - if (_context.CurrentProperty != null) + + if (_context.CurrentProperty is not null) { string err = SR.Format(SR.OpenPropertyInCurrentFrame_EO, _context.CurrentType.ToString(), _context.CurrentProperty.ToString()); @@ -430,7 +440,7 @@ public override void WriteEndObject() // Create From InitText, or Create with parameters. // But, If we got to End Object and still haven't Created it, // then create it now. - if (_context.CurrentInstance == null) + if (_context.CurrentInstance is null) { Logic_CreateAndAssignToParentStart(_context); } @@ -452,15 +462,17 @@ public override void WriteEndObject() Logic_EndInit(_context); instance = _context.CurrentInstance; Logic_AssignProvidedValue(_context); - if (_context.CurrentInstanceRegisteredName != null) + if (_context.CurrentInstanceRegisteredName is not null) { // Names on MEs apply to the ME, not to the provided value - if (_nameFixupGraph != null) + if (_nameFixupGraph is not null) { TriggerNameResolution(instance, _context.CurrentInstanceRegisteredName); } + _context.CurrentInstanceRegisteredName = null; } + instance = _context.CurrentInstance; isFixupToken = instance is NameFixupToken; hasUnresolvedChildren = !isFixupToken && HasUnresolvedChildren(instance); @@ -511,6 +523,7 @@ public override void WriteEndObject() _context.ParentType)); } } + _lastInstance = _context.CurrentInstance; string name = _context.CurrentInstanceRegisteredName; @@ -530,7 +543,7 @@ public override void WriteEndObject() } else if (isFixupToken) { - if (name != null) + if (name is not null) { NameFixupToken token = (NameFixupToken)_lastInstance; if (token.FixupType == FixupType.ObjectInitializationValue && !token.CanAssignDirectly) @@ -543,7 +556,7 @@ public override void WriteEndObject() } } } - else if (_nameFixupGraph != null) + else if (_nameFixupGraph is not null) { TriggerNameResolution(_lastInstance, name); } @@ -583,18 +596,18 @@ public override void WriteStartMember(XamlMember property) { err = SR.Format(SR.CantSetUnknownProperty, property.ToString()); } - else if (_context.CurrentProperty != null) + else if (_context.CurrentProperty is not null) { err = SR.Format(SR.OpenPropertyInCurrentFrame_SM, _context.CurrentType.ToString(), _context.CurrentProperty.ToString(), property.ToString()); } - else if (_context.CurrentType == null) + else if (_context.CurrentType is null) { err = SR.Format(SR.NoTypeInCurrentFrame_SM, property.ToString()); } - if (err != null) + if (err is not null) { throw _context.WithLineInfo(new XamlObjectWriterException(err)); } @@ -606,11 +619,11 @@ public override void WriteStartMember(XamlMember property) // Duplicate Property Setting Check. // - Logic_DuplicatePropertyCheck(_context, property, false /*onParent*/); + Logic_DuplicatePropertyCheck(_context, property, onParent: false); // If we haven't created the object yet then consider creating it now. // We need an object instance to set property values on. - if (_context.CurrentInstance == null) + if (_context.CurrentInstance is null) { if (!IsConstructionDirective(_context.CurrentProperty) && !IsDirectiveAllowedOnNullInstance(_context.CurrentProperty, _context.CurrentType)) @@ -641,6 +654,7 @@ public override void WriteStartMember(XamlMember property) { throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.SettingPropertiesIsNotAllowed, property.Name))); } + // We don't allow attachable properties either, if the the Type Converter returned // a NameFixupToken. We could consider allowing this in the future by storing the // APs on the token. @@ -652,6 +666,7 @@ public override void WriteStartMember(XamlMember property) } } } + if (property.IsDirective && property != XamlLanguage.Items && property != XamlLanguage.PositionalParameters) { // Creates the container for x:Arguments (possible other future directives) If this was @@ -684,19 +699,20 @@ public override void WriteEndMember() XamlMember property; // In the Text value case we will be on the text frame // and the property is in the parent. - if (_context.CurrentType == null) + if (_context.CurrentType is null) { property = _context.ParentProperty; } + // In the Object value case we pop'ed and assigned the value already. else { property = _context.CurrentProperty; } - if (property == null) + if (property is null) { - string err = (_context.CurrentType != null) + string err = (_context.CurrentType is not null) ? SR.Format(SR.NoPropertyInCurrentFrame_EM, _context.CurrentType.ToString()) : SR.NoPropertyInCurrentFrame_EM_noType; @@ -729,14 +745,15 @@ public override void WriteEndMember() else if (property == XamlLanguage.Class) { object value = null; - if (_context.CurrentType == null) + if (_context.CurrentType is null) { value = _context.CurrentInstance; _context.PopScope(); } + Logic_ValidateXClass(_context, value); } - else if (_context.CurrentType == null) + else if (_context.CurrentType is null) { // CurrentType == null means we are in a Value Frame (under a property) // [rather than the result of some S0 sub-tree]. @@ -752,10 +769,10 @@ public override void WriteEndMember() object value = _context.CurrentInstance; bool shouldSetValue = true; - if (value != null) + if (value is not null) { XAML3.MarkupExtension me = value as XAML3.MarkupExtension; - if (me != null) + if (me is not null) { _context.CurrentInstance = me; XamlType valueXamlType = GetXamlType(value.GetType()); @@ -764,6 +781,7 @@ public override void WriteEndMember() Logic_AssignProvidedValue(_context); shouldSetValue = false; } + // If the MarkupExtension's provided value is not assigned to the property, the MarkupExtension will be assigned directly. } else // normal TC case. @@ -784,11 +802,13 @@ public override void WriteEndMember() } } } + _lastInstance = _context.CurrentInstance; if (shouldSetValue) { Logic_DoAssignmentToParentProperty(_context); } + _context.PopScope(); // Value Node Scope } @@ -810,20 +830,21 @@ public override void WriteValue(object value) // Handles the case of SM Template; V NodeList; EM if (_deferringWriter.Mode == DeferringMode.TemplateReady) { - Debug.Assert(_context.CurrentProperty.DeferringLoader != null); + Debug.Assert(_context.CurrentProperty.DeferringLoader is not null); XamlNodeList templateList = _deferringWriter.CollectTemplateList(); _context.PushScope(); _context.CurrentInstance = (XamlReader)templateList.GetReader(); } + return; } // Error Checking // XamlMember currentProperty = _context.CurrentProperty; - if (currentProperty == null) + if (currentProperty is null) { - string err = (_context.CurrentType != null) + string err = (_context.CurrentType is not null) ? SR.Format(SR.NoPropertyInCurrentFrame_V, value, _context.CurrentType.ToString()) : SR.Format(SR.NoPropertyInCurrentFrame_V_noType, value); @@ -874,11 +895,12 @@ public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration) { ThrowIfDisposed(); ArgumentNullException.ThrowIfNull(namespaceDeclaration); - if(namespaceDeclaration.Prefix == null) + if(namespaceDeclaration.Prefix is null) { throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull); } - if(namespaceDeclaration.Namespace == null) + + if(namespaceDeclaration.Namespace is null) { throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull); } @@ -898,7 +920,8 @@ public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration) string err = SR.ValueMustBeFollowedByEndMember; throw _context.WithLineInfo(new XamlObjectWriterException(err)); } - if (_context.CurrentType != null && _context.CurrentProperty == null) + + if (_context.CurrentType is not null && _context.CurrentProperty is null) { string err = SR.Format(SR.NoPropertyInCurrentFrame_NS, namespaceDeclaration.Prefix, namespaceDeclaration.Namespace, @@ -907,10 +930,11 @@ public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration) } // A Frame is pushed by either a AddNamespace or a WriteObject - if (_context.CurrentType != null) + if (_context.CurrentType is not null) { _context.PushScope(); } + _context.AddNamespacePrefix(namespaceDeclaration.Prefix, namespaceDeclaration.Namespace); } @@ -921,6 +945,7 @@ public void Clear() { _context.PopScope(); } + _rootNamescope = null; _nextNodeMustBeEndMember = false; _deferringWriter.Clear(); @@ -934,18 +959,20 @@ protected override void Dispose(bool disposing) _inDispose = true; if (disposing && !IsDisposed) { - bool seenStartObject = _context.LiveDepth > 1 || _context.CurrentType != null; + bool seenStartObject = _context.LiveDepth > 1 || _context.CurrentType is not null; if (seenStartObject) { while (_context.LiveDepth > 0) { - if (_context.CurrentProperty != null) + if (_context.CurrentProperty is not null) { WriteEndMember(); } + WriteEndObject(); } } + _deferringWriter.Close(); _deferringWriter = null; @@ -975,7 +1002,7 @@ public XAML3.INameScope RootNameScope { get { - if (_rootNamescope != null) + if (_rootNamescope is not null) { return _rootNamescope; } @@ -1045,10 +1072,11 @@ XamlException IAddLineInfo.WithLineInfo(XamlException ex) private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLineInfo lineInfo) { XamlMember keyProperty = instanceType.GetAliasedProperty(XamlLanguage.Key); - if (keyProperty == null || instance == null) + if (keyProperty is null || instance is null) { throw lineInfo.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.MissingKey, instanceType.Name))); } + object key = Runtime.GetValue(instance, keyProperty); return key; } @@ -1056,11 +1084,12 @@ private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLi private XamlType GetXamlType(Type clrType) { XamlType result = SchemaContext.GetXamlType(clrType); - if (result == null) + if (result is null) { throw new InvalidOperationException(SR.Format(SR.ObjectWriterTypeNotAllowed, SchemaContext.GetType(), clrType)); } + return result; } @@ -1094,13 +1123,15 @@ bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember, XamlType xamlType) { return true; } + if (xamlMember == XamlLanguage.Uid) { - if (null == xamlType.GetAliasedProperty(XamlLanguage.Uid)) + if (xamlType.GetAliasedProperty(XamlLanguage.Uid) is null) { return true; } } + return false; } @@ -1120,13 +1151,13 @@ private void Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) // of the rule in AssignProvideValue that skips PV() if the // parent instance is null (which is always is for Ctor params). // So Unpack and call Provide Value on items in the arguement vector here. - if (currentType.IsMarkupExtension && ctx.CurrentCtorArgs != null) + if (currentType.IsMarkupExtension && ctx.CurrentCtorArgs is not null) { object[] args = ctx.CurrentCtorArgs; for (int i = 0; i < args.Length; i++) { XAML3.MarkupExtension me = args[i] as XAML3.MarkupExtension; - if (me != null) + if (me is not null) { args[i] = Logic_PushAndPopAProvideValueStackFrame(ctx, XamlLanguage.PositionalParameters, me, false); } @@ -1142,21 +1173,21 @@ private void Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) else // with Factory Method { XamlPropertyName propertyName = XamlPropertyName.Parse((string)factoryMethodName); - if (propertyName == null) + if (propertyName is null) { string errMsg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.InvalidExpression, factoryMethodName); throw ctx.WithLineInfo(new XamlInternalException(errMsg)); } XamlType ownerType; - if (propertyName.Owner == null) + if (propertyName.Owner is null) { ownerType = currentType; } else { ownerType = ctx.GetXamlType(propertyName.Owner); - if (ownerType == null) + if (ownerType is null) { XamlTypeName ownerTypeName = ctx.GetXamlTypeName(propertyName.Owner); throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.CannotResolveTypeForFactoryMethod, ownerTypeName, propertyName.Name))); @@ -1165,7 +1196,7 @@ private void Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) inst = Runtime.CreateWithFactoryMethod(ownerType, propertyName.Name, ctx.CurrentCtorArgs); - Debug.Assert(inst != null); // runtime throws before it returns null. + Debug.Assert(inst is not null); // runtime throws before it returns null. XamlType instType = GetXamlType(inst.GetType()); if (!instType.CanAssignTo(currentType)) @@ -1173,6 +1204,7 @@ private void Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NotAssignableFrom, currentType.GetQualifiedName(), instType.GetQualifiedName()))); } } + ctx.CurrentCtorArgs = null; ctx.CurrentInstance = inst; if (currentType.IsCollection || currentType.IsDictionary) @@ -1210,7 +1242,7 @@ private void Logic_ConvertPositionalParamsToArgs(ObjectWriterContext ctx) object[] argInstances = new object[rawArgs.Count]; IList paramTypes = meType.GetPositionalParameters(rawArgs.Count); - if (null == paramTypes) + if (paramTypes is null) { // A constructor with the specified number of arguments doesn't exist string msg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.NoSuchConstructor, rawArgs.Count, meType.Name); @@ -1248,10 +1280,12 @@ private void Logic_CreateFromInitializationValue(ObjectWriterContext ctx) string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName()); throw ctx.WithLineInfo(new XamlObjectWriterException(err)); } - if (ts == null) + + if (ts is null) { throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.InitializationSyntaxWithoutTypeConverter, xamlType.GetQualifiedName()))); } + inst = Logic_CreateFromValue(ctx, ts, value, null, xamlType.Name); // Pop off the Text Frame. @@ -1266,6 +1300,7 @@ private void Logic_CreateFromInitializationValue(ObjectWriterContext ctx) { ctx.CurrentCollection = inst; } + Logic_ApplyCurrentPreconstructionPropertyValues(ctx, true); } } @@ -1291,6 +1326,7 @@ private object Logic_CreateFromValue(ObjectWriterContext ctx, XamlValueConverter { throw; } + string err = SR.Format(SR.TypeConverterFailed, targetName, value); throw lineInfo.WithLineInfo(new XamlObjectWriterException(err, ex)); } @@ -1303,11 +1339,11 @@ private bool Logic_CreatePropertyValueFromValue(ObjectWriterContext ctx) object value = ctx.CurrentInstance; XamlReader deferredContent = value as XamlReader; - if (deferredContent != null) + if (deferredContent is not null) { // property.DeferringLoader looks at the property AND the type of the property. XamlValueConverter deferringLoader = property.DeferringLoader; - if (deferringLoader != null) + if (deferringLoader is not null) { ctx.CurrentInstance = Runtime.DeferredLoad( ctx.ServiceProviderContext, deferringLoader, deferredContent); @@ -1329,22 +1365,23 @@ private bool Logic_CreatePropertyValueFromValue(ObjectWriterContext ctx) declaringType = ctx.ParentType; } - if (property != null && !property.IsUnknown && declaringType != null) + if (property is not null && !property.IsUnknown && declaringType is not null) { XamlType grandParentXamlType = ctx.GrandParentType; if (property.IsDirective && property == XamlLanguage.Key && - grandParentXamlType != null && + grandParentXamlType is not null && grandParentXamlType.IsDictionary) { converter = grandParentXamlType.KeyType.TypeConverter; } - if (converter!= null && converter.ConverterType != null && converter != BuiltInValueConverter.String) + + if (converter is not null && converter.ConverterType is not null && converter != BuiltInValueConverter.String) { TypeConverter typeConverter = Runtime.GetConverterInstance(converter); - if (typeConverter != null) + if (typeConverter is not null) { - if (declaringType.SetTypeConverterHandler != null) + if (declaringType.SetTypeConverterHandler is not null) { var eventArgs = new XAML3.XamlSetTypeConverterEventArgs(property, typeConverter, value, ctx.ServiceProviderContext, TypeConverterHelper.InvariantEnglishUS, @@ -1362,7 +1399,7 @@ private bool Logic_CreatePropertyValueFromValue(ObjectWriterContext ctx) } } - if (converter != null) + if (converter is not null) { inst = Logic_CreateFromValue(ctx, converter, value, property, property.Name); } @@ -1372,6 +1409,7 @@ private bool Logic_CreatePropertyValueFromValue(ObjectWriterContext ctx) // so pass it through to be set to the property value later. inst = value; } + ctx.CurrentInstance = inst; return true; } @@ -1396,27 +1434,31 @@ private bool Logic_ShouldConvertKey(ObjectWriterContext ctx) { return true; } + if (ctx.GrandParentShouldNotConvertChildKeys) { return false; } + XamlType dictionaryType = ctx.GrandParentType; - if (dictionaryType != null && dictionaryType.IsDictionary && + if (dictionaryType is not null && dictionaryType.IsDictionary && typeof(IDictionary).IsAssignableFrom(dictionaryType.UnderlyingType) && !IsBuiltInGenericDictionary(dictionaryType.UnderlyingType)) { return false; } + ctx.GrandParentShouldConvertChildKeys = true; return true; } private static bool IsBuiltInGenericDictionary(Type type) { - if (type == null || !type.IsGenericType) + if (type is null || !type.IsGenericType) { return false; } + Type openGeneric = type.GetGenericTypeDefinition(); return openGeneric == typeof(Dictionary<,>) || openGeneric == typeof(SortedDictionary<,>) || @@ -1430,7 +1472,7 @@ private void Logic_BeginInit(ObjectWriterContext ctx) XamlType xamlType = ctx.CurrentType; Runtime.InitializationGuard(xamlType, inst, true); - if (ctx.BaseUri != null) + if (ctx.BaseUri is not null) { Runtime.SetUriBase(xamlType, inst, ctx.BaseUri); } @@ -1525,13 +1567,13 @@ private void Logic_ApplyCurrentPreconstructionPropertyValues(ObjectWriterContext // (x:Key and x:Name need their own "saved spot" outside of PreconstructionPropertyValues) XAML3.MarkupExtension me = value as XAML3.MarkupExtension; - if (me != null && !prop.IsDirective) + if (me is not null && !prop.IsDirective) { Logic_PushAndPopAProvideValueStackFrame(ctx, prop, me, true); } else { - Logic_ApplyPropertyValue(ctx, prop, value, false /*onParent*/); + Logic_ApplyPropertyValue(ctx, prop, value, onParent: false); } } } @@ -1585,7 +1627,7 @@ private void Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, { XamlType xamlType = onParent ? ctx.ParentType : ctx.CurrentType; XamlMember propertyForDirective = xamlType.GetAliasedProperty(prop as XamlDirective); - if (prop != XamlLanguage.Key && propertyForDirective != null) + if (prop != XamlLanguage.Key && propertyForDirective is not null) { // handle aliases for x:Uid x:Lang etc. Logic_DuplicatePropertyCheck(ctx, propertyForDirective, onParent); @@ -1614,7 +1656,7 @@ private void Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, { Logic_CheckBaseUri(ctx, (string)value); ctx.BaseUri = new Uri((string)value); - if (ctx.ParentInstance != null) + if (ctx.ParentInstance is not null) { Runtime.SetUriBase(ctx.ParentType, ctx.ParentInstance, ctx.BaseUri); } @@ -1626,7 +1668,7 @@ private void Logic_CheckBaseUri(ObjectWriterContext ctx, string value) { // Make sure BaseUri is not already set and that we can only set BaseUri on the root element // Depth > 2 because on the root element, SO/SM takes 1 slot, V is slot 2 - if ((ctx.BaseUri != null) || (ctx.Depth > 2)) + if ((ctx.BaseUri is not null) || (ctx.Depth > 2)) { throw new XamlObjectWriterException(SR.CannotSetBaseUri); } @@ -1638,7 +1680,7 @@ private void Logic_CheckBaseUri(ObjectWriterContext ctx, string value) private void Logic_AssignProvidedValue(ObjectWriterContext ctx) { bool handled = Logic_ProvideValue(ctx); - if (!handled && ctx.ParentProperty != null) + if (!handled && ctx.ParentProperty is not null) { Logic_DoAssignmentToParentProperty(ctx); } @@ -1652,7 +1694,7 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) object parentInstance = ctx.ParentInstance; XamlMember parentProperty = ctx.ParentProperty; - if (parentProperty != null && parentProperty.IsUnknown == false) + if (parentProperty is not null && parentProperty.IsUnknown == false) { XamlType declaringType = null; @@ -1665,9 +1707,9 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) declaringType = ctx.ParentType; } - if (declaringType != null) + if (declaringType is not null) { - if (declaringType.SetMarkupExtensionHandler != null) + if (declaringType.SetMarkupExtensionHandler is not null) { var eventArgs = new XAML3.XamlSetMarkupExtensionEventArgs(parentProperty, me, ctx.ServiceProviderContext, parentInstance); eventArgs.CurrentType = declaringType; @@ -1679,6 +1721,7 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) } } } + // The Service Provider Interface IProvideValueTarget requires that we can supply ProvideValue with the // instance of the left-hand side of the property assignment. Markup extensions that are assigned to // directives are allowed to have a null left-hand instance. @@ -1687,7 +1730,7 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) // or it is the live root instance. ME.ProvideValue must be invoked in each case, except where a ME is the // live root instance and _skipProvideValueOnRoot is true. This allows live root instances of templates to // remain as MEs where necessary. - Debug.Assert(parentInstance != null || parentProperty != null && parentProperty.IsDirective || ctx.LiveDepth == 1); + Debug.Assert(parentInstance is not null || (parentProperty is not null && parentProperty.IsDirective) || ctx.LiveDepth == 1); object value = me; if (ctx.LiveDepth != 1 || !_skipProvideValueOnRoot) { @@ -1695,9 +1738,9 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) } // Checking that the ME isn't the Root of the XAML Document. - if (ctx.ParentProperty != null) + if (ctx.ParentProperty is not null) { - if (value != null) + if (value is not null) { if (!(value is NameFixupToken)) { @@ -1712,12 +1755,14 @@ private bool Logic_ProvideValue(ObjectWriterContext ctx) { ctx.CurrentType = ctx.ParentProperty.Type; } + ctx.CurrentInstance = value; } else { ctx.CurrentInstance = value; } + return false; } @@ -1764,21 +1809,23 @@ private void Logic_DoAssignmentToParentCollection(ObjectWriterContext ctx) // If Value is a Markup Extention then check the collection item type // if it can hold the ME then don't call ProvideValue(). XAML3.MarkupExtension me = value as XAML3.MarkupExtension; - if(me != null && !Logic_WillParentCollectionAdd(ctx, value.GetType(), true)) + if(me is not null && !Logic_WillParentCollectionAdd(ctx, value.GetType(), true)) { // We don't need to call Logic_ProvideValue() with the extra handler // interfaces, because this is collection not a scalar property. value = Runtime.CallProvideValue(me, ctx.ServiceProviderContext); } + Runtime.Add(parentCollection, collectionType, value, currentType); } } else { - if (currentType == null) + if (currentType is null) { - currentType = value == null ? collectionType.ItemType : GetXamlType(value.GetType()); + currentType = value is null ? collectionType.ItemType : GetXamlType(value.GetType()); } + object key = ctx.CurrentKey; bool keyIsSet = ctx.CurrentIsKeySet; if (!Logic_PendAssignmentToParentCollection(ctx, key, keyIsSet)) @@ -1787,6 +1834,7 @@ private void Logic_DoAssignmentToParentCollection(ObjectWriterContext ctx) { key = GetKeyFromInstance(value, currentType, this); } + Logic_AddToParentDictionary(ctx, key, value); } } @@ -1819,6 +1867,7 @@ private bool Logic_WillParentCollectionAdd(ObjectWriterContext ctx, Type type, b { return true; } + return false; } @@ -1848,6 +1897,7 @@ private void Logic_AddToParentDictionary(ObjectWriterContext ctx, object key, ob { throw; } + if (Debugger.IsLogging()) { Debug.WriteLine(SR.Format(SR.DictionaryFirstChanceException, ctx.ParentType, key, ctx.ParentType.KeyType)); @@ -1858,13 +1908,14 @@ private void Logic_AddToParentDictionary(ObjectWriterContext ctx, object key, ob // keys on this dictionary instance. ctx.ParentShouldConvertChildKeys = true; } + // Else, this is a deferred add, where the uncoverted key was saved earlier, // before the parent's ShouldConvertChildKeys flag was set. So we skip the // Add up above, and go directly to the conversion below. // Reproduce the stack as it would have been at the point when the key was originally // read, and run the type converter now. - Debug.Assert(ctx.CurrentProperty == null); + Debug.Assert(ctx.CurrentProperty is null); ctx.CurrentProperty = XamlLanguage.Key; ctx.PushScope(); ctx.CurrentInstance = key; @@ -1889,12 +1940,13 @@ private bool Logic_PendAssignmentToParentCollection(ObjectWriterContext ctx, obj NameFixupToken valueToken = value as NameFixupToken; List pendingCollection = null; - if (_pendingCollectionAdds != null) + if (_pendingCollectionAdds is not null) { PendingCollectionAdds.TryGetValue(parentCollection, out pendingCollection); } - if (pendingCollection == null && - (keyToken != null || valueToken != null || + + if (pendingCollection is null && + (keyToken is not null || valueToken is not null || HasUnresolvedChildren(key) || HasUnresolvedChildren(value))) { // We pend the add not only if the key or value are unresolved, but also if they @@ -1904,19 +1956,22 @@ private bool Logic_PendAssignmentToParentCollection(ObjectWriterContext ctx, obj pendingCollection = new List(); PendingCollectionAdds.Add(parentCollection, pendingCollection); } - if (keyToken != null) + + if (keyToken is not null) { // Set KeyHolder to null since the item is no longer on the stack, // so we won't be getting its key from the saved KeyHolder anymore keyToken.Target.KeyHolder = null; keyToken.Target.TemporaryCollectionIndex = pendingCollection.Count; } - if (valueToken != null) + + if (valueToken is not null) { Logic_PendCurrentFixupToken_SetValue(ctx, valueToken); valueToken.Target.TemporaryCollectionIndex = pendingCollection.Count; } - if (pendingCollection != null) + + if (pendingCollection is not null) { PendingCollectionAdd pendingAdd = new PendingCollectionAdd { @@ -1938,8 +1993,10 @@ private bool Logic_PendAssignmentToParentCollection(ObjectWriterContext ctx, obj PendingKeyConversionContexts.Add(parentCollection, new ObjectWriterContext(savedContext, null, null, Runtime)); } } + return true; } + return false; } @@ -1961,17 +2018,19 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) string msg = SR.Format(SR.ForwardRefDirectives, names); throw ctx.WithLineInfo(new XamlObjectWriterException(msg)); } + if (parentProperty == XamlLanguage.PositionalParameters) { ctx.CurrentType = XamlLanguage.PositionalParameterDescriptor; ctx.CurrentInstance = new PositionalParameterDescriptor(value, false); } + Logic_DoAssignmentToParentCollection(ctx); } else { object parentInstance = ctx.ParentInstance; - if (parentInstance != null) + if (parentInstance is not null) { // This checks for multi-values to single valued properties. // @@ -1985,6 +2044,7 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) ctx.ParentProperty, ctx.ParentType)); } + ctx.ParentIsPropertyValueSet = true; if (value is NameFixupToken) { @@ -1998,6 +2058,7 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) string msg = SR.Format(SR.ForwardRefDirectives, names); throw ctx.WithLineInfo(new XamlObjectWriterException(msg)); } + Logic_PendKeyFixupToken(ctx, token); } else @@ -2011,7 +2072,7 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) if (!ctx.CurrentIsObjectFromMember) { - Logic_ApplyPropertyValue(ctx, parentProperty, value, true /*onParent*/); + Logic_ApplyPropertyValue(ctx, parentProperty, value, onParent: true); // registered a named object if (parentProperty == parentType.GetAliasedProperty(XamlLanguage.Name)) @@ -2023,6 +2084,7 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) { ctx.ParentKey = value; } + // The other aliases of Uid, Lang, don't have special processing. } } @@ -2040,7 +2102,6 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) } else { - if (value is NameFixupToken) { // Only the key directive may be assigned a reference. @@ -2051,6 +2112,7 @@ private void Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) string msg = SR.Format(SR.ForwardRefDirectives, names); throw ctx.WithLineInfo(new XamlObjectWriterException(msg)); } + Logic_PendKeyFixupToken(ctx, (NameFixupToken)value); } else if (parentProperty == XamlLanguage.Key) @@ -2086,7 +2148,7 @@ private void Logic_PendKeyFixupToken(ObjectWriterContext ctx, NameFixupToken tok // if the grandparent instance is null, we're not in a dictionary, so the key will never be used // so just throw it away - if (token.Target.Instance != null) + if (token.Target.Instance is not null) { Logic_PendCurrentFixupToken_SetValue(ctx, token); } @@ -2113,7 +2175,7 @@ private void RegisterName(ObjectWriterContext ctx, string name, { XAML3.INameScope underlyingNameScope = nameScope; NameScopeDictionary nameScopeDict = nameScope as NameScopeDictionary; - if (nameScopeDict != null) + if (nameScopeDict is not null) { underlyingNameScope = nameScopeDict.UnderlyingNameScope; } @@ -2139,6 +2201,7 @@ private void RegisterName(ObjectWriterContext ctx, string name, { throw; } + throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NameScopeException, ex.Message), ex)); } } @@ -2169,13 +2232,15 @@ private void Logic_ValidateXClass(ObjectWriterContext ctx, object value) { throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveNotAtRoot, XamlLanguage.Class))); } + string className = value as string; - if (className == null) + if (className is null) { throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveMustBeString, XamlLanguage.Class))); } + object curInstance = ctx.CurrentInstance; - Type rootInstanceType = (curInstance != null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType; + Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType; if (rootInstanceType.FullName != className) { string rootNamespace = SchemaContext.GetRootNamespace(rootInstanceType.Assembly); @@ -2183,6 +2248,7 @@ private void Logic_ValidateXClass(ObjectWriterContext ctx, object value) { className = $"{rootNamespace}.{className}"; } + if (rootInstanceType.FullName != className) { throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.XClassMustMatchRootInstance, className, rootInstanceType.FullName))); @@ -2197,7 +2263,7 @@ private void Logic_AddDependencyForUnresolvedChildren(ObjectWriterContext ctx, object childThatHasUnresolvedChildren = ctx.CurrentInstance; XamlMember property = ctx.ParentProperty; - if (property != null && property.IsDirective && ctx.ParentInstance == null && property != XamlLanguage.Key) + if (property is not null && property.IsDirective && ctx.ParentInstance is null && property != XamlLanguage.Key) { // The parent instance is null, so we're in a creation directives. Forward refs // aren't allowed here. @@ -2220,7 +2286,7 @@ private NameFixupToken GetTokenForUnresolvedChildren(object childThatHasUnresolv XamlMember property, XamlSavedContext deferredMarkupExtensionContext) { NameFixupToken token = new NameFixupToken(); - if (deferredMarkupExtensionContext != null) + if (deferredMarkupExtensionContext is not null) { token.FixupType = FixupType.MarkupExtensionFirstRun; token.SavedContext = deferredMarkupExtensionContext; @@ -2229,6 +2295,7 @@ private NameFixupToken GetTokenForUnresolvedChildren(object childThatHasUnresolv { token.FixupType = FixupType.UnresolvedChildren; } + token.ReferencedObject = childThatHasUnresolvedChildren; token.Target.Property = property; return token; @@ -2236,7 +2303,7 @@ private NameFixupToken GetTokenForUnresolvedChildren(object childThatHasUnresolv private void CompleteNameReferences() { - if (_nameFixupGraph == null) + if (_nameFixupGraph is null) { return; } @@ -2247,17 +2314,19 @@ private void CompleteNameReferences() foreach (NameFixupToken token in simpleFixups) { object namedObject = token.ResolveName(token.NeededNames[0]); - if (namedObject == null) + if (namedObject is null) { - if (unresolvedRefs == null) + if (unresolvedRefs is null) { unresolvedRefs = new List(); } + unresolvedRefs.Add(token); } + // Only process if we haven't found any unresolved references. If we have, // we're going to throw, so no point in processing. - else if (unresolvedRefs == null) + else if (unresolvedRefs is null) { token.ReferencedObject = namedObject; token.NeededNames.RemoveAt(0); @@ -2270,7 +2339,8 @@ private void CompleteNameReferences() _nameFixupGraph.AddEndOfParseDependency(token.ReferencedObject, token.Target); } } - if (unresolvedRefs != null) + + if (unresolvedRefs is not null) { ThrowUnresolvedRefs(unresolvedRefs); } @@ -2289,7 +2359,7 @@ private void CompleteNameReferences() foreach (NameFixupToken token in objectDependencies) { ProcessNameFixup(token, true); - if (token.Target.Instance != null && + if (token.Target.Instance is not null && !_nameFixupGraph.HasUnresolvedChildren(token.Target.Instance)) { CompleteDeferredInitialization(token.Target); @@ -2308,6 +2378,7 @@ private void ThrowUnresolvedRefs(IEnumerable unresolvedRefs) { exceptionMessage.AppendLine(); } + exceptionMessage.Append(SR.Format(SR.UnresolvedForwardReferences, token.NeededNames[0])); if (token.LineNumber != 0) { @@ -2315,10 +2386,13 @@ private void ThrowUnresolvedRefs(IEnumerable unresolvedRefs) { exceptionMessage.Append(SR.Format(SR.LineNumberAndPosition, string.Empty, token.LineNumber, token.LinePosition)); } + exceptionMessage.Append(SR.Format(SR.LineNumberOnly, string.Empty, token.LineNumber)); } + first = false; } + throw new XamlObjectWriterException(exceptionMessage.ToString()); } @@ -2328,7 +2402,7 @@ private void TriggerNameResolution(object instance, string name) Debug.Assert(!_inNameResolution); _inNameResolution = true; #endif - Debug.Assert(_nameFixupGraph != null); + Debug.Assert(_nameFixupGraph is not null); _nameFixupGraph.ResolveDependenciesTo(instance, name); while (_nameFixupGraph.HasResolvedTokensPendingProcessing) { @@ -2340,7 +2414,7 @@ private void TriggerNameResolution(object instance, string name) // dependencies to its name now. if (token.FixupType == FixupType.ObjectInitializationValue && !token.CanAssignDirectly && - token.TargetContext.CurrentInstanceRegisteredName != null && + token.TargetContext.CurrentInstanceRegisteredName is not null && !_context.IsOnTheLiveStack(token.TargetContext.CurrentInstance)) { string convertedName = token.TargetContext.CurrentInstanceRegisteredName; @@ -2368,10 +2442,11 @@ private void TriggerNameResolution(object instance, string name) bool ICheckIfInitialized.IsFullyInitialized(object instance) { - if (instance == null) + if (instance is null) { return true; } + if (_context.LiveDepth > 0) { // An object is fully initialized if it's off the stack, and has no uninitialized children @@ -2379,7 +2454,8 @@ bool ICheckIfInitialized.IsFullyInitialized(object instance) { return false; } - return _nameFixupGraph == null || !_nameFixupGraph.HasUnresolvedOrPendingChildren(instance); + + return _nameFixupGraph is null || !_nameFixupGraph.HasUnresolvedOrPendingChildren(instance); } else { @@ -2387,7 +2463,7 @@ bool ICheckIfInitialized.IsFullyInitialized(object instance) // and remove those dependencies. But we still want to be able to inform MEs/TCs that // the named objects they're getting aren't actually fully initialized. So we save a list // of incompletely initialized objects at the point we started completing references. - return _nameFixupGraph == null || !_nameFixupGraph.WasUninitializedAtEndOfParse(instance); + return _nameFixupGraph is null || !_nameFixupGraph.WasUninitializedAtEndOfParse(instance); } } @@ -2468,6 +2544,7 @@ private void ProcessNameFixup_Reparse(NameFixupToken token, bool nameResolutionI { return; } + break; case FixupType.MarkupExtensionRerun: // Logic_ProvideValue already ran the first time, no need to rerun it @@ -2481,12 +2558,13 @@ private void ProcessNameFixup_Reparse(NameFixupToken token, bool nameResolutionI break; case FixupType.ObjectInitializationValue: Logic_CreateFromInitializationValue(owc); - if (token.TargetContext.CurrentInstanceRegisteredName != null) + if (token.TargetContext.CurrentInstanceRegisteredName is not null) { // We couldn't actually register before, because the instance hadn't been // created by the TypeConverter. So register it now. Logic_RegisterName_OnCurrent(token.TargetContext, token.TargetContext.CurrentInstanceRegisteredName); } + break; } @@ -2504,7 +2582,7 @@ private void ProcessNameFixup_Reparse(NameFixupToken token, bool nameResolutionI { ProcessNameFixup_UpdatePendingAddItem(token, owc.CurrentInstance); } - else if (token.Target.Property != null) + else if (token.Target.Property is not null) { Logic_DoAssignmentToParentProperty(owc); } @@ -2516,7 +2594,7 @@ private void ProcessNameFixup_Reparse(NameFixupToken token, bool nameResolutionI } NameFixupToken newToken = owc.CurrentInstance as NameFixupToken; - if (newToken != null) + if (newToken is not null) { // Line Info should be the same as the original token, not wherever we happen to be currently. // Also several properties on Target (IsOnTheStack, EndInstanceLineInfo, and potentially others) @@ -2536,12 +2614,13 @@ private void ProcessNameFixup_Reparse(NameFixupToken token, bool nameResolutionI private void ProcessNameFixup_UpdatePendingAddKey(NameFixupToken token, object key) { - if (token.Target.KeyHolder != null) + if (token.Target.KeyHolder is not null) { // The KeyHolder item is still on the stack, so update the KeyHolder Debug.Assert(token.Target.KeyHolder.Key == token); token.Target.KeyHolder.Key = key; } + // if the index is less than 0, the target's not a dictionary, so throw away the key else if (token.Target.TemporaryCollectionIndex >= 0) { @@ -2562,14 +2641,14 @@ private void ProcessNameFixup_UpdatePendingAddItem(NameFixupToken token, object pendingAdd.Item = item; if (!(item is NameFixupToken)) { - pendingAdd.ItemType = (item != null) ? GetXamlType(item.GetType()) : null; + pendingAdd.ItemType = (item is not null) ? GetXamlType(item.GetType()) : null; } } private void ExecutePendingAdds(XamlType instanceType, object instance) { List pendingCollection; - if (_pendingCollectionAdds != null && PendingCollectionAdds.TryGetValue(instance, out pendingCollection)) + if (_pendingCollectionAdds is not null && PendingCollectionAdds.TryGetValue(instance, out pendingCollection)) { foreach (PendingCollectionAdd pendingAdd in pendingCollection) { @@ -2586,6 +2665,7 @@ private void ExecutePendingAdds(XamlType instanceType, object instance) pendingAdd.Key = GetKeyFromInstance(pendingAdd.Item, itemType, pendingAdd); pendingAdd.KeyIsSet = true; } + if (pendingAdd.KeyIsUnconverted) { // If the Add of the unconverted key fails, we will need to convert the key. @@ -2612,8 +2692,9 @@ private void ExecutePendingAdds(XamlType instanceType, object instance) Runtime.LineInfo = oldLineInfo; } } + PendingCollectionAdds.Remove(instance); - if (_pendingKeyConversionContexts != null && _pendingKeyConversionContexts.ContainsKey(instance)) + if (_pendingKeyConversionContexts is not null && _pendingKeyConversionContexts.ContainsKey(instance)) { _pendingKeyConversionContexts.Remove(instance); } @@ -2638,6 +2719,7 @@ XamlException IAddLineInfo.WithLineInfo(XamlException ex) { ex.SetLineInfo(LineNumber, LinePosition); } + return ex; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlReaderSettings.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlReaderSettings.cs index 92ec047116a..8f661aec53b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlReaderSettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlReaderSettings.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using System.Reflection; namespace System.Xaml @@ -25,7 +24,7 @@ public XamlReaderSettings() public XamlReaderSettings(XamlReaderSettings settings) : this() { - if (settings != null) + if (settings is not null) { AllowProtectedMembersOnRoot = settings.AllowProtectedMembersOnRoot; ProvideLineInfo = settings.ProvideLineInfo; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlTextReader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlTextReader.cs index 6343201d7a8..5c22dd1c859 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlTextReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlTextReader.cs @@ -111,7 +111,7 @@ private void Initialize(XmlReader givenXmlReader, XamlSchemaContext schemaContex _endOfStreamNode = new InternalNode(InternalNodeType.EndOfStream); _context = (XamlParserContext)XamlContext.CreateContext(UsageMode.Parser, schemaContext, - _mergedSettings.LocalAssembly, false /*ignoreCanConvert*/); + _mergedSettings.LocalAssembly, ignoreCanConvert: false); XamlScanner xamlScanner = new XamlScanner(_context, myXmlReader, _mergedSettings); XamlPullParser parser = new XamlPullParser(_context, xamlScanner, _mergedSettings); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReader.cs index 74af4bd0fb3..cf349e8fd21 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReader.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Xaml.MS.Impl; using System.Xaml.Schema; @@ -88,7 +86,7 @@ public XamlXmlReader(string fileName, XamlSchemaContext schemaContext, XamlXmlRe private XmlReader CreateXmlReader(string fileName, XamlXmlReaderSettings settings) { - bool closeInput = (settings == null) ? true : settings.CloseInput; + bool closeInput = (settings is null) ? true : settings.CloseInput; return XmlReader.Create(fileName, new XmlReaderSettings { CloseInput = closeInput, DtdProcessing = DtdProcessing.Prohibit }); } @@ -122,7 +120,7 @@ public XamlXmlReader(Stream stream, XamlSchemaContext schemaContext, XamlXmlRead private XmlReader CreateXmlReader(Stream stream, XamlXmlReaderSettings settings) { - bool closeInput = (settings != null) && settings.CloseInput; + bool closeInput = (settings is not null) && settings.CloseInput; return XmlReader.Create(stream, new XmlReaderSettings { CloseInput = closeInput, DtdProcessing = DtdProcessing.Prohibit }); } @@ -156,7 +154,7 @@ public XamlXmlReader(TextReader textReader, XamlSchemaContext schemaContext, Xam private XmlReader CreateXmlReader(TextReader textReader, XamlXmlReaderSettings settings) { - bool closeInput = (settings != null) && settings.CloseInput; + bool closeInput = (settings is not null) && settings.CloseInput; return XmlReader.Create(textReader, new XmlReaderSettings { CloseInput = closeInput, DtdProcessing = DtdProcessing.Prohibit }); } @@ -164,7 +162,7 @@ private void Initialize(XmlReader givenXmlReader, XamlSchemaContext schemaContex { XmlReader myXmlReader; - _mergedSettings = (settings == null) ? new XamlXmlReaderSettings() : new XamlXmlReaderSettings(settings); + _mergedSettings = (settings is null) ? new XamlXmlReaderSettings() : new XamlXmlReaderSettings(settings); // Wrap the xmlreader with a XmlCompatReader instance to apply MarkupCompat rules. if (!_mergedSettings.SkipXmlCompatibilityProcessing) { @@ -181,38 +179,43 @@ private void Initialize(XmlReader givenXmlReader, XamlSchemaContext schemaContex // Or have already processed the markup compat and want that extra perf. myXmlReader = givenXmlReader; } + // Pick up the XmlReader settings to override the "settings" defaults. if (!string.IsNullOrEmpty(myXmlReader.BaseURI)) { _mergedSettings.BaseUri = new Uri(myXmlReader.BaseURI); } + if (myXmlReader.XmlSpace == XmlSpace.Preserve) { _mergedSettings.XmlSpacePreserve = true; } + if (!string.IsNullOrEmpty(myXmlReader.XmlLang)) { _mergedSettings.XmlLang = myXmlReader.XmlLang; } + IXmlNamespaceResolver myXmlReaderNS = myXmlReader as IXmlNamespaceResolver; Dictionary xmlnsDictionary = null; - if (myXmlReaderNS != null) + if (myXmlReaderNS is not null) { IDictionary rootNamespaces = myXmlReaderNS.GetNamespacesInScope(XmlNamespaceScope.Local); - if (rootNamespaces != null) + if (rootNamespaces is not null) { foreach (KeyValuePair ns in rootNamespaces) { - if (xmlnsDictionary == null) + if (xmlnsDictionary is null) { xmlnsDictionary = new Dictionary(); } + xmlnsDictionary[ns.Key] = ns.Value; } } } - if (schemaContext == null) + if (schemaContext is null) { schemaContext = new XamlSchemaContext(); } @@ -245,7 +248,7 @@ public override bool Read() _current = _nodeStream.Current; if (_current.NodeType == XamlNodeType.None) { - if (_current.LineInfo != null) + if (_current.LineInfo is not null) { _currentLineInfo = _current.LineInfo; } @@ -264,7 +267,8 @@ public override bool Read() _current = _endOfStreamNode; break; } - } while (_current.NodeType == XamlNodeType.None); + } + while (_current.NodeType == XamlNodeType.None); return !IsEof; } @@ -340,7 +344,7 @@ internal bool IsXmlNamespaceSupported(string xmlNamespace, out string newXmlName // We're inside of a XmlDataIsland // First, substitute in the LocalAssembly if needed - if (_mergedSettings.LocalAssembly != null) + if (_mergedSettings.LocalAssembly is not null) { string clrNs, assemblyName; if (ClrNamespaceUriParser.TryParseUri(xmlNamespace, out clrNs, out assemblyName) && @@ -353,12 +357,11 @@ internal bool IsXmlNamespaceSupported(string xmlNamespace, out string newXmlName } bool result = _context.SchemaContext.TryGetCompatibleXamlNamespace(xmlNamespace, out newXmlNamespace); - if (newXmlNamespace == null) + if (newXmlNamespace is null) { newXmlNamespace = string.Empty; } - // we need to treat all namespaces inside of XmlDataIslands as Supported. // we need to tree Freeze as known, if it is around... don't hardcode. // else if (xmlNamespace == XamlReaderHelper.PresentationOptionsNamespaceURI) diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReaderSettings.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReaderSettings.cs index ae311adcb99..e0e04b1a043 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReaderSettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/InfosetObjects/XamlXmlReaderSettings.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; - namespace System.Xaml { public class XamlXmlReaderSettings : XamlReaderSettings @@ -24,12 +22,13 @@ public XamlXmlReaderSettings() public XamlXmlReaderSettings(XamlXmlReaderSettings settings) : base(settings) { - if (settings != null) + if (settings is not null) { - if (settings._xmlnsDictionary != null) + if (settings._xmlnsDictionary is not null) { _xmlnsDictionary = new Dictionary(settings._xmlnsDictionary); } + XmlLang = settings.XmlLang; XmlSpacePreserve = settings.XmlSpacePreserve; SkipXmlCompatibilityProcessing = settings.SkipXmlCompatibilityProcessing; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/AssemblyNamespacePair.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/AssemblyNamespacePair.cs index 460efd016a4..9fc0c0b70af 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/AssemblyNamespacePair.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/AssemblyNamespacePair.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using System.Reflection; namespace System.Xaml.MS.Impl diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/XmlNsInfo.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/XmlNsInfo.cs index 6ee9da962fa..be558a9ee72 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/XmlNsInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/XmlNsInfo.cs @@ -5,9 +5,7 @@ #nullable disable using System.Collections.Concurrent; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; @@ -31,10 +29,11 @@ internal IList NsDefs { get { - if (_nsDefs == null) + if (_nsDefs is null) { _nsDefs = LoadNsDefs(); } + return _nsDefs; } } @@ -45,10 +44,11 @@ internal ConcurrentDictionary> ClrToXmlNs { get { - if (_clrToXmlNs == null) + if (_clrToXmlNs is null) { _clrToXmlNs = LoadClrToXmlNs(); } + return _clrToXmlNs; } } @@ -58,10 +58,11 @@ internal ICollection InternalsVisibleTo { get { - if (_internalsVisibleTo == null) + if (_internalsVisibleTo is null) { _internalsVisibleTo = LoadInternalsVisibleTo(); } + return _internalsVisibleTo; } } @@ -71,10 +72,11 @@ internal Dictionary OldToNewNs { get { - if (_oldToNewNs == null) + if (_oldToNewNs is null) { _oldToNewNs = LoadOldToNewNs(); } + return _oldToNewNs; } } @@ -84,10 +86,11 @@ internal Dictionary Prefixes { get { - if (_prefixes == null) + if (_prefixes is null) { _prefixes = LoadPrefixes(); } + return _prefixes; } } @@ -97,10 +100,11 @@ internal string RootNamespace { get { - if (_rootNamespace == null) + if (_rootNamespace is null) { _rootNamespace = LoadRootNamespace() ?? string.Empty; } + return _rootNamespace; } } @@ -117,12 +121,12 @@ internal XmlNsInfo(Assembly assembly, bool fullyQualifyAssemblyName) void EnsureReflectionOnlyAttributeData() { - if (_attributeData == null) + if (_attributeData is null) { // We don't scoop RefOnly assemblies out of the AppDomain; they'll always be rooted // in XamlSchemaContext._referenceAssemblies or _xmlnsInfoForUnreferencedAssemblies. // So they should never be collected. - Debug.Assert(Assembly != null, "RefOnly assemblies shouldn't be GCed"); + Debug.Assert(Assembly is not null, "RefOnly assemblies shouldn't be GCed"); _attributeData = Assembly.GetCustomAttributesData(); } } @@ -141,6 +145,7 @@ internal static string GetPreferredPrefix(string prefix1, string prefix2) { return prefix1; } + return prefix2; } @@ -149,10 +154,11 @@ IList LoadNsDefs() IList result = new List(); Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return result; } + if (assembly.ReflectionOnly) { EnsureReflectionOnlyAttributeData(); @@ -180,12 +186,13 @@ IList LoadNsDefs() LoadNsDefHelper(result, xmlns, clrns, assembly); } } + return result; } void LoadNsDefHelper(IList result, string xmlns, string clrns, Assembly assembly) { - if (string.IsNullOrEmpty(xmlns) || clrns == null) + if (string.IsNullOrEmpty(xmlns) || clrns is null) { throw new XamlSchemaException(SR.Format(SR.BadXmlnsDefinition, assembly.FullName)); } @@ -199,10 +206,11 @@ ConcurrentDictionary> LoadClrToXmlNs() XamlSchemaContext.CreateDictionary>(); Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return result; } + foreach (XmlNsDefinition nsDef in NsDefs) { IList xmlNamespaceList; @@ -211,6 +219,7 @@ ConcurrentDictionary> LoadClrToXmlNs() xmlNamespaceList = new List(); result.TryAdd(nsDef.ClrNamespace, xmlNamespaceList); } + xmlNamespaceList.Add(nsDef.XmlNamespace); } @@ -226,6 +235,7 @@ ConcurrentDictionary> LoadClrToXmlNs() string clrNsUri = ClrNamespaceUriParser.GetUri(clrToXmlNs.Key, assemblyName); nsList.Add(clrNsUri); } + // Convert to read-only lists so we can safely return these from public API MakeListsImmutable(result); return result; @@ -236,10 +246,11 @@ ICollection LoadInternalsVisibleTo() var result = new List(); Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return result; } + if (assembly.ReflectionOnly) { EnsureReflectionOnlyAttributeData(); @@ -261,15 +272,17 @@ ICollection LoadInternalsVisibleTo() LoadInternalsVisibleToHelper(result, ivAttrib.AssemblyName, assembly); } } + return result; } void LoadInternalsVisibleToHelper(List result, string assemblyName, Assembly assembly) { - if (assemblyName == null) + if (assemblyName is null) { throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo1, assembly.FullName)); } + try { result.Add(new AssemblyName(assemblyName)); @@ -278,6 +291,7 @@ void LoadInternalsVisibleToHelper(List result, string assemblyName { throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo2, assemblyName, assembly.FullName), ex); } + // AssemblyName.ctor throws FLE on malformed assembly name catch (FileLoadException ex) { @@ -290,10 +304,11 @@ Dictionary LoadOldToNewNs() Dictionary result = new Dictionary(StringComparer.Ordinal); Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return result; } + if (assembly.ReflectionOnly) { EnsureReflectionOnlyAttributeData(); @@ -333,6 +348,7 @@ void LoadOldToNewNsHelper(Dictionary result, string oldns, strin { throw new XamlSchemaException(SR.Format(SR.DuplicateXmlnsCompat, assembly.FullName, oldns)); } + result.Add(oldns, newns); } @@ -341,10 +357,11 @@ Dictionary LoadPrefixes() Dictionary result = new Dictionary(StringComparer.Ordinal); Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return result; } + if (assembly.ReflectionOnly) { EnsureReflectionOnlyAttributeData(); @@ -368,6 +385,7 @@ Dictionary LoadPrefixes() LoadPrefixesHelper(result, xmlnsPrefixAttr.XmlNamespace, xmlnsPrefixAttr.Prefix, assembly); } } + return result; } @@ -389,10 +407,11 @@ void LoadPrefixesHelper(Dictionary result, string xmlns, string string LoadRootNamespace() { Assembly assembly = Assembly; - if (assembly == null) + if (assembly is null) { return null; } + if (assembly.ReflectionOnly) { EnsureReflectionOnlyAttributeData(); @@ -404,13 +423,14 @@ string LoadRootNamespace() return cad.ConstructorArguments[0].Value as string; } } + return null; } else { RootNamespaceAttribute rootNs = (RootNamespaceAttribute) Attribute.GetCustomAttribute(assembly, typeof(RootNamespaceAttribute)); - return (rootNs == null) ? null : rootNs.Namespace; + return (rootNs is null) ? null : rootNs.Namespace; } } @@ -423,7 +443,6 @@ void MakeListsImmutable(IDictionary> dict) { dict[key] = new ReadOnlyCollection(dict[key]); } - } private class NamespaceComparer @@ -453,10 +472,11 @@ public NamespaceComparer(XmlNsInfo nsInfo, Assembly assembly) { throw new XamlSchemaException(SR.Format(SR.XmlnsCompatCycle, assembly.FullName, ns)); } + IncrementSubsumeCount(ns); ns = GetNewNs(ns); } - while (ns != null); + while (ns is not null); } } @@ -466,38 +486,42 @@ public int CompareNamespacesByPreference(string ns1, string ns2) { return 0; } + const int Prefer_NS1 = -1; const int Prefer_NS2 = 1; // If one namespace subsumes the other, favor the subsumer string newNs = GetNewNs(ns1); - while (newNs != null) + while (newNs is not null) { if (newNs == ns2) { return Prefer_NS2; } + newNs = GetNewNs(newNs); } + newNs = GetNewNs(ns2); - while (newNs != null) + while (newNs is not null) { if (newNs == ns1) { return Prefer_NS1; } + newNs = GetNewNs(newNs); } // Favor namespaces that aren't subsumed over ones that are - if (GetNewNs(ns1) == null) + if (GetNewNs(ns1) is null) { - if (GetNewNs(ns2) != null) + if (GetNewNs(ns2) is not null) { return Prefer_NS1; } } - else if (GetNewNs(ns2) == null) + else if (GetNewNs(ns2) is null) { return Prefer_NS2; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScope.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScope.cs index cea711a1e71..3cf7395b907 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScope.cs @@ -8,7 +8,6 @@ // within the logical tree section. using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.Windows.Markup; @@ -40,7 +39,7 @@ public void RegisterName(string name, object scopedElement) throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); } - if (_nameMap == null) + if (_nameMap is null) { _nameMap = new HybridDictionary(); _nameMap[name] = scopedElement; @@ -49,7 +48,7 @@ public void RegisterName(string name, object scopedElement) { object nameContext = _nameMap[name]; // first time adding the Name, set it - if (nameContext == null) + if (nameContext is null) { _nameMap[name] = scopedElement; } @@ -73,7 +72,7 @@ public void UnregisterName(string name) throw new ArgumentException(SR.NameScopeNameNotEmptyString); } - if (_nameMap?[name] == null) + if (_nameMap?[name] is null) { throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name)); } @@ -88,7 +87,7 @@ public void UnregisterName(string name) /// corresponding Context if found, else null public object FindName(string name) { - if (_nameMap == null || string.IsNullOrEmpty(name)) + if (_nameMap is null || string.IsNullOrEmpty(name)) { return null; } @@ -113,7 +112,7 @@ public object FindName(string name) public void CopyTo(KeyValuePair[] array, int arrayIndex) { - if (_nameMap == null) + if (_nameMap is null) { array = null; return; @@ -136,16 +135,18 @@ public bool Remove(KeyValuePair item) { return false; } + return Remove(item.Key); } public void Add(KeyValuePair item) { - if (item.Key == null) + if (item.Key is null) { throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item)); } - if (item.Value == null) + + if (item.Value is null) { throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Value"), nameof(item)); } @@ -155,10 +156,11 @@ public void Add(KeyValuePair item) public bool Contains(KeyValuePair item) { - if (item.Key == null) + if (item.Key is null) { throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item)); } + return ContainsKey(item.Key); } @@ -190,7 +192,7 @@ public bool ContainsKey(string key) ArgumentNullException.ThrowIfNull(key); object value = FindName(key); - return value != null; + return value is not null; } public bool Remove(string key) @@ -220,7 +222,7 @@ public ICollection Keys { get { - if (_nameMap == null) + if (_nameMap is null) { return null; } @@ -230,6 +232,7 @@ public ICollection Keys { list.Add(key); } + return list; } } @@ -238,7 +241,7 @@ public ICollection Values { get { - if (_nameMap == null) + if (_nameMap is null) { return null; } @@ -248,6 +251,7 @@ public ICollection Values { list.Add(value); } + return list; } } @@ -267,7 +271,7 @@ public KeyValuePair Current { get { - if (_enumerator == null) + if (_enumerator is null) { return default(KeyValuePair); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScopeDictionary.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScopeDictionary.cs index 18d122af503..73243f2b4e1 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScopeDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameScopeDictionary.cs @@ -5,7 +5,6 @@ #nullable disable using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.Windows.Markup; using System.Xaml.MS.Impl; @@ -49,14 +48,14 @@ public void RegisterName(string name, object scopedElement) throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); } - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { _names.Add(name); _underlyingNameScope.RegisterName(name, scopedElement); } else { - if (_nameMap == null) + if (_nameMap is null) { _nameMap = new HybridDictionary(); _nameMap[name] = scopedElement; @@ -65,7 +64,7 @@ public void RegisterName(string name, object scopedElement) { object nameContext = _nameMap[name]; - if (nameContext == null) + if (nameContext is null) { _nameMap[name] = scopedElement; } @@ -84,14 +83,14 @@ public void UnregisterName(string name) if (name.Length == 0) throw new ArgumentException(SR.NameScopeNameNotEmptyString); - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { _underlyingNameScope.UnregisterName(name); _names.Remove(name); } else { - if (_nameMap != null && _nameMap[name] != null) + if (_nameMap is not null && _nameMap[name] is not null) { _nameMap.Remove(name); } @@ -109,16 +108,17 @@ public object FindName(string name) if (name.Length == 0) throw new ArgumentException(SR.NameScopeNameNotEmptyString); - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { return _underlyingNameScope.FindName(name); } else { - if (_nameMap == null) + if (_nameMap is null) { return null; } + return _nameMap[name]; } } @@ -139,13 +139,13 @@ public Enumerator(NameScopeDictionary nameScopeDictionary) _underlyingNameScope = nameScopeDictionary._underlyingNameScope; _names = nameScopeDictionary._names; - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { index = -1; } else { - if (_nameMap != null) + if (_nameMap is not null) { dictionaryEnumerator = _nameMap.GetEnumerator(); } @@ -161,14 +161,14 @@ public KeyValuePair Current { get { - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { string name = _names[index]; return new KeyValuePair(name, _underlyingNameScope.FindName(name)); } else { - if (_nameMap != null) + if (_nameMap is not null) { return new KeyValuePair((string)dictionaryEnumerator.Key, dictionaryEnumerator.Value); } @@ -180,7 +180,7 @@ public KeyValuePair Current public bool MoveNext() { - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { if (index == _names.Count - 1) { @@ -192,7 +192,7 @@ public bool MoveNext() } else { - if (_nameMap != null) + if (_nameMap is not null) { return dictionaryEnumerator.MoveNext(); } @@ -211,7 +211,7 @@ object IEnumerator.Current void IEnumerator.Reset() { - if (_underlyingNameScope != null) + if (_underlyingNameScope is not null) { index = -1; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameValidationHelper.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameValidationHelper.cs index c05379bef68..a0b2fa365bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameValidationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NameValidationHelper.cs @@ -55,6 +55,7 @@ internal static bool IsValidIdentifierName(string name) return false; } } + return true; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NamespaceDeclaration.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NamespaceDeclaration.cs index 8148049fa18..09b04ed7da0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NamespaceDeclaration.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/NamespaceDeclaration.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Diagnostics; - namespace System.Xaml { [DebuggerDisplay("Prefix={Prefix} Namespace={Namespace}")] diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameParser.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameParser.cs index d66ffb6e590..d9fa7bb8bf4 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameParser.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.Serialization; using System.Xaml.Schema; @@ -64,6 +61,7 @@ public static XamlTypeName ParseIfTrivalName(string text, Func p error = SR.Format(SR.PrefixNotFound, prefix); return null; } + XamlTypeName xamlTypeName = new XamlTypeName(ns, simpleName); return xamlTypeName; } @@ -95,6 +93,7 @@ public XamlTypeName ParseName(string text, out string error) { typeName = CollectNameFromStack(); } + return typeName; } @@ -124,6 +123,7 @@ public IList ParseList(string text, out string error) { typeNameList = CollectNameListFromStack(); } + return typeNameList; } @@ -143,6 +143,7 @@ private void P_XamlTypeName() { ThrowOnBadInput(); } + P_SimpleTypeName(); // Optional @@ -160,7 +161,6 @@ private void P_XamlTypeName() Callout_EndOfType(); } - // SimpleTypeName ::= (Prefix ‘:’)? TypeName // private void P_SimpleTypeName() @@ -183,10 +183,11 @@ private void P_SimpleTypeName() { ThrowOnBadInput(); } + name = _scanner.MultiCharTokenText; _scanner.Read(); - } + Callout_FoundName(prefix, name); } @@ -206,6 +207,7 @@ private void P_TypeParameters() { ThrowOnBadInput(); } + _scanner.Read(); } @@ -276,10 +278,11 @@ void Callout_EndOfType() XamlTypeName typeName = new XamlTypeName(frame.Namespace, frame.Name, frame.TypeArgs); frame = _stack.Peek(); - if (frame.TypeArgs == null) + if (frame.TypeArgs is null) { frame.AllocateTypeArgs(); } + frame.TypeArgs.Add(typeName); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameScanner.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameScanner.cs index dd1f62f195b..83c67646a21 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameScanner.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/GenericTypeNameScanner.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Diagnostics; using System.Xaml.MS.Impl; namespace MS.Internal.Xaml.Parser @@ -68,11 +66,13 @@ public void Read() _token = GenericTypeNameScannerToken.NAME; _state = State.START; } + if (_state == State.INSUBSCRIPT) { _token = GenericTypeNameScannerToken.ERROR; _state = State.START; } + break; } @@ -91,6 +91,7 @@ public void Read() break; } } + if (_token == GenericTypeNameScannerToken.NAME || _token == GenericTypeNameScannerToken.SUBSCRIPT) { _tokenText = CollectMultiCharToken(); @@ -112,6 +113,7 @@ internal static int ParseSubscriptSegment(string subscript, ref int pos) { return 0; } + openBracketFound = true; break; case Comma: @@ -119,6 +121,7 @@ internal static int ParseSubscriptSegment(string subscript, ref int pos) { return 0; } + rank++; break; case CloseBracket: @@ -126,6 +129,7 @@ internal static int ParseSubscriptSegment(string subscript, ref int pos) { return 0; } + pos++; return rank; default: @@ -134,8 +138,10 @@ internal static int ParseSubscriptSegment(string subscript, ref int pos) { return 0; } + break; } + pos++; } while (pos < subscript.Length); @@ -152,6 +158,7 @@ internal static string StripSubscript(string typeName, out string subscript) subscript = null; return typeName; } + subscript = typeName.Substring(openBracketNdx); return typeName.Substring(0, openBracketNdx); } @@ -200,8 +207,10 @@ private void State_Start() { _token = GenericTypeNameScannerToken.ERROR; } + break; } + _lastChar = CurrentChar; Advance(); } @@ -251,8 +260,10 @@ private void State_InName() { _token = GenericTypeNameScannerToken.ERROR; } + break; } + _lastChar = CurrentChar; Advance(); } @@ -287,8 +298,10 @@ private void State_InSubscript() { _token = GenericTypeNameScannerToken.ERROR; } + break; } + _lastChar = CurrentChar; Advance(); } @@ -314,12 +327,12 @@ private string CollectMultiCharToken() { return _inputText; } + string result = _inputText.Substring(_multiCharTokenStartIdx, _multiCharTokenLength); return result; } } - internal class Sample_StringParserBase { protected const char NullChar = '\0'; @@ -351,6 +364,7 @@ protected bool Advance() _idx = _inputText.Length; return false; } + return true; } @@ -366,6 +380,7 @@ protected static bool IsWhitespaceChar(char ch) { return true; } + return false; } @@ -378,6 +393,7 @@ protected bool AdvanceOverWhitespace() sawWhitespace = true; Advance(); } + return sawWhitespace; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MePullParser.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MePullParser.cs index afc10fc3cc5..6b3a2acd2d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MePullParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MePullParser.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; using MS.Internal.Xaml.Context; @@ -47,16 +44,19 @@ public IEnumerable Parse(string text, int lineNumber, int linePosition { yield return node; } + if (!f.found) { string brokenRule = _brokenRule; _brokenRule = null; throw new XamlParseException(_tokenizer, brokenRule); } + if (_tokenizer.Token != MeTokenType.None) { throw new XamlParseException(_tokenizer, SR.UnexpectedTokenAfterME); } + if (_tokenizer.HasTrailingWhitespace) { throw new XamlParseException(_tokenizer, SR.WhitespaceAfterME); @@ -79,6 +79,7 @@ private bool Expect(MeTokenType token, string ruleString) SetBrokenRuleString(ruleString); return false; } + return true; } @@ -121,6 +122,7 @@ private IEnumerable P_MarkupExtension(Found f) { yield return node; } + break; default: @@ -165,6 +167,7 @@ private IEnumerable P_Arguments(Found f) { yield return node; } + f.found = f2.found; if (f.found) { @@ -186,6 +189,7 @@ private IEnumerable P_Arguments(Found f) yield return node; } } + break; // Arguments ::= (PositionalArgs ( ',' NamedArgs)?) | @ NamedArgs @@ -194,6 +198,7 @@ private IEnumerable P_Arguments(Found f) { yield return node; } + f.found = f2.found; break; @@ -226,11 +231,13 @@ private IEnumerable P_PositionalArgs(Found f) { yield return node; } + if (!f2.found) { SetBrokenRuleString("PositionalArgs ::= (NamedArg | (@Value (',' PositionalArgs)?)"); break; } + f.found = f2.found; // PositionalArgs ::= (Value @ (',' PositionalArgs)?) | NamedArg @@ -246,13 +253,16 @@ private IEnumerable P_PositionalArgs(Found f) { yield return node; } + if (!f3.found) { SetBrokenRuleString("PositionalArgs ::= (Value (',' @ PositionalArgs)?) | NamedArg"); break; } + // no f.found this is optional } + break; // PositionalArgs ::= (Value (',' PositionalArgs)?) | @ NamedArg @@ -261,14 +271,17 @@ private IEnumerable P_PositionalArgs(Found f) { yield return Logic_EndPositionalParameters(); } + foreach (XamlNode node in P_NamedArg(f2)) { yield return node; } + if (!f2.found) { SetBrokenRuleString("PositionalArgs ::= (Value (',' PositionalArgs)?) | @ NamedArg"); } + f.found = f2.found; break; @@ -293,6 +306,7 @@ private IEnumerable P_NamedArgs(Found f) { yield return node; } + f.found = f2.found; // NamedArgs ::= NamedArg @( ',' NamedArg )* @@ -307,6 +321,7 @@ private IEnumerable P_NamedArgs(Found f) yield return node; } } + break; default: @@ -339,6 +354,7 @@ private IEnumerable P_Value(Found f) { yield return node; } + f.found = true; NextToken(); break; @@ -349,6 +365,7 @@ private IEnumerable P_Value(Found f) { yield return node; } + f.found = f2.found; break; @@ -392,6 +409,7 @@ private IEnumerable P_NamedArg(Found f) { yield return node; } + f.found = true; NextToken(); break; @@ -402,13 +420,14 @@ private IEnumerable P_NamedArg(Found f) { yield return node; } + f.found = f2.found; break; case MeTokenType.PropertyName: { string error; - if (_context.CurrentMember == null) + if (_context.CurrentMember is null) { error = SR.Format(SR.MissingComma1, _tokenizer.TokenText); } @@ -416,6 +435,7 @@ private IEnumerable P_NamedArg(Found f) { error = SR.Format(SR.MissingComma2, _context.CurrentMember.Name, _tokenizer.TokenText); } + throw new XamlParseException(_tokenizer, error); } @@ -423,11 +443,11 @@ private IEnumerable P_NamedArg(Found f) SetBrokenRuleString("NamedArg ::= PROPERTYNAME '=' @(STRING | QUOTEDMARKUPEXTENSION | MarkupExtension)"); break; } + yield return Logic_EndMember(); } } - // ================================================ private void NextToken() @@ -440,7 +460,6 @@ private int LineNumber get { return _tokenizer.LineNumber; } } - private int LinePosition { get { return _tokenizer.LinePosition; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MeScanner.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MeScanner.cs index 22bd1dd8334..f66556f8caf 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MeScanner.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/MeScanner.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text; using System.Xaml; using System.Xaml.MS.Impl; @@ -28,7 +25,7 @@ enum MeTokenType PropertyName, // String - Preceeds a '='. {},= delimited, can (but shouldn't) contain spaces. String, // String - all other strings, {},= delimited can contain spaces. QuotedMarkupExtension // String - must be recursivly parsed as a MarkupExtension. - }; + } // 1) Value and (propertynames for compatibility with WPF 3.0) can also have // escaped character with '\' to include '{' '}' ',' '=', and '\'. @@ -161,6 +158,7 @@ public void Read() _token = MeTokenType.Open; _state = StringState.Type; // types follow '{' } + break; case Quote1: @@ -172,8 +170,10 @@ public void Read() { isQuotedMarkupExtension = true; } + PushBack(); // put back the read-ahead. } + readString = true; // read substring" break; @@ -197,6 +197,7 @@ public void Read() ++_context.CurrentBracketModeParseParameters.CurrentConstructorParam < _context.CurrentBracketModeParseParameters.MaxConstructorParams; } + break; default: @@ -207,7 +208,7 @@ public void Read() if(readString) { if (_context.CurrentType.IsMarkupExtension - && _context.CurrentBracketModeParseParameters != null + && _context.CurrentBracketModeParseParameters is not null && _context.CurrentBracketModeParseParameters.IsConstructorParsingMode) { int currentCtrParam = _context.CurrentBracketModeParseParameters.CurrentConstructorParam; @@ -233,6 +234,7 @@ public void Read() ResolvePropertyName(str); break; } + _state = StringState.Value; _tokenText = RemoveEscapes(str); } @@ -277,7 +279,8 @@ private static string RemoveEscapes(string value) // pick up again after that start = idx + 2; } - } while (start < value.Length); + } + while (start < value.Length); string result = builder.ToString(); return result; } @@ -286,7 +289,7 @@ private void ResolveTypeName(string longName) { string error; XamlTypeName typeName = XamlTypeName.ParseInternal(longName, _context.FindNamespaceByPrefix, out error); - if (typeName == null) + if (typeName is null) { throw new XamlParseException(this, error); } @@ -296,9 +299,9 @@ private void ResolveTypeName(string longName) typeName.Name = typeName.Name + KnownStrings.Extension; XamlType xamlType = _context.GetXamlType(typeName, false); // This would be cleaner if we moved the Extension fallback logic out of XSC - if (xamlType == null || + if (xamlType is null || // Guard against Extension getting added twice - (xamlType.UnderlyingType != null && + (xamlType.UnderlyingType is not null && KS.Eq(xamlType.UnderlyingType.Name, typeName.Name + KnownStrings.Extension))) { typeName.Name = bareTypeName; @@ -312,7 +315,7 @@ private void ResolveTypeName(string longName) private void ResolvePropertyName(string longName) { XamlPropertyName propName = XamlPropertyName.Parse(longName); - if (propName == null) + if (propName is null) { throw new ArgumentException(SR.MalformedPropertyName); } @@ -324,15 +327,17 @@ private void ResolvePropertyName(string longName) if (propName.IsDotted) { - prop = _context.GetDottedProperty(tagType, tagNamespace, propName, false /*tagIsRoot*/); + prop = _context.GetDottedProperty(tagType, tagNamespace, propName, tagIsRoot: false); } + // Regular property p else { string ns = _context.GetAttributeNamespace(propName, Namespace); declaringType = _context.CurrentType; - prop = _context.GetNoDotAttributeProperty(declaringType, propName, Namespace, ns, false /*tagIsRoot*/); + prop = _context.GetNoDotAttributeProperty(declaringType, propName, Namespace, ns, tagIsRoot: false); } + _tokenProperty = prop; } @@ -375,9 +380,10 @@ private string ReadString() break; // we are done. } } + // If we are inside of MarkupExtensionBracketCharacters for a particular property or position parameter, // scoop up everything inside one by one, and keep track of nested Bracket Characters in the stack. - else if (_context.CurrentBracketModeParseParameters != null && _context.CurrentBracketModeParseParameters.IsBracketEscapeMode) + else if (_context.CurrentBracketModeParseParameters is not null && _context.CurrentBracketModeParseParameters.IsBracketEscapeMode) { Stack bracketCharacterStack = _context.CurrentBracketModeParseParameters.BracketCharacterStack; if (_currentSpecialBracketCharacters.StartsEscapeSequence(ch)) @@ -421,6 +427,7 @@ private string ReadString() done = true; // we are done. break; } + sb.Append(ch); break; @@ -438,6 +445,7 @@ private string ReadString() braceCount--; sb.Append(ch); } + break; case Comma: done = true; // we are done. @@ -458,12 +466,13 @@ private string ReadString() { throw new XamlParseException(this, SR.QuoteCharactersOutOfPlace); } + quoteChar = ch; wasQuoted = true; break; default: // All other character (including whitespace) - if (_currentSpecialBracketCharacters != null && _currentSpecialBracketCharacters.StartsEscapeSequence(ch)) + if (_currentSpecialBracketCharacters is not null && _currentSpecialBracketCharacters.StartsEscapeSequence(ch)) { Stack bracketCharacterStack = _context.CurrentBracketModeParseParameters.BracketCharacterStack; @@ -494,6 +503,7 @@ private string ReadString() break; // we are done. } } + atStart = false; Advance(); } @@ -532,6 +542,7 @@ private char NextChar { return _inputText[_idx + 1]; } + return NullChar; } } @@ -544,6 +555,7 @@ private bool Advance() _idx = _inputText.Length; return false; } + return true; } @@ -559,6 +571,7 @@ private static bool IsWhitespaceChar(char ch) { return true; } + return false; } @@ -590,7 +603,7 @@ private void PushBack() private SpecialBracketCharacters GetBracketCharacterForProperty(string propertyName) { SpecialBracketCharacters bracketCharacters = null; - if (_context.CurrentEscapeCharacterMapForMarkupExtension != null && + if (_context.CurrentEscapeCharacterMapForMarkupExtension is not null && _context.CurrentEscapeCharacterMapForMarkupExtension.ContainsKey(propertyName)) { bracketCharacters = _context.CurrentEscapeCharacterMapForMarkupExtension[propertyName]; @@ -607,7 +620,7 @@ internal BracketModeParseParameters(XamlParserContext context) CurrentConstructorParam = 0; IsBracketEscapeMode = false; BracketCharacterStack = new Stack(); - if (context.CurrentLongestConstructorOfMarkupExtension != null) + if (context.CurrentLongestConstructorOfMarkupExtension is not null) { IsConstructorParsingMode = context.CurrentLongestConstructorOfMarkupExtension.Length > 0; MaxConstructorParams = context.CurrentLongestConstructorOfMarkupExtension.Length; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NamespacePrefixLookup.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NamespacePrefixLookup.cs index 0550e68ccd5..4b568689fa1 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NamespacePrefixLookup.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NamespacePrefixLookup.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; using System.Xaml; namespace MS.Internal.Xaml.Parser @@ -27,9 +25,11 @@ public string LookupPrefix(string ns) { // we really shouldn't generate extraneous new namespaces string newPrefix; - do { + do + { newPrefix = $"prefix{n++}"; - } while (_nsResolver(newPrefix) != null); + } + while (_nsResolver(newPrefix) is not null); _newNamespaces.Add(new NamespaceDeclaration(ns, newPrefix)); return newPrefix; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NodeStreamSorter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NodeStreamSorter.cs index 10527389091..98ec1e8372e 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NodeStreamSorter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/NodeStreamSorter.cs @@ -4,10 +4,7 @@ #nullable disable -using System; using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; using System.Xaml.MS.Impl; using MS.Internal.Xaml.Context; @@ -45,6 +42,7 @@ private void InitializeObjectFrameStack() { _seenStack.Add(new SeenCtorDirectiveFlags()); } + _seenStack[0].SeenInstancingProperty = false; _seenStack[0].SeenOutOfOrderCtorDirective = false; } @@ -56,6 +54,7 @@ private void StartObjectFrame() { _seenStack.Add(new SeenCtorDirectiveFlags()); } + _seenStack[_startObjectDepth].SeenInstancingProperty = false; _seenStack[_startObjectDepth].SeenOutOfOrderCtorDirective = false; } @@ -131,6 +130,7 @@ public bool MoveNext() { return false; } + _current = _source.Current; if (_current.NodeType == XamlNodeType.StartObject) { @@ -142,8 +142,10 @@ public bool MoveNext() _current = _buffer.Dequeue(); } } + // Skip over "End Of Attributes" nodes. - } while (_current.IsEndOfAttributes); + } + while (_current.IsEndOfAttributes); return true; } @@ -194,6 +196,7 @@ private void StartNewNodeStreamWithSettingsPreamble() { _buffer.Enqueue(node); } + break; default: break; @@ -203,13 +206,13 @@ private void StartNewNodeStreamWithSettingsPreamble() private void EnqueueInitialExtraXmlNses() { - if (_xmlnsDictionary != null) + if (_xmlnsDictionary is not null) { foreach (string prefix in _xmlnsDictionary.Keys) { // Skip any prefixes in the settings that were already defined // in the XML text (on the root node) - if (_context.FindNamespaceByPrefixInParseStack(prefix) == null) + if (_context.FindNamespaceByPrefixInParseStack(prefix) is null) { string uriString = _xmlnsDictionary[prefix]; XamlNode node = new XamlNode(XamlNodeType.NamespaceDeclaration, new NamespaceDeclaration(uriString, prefix)); @@ -229,11 +232,13 @@ private void EnqueueInitialXmlState() { EnqueueOneXmlDirectiveProperty(XamlLanguage.Space, KnownStrings.Preserve); } + if (!string.IsNullOrEmpty(_settings.XmlLang)) { EnqueueOneXmlDirectiveProperty(XamlLanguage.Lang, _settings.XmlLang); } - if (_settings.BaseUri != null) + + if (_settings.BaseUri is not null) { EnqueueOneXmlDirectiveProperty(XamlLanguage.Base, _settings.BaseUri.ToString()); } @@ -272,10 +277,11 @@ private void ReadAheadAndSortCtorProperties() // then dig in and correct the stream. // // if (HaveSeenOutOfOrderCtorDirective) - if(_moveList != null) + if(_moveList is not null) { SortContentsOfReadAheadBuffer(); } + return; } @@ -301,6 +307,7 @@ private void ReadAheadToEndOfAttributes() { throw new InvalidOperationException("premature end of stream before EoA"); } + node = _source.Current; switch (node.NodeType) { @@ -314,6 +321,7 @@ private void ReadAheadToEndOfAttributes() { done = true; } + break; case XamlNodeType.None: @@ -324,6 +332,7 @@ private void ReadAheadToEndOfAttributes() done = true; } } + break; case XamlNodeType.StartMember: @@ -334,15 +343,17 @@ private void ReadAheadToEndOfAttributes() CheckForOutOfOrderCtorDirectives(node); } } + break; case XamlNodeType.EndMember: propertyDepth -= 1; break; } - _buffer.Enqueue(node); - } while (!done); + _buffer.Enqueue(node); + } + while (!done); } // After the End of Attributes is found continue to buffer nodes @@ -359,6 +370,7 @@ private void ReadAheadToFirstInstancingProperty() { throw new InvalidOperationException("premature end of stream after EoA"); } + XamlNode node = _source.Current; switch (node.NodeType) { @@ -371,6 +383,7 @@ private void ReadAheadToFirstInstancingProperty() done = true; } } + break; case XamlNodeType.EndMember: @@ -384,10 +397,13 @@ private void ReadAheadToFirstInstancingProperty() // Exit loop normaly so we Enqueue the EndObject. done = true; } + break; } + _buffer.Enqueue(node); - } while (!done); + } + while (!done); } // This updates the state of instancing vs. construction controling @@ -401,19 +417,22 @@ private bool CheckForOutOfOrderCtorDirectives(XamlNode node) if (HaveSeenInstancingProperty) { HaveSeenOutOfOrderCtorDirective = true; - if (_moveList == null) + if (_moveList is null) { _moveList = new List(); } + _moveList.Add(_buffer.Count); // mark the current position as needing fixup } } + // Anything else except x:Key is an instancing member. else if (!(prop.IsDirective && prop == XamlLanguage.Key)) { HaveSeenInstancingProperty = true; isInstancingProperty = true; } + return isInstancingProperty; } @@ -423,6 +442,7 @@ private bool IsCtorDirective(XamlMember member) { return false; } + if ((member == XamlLanguage.Initialization) || (member == XamlLanguage.PositionalParameters) || (member == XamlLanguage.FactoryMethod) @@ -432,6 +452,7 @@ private bool IsCtorDirective(XamlMember member) { return true; } + return false; } @@ -441,10 +462,12 @@ private bool IsInstancingMember(XamlMember member) { return false; } + if (member.IsDirective && member == XamlLanguage.Key) { return false; } + // Actually... // XamlLanguage.Uid, if the type has no UidProperty is not "instancing". // But it might be slower to track the current type and lookup the UidProperty @@ -498,6 +521,7 @@ private void BuildSortingBuffer() case XamlNodeType.StartMember: break; } + _sortingInfoArray[i] = rInfo; } } @@ -509,6 +533,7 @@ private void ReloadSortedBuffer() int xamlIndex = _sortingInfoArray[idx].OriginalOrderIndex; _buffer.Enqueue(_originalNodesInOrder[xamlIndex]); } + _sortingInfoArray = null; } @@ -540,6 +565,7 @@ private bool MoveList_RemoveStartMemberIndexWithGreatestDepth(out int deepestCto { return false; } + for (int i = 0; i < _moveList.Count; i++) { int ctorIdx = _moveList[i]; @@ -550,6 +576,7 @@ private bool MoveList_RemoveStartMemberIndexWithGreatestDepth(out int deepestCto deepestIdx = i; } } + Debug.Assert(deepestIdx != -1); _moveList.RemoveAt(deepestIdx); return true; @@ -595,10 +622,12 @@ private bool AdvanceToNextInstancingMember(int current, int depth, out int end) { return false; } + current = end; originalIdx = _sortingInfoArray[current].OriginalOrderIndex; nextMember = _originalNodesInOrder[originalIdx].Member; } + return true; } @@ -615,10 +644,12 @@ private bool AdvanceToNextCtorDirective(int current, int depth, out int end) { return false; } + current = end; originalIdx = _sortingInfoArray[current].OriginalOrderIndex; member = _originalNodesInOrder[originalIdx].Member; } + return true; } @@ -641,10 +672,12 @@ private int AdvanceOverNoninstancingDirectives(int start, int depth) Debug.Assert(false, "Missing End Object in node sorter"); } } + current = end; originalIdx = _sortingInfoArray[current].OriginalOrderIndex; nextMember = _originalNodesInOrder[originalIdx].Member; } + return end - start; } @@ -689,6 +722,7 @@ private bool AdvanceTo(int start, XamlNodeType nodeType, int searchDepth, out in return false; // we have searched past the end of the current Object. } } + end =_sortingInfoArray.Length; return false; } @@ -713,6 +747,7 @@ private bool BackupTo(int start, XamlNodeType nodeType, int searchDepth, out int } } } + end = 0; return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/ScannerNodeType.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/ScannerNodeType.cs index d90d3c77705..9242a76f40c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/ScannerNodeType.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/ScannerNodeType.cs @@ -18,7 +18,7 @@ internal enum ScannerNodeType EMPTYPROPERTYELEMENT, TEXT, ENDTAG - }; + } internal enum ScannerAttributeKind { @@ -31,5 +31,5 @@ internal enum ScannerAttributeKind Property, AttachableProperty, Unknown - }; + } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlAttribute.cs index e3f1b09d9d0..7eec95b87de 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlAttribute.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Diagnostics; using System.Xaml; using System.Xaml.MS.Impl; using System.Xml; @@ -31,7 +29,7 @@ public XamlAttribute(XamlPropertyName propName, string val, IXmlLineInfo lineInf Name = propName; Value = val; Kind = ScannerAttributeKind.Property; // non-"namespace" default; - if (lineInfo != null) + if (lineInfo is not null) { LineNumber = lineInfo.LineNumber; LinePosition = lineInfo.LinePosition; @@ -95,7 +93,6 @@ public void Initialize(XamlParserContext context, XamlType tagType, string owner } } - // FxCop says this is not called // public bool IsXamlNsDefinition // { @@ -129,6 +126,7 @@ internal bool CheckIsXmlNamespaceDefinition(out string definingPrefix, out strin : $"{Name.OwnerName}.{Name.Name}"; return true; } + // case where: xmlns="ValueUri" if (string.IsNullOrEmpty(Name.Prefix) && KS.Eq(Name.Name, KnownStrings.XmlNsPrefix)) { @@ -136,6 +134,7 @@ internal bool CheckIsXmlNamespaceDefinition(out string definingPrefix, out strin definingPrefix = string.Empty; return true; } + return false; } @@ -148,18 +147,19 @@ private XamlMember GetXamlAttributeProperty(XamlParserContext context, XamlPrope string ns = context.GetAttributeNamespace(propName, tagNamespace); // No Namespace, == Unknown Property - if (ns == null) + if (ns is null) { XamlMember unknownProperty; if (propName.IsDotted) { XamlType attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext); - unknownProperty = new XamlMember(propName.Name, attachedOwnerType, true /*isAttachable*/); + unknownProperty = new XamlMember(propName.Name, attachedOwnerType, isAttachable: true); } else { unknownProperty = new XamlMember(propName.Name, tagType, false); } + return unknownProperty; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlName.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlName.cs index 9eb758a8231..79bc8c8e907 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlName.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlName.cs @@ -82,6 +82,7 @@ public static bool IsValidNameChar(char ch) { return true; } + return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPropertyName.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPropertyName.cs index 0595a15bc2f..228a1749788 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPropertyName.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPropertyName.cs @@ -4,8 +4,6 @@ #nullable disable -using System; - namespace MS.Internal.Xaml.Parser { internal class XamlPropertyName : XamlName @@ -13,7 +11,7 @@ internal class XamlPropertyName : XamlName private XamlPropertyName(XamlName owner, string prefix, string name) : base(name) { - if (owner != null) + if (owner is not null) { Owner = owner; _prefix = owner.Prefix ?? string.Empty; @@ -96,7 +94,7 @@ public string OwnerName public bool IsDotted { - get { return Owner != null; } + get { return Owner is not null; } } } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPullParser.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPullParser.cs index 0a05edb162b..0bfb9ef2943 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPullParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlPullParser.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; using System.Runtime.Serialization; using System.Xaml; using System.Xaml.Schema; @@ -72,6 +70,7 @@ public IEnumerable Parse() { yield return Logic_LineInfo(); } + nodeType = _xamlScanner.NodeType; } @@ -97,6 +96,7 @@ public IEnumerable P_Element() { yield return node; } + break; case ScannerNodeType.ELEMENT: @@ -104,10 +104,12 @@ public IEnumerable P_Element() { yield return node; } + foreach (XamlNode node in P_ElementBody()) { yield return node; } + break; default: throw new XamlUnexpectedParseException(_xamlScanner, nodeType, ElementRuleException); @@ -124,6 +126,7 @@ public IEnumerable P_EmptyElement() throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, EmptyElementRuleException); } + yield return Logic_StartObject(_xamlScanner.Type, _xamlScanner.Namespace); _xamlScanner.Read(); if (ProvideLineInfo) @@ -138,18 +141,21 @@ public IEnumerable P_EmptyElement() { yield return node; } + _xamlScanner.Read(); if (ProvideLineInfo) { yield return Logic_LineInfo(); } } + while (_xamlScanner.NodeType == ScannerNodeType.ATTRIBUTE) { foreach (XamlNode node in LogicStream_Attribute()) { yield return node; } + _xamlScanner.Read(); if (ProvideLineInfo) { @@ -171,6 +177,7 @@ public IEnumerable P_StartElement() throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, StartElementRuleException); } + yield return Logic_StartObject(_xamlScanner.Type, _xamlScanner.Namespace); _xamlScanner.Read(); if (ProvideLineInfo) @@ -185,6 +192,7 @@ public IEnumerable P_StartElement() { yield return node; } + _xamlScanner.Read(); if (ProvideLineInfo) { @@ -204,6 +212,7 @@ public IEnumerable P_ElementBody() { yield return node; } + _xamlScanner.Read(); if (ProvideLineInfo) { @@ -227,6 +236,7 @@ public IEnumerable P_ElementBody() { yield return node; } + break; case ScannerNodeType.PREFIXDEFINITION: @@ -240,8 +250,10 @@ public IEnumerable P_ElementBody() { yield return node; } + nodeType = _xamlScanner.NodeType; - } while (nodeType == ScannerNodeType.PREFIXDEFINITION + } + while (nodeType == ScannerNodeType.PREFIXDEFINITION || nodeType == ScannerNodeType.ELEMENT || nodeType == ScannerNodeType.EMPTYELEMENT || nodeType == ScannerNodeType.TEXT); @@ -264,11 +276,12 @@ public IEnumerable P_ElementBody() } } } + break; case ScannerNodeType.ENDTAG: // if foo has no default constructor we need to output SM _Initialization V "" EM XamlType currentType = _context.CurrentType; - bool hasTypeConverter = currentType.TypeConverter != null; + bool hasTypeConverter = currentType.TypeConverter is not null; bool isConstructable = currentType.IsConstructible && !currentType.ConstructionRequiresArguments; if (!hasContent && hasTypeConverter && !isConstructable) { @@ -276,19 +289,22 @@ public IEnumerable P_ElementBody() yield return new XamlNode(XamlNodeType.Value, string.Empty); yield return Logic_EndMember(); } + doneWithElementContent = true; break; default: doneWithElementContent = true; break; } - } while (!doneWithElementContent); + } + while (!doneWithElementContent); if (_xamlScanner.NodeType != ScannerNodeType.ENDTAG) { throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, ElementBodyRuleException); } + yield return Logic_EndObject(); _xamlScanner.Read(); if (ProvideLineInfo) @@ -311,12 +327,14 @@ public IEnumerable P_PropertyElement() { yield return node; } + break; case ScannerNodeType.PROPERTYELEMENT: foreach (XamlNode node in P_NonemptyPropertyElement()) { yield return node; } + break; default: throw new XamlUnexpectedParseException(_xamlScanner, nodeType, @@ -334,6 +352,7 @@ public IEnumerable P_EmptyPropertyElement() throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, EmptyPropertyElementRuleException); } + yield return Logic_StartMember(_xamlScanner.PropertyElement); yield return Logic_EndMember(); _xamlScanner.Read(); @@ -353,6 +372,7 @@ public IEnumerable P_NonemptyPropertyElement() throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, NonemptyPropertyElementRuleException); } + yield return Logic_StartMember(_xamlScanner.PropertyElement); _xamlScanner.Read(); if (ProvideLineInfo) @@ -376,8 +396,10 @@ public IEnumerable P_NonemptyPropertyElement() { yield return node; } + nodeType = _xamlScanner.NodeType; - } while (nodeType == ScannerNodeType.PREFIXDEFINITION + } + while (nodeType == ScannerNodeType.PREFIXDEFINITION || nodeType == ScannerNodeType.ELEMENT || nodeType == ScannerNodeType.EMPTYELEMENT || nodeType == ScannerNodeType.TEXT); @@ -398,19 +420,21 @@ public IEnumerable P_NonemptyPropertyElement() } } } + break; default: doingPropertyContent = false; break; } - } while (doingPropertyContent); - + } + while (doingPropertyContent); if (_xamlScanner.NodeType != ScannerNodeType.ENDTAG) { throw new XamlUnexpectedParseException(_xamlScanner, _xamlScanner.NodeType, NonemptyPropertyElementRuleException); } + yield return Logic_EndMember(); _xamlScanner.Read(); if (ProvideLineInfo) @@ -445,6 +469,7 @@ public IEnumerable P_ElementContent() { yield return Logic_LineInfo(); } + break; } } @@ -455,20 +480,23 @@ public IEnumerable P_ElementContent() // on Content Property in before the PrefixDef's and then the ObjectType. while (nodeType == ScannerNodeType.PREFIXDEFINITION) { - if (savedPrefixDefinitions == null) + if (savedPrefixDefinitions is null) { savedPrefixDefinitions = new List(); } + if (ProvideLineInfo) { savedPrefixDefinitions.Add(Logic_LineInfo()); } + savedPrefixDefinitions.Add(Logic_PrefixDefinition()); _xamlScanner.Read(); if (ProvideLineInfo) { yield return Logic_LineInfo(); } + nodeType = _xamlScanner.NodeType; } @@ -482,19 +510,21 @@ public IEnumerable P_ElementContent() // then a TypeConverter if (nodeType == ScannerNodeType.TEXT) { - if (currentType.ContentProperty != null && CanAcceptString(currentType.ContentProperty)) + if (currentType.ContentProperty is not null && CanAcceptString(currentType.ContentProperty)) { isContentProperty = true; } + // If there have been "real" properties then we are forced to use the // Constructor. Otherwise we can consider a TypeConverter on the TEXT. else if (!_context.CurrentForcedToUseConstructor && !_xamlScanner.TextContent.IsEmpty - && currentType.TypeConverter != null) + && currentType.TypeConverter is not null) { isTextInitialization = true; } } + // Otherwise, we look first for a collection, and then fall back to content property if (!isTextInitialization && !isContentProperty) { @@ -508,12 +538,13 @@ public IEnumerable P_ElementContent() isContentProperty = true; } } + // Don't yield more than one unknown content property for multiple, // contiguous content objects and values. if (isContentProperty && !_context.CurrentInUnknownContent) { XamlMember contentProperty = currentType.ContentProperty; - if (contentProperty != null) + if (contentProperty is not null) { bool isVisible = _context.IsVisible( contentProperty, _context.CurrentTypeIsRoot ? _context.CurrentType : null); @@ -528,6 +559,7 @@ public IEnumerable P_ElementContent() contentProperty = new XamlMember(contentProperty.Name, currentType, false); } } + // A null argument produces an unknown content member. yield return Logic_StartContentProperty(contentProperty); @@ -541,12 +573,13 @@ public IEnumerable P_ElementContent() // Now we are ready for the given element. // so now emit the saved prefix definitions. - if (savedPrefixDefinitions != null) + if (savedPrefixDefinitions is not null) { for (int i = 0; i < savedPrefixDefinitions.Count; i++) { yield return savedPrefixDefinitions[i]; } + if (ProvideLineInfo) { yield return Logic_LineInfo(); @@ -605,6 +638,7 @@ public IEnumerable P_ElementContent() { yield return Logic_EndMember(); } + break; } // end switch } @@ -644,6 +678,7 @@ public IEnumerable P_PropertyContent() { yield return Logic_LineInfo(); } + if (string.IsNullOrEmpty(trimmed)) { break; @@ -656,27 +691,30 @@ public IEnumerable P_PropertyContent() // in before the PrefixDef's and then the ObjectType. while (nodeType == ScannerNodeType.PREFIXDEFINITION) { - if (_savedPrefixDefinitions == null) + if (_savedPrefixDefinitions is null) { _savedPrefixDefinitions = new List(); } + _savedPrefixDefinitions.Add(Logic_PrefixDefinition()); if (ProvideLineInfo) { _savedPrefixDefinitions.Add(Logic_LineInfo()); } + _xamlScanner.Read(); if (ProvideLineInfo) { yield return Logic_LineInfo(); } + nodeType = _xamlScanner.NodeType; } // If this is TEXT and the current Property has a TypeConverter // Then emit the TEXT now. if (nodeType == ScannerNodeType.TEXT - && _context.CurrentMember.TypeConverter != null) + && _context.CurrentMember.TypeConverter is not null) { yield return new XamlNode(XamlNodeType.Value, trimmed); } @@ -721,7 +759,7 @@ public IEnumerable P_PropertyContent() { // Now we are ready for the given element. // now emit the saved prefix definitions. - if (_savedPrefixDefinitions != null) + if (_savedPrefixDefinitions is not null) { for (int i = 0; i < _savedPrefixDefinitions.Count; i++) { @@ -735,6 +773,7 @@ public IEnumerable P_PropertyContent() } } } + break; } } @@ -820,6 +859,7 @@ private IEnumerable LogicStream_Attribute() XamlNode textNode = new XamlNode(XamlNodeType.Value, text.AttributeText); yield return textNode; } + yield return new XamlNode(XamlNodeType.EndMember); } @@ -836,8 +876,9 @@ private XamlNode Logic_StartMember(XamlMember member) { _context.CurrentForcedToUseConstructor = true; } + XamlType memberXamlType = member.Type; - _context.CurrentInContainerDirective = member.IsDirective && (memberXamlType != null && (memberXamlType.IsCollection || memberXamlType.IsDictionary)); + _context.CurrentInContainerDirective = member.IsDirective && (memberXamlType is not null && (memberXamlType.IsCollection || memberXamlType.IsDictionary)); var startMember = new XamlNode(XamlNodeType.StartMember, member); return startMember; @@ -853,10 +894,11 @@ private XamlNode Logic_EndMember() private XamlNode Logic_StartContentProperty(XamlMember property) { - if (property == null) + if (property is null) { property = XamlLanguage.UnknownContent; } + _context.CurrentMember = property; var startProperty = new XamlNode(XamlNodeType.StartMember, property); // SetLineInfo(startProperty); // No line number info for objects from members. @@ -892,7 +934,7 @@ private string Logic_ApplyFinalTextTrimming(XamlText text) // OR the previous element was "TrimSurroundingWhitespace" // then trim leading Whitespace. XamlType previousObject = _context.CurrentPreviousChildType; - if (previousObject == null || previousObject.TrimSurroundingWhitespace) + if (previousObject is null || previousObject.TrimSurroundingWhitespace) { trimmed = XamlText.TrimLeadingWhitespace(trimmed); } @@ -908,6 +950,7 @@ private string Logic_ApplyFinalTextTrimming(XamlText text) } } } + return trimmed; } @@ -938,10 +981,11 @@ private XamlType ArrayExtensionType { get { - if (_arrayExtensionType == null) + if (_arrayExtensionType is null) { _arrayExtensionType = _context.GetXamlType(arrayType); } + return _arrayExtensionType; } } @@ -951,10 +995,11 @@ private XamlMember ArrayTypeMember { get { - if (_arrayTypeMember == null) + if (_arrayTypeMember is null) { _arrayTypeMember = _context.GetXamlProperty(ArrayExtensionType, @"Type", null); } + return _arrayTypeMember; } } @@ -964,10 +1009,11 @@ private XamlMember ItemsTypeMember { get { - if (_itemsTypeMember == null) + if (_itemsTypeMember is null) { _itemsTypeMember = _context.GetXamlProperty(ArrayExtensionType, @"Items", null); } + return _itemsTypeMember; } } @@ -995,6 +1041,7 @@ private IEnumerable LogicStream_CheckForStartGetCollectionFromMember() { yield return new XamlNode(XamlNodeType.NamespaceDeclaration, nsDecl); } + yield return Logic_StartObject(ArrayExtensionType, null); _context.CurrentInImplicitArray = true; yield return Logic_StartMember(ArrayTypeMember); @@ -1021,18 +1068,20 @@ private IEnumerable LogicStream_CheckForStartGetCollectionFromMember() { emitPreamble = true; } + // If the collection is R/W and there is a type converter and we have Text // use the type converter rather than the GO; SM _items; - else if (propertyType.TypeConverter != null && !currentProperty.IsReadOnly + else if (propertyType.TypeConverter is not null && !currentProperty.IsReadOnly && _xamlScanner.NodeType == ScannerNodeType.TEXT) { emitPreamble = false; } + // Or if the Value (this is the first value in the collection) // isn't assignable to the Collection then "Get" the collection. - else if (valueElementType == null || !valueElementType.CanAssignTo(propertyType)) + else if (valueElementType is null || !valueElementType.CanAssignTo(propertyType)) { - if (valueElementType != null) + if (valueElementType is not null) { // Unless: the Value is a Markup extension, in which case it is // assumed that the ProvideValue() type will be AssignableFrom @@ -1043,6 +1092,7 @@ private IEnumerable LogicStream_CheckForStartGetCollectionFromMember() { emitPreamble = true; } + // Except: the Array Extension can never return a dictionary // so for Array Extension do "Get" the collection. // Note Array Extension would be suitable for List Collections @@ -1054,6 +1104,7 @@ private IEnumerable LogicStream_CheckForStartGetCollectionFromMember() } } } + if (emitPreamble) { yield return Logic_StartGetObjectFromMember(propertyType); @@ -1080,7 +1131,7 @@ private bool Logic_IsDiscardableWhitespace(XamlText text) else { // Force unknown members to behave as whitespace significant collections in order to preserve as much information as possible. - if (_context.CurrentMember != null && _context.CurrentMember.IsUnknown) + if (_context.CurrentMember is not null && _context.CurrentMember.IsUnknown) { return false; } @@ -1101,32 +1152,36 @@ private bool Logic_IsDiscardableWhitespace(XamlText text) XamlMember prop = _context.CurrentMember; if (_xamlScanner.PeekNodeType == ScannerNodeType.ELEMENT) { - if (prop == null) + if (prop is null) { prop = _context.CurrentType.ContentProperty; } - if (prop != null && prop.Type != null && prop.Type.IsWhitespaceSignificantCollection) + + if (prop is not null && prop.Type is not null && prop.Type.IsWhitespaceSignificantCollection) { return false; } - if (prop == null && _context.CurrentType.IsWhitespaceSignificantCollection) + + if (prop is null && _context.CurrentType.IsWhitespaceSignificantCollection) { return false; } } + // Whitespace can also start content if space is preserved and it's at the end of an element and... else if (text.IsSpacePreserved && _xamlScanner.PeekNodeType == ScannerNodeType.ENDTAG) { // ...it's by itself in a PE with no other children - if (prop != null) + if (prop is not null) { - if (_context.CurrentPreviousChildType == null) + if (_context.CurrentPreviousChildType is null) { return false; } } + // ...it's in an element with a string content property - else if (_context.CurrentType.ContentProperty != null) + else if (_context.CurrentType.ContentProperty is not null) { prop = _context.CurrentType.ContentProperty; // For backcompat we need to support CPs of type object here. @@ -1138,36 +1193,42 @@ private bool Logic_IsDiscardableWhitespace(XamlText text) { return false; } + if (prop.Type.IsWhitespaceSignificantCollection) { return false; } } + // ...it's in a type-convertible element - else if (_context.CurrentType.TypeConverter != null && !_context.CurrentForcedToUseConstructor) + else if (_context.CurrentType.TypeConverter is not null && !_context.CurrentForcedToUseConstructor) { return false; } } } } + return true; } private static bool CanAcceptString(XamlMember property) { - if (property == null) + if (property is null) { return false; } + if (property.TypeConverter == BuiltInValueConverter.String) { return true; } + if (property.TypeConverter == BuiltInValueConverter.Object) { return true; } + XamlType propertyType = property.Type; if (propertyType.IsCollection) { @@ -1179,6 +1240,7 @@ private static bool CanAcceptString(XamlMember property) } } } + return false; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlQualifiedName.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlQualifiedName.cs index e2907632791..b6b45caef62 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlQualifiedName.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlQualifiedName.cs @@ -4,8 +4,6 @@ #nullable disable -using System; - namespace MS.Internal.Xaml.Parser { internal class XamlQualifiedName : XamlName @@ -31,10 +29,12 @@ internal static bool IsNameValid(string name) { return false; } + if (!IsValidNameStartChar(name[0])) { return false; } + for (int i = 1; i < name.Length; i++) { if (!IsValidQualifiedNameChar(name[i])) @@ -42,6 +42,7 @@ internal static bool IsNameValid(string name) return false; } } + return true; } @@ -51,10 +52,12 @@ internal static bool IsNameValid_WithPlus(string name) { return false; } + if (!IsValidNameStartChar(name[0])) { return false; } + for (int i = 1; i < name.Length; i++) { if (!IsValidQualifiedNameCharPlus(name[i])) @@ -62,6 +65,7 @@ internal static bool IsNameValid_WithPlus(string name) return false; } } + return true; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScanner.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScanner.cs index abdb409ffd8..fa1758f717f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScanner.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScanner.cs @@ -4,9 +4,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; using System.Xaml.MS.Impl; using System.Xaml.Schema; @@ -206,16 +203,18 @@ private void ProcessCurrentXmlNode() break; } } + // ============= Private ================================== private XamlText AccumulatedText { get { - if (_accumulatedText == null) + if (_accumulatedText is null) { _accumulatedText = new XamlText(_scannerStack.CurrentXmlSpacePreserve); } + return _accumulatedText; } } @@ -227,7 +226,7 @@ private void ClearAccumulatedText() private bool HaveAccumulatedText { - get { return _accumulatedText != null && !_accumulatedText.IsEmpty; } + get { return _accumulatedText is not null && !_accumulatedText.IsEmpty; } } // ============= Element Processing ================================== @@ -247,10 +246,11 @@ private void ReadElement() { Debug.Assert(_xmlReader.NodeType == XmlNodeType.Element); XamlPropertyName name = XamlPropertyName.Parse(_xmlReader.Name, _xmlReader.NamespaceURI); - if (_scannerStack.CurrentType == null) + if (_scannerStack.CurrentType is null) { throw LineInfo(new XamlParseException(SR.Format(SR.ParentlessPropertyElement, _xmlReader.Name))); } + ReadPropertyElement(name, _scannerStack.CurrentType, _scannerStack.CurrentTypeNamespace, isEmptyTag); } else @@ -283,7 +283,7 @@ private void ReadObjectElement(XamlName name, bool isEmptyTag) // See app Paperboy Debug.Assert(_xmlReader.NodeType == XmlNodeType.Element); string xamlNs = _xmlReader.NamespaceURI; - if (xamlNs == null) + if (xamlNs is null) { ReadObjectElement_NoNamespace(name, node); } @@ -296,7 +296,7 @@ private void ReadObjectElement(XamlName name, bool isEmptyTag) // XamlSchemaContext schemaContext = _parserContext.SchemaContext; XamlMember dirProperty = schemaContext.GetXamlDirective(xamlNs, name.Name); - if (dirProperty != null) + if (dirProperty is not null) { ReadObjectElement_DirectiveProperty(dirProperty, node); } @@ -355,6 +355,7 @@ private void ReadObjectElement_DirectiveProperty(XamlMember dirProperty, XamlSca { _scannerStack.CurrentProperty = node.PropertyElement; } + node.NodeType = ScannerNodeType.PROPERTYELEMENT; node.IsCtorForcingMember = false; } @@ -373,15 +374,16 @@ private bool ReadObjectElement_Object(string xmlns, string name, XamlScannerNode } IList typeArgs = null; - if (_typeArgumentAttribute != null) + if (_typeArgumentAttribute is not null) { string error; typeArgs = XamlTypeName.ParseListInternal(_typeArgumentAttribute.Value, _parserContext.FindNamespaceByPrefix, out error); - if (typeArgs == null) + if (typeArgs is null) { throw new XamlParseException(_typeArgumentAttribute.LineNumber, _typeArgumentAttribute.LinePosition, error); } } + XamlTypeName typeName = new XamlTypeName(xmlns, name, typeArgs); node.Type = _parserContext.GetXamlType(typeName, true); @@ -404,6 +406,7 @@ private bool ReadObjectElement_Object(string xmlns, string name, XamlScannerNode { node.NodeType = ScannerNodeType.EMPTYELEMENT; } + return false; } @@ -477,7 +480,7 @@ private void ReadEndElement() // if we are ending a property element tag clear the current property // if we are ending an element then pop off the current frame. - if (_scannerStack.CurrentProperty != null) + if (_scannerStack.CurrentProperty is not null) { _scannerStack.CurrentProperty = null; // List of Content is considered separately for each property. @@ -558,7 +561,7 @@ private void PreprocessAttributes() XamlPropertyName propName = XamlPropertyName.Parse(xmlName); - if (propName == null) + if (propName is null) { throw new XamlParseException(SR.Format(SR.InvalidXamlMemberName, xmlName)); } @@ -575,7 +578,8 @@ private void PreprocessAttributes() } b = _xmlReader.MoveToNextAttribute(); - } while (b); + } + while (b); PreprocessForTypeArguments(list); @@ -583,6 +587,7 @@ private void PreprocessAttributes() { _attributes = list; } + // Restore the XML reader’s position to the Element after reading the // attributes so that the rest of the code can always assume it is on an Element _xmlReader.MoveToElement(); @@ -600,7 +605,7 @@ private void PreprocessForTypeArguments(List attrList) { string attrNamespace = _parserContext.FindNamespaceByPrefix(attr.Name.Prefix); XamlMember directiveProperty = _parserContext.ResolveDirectiveProperty(attrNamespace, attr.Name.Name); - if (directiveProperty != null) + if (directiveProperty is not null) { typeArgsIdx = i; _typeArgumentAttribute = attr; @@ -608,6 +613,7 @@ private void PreprocessForTypeArguments(List attrList) } } } + if (typeArgsIdx >= 0) { attrList.RemoveAt(typeArgsIdx); @@ -616,7 +622,7 @@ private void PreprocessForTypeArguments(List attrList) private void PostprocessAttributes(XamlScannerNode node) { - if (_attributes == null) + if (_attributes is null) { return; } @@ -625,16 +631,16 @@ private void PostprocessAttributes(XamlScannerNode node) // Attributes on Properties are errors // and don't need this detailed processing. - if (node.Type == null) + if (node.Type is null) { if (_settings.IgnoreUidsOnPropertyElements) { StripUidProperty(); } + return; } - bool tagIsRoot = _scannerStack.Depth == 0; // Attributes are processed before frame is pushed foreach (XamlAttribute attr in _attributes) { @@ -658,10 +664,11 @@ private void PostprocessAttributes(XamlScannerNode node) break; case ScannerAttributeKind.CtorDirective: - if (ctorDirectivesList == null) + if (ctorDirectivesList is null) { ctorDirectivesList = new List(); } + ctorDirectivesList.Add(attr); break; @@ -672,18 +679,20 @@ private void PostprocessAttributes(XamlScannerNode node) _hasKeyAttribute = true; } - if (otherDirectivesList == null) + if (otherDirectivesList is null) { otherDirectivesList = new List(); } + otherDirectivesList.Add(attr); break; default: - if (otherPropertiesList == null) + if (otherPropertiesList is null) { otherPropertiesList = new List(); } + otherPropertiesList.Add(attr); break; } @@ -692,25 +701,25 @@ private void PostprocessAttributes(XamlScannerNode node) _attributes = new List(); // First the Construction Directives - if (ctorDirectivesList != null) + if (ctorDirectivesList is not null) { _attributes.AddRange(ctorDirectivesList); } - if (otherDirectivesList != null) + if (otherDirectivesList is not null) { _attributes.AddRange(otherDirectivesList); } // Next the aliased Name property before any other "real" properties. // (this is a WPF template requirement) - if (nameAttribute != null) + if (nameAttribute is not null) { _attributes.Add(nameAttribute); } // Then everything else - if (otherPropertiesList != null) + if (otherPropertiesList is not null) { _attributes.AddRange(otherPropertiesList); } @@ -725,6 +734,7 @@ private void StripUidProperty() _attributes.RemoveAt(i); } } + if (_attributes.Count == 0) { _attributes = null; @@ -733,7 +743,7 @@ private void StripUidProperty() private bool HaveUnprocessedAttributes { - get { return _attributes != null; } + get { return _attributes is not null; } } private void EnqueueAnotherAttribute(bool isEmptyTag) @@ -759,6 +769,7 @@ private void EnqueueAnotherAttribute(bool isEmptyTag) else _scannerStack.CurrentXmlSpacePreserve = false; } + node.NodeType = ScannerNodeType.DIRECTIVE; break; @@ -793,7 +804,7 @@ private void EnqueueAnotherAttribute(bool isEmptyTag) // the corresponding Glyphs.Indices property. XamlMember attrProperty = attr.Property; bool convertCRLFtoLF = - !(attrProperty != null && + !(attrProperty is not null && attrProperty.Name == "UnicodeString" && attrProperty.DeclaringType.Name == "Glyphs"); @@ -821,12 +832,13 @@ private void EnqueueAnyText() // we are In a Whitespace significant collection. EnqueueTextNode(); } + ClearAccumulatedText(); } private void EnqueueTextNode() { - Debug.Assert(_accumulatedText != null, "Creating unnecessary XamlText objects"); + Debug.Assert(_accumulatedText is not null, "Creating unnecessary XamlText objects"); // Don't send the text if it is Whitespace outside the root tag. if (!(_scannerStack.Depth == 0 && AccumulatedText.IsWhiteSpaceOnly)) @@ -861,10 +873,11 @@ private bool IsXDataElement(string xmlns, string name) XamlException LineInfo(XamlException e) { - if (_xmlLineInfo != null) + if (_xmlLineInfo is not null) { e.SetLineInfo(_xmlLineInfo.LineNumber, _xmlLineInfo.LinePosition); } + return e; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerNode.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerNode.cs index e66056d5a4e..3772543af98 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerNode.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerNode.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using System.Xaml; using System.Xml; @@ -15,7 +14,7 @@ internal class XamlScannerNode { public XamlScannerNode(IXmlLineInfo lineInfo) { - if (lineInfo != null) + if (lineInfo is not null) { LineNumber = lineInfo.LineNumber; LinePosition = lineInfo.LinePosition; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerStack.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerStack.cs index d3299634098..67b80615b4b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerStack.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlScannerStack.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; using System.Xaml; namespace MS.Internal.Xaml.Parser @@ -88,6 +86,5 @@ public bool CurrentlyInContent _stack.Peek().InContent = value; } } - } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlText.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlText.cs index f599af2a03b..251cce8599d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlText.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Parser/XamlText.cs @@ -4,8 +4,6 @@ #nullable disable -using System; -using System.Diagnostics; using System.Text; using System.Xaml; @@ -60,6 +58,7 @@ public string AttributeText { return text.Remove(0, ME_ESCAPE.Length); } + return text; } } @@ -103,6 +102,7 @@ public void Paste(string text, bool trimLeadingWhitespace, bool convertCRLFtoLF= // See XamlScanner.EnqueueAnotherAttribute for the fixed call. text = text.Replace(RETURN_STRING, ""); } + _sb.Append(text); } else if (newTextIsWhitespace) @@ -147,6 +147,7 @@ public void Paste(string text, bool trimLeadingWhitespace, bool convertCRLFtoLF= { _sb.Append(SPACE); } + _sb.Append(trimmed); // Always leave trailing WS, if it was present. @@ -157,6 +158,7 @@ public void Paste(string text, bool trimLeadingWhitespace, bool convertCRLFtoLF= _sb.Append(SPACE); } } + _isWhiteSpaceOnly = _isWhiteSpaceOnly && newTextIsWhitespace; } @@ -171,6 +173,7 @@ public bool LooksLikeAMarkupExtension return false; return true; } + return false; } } @@ -184,6 +187,7 @@ static bool IsWhitespace(string text) if (!IsWhitespaceChar(text[i])) return false; } + return true; } @@ -234,13 +238,16 @@ static string CollapseWhitespace(string text) } } } + if (!skipSpace) { sb.Append(SPACE); } } + firstIdx = advancingIdx; } + return sb.ToString(); } @@ -291,6 +298,7 @@ static bool HasSurroundingEastAsianChars(int start, int end, string text) return true; } } + return false; } @@ -314,6 +322,7 @@ static int ComputeUnicodeScalarValue(int takeOneIdx, int takeTwoIdx, string text { unicodeScalarValue = text[takeOneIdx]; } + return unicodeScalarValue; } @@ -367,6 +376,7 @@ static bool IsEastAsianCodePoint(int unicodeScalarValue) return true; } } + return false; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderBaseDelegate.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderBaseDelegate.cs index 5604f8483ea..18dd925b693 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderBaseDelegate.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderBaseDelegate.cs @@ -12,7 +12,7 @@ namespace System.Xaml // Advancing to the next node with Read() is left to be defined // in the deriving class. // - abstract internal class ReaderBaseDelegate: XamlReader, IXamlLineInfo + internal abstract class ReaderBaseDelegate: XamlReader, IXamlLineInfo { protected XamlSchemaContext _schemaContext; protected XamlNode _currentNode; @@ -77,7 +77,7 @@ public int LineNumber { get { - if (_currentLineInfo != null) + if (_currentLineInfo is not null) { return _currentLineInfo.LineNumber; } @@ -92,7 +92,7 @@ public int LinePosition { get { - if (_currentLineInfo != null) + if (_currentLineInfo is not null) { return _currentLineInfo.LinePosition; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderDelegate.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderDelegate.cs index 02f9a23b273..53704d14e7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderDelegate.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderDelegate.cs @@ -36,6 +36,7 @@ public override bool Read() { return true; // This is the common/fast path } + // else do the NONE node stuff if (_currentNode.IsLineInfo) { @@ -45,7 +46,8 @@ public override bool Read() { break; } - } while (_currentNode.NodeType == XamlNodeType.None); + } + while (_currentNode.NodeType == XamlNodeType.None); return !IsEof; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderMultiIndexDelegate.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderMultiIndexDelegate.cs index 7f18193a934..cf79ff08e0b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderMultiIndexDelegate.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/ReaderMultiIndexDelegate.cs @@ -50,8 +50,9 @@ public override bool Read() { return true; // This is the common/fast path } + // else do the NONE node stuff. - if (_currentNode.LineInfo != null) + if (_currentNode.LineInfo is not null) { _currentLineInfo = _currentNode.LineInfo; } @@ -67,7 +68,8 @@ public override bool Read() _currentLineInfo = null; break; } - } while (_currentNode.NodeType == XamlNodeType.None); + } + while (_currentNode.NodeType == XamlNodeType.None); return !IsEof; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/RefOnly/LooseTypeExtensions.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/RefOnly/LooseTypeExtensions.cs index 9ae27e6b7bd..100326f7d86 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/RefOnly/LooseTypeExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/RefOnly/LooseTypeExtensions.cs @@ -32,10 +32,12 @@ internal static bool AssemblyQualifiedNameEquals(Type t1, Type t2) { return false; } + if (t1.Assembly.FullName == t2.Assembly.FullName) { return true; } + AssemblyName t1name = new AssemblyName(t1.Assembly.FullName); AssemblyName t2name = new AssemblyName(t2.Assembly.FullName); if (t1name.Name == t2name.Name) @@ -43,6 +45,7 @@ internal static bool AssemblyQualifiedNameEquals(Type t1, Type t2) return t1name.CultureInfo.Equals(t2name.CultureInfo) && SafeSecurityHelper.IsSameKeyToken(t1name.GetPublicKeyToken(), t2name.GetPublicKeyToken()); } + return IsWindowsBaseToSystemXamlComparison(t1.Assembly, t2.Assembly, t1name, t2name); } @@ -60,12 +63,13 @@ static bool IsWindowsBaseToSystemXamlComparison(Assembly a1, Assembly a2, { windowsBaseName = name2; } - return (windowsBaseName != null && SafeSecurityHelper.IsSameKeyToken(windowsBaseName.GetPublicKeyToken(), WindowsBaseToken)); + + return (windowsBaseName is not null && SafeSecurityHelper.IsSameKeyToken(windowsBaseName.GetPublicKeyToken(), WindowsBaseToken)); } internal static bool IsAssemblyQualifiedNameAssignableFrom(Type t1, Type t2) { - if (t1 == null || t2 == null) + if (t1 is null || t2 is null) { return false; } @@ -104,7 +108,7 @@ internal static bool IsAssemblyQualifiedNameAssignableFrom(Type t1, Type t2) static bool LooselyImplementInterface(Type t, Type interfaceType) { - for (Type type = t; type != null; type = type.BaseType) + for (Type type = t; type is not null; type = type.BaseType) { Type[] interfaces = type.GetInterfaces(); for (int i = 0; i < interfaces.Length; i++) @@ -116,12 +120,13 @@ static bool LooselyImplementInterface(Type t, Type interfaceType) } } } + return false; } static bool IsLooseSubClassOf(Type t1, Type t2) { - if (t1 == null || t2 == null) + if (t1 is null || t2 is null) { return false; } @@ -131,13 +136,14 @@ static bool IsLooseSubClassOf(Type t1, Type t2) return false; // strictly testing for sub-class } - for(Type baseType = t1.BaseType; baseType != null; baseType = baseType.BaseType) + for(Type baseType = t1.BaseType; baseType is not null; baseType = baseType.BaseType) { if (AssemblyQualifiedNameEquals(baseType, t2)) { return true; } } + return false; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/DateTimeOffsetConverter2.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/DateTimeOffsetConverter2.cs index 2782f3a356d..0d2f49a43ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/DateTimeOffsetConverter2.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/DateTimeOffsetConverter2.cs @@ -8,7 +8,6 @@ using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; -using System.Security; namespace System.Xaml.Replacements { @@ -58,7 +57,8 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul }); return new InstanceDescriptor( constructor, - new object[] { + new object[] + { dtOffset.Year, dtOffset.Month, dtOffset.Day, diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeListConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeListConverter.cs index fc81c613d6f..04cebf3467b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeListConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeListConverter.cs @@ -6,7 +6,6 @@ using System.ComponentModel; using System.Globalization; -using System.Windows.Markup; namespace System.Xaml.Replacements { @@ -22,7 +21,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { - if (context != null && value is string typeList) + if (context is not null && value is string typeList) { string[] tl = StringHelpers.SplitTypeList(typeList); Type[] types = new Type[tl.Length]; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeTypeConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeTypeConverter.cs index 310d07c69f2..06c4616cf1b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeTypeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Replacements/TypeTypeConverter.cs @@ -21,10 +21,10 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { - if (context != null && value is string typeName) + if (context is not null && value is string typeName) { IXamlTypeResolver typeResolver = GetService(context); - if (typeResolver != null) + if (typeResolver is not null) { return typeResolver.Resolve(typeName); } @@ -38,10 +38,10 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { - if (context != null && value is Type type && destinationType == typeof(string)) + if (context is not null && value is Type type && destinationType == typeof(string)) { string result = ConvertTypeToString(context, type); - if (result != null) + if (result is not null) { return result; } @@ -53,17 +53,18 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul private static string ConvertTypeToString(ITypeDescriptorContext context, Type type) { IXamlSchemaContextProvider schemaContextProvider = GetService(context); - if (schemaContextProvider == null) + if (schemaContextProvider is null) { return null; } - if (schemaContextProvider.SchemaContext == null) + + if (schemaContextProvider.SchemaContext is null) { return null; } XamlType xamlType = schemaContextProvider.SchemaContext.GetXamlType(type); - if (xamlType == null) + if (xamlType is null) { return null; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/ClrObjectRuntime.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/ClrObjectRuntime.cs index 96beb76ed6d..061426ac968 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/ClrObjectRuntime.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/ClrObjectRuntime.cs @@ -4,9 +4,7 @@ #nullable disable -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Xaml; @@ -26,19 +24,21 @@ class ClrObjectRuntime : XamlRuntime public ClrObjectRuntime(XamlRuntimeSettings settings, bool isWriter) { - if (settings != null) + if (settings is not null) { _ignoreCanConvert = settings.IgnoreCanConvert; } + _isWriter = isWriter; } private static Exception UnwrapTargetInvocationException(Exception e) { - if(e is TargetInvocationException && e.InnerException != null) + if(e is TargetInvocationException && e.InnerException is not null) { return e.InnerException; } + return e; } @@ -48,6 +48,7 @@ public override object CreateInstance(XamlType xamlType, object[] args) { throw CreateException(SR.Format(SR.CannotCreateBadType, xamlType.Name)); } + try { return CreateInstanceWithCtor(xamlType, args); @@ -62,6 +63,7 @@ public override object CreateInstance(XamlType xamlType, object[] args) { throw; } + throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.UnderlyingType), UnwrapTargetInvocationException(ex)); } } @@ -74,10 +76,11 @@ protected virtual object CreateInstanceWithCtor(XamlType xamlType, object[] args public override object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args) { Type type = xamlType.UnderlyingType; - if (type == null) + if (type is null) { throw CreateException((SR.Format(SR.CannotResolveTypeForFactoryMethod, xamlType, methodName))); } + object instance = null; try { @@ -94,11 +97,12 @@ public override object CreateWithFactoryMethod(XamlType xamlType, string methodN throw CreateException(SR.Format(SR.MethodInvocation, qMethodName), UnwrapTargetInvocationException(e)); } - if (instance == null) + if (instance is null) { string qMethodName = $"{type}.{methodName}"; throw CreateException(SR.Format(SR.FactoryReturnedNull, qMethodName)); } + return instance; } @@ -111,23 +115,26 @@ protected virtual object InvokeFactoryMethod(Type type, string methodName, objec protected MethodInfo GetFactoryMethod(Type type, string methodName, object[] args, BindingFlags flags) { MethodInfo factory = null; - if (args == null || args.Length == 0) + if (args is null || args.Length == 0) { factory = type.GetMethod(methodName, flags, null, Type.EmptyTypes, null); } - if (factory == null) + + if (factory is null) { // We go down this path even if there are no args, because we might match a params array MemberInfo[] members = type.GetMember(methodName, MemberTypes.Method, flags); MethodBase[] methods = members as MethodBase[]; - if (methods == null) + if (methods is null) { methods = new MethodBase[members.Length]; Array.Copy(members, methods, members.Length); } + // This method throws if it can't find a match, so factory will never be null factory = (MethodInfo)BindToMethod(flags, methods, args); } + return factory; } @@ -164,6 +171,7 @@ public override bool CanConvertToString(XAML3.IValueSerializerContext context, X { throw; } + throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex); } } @@ -180,6 +188,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, TypeConve { throw; } + throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex); } } @@ -196,6 +205,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, TypeConverter { throw; } + throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex); } } @@ -212,6 +222,7 @@ public override string ConvertToString(XAML3.IValueSerializerContext context, XA { throw; } + throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex); } } @@ -228,6 +239,7 @@ public override T ConvertToValue(ITypeDescriptorContext context, TypeConverte { throw; } + throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(T)), ex); } } @@ -263,8 +275,10 @@ public override object GetValue(object obj, XamlMember property, bool failIfWrit { throw; } + throw CreateException(SR.Format(SR.GetValue, property), UnwrapTargetInvocationException(e)); } + return value; } @@ -281,6 +295,7 @@ public override void SetValue(object inst, XamlMember property, object value) { return; } + SetValue(property, inst, value); } catch(Exception e) @@ -289,6 +304,7 @@ public override void SetValue(object inst, XamlMember property, object value) { throw; } + throw CreateException(SR.Format(SR.SetValue, property), UnwrapTargetInvocationException(e)); } } @@ -310,6 +326,7 @@ public override void Add(object collection, XamlType collectionType, object valu { throw; } + throw CreateException(SR.Format(SR.AddCollection, collectionType), UnwrapTargetInvocationException(e)); } } @@ -326,6 +343,7 @@ public override void AddToDictionary(object collection, XamlType dictionaryType, { throw; } + throw CreateException(SR.Format(SR.AddDictionary, dictionaryType), UnwrapTargetInvocationException(e)); } } @@ -348,8 +366,10 @@ public override IList GetCollectionItems(object collection, XamlType col { throw; } + throw CreateException(SR.Format(SR.GetItemsException, collectionType), ex); } + return result; } @@ -363,7 +383,7 @@ public override IEnumerable GetDictionaryItems(object dictionar // - an IEnumerator>, or // - an IEnumerator that returns DictionaryEntrys IDictionaryEnumerator dictionaryEnumerator = enumerator as IDictionaryEnumerator; - if (dictionaryEnumerator != null) + if (dictionaryEnumerator is not null) { return DictionaryEntriesFromIDictionaryEnumerator(dictionaryEnumerator); } @@ -393,6 +413,7 @@ public override IEnumerable GetDictionaryItems(object dictionar { throw; } + throw CreateException(SR.Format(SR.GetItemsException, dictionaryType), ex); } } @@ -409,6 +430,7 @@ public override int AttachedPropertyCount(object instance) { throw; } + throw CreateException(SR.Format(SR.APSException, instance)); } } @@ -424,6 +446,7 @@ public override KeyValuePair[] GetAttachedPr result = new KeyValuePair[count]; AttachablePropertyServices.CopyPropertiesTo(instance, result, 0); } + return result; } catch (Exception ex) @@ -432,6 +455,7 @@ public override KeyValuePair[] GetAttachedPr { throw; } + throw CreateException(SR.Format(SR.APSException, instance)); } } @@ -441,7 +465,7 @@ public override void SetConnectionId(object root, int connectionId, object insta try { XAML3.IComponentConnector connector = root as XAML3.IComponentConnector; - if(connector != null) + if(connector is not null) { connector.Connect(connectionId, instance); } @@ -452,6 +476,7 @@ public override void SetConnectionId(object root, int connectionId, object insta { throw; } + throw CreateException(SR.SetConnectionId, e); } } @@ -461,7 +486,7 @@ public override void InitializationGuard(XamlType xamlType, object obj, bool beg try { ISupportInitialize supportInit = obj as ISupportInitialize; - if(supportInit != null) + if(supportInit is not null) { if(begin) { @@ -479,6 +504,7 @@ public override void InitializationGuard(XamlType xamlType, object obj, bool beg { throw; } + throw CreateException(SR.Format(SR.InitializationGuard, xamlType), e); } } @@ -496,6 +522,7 @@ public override object CallProvideValue(XAML3.MarkupExtension me, IServiceProvid { throw; } + throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e); } } @@ -505,7 +532,7 @@ public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) try { XAML3.IUriContext uriContext = obj as XAML3.IUriContext; - if(uriContext != null) + if(uriContext is not null) { uriContext.BaseUri = baseUri; } @@ -516,6 +543,7 @@ public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) { throw; } + throw CreateException(SR.Format(SR.AddDictionary, xamlType), e); } } @@ -526,16 +554,17 @@ public override void SetXmlInstance(object inst, XamlMember property, XAML3.XDat { object propInstance = GetValue(inst, property, true); IXmlSerializable iXmlSerial = propInstance as IXmlSerializable; - if(iXmlSerial == null) + if(iXmlSerial is null) { throw CreateException((SR.Format(SR.XmlDataNull, property.Name))); } XmlReader reader = xData.XmlReader as XmlReader; - if(reader == null) + if(reader is null) { throw new XamlInternalException(SR.Format(SR.XmlValueNotReader, property.Name)); } + try { iXmlSerial.ReadXml(reader); @@ -546,6 +575,7 @@ public override void SetXmlInstance(object inst, XamlMember property, XAML3.XDat { throw; } + throw CreateException(SR.Format(SR.SetXmlInstance, property), e); } } @@ -562,24 +592,27 @@ public override object DeferredLoad(ServiceProviderContext serviceContext, try { XamlDeferringLoader converter = GetConverterInstance(deferringLoader); - if(converter == null) + if(converter is null) { throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); } + return converter.Load(deferredContent, serviceContext); } catch (Exception e) { // Reset the reader in case our caller catches and retries IXamlIndexingReader indexingReader = deferredContent as IXamlIndexingReader; - if(indexingReader != null && indexingReader.CurrentIndex >= 0) + if(indexingReader is not null && indexingReader.CurrentIndex >= 0) { indexingReader.CurrentIndex = -1; } + if (CriticalExceptions.IsCriticalException(e) || e is XamlException) { throw; } + throw CreateException(SR.DeferredLoad, e); } } @@ -591,10 +624,11 @@ public override XamlReader DeferredSave(IServiceProvider serviceContext, try { XamlDeferringLoader converter = GetConverterInstance(deferringLoader); - if (converter == null) + if (converter is null) { throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); } + return converter.Save(value, serviceContext); } catch (Exception e) @@ -603,6 +637,7 @@ public override XamlReader DeferredSave(IServiceProvider serviceContext, { throw; } + throw CreateException(SR.DeferredSave, e); } } @@ -619,6 +654,7 @@ public override ShouldSerializeResult ShouldSerialize(XamlMember member, object { throw; } + throw CreateException(SR.Format(SR.ShouldSerializeFailed, member)); } } @@ -629,7 +665,7 @@ private object CreateObjectWithTypeConverter(ServiceProviderContext serviceConte TypeConverter typeConverter = GetConverterInstance(ts); object obj; - if (typeConverter != null) + if (typeConverter is not null) { // We sometimes ignoreCanConvert for WPFv3 Compatibility (but only if a string is coming in) if (_ignoreCanConvert && value.GetType() == typeof(string)) @@ -684,7 +720,8 @@ private XamlException CreateException(string message, Exception innerException) { ex = new XamlObjectReaderException(message, innerException); } - return (LineInfo != null) ? LineInfo.WithLineInfo(ex) : ex; + + return (LineInfo is not null) ? LineInfo.WithLineInfo(ex) : ex; } private IEnumerator GetItems(object collection, XamlType collectionType) @@ -700,12 +737,15 @@ private IEnumerator GetItems(object collection, XamlType collectionType) { throw; } + throw CreateException(SR.Format(SR.GetItemsException, collectionType), UnwrapTargetInvocationException(ex)); } - if (result == null) + + if (result is null) { throw CreateException(SR.Format(SR.GetItemsReturnedNull, collectionType)); } + return result; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/DynamicMethodRuntime.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/DynamicMethodRuntime.cs index c1aaf0c7eaf..48d75bc686a 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/DynamicMethodRuntime.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/DynamicMethodRuntime.cs @@ -4,13 +4,9 @@ #nullable disable -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; -using System.Security; using System.Xaml; using System.Xaml.MS.Impl; using System.Xaml.Permissions; @@ -18,7 +14,6 @@ namespace MS.Internal.Xaml.Runtime { - // Perf notes: // - Consider caching some bounded number of ctor/factory binding lookups, similar to what // Activator.CreateInstance does. @@ -68,10 +63,11 @@ private Dictionary PropertyGetDelegates { get { - if (_propertyGetDelegates == null) + if (_propertyGetDelegates is null) { _propertyGetDelegates = new Dictionary(); } + return _propertyGetDelegates; } } @@ -80,10 +76,11 @@ private Dictionary PropertySetDelegates { get { - if (_propertySetDelegates == null) + if (_propertySetDelegates is null) { _propertySetDelegates = new Dictionary(); } + return _propertySetDelegates; } } @@ -92,10 +89,11 @@ private Dictionary FactoryDelegates { get { - if (_factoryDelegates == null) + if (_factoryDelegates is null) { _factoryDelegates = new Dictionary(); } + return _factoryDelegates; } } @@ -104,10 +102,11 @@ private Dictionary ConverterInstances { get { - if (_converterInstances == null) + if (_converterInstances is null) { _converterInstances = new Dictionary(); } + return _converterInstances; } } @@ -116,41 +115,44 @@ private Dictionary DelegateCreators { get { - if (_delegateCreators == null) + if (_delegateCreators is null) { _delegateCreators = new Dictionary(); } + return _delegateCreators; } } internal DynamicMethodRuntime(XamlRuntimeSettings settings, XamlSchemaContext schemaContext, XamlAccessLevel accessLevel) - : base(settings, true /*isWriter*/) + : base(settings, isWriter: true) { - Debug.Assert(schemaContext != null); - Debug.Assert(accessLevel != null); + Debug.Assert(schemaContext is not null); + Debug.Assert(accessLevel is not null); _schemaContext = schemaContext; _localAssembly = Assembly.Load(accessLevel.AssemblyAccessToAssemblyName); - if (accessLevel.PrivateAccessToTypeName != null) + if (accessLevel.PrivateAccessToTypeName is not null) { - _localType = _localAssembly.GetType(accessLevel.PrivateAccessToTypeName, true /*throwOnError*/); + _localType = _localAssembly.GetType(accessLevel.PrivateAccessToTypeName, throwOnError: true); } } public override TConverterBase GetConverterInstance(XamlValueConverter ts) { Type clrType = ts.ConverterType; - if (clrType == null) + if (clrType is null) { return null; } + object result; if (!ConverterInstances.TryGetValue(clrType, out result)) { result = CreateInstanceWithCtor(clrType, null); ConverterInstances.Add(clrType, result); } + return (TConverterBase)result; } @@ -163,7 +165,7 @@ public override object CreateFromValue( if (ts == BuiltInValueConverter.Event) { string valueString = value as string; - if (valueString != null) + if (valueString is not null) { object rootObject; Type delegateType; @@ -172,6 +174,7 @@ public override object CreateFromValue( return CreateDelegate(delegateType, rootObject, valueString); } } + return base.CreateFromValue(serviceContext, ts, value, property); } @@ -184,6 +187,7 @@ protected override Delegate CreateDelegate(Type delegateType, object target, str creator = CreateDelegateCreator(targetType); DelegateCreators.Add(targetType, creator); } + return creator.Invoke(delegateType, target, methodName); } @@ -195,23 +199,26 @@ protected override object CreateInstanceWithCtor(XamlType xamlType, object[] arg private object CreateInstanceWithCtor(Type type, object[] args) { ConstructorInfo ctor = null; - if (args == null || args.Length == 0) + if (args is null || args.Length == 0) { ctor = type.GetConstructor(BF_AllInstanceMembers, null, Type.EmptyTypes, null); } - if (ctor == null) + + if (ctor is null) { // We go down this path even if there are no args, because we might match a params array ConstructorInfo[] ctors = type.GetConstructors(BF_AllInstanceMembers); // This method throws if it can't find a match, so ctor will never be null ctor = (ConstructorInfo)BindToMethod(BF_AllInstanceMembers, ctors, args); } + FactoryDelegate factoryDelegate; if (!FactoryDelegates.TryGetValue(ctor, out factoryDelegate)) { factoryDelegate = CreateFactoryDelegate(ctor); FactoryDelegates.Add(ctor, factoryDelegate); } + return factoryDelegate.Invoke(args); } @@ -224,13 +231,14 @@ protected override object InvokeFactoryMethod(Type type, string methodName, obje factoryDelegate = CreateFactoryDelegate(factory); FactoryDelegates.Add(factory, factoryDelegate); } + return factoryDelegate.Invoke(args); } protected override object GetValue(XamlMember member, object obj) { MethodInfo getter = member.Invoker.UnderlyingGetter; - if (getter == null) + if (getter is null) { throw new NotSupportedException(SR.Format(SR.CantGetWriteonlyProperty, member)); } @@ -241,13 +249,14 @@ protected override object GetValue(XamlMember member, object obj) getterDelegate = CreateGetDelegate(getter); PropertyGetDelegates.Add(getter, getterDelegate); } + return getterDelegate.Invoke(obj); } protected override void SetValue(XamlMember member, object obj, object value) { MethodInfo setter = member.Invoker.UnderlyingSetter; - if (setter == null) + if (setter is null) { throw new NotSupportedException(SR.Format(SR.CantSetReadonlyProperty, member)); } @@ -258,6 +267,7 @@ protected override void SetValue(XamlMember member, object obj, object value) setterDelegate = CreateSetDelegate(setter); PropertySetDelegates.Add(setter, setterDelegate); } + setterDelegate.Invoke(obj, value); } @@ -271,12 +281,13 @@ private DelegateCreator CreateDelegateCreator(Type targetType) // will fail if we the _localAssembly doesn't have RestrictedMemberAccess permission MethodInfo helper = targetType.GetMethod(KnownStrings.CreateDelegateHelper, helperFlags, null, new Type[] { typeof(Type), typeof(string) }, null); - if (helper == null) + if (helper is null) { - if (_delegateCreatorWithoutHelper == null) + if (_delegateCreatorWithoutHelper is null) { _delegateCreatorWithoutHelper = CreateDelegateCreatorWithoutHelper(); } + return _delegateCreatorWithoutHelper; } @@ -379,19 +390,21 @@ private LocalBuilder[] LoadArguments(ILGenerator ilGenerator, MethodBase method) Emit_CastTo(ilGenerator, paramType); } } + return locals; } // update object[] args from any variables passed by ref in LoadArguments private void UnloadArguments(ILGenerator ilGenerator, LocalBuilder[] locals) { - if (locals == null) + if (locals is null) { return; } + for (int i = 0; i < locals.Length; i++) { - if (locals[i] != null) + if (locals[i] is not null) { ilGenerator.Emit(OpCodes.Ldarg_0); Emit_ConstInt(ilGenerator, i); @@ -446,7 +459,7 @@ private PropertySetDelegate CreateSetDelegate(MethodInfo setter) private DynamicMethod CreateDynamicMethod(string name, Type returnType, params Type[] argTypes) { - if (_localType != null) + if (_localType is not null) { return new DynamicMethod(name, returnType, argTypes, _localType); } @@ -461,12 +474,13 @@ private Type GetTargetType(MethodInfo instanceMethod) Type declaringType = instanceMethod.DeclaringType; // Derived classes are not allowed to access protected members on instances of their base classes. // So if it it's an inherited protected member, we need to cast to the local type. - if (_localType != null && _localType != declaringType && declaringType.IsAssignableFrom(_localType)) + if (_localType is not null && _localType != declaringType && declaringType.IsAssignableFrom(_localType)) { if (instanceMethod.IsFamily || instanceMethod.IsFamilyAndAssembly) { return _localType; } + if (instanceMethod.IsFamilyOrAssembly) { // This is a non-security-critical check; we're attempting to do the right thing here, @@ -479,6 +493,7 @@ private Type GetTargetType(MethodInfo instanceMethod) } } } + // Otherwise just cast to the declaring type of the member return declaringType; } @@ -575,25 +590,28 @@ private void Emit_LateBoundInvoke(ILGenerator ilGenerator, Type targetType, stri // Assuming all arguments are reference types ilGenerator.Emit(OpCodes.Stelem_Ref); // args[i] = ldarg_paramArgNums[i] } + ilGenerator.Emit(OpCodes.Ldloc, args); - if (s_InvokeMemberMethod == null) + if (s_InvokeMemberMethod is null) { s_InvokeMemberMethod = typeof(Type).GetMethod(KnownStrings.InvokeMember, new Type[] { typeof(string), typeof(BindingFlags), typeof(Binder), typeof(object), typeof(object[]) }); } + ilGenerator.Emit(OpCodes.Callvirt, s_InvokeMemberMethod); } private void Emit_TypeOf(ILGenerator ilGenerator, Type type) { ilGenerator.Emit(OpCodes.Ldtoken, type); - if (s_GetTypeFromHandleMethod == null) + if (s_GetTypeFromHandleMethod is null) { s_GetTypeFromHandleMethod = typeof(Type).GetMethod( KnownStrings.GetTypeFromHandle, BindingFlags.Public | BindingFlags.Static, null, new Type[] { typeof(RuntimeTypeHandle) }, null); } + ilGenerator.Emit(OpCodes.Call, s_GetTypeFromHandleMethod); } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/PartialTrustTolerantRuntime.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/PartialTrustTolerantRuntime.cs index f61067056cc..5d5702ab4f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/PartialTrustTolerantRuntime.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Runtime/PartialTrustTolerantRuntime.cs @@ -4,9 +4,7 @@ #nullable disable -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Security; using System.Windows.Markup; @@ -39,7 +37,7 @@ class PartialTrustTolerantRuntime : XamlRuntime public PartialTrustTolerantRuntime(XamlRuntimeSettings runtimeSettings, XamlAccessLevel accessLevel, XamlSchemaContext schemaContext) { - _transparentRuntime = new ClrObjectRuntime(runtimeSettings, true /*isWriter*/); + _transparentRuntime = new ClrObjectRuntime(runtimeSettings, isWriter: true); _accessLevel = accessLevel; _schemaContext = schemaContext; } @@ -53,7 +51,7 @@ public override IAddLineInfo LineInfo set { _transparentRuntime.LineInfo = value; - if (_elevatedRuntime != null) + if (_elevatedRuntime is not null) { _elevatedRuntime.LineInfo = value; } @@ -84,6 +82,7 @@ public override object CreateFromValue(ServiceProviderContext serviceContext, Xa { return _transparentRuntime.CreateFromValue(serviceContext, ts, value, property); } + // We don't know if MissingMethodException is due to visibility or not. // So we fall back to the elevated runtime, but we don't set _memberAccessPermissionDenied. catch (MissingMethodException) @@ -95,6 +94,7 @@ public override object CreateFromValue(ServiceProviderContext serviceContext, Xa MemberAccessPermissionDenied = true; } } + return _elevatedRuntime.CreateFromValue(serviceContext, ts, value, property); } @@ -148,6 +148,7 @@ public override object CreateInstance(XamlType xamlType, object[] args) { MemberAccessPermissionDenied = true; } + // We don't know if MissingMethodException is due to visibility or not. // So we fall back to the elevated runtime, but we don't set _memberAccessPermissionDenied. else if (ex.InnerException is MissingMethodException) @@ -160,6 +161,7 @@ public override object CreateInstance(XamlType xamlType, object[] args) } } } + return _elevatedRuntime.CreateInstance(xamlType, args); } @@ -177,6 +179,7 @@ public override object CreateWithFactoryMethod(XamlType xamlType, string methodN { MemberAccessPermissionDenied = true; } + // We don't know if MissingMethodException is due to visibility or not. // So we fall back to the elevated runtime, but we don't set _memberAccessPermissionDenied. else if (ex.InnerException is MissingMethodException) @@ -189,6 +192,7 @@ public override object CreateWithFactoryMethod(XamlType xamlType, string methodN } } } + return _elevatedRuntime.CreateWithFactoryMethod(xamlType, methodName, args); } @@ -218,6 +222,7 @@ public override object DeferredLoad(ServiceProviderContext serviceContext, XamlV } } } + return _elevatedRuntime.DeferredLoad(serviceContext, deferringLoader, deferredContent); } @@ -253,6 +258,7 @@ public override XamlReader DeferredSave(IServiceProvider context, MemberAccessPermissionDenied = true; } } + return _elevatedRuntime.DeferredSave(context, deferringLoader, value); } @@ -264,6 +270,7 @@ public override TConverterBase GetConverterInstance(XamlValueCon { return _transparentRuntime.GetConverterInstance(converter); } + // We don't know if MissingMethodException is due to visibility or not. // So we fall back to the elevated runtime, but we don't set _memberAccessPermissionDenied. catch (MissingMethodException) @@ -279,6 +286,7 @@ public override TConverterBase GetConverterInstance(XamlValueCon MemberAccessPermissionDenied = true; } } + return _elevatedRuntime.GetConverterInstance(converter); } @@ -306,6 +314,7 @@ public override object GetValue(object obj, XamlMember property, bool failIfWrit MemberAccessPermissionDenied = true; } } + return _elevatedRuntime.GetValue(obj, property, failIfWriteOnly); } @@ -352,6 +361,7 @@ public override void SetValue(object obj, XamlMember property, object value) MemberAccessPermissionDenied = true; } } + _elevatedRuntime.SetValue(obj, property, value); } @@ -380,6 +390,7 @@ public override void SetXmlInstance(object inst, XamlMember property, XData xDat MemberAccessPermissionDenied = true; } } + _elevatedRuntime.SetXmlInstance(inst, property, xData); return; } @@ -415,7 +426,7 @@ private bool MemberAccessPermissionDenied private void EnsureElevatedRuntime() { - if (_elevatedRuntime == null) + if (_elevatedRuntime is null) { _elevatedRuntime = new DynamicMethodRuntime( _transparentRuntime.GetSettings(), _schemaContext, _accessLevel); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/BuiltInValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/BuiltInValueConverter.cs index dc27fa4ce49..8e90d6e8124 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/BuiltInValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/BuiltInValueConverter.cs @@ -74,94 +74,117 @@ internal static XamlValueConverter GetTypeConverter(Type targetTy { return String; } + if (typeof(object) == targetType) { return Object; } + if (typeof(int) == targetType) { return Int32; } + if (typeof(short) == targetType) { return s_Int16 ??= new BuiltInValueConverter(typeof(Int16Converter), () => new Int16Converter()); } + if (typeof(long) == targetType) { return s_Int64 ??= new BuiltInValueConverter(typeof(Int64Converter), () => new Int64Converter()); } + if (typeof(uint) == targetType) { return s_UInt32 ??= new BuiltInValueConverter(typeof(UInt32Converter), () => new UInt32Converter()); } + if (typeof(ushort) == targetType) { return s_UInt16 ??= new BuiltInValueConverter(typeof(UInt16Converter), () => new UInt16Converter()); } + if (typeof(ulong) == targetType) { return s_UInt64 ??= new BuiltInValueConverter(typeof(UInt64Converter), () => new UInt64Converter()); } + if (typeof(bool) == targetType) { return s_Boolean ??= new BuiltInValueConverter(typeof(BooleanConverter), () => new BooleanConverter()); } + if (typeof(double) == targetType) { return s_Double ??= new BuiltInValueConverter(typeof(DoubleConverter), () => new DoubleConverter()); } + if (typeof(float) == targetType) { return s_Single ??= new BuiltInValueConverter(typeof(SingleConverter), () => new SingleConverter()); } + if (typeof(byte) == targetType) { return s_Byte ??= new BuiltInValueConverter(typeof(ByteConverter), () => new ByteConverter()); } + if (typeof(sbyte) == targetType) { return s_SByte ??= new BuiltInValueConverter(typeof(SByteConverter), () => new SByteConverter()); } + if (typeof(char) == targetType) { return s_Char ??= new BuiltInValueConverter(typeof(CharConverter), () => new CharConverter()); } + if (typeof(decimal) == targetType) { return s_Decimal ??= new BuiltInValueConverter(typeof(DecimalConverter), () => new DecimalConverter()); } + if (typeof(TimeSpan) == targetType) { return s_TimeSpan ??= new BuiltInValueConverter(typeof(TimeSpanConverter), () => new TimeSpanConverter()); } + if (typeof(Guid) == targetType) { return s_Guid ??= new BuiltInValueConverter(typeof(GuidConverter), () => new GuidConverter()); } + if (typeof(Type).IsAssignableFrom(targetType)) { return s_Type ??= new BuiltInValueConverter(typeof(System.Xaml.Replacements.TypeTypeConverter), () => new System.Xaml.Replacements.TypeTypeConverter()); } + if (typeof(Type[]).IsAssignableFrom(targetType)) { return s_TypeList ??= new BuiltInValueConverter(typeof(System.Xaml.Replacements.TypeListConverter), () => new System.Xaml.Replacements.TypeListConverter()); } + if (typeof(DateTime) == targetType) { return s_DateTime ??= new BuiltInValueConverter(typeof(System.Xaml.Replacements.DateTimeConverter2), () => new System.Xaml.Replacements.DateTimeConverter2()); } + if (typeof(DateTimeOffset) == targetType) { return s_DateTimeOffset ??= new BuiltInValueConverter(typeof(System.Xaml.Replacements.DateTimeOffsetConverter2), () => new System.Xaml.Replacements.DateTimeOffsetConverter2()); } + if (typeof(CultureInfo).IsAssignableFrom(targetType)) { return s_CultureInfo ??= new BuiltInValueConverter(typeof(CultureInfoConverter), () => new CultureInfoConverter()); } + if (typeof(Delegate).IsAssignableFrom(targetType)) { return s_Delegate ??= new BuiltInValueConverter(typeof(EventConverter), () => new EventConverter()); } + if (typeof(Uri).IsAssignableFrom(targetType)) { if(s_Uri is null) @@ -172,7 +195,7 @@ internal static XamlValueConverter GetTypeConverter(Type targetTy stdConverter = TypeDescriptor.GetConverter(typeof(Uri)); // The TypeConverter for Uri, if one is found, should be capable of converting from { String, Uri } // and converting to { String, Uri, System.ComponentModel.Design.Serialization.InstanceDescriptor } - if (stdConverter == null || + if (stdConverter is null || !stdConverter.CanConvertFrom(typeof(string)) || !stdConverter.CanConvertFrom(typeof(Uri)) || !stdConverter.CanConvertTo(typeof(string)) || !stdConverter.CanConvertTo(typeof(Uri)) || !stdConverter.CanConvertTo(typeof(InstanceDescriptor))) { @@ -183,7 +206,7 @@ internal static XamlValueConverter GetTypeConverter(Type targetTy { } - if (stdConverter == null) + if (stdConverter is null) { s_Uri = new BuiltInValueConverter(typeof(TypeUriConverter), () => new TypeUriConverter()); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/CollectionReflector.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/CollectionReflector.cs index 0d2f900ad73..bca36149fa9 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/CollectionReflector.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/CollectionReflector.cs @@ -5,7 +5,6 @@ #nullable disable using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Xaml.MS.Impl; @@ -41,7 +40,7 @@ internal static XamlCollectionKind LookupCollectionKind(Type type, out MethodInf // Dictionaries and Collections must implement IEnumerable or have method // GetEnumerator() where return type is assignable to IEnumerator bool isIEnumerable = typeof(IEnumerable).IsAssignableFrom(type); - if (!isIEnumerable && LookupEnumeratorMethod(type) == null) + if (!isIEnumerable && LookupEnumeratorMethod(type) is null) { return XamlCollectionKind.None; } @@ -51,6 +50,7 @@ internal static XamlCollectionKind LookupCollectionKind(Type type, out MethodInf { return XamlCollectionKind.Dictionary; } + if (TryGetIDictionaryAdder(type, out addMethod)) { return XamlCollectionKind.Dictionary; @@ -60,17 +60,19 @@ internal static XamlCollectionKind LookupCollectionKind(Type type, out MethodInf { return XamlCollectionKind.Collection; } + if (TryGetICollectionAdder(type, out addMethod)) { return XamlCollectionKind.Collection; } // If the type doesn't match any of the interfaces, check for Add methods - if (TryGetDictionaryAdder(type, false /*mayBeIDictionary*/, out addMethod)) + if (TryGetDictionaryAdder(type, mayBeIDictionary: false, out addMethod)) { return XamlCollectionKind.Dictionary; } - if (TryGetCollectionAdder(type, false /*mayBeICollection*/, out addMethod)) + + if (TryGetCollectionAdder(type, mayBeICollection: false, out addMethod)) { return XamlCollectionKind.Collection; } @@ -84,20 +86,23 @@ internal static MethodInfo LookupAddMethod(Type type, XamlCollectionKind collect switch (collectionKind) { case XamlCollectionKind.Collection: - bool isCollection = TryGetCollectionAdder(type, true /*mayBeICollection*/, out result); - if (isCollection && result == null) + bool isCollection = TryGetCollectionAdder(type, mayBeICollection: true, out result); + if (isCollection && result is null) { throw new XamlSchemaException(SR.Format(SR.AmbiguousCollectionItemType, type)); } + break; case XamlCollectionKind.Dictionary: - bool isDictionary = TryGetDictionaryAdder(type, true /*mayBeIDictionary*/, out result); - if (isDictionary && result == null) + bool isDictionary = TryGetDictionaryAdder(type, mayBeIDictionary: true, out result); + if (isDictionary && result is null) { throw new XamlSchemaException(SR.Format(SR.AmbiguousDictionaryItemType, type)); } + break; } + return result; } @@ -107,7 +112,7 @@ private static bool TryGetICollectionAdder(Type type, out MethodInfo addMethod) { bool hasMoreThanOneICollection = false; Type genericICollection = GetGenericInterface(type, typeof(ICollection<>), out hasMoreThanOneICollection); - if (genericICollection != null) + if (genericICollection is not null) { addMethod = genericICollection.GetMethod(KnownStrings.Add); return true; @@ -129,7 +134,7 @@ private static bool TryGetCollectionAdder(Type type, bool mayBeICollection, out // Look for ICollection implementation if (TryGetICollectionAdder(type, out addMethod)) { - if (addMethod != null) + if (addMethod is not null) { return true; } @@ -144,11 +149,12 @@ private static bool TryGetCollectionAdder(Type type, bool mayBeICollection, out // Else if it implements IList, the item type is Object bool hasMoreThanOneAddMethod = false; addMethod = GetAddMethod(type, 1, out hasMoreThanOneAddMethod); - if (addMethod == null && typeof(IList).IsAssignableFrom(type)) + if (addMethod is null && typeof(IList).IsAssignableFrom(type)) { addMethod = IListAddMethod; } - if (addMethod != null) + + if (addMethod is not null) { return true; } @@ -171,7 +177,7 @@ private static bool TryGetIDictionaryAdder(Type type, out MethodInfo addMethod) { bool hasMoreThanOneIDictionary = false; Type genericIDictionary = GetGenericInterface(type, typeof(IDictionary<,>), out hasMoreThanOneIDictionary); - if (genericIDictionary != null) + if (genericIDictionary is not null) { addMethod = GetPublicMethod(genericIDictionary, KnownStrings.Add, 2); return true; @@ -193,7 +199,7 @@ private static bool TryGetDictionaryAdder(Type type, bool mayBeIDictionary, out // Look for IDictionary implementation if (TryGetIDictionaryAdder(type, out addMethod)) { - if (addMethod != null) + if (addMethod is not null) { return true; } @@ -208,11 +214,12 @@ private static bool TryGetDictionaryAdder(Type type, bool mayBeIDictionary, out // Else if it implements non-generic IDictionary, key and item types are Object bool hasMoreThanOneAddMethod = false; addMethod = GetAddMethod(type, 2, out hasMoreThanOneAddMethod); - if (addMethod == null && typeof(IDictionary).IsAssignableFrom(type)) + if (addMethod is null && typeof(IDictionary).IsAssignableFrom(type)) { addMethod = IDictionaryAddMethod; } - if (addMethod != null) + + if (addMethod is not null) { return true; } @@ -254,16 +261,18 @@ internal static MethodInfo GetIsReadOnlyMethod(Type collectionType, Type itemTyp MethodInfo isReadOnlyMethod = genericICollection.GetProperty(KnownStrings.IsReadOnly).GetGetMethod(); return isReadOnlyMethod; } + return null; } private static MethodInfo LookupEnumeratorMethod(Type type) { MethodInfo result = GetMethod(type, KnownStrings.GetEnumerator, Type.EmptyTypes); - if ((result != null) && !typeof(IEnumerator).IsAssignableFrom(result.ReturnType)) + if ((result is not null) && !typeof(IEnumerator).IsAssignableFrom(result.ReturnType)) { result = null; } + return result; } @@ -275,19 +284,22 @@ private static Type GetGenericInterface(Type type, Type interfaceType, out bool { return type; } + foreach (Type currentInterface in type.GetInterfaces()) { if (currentInterface.IsGenericType && currentInterface.GetGenericTypeDefinition() == interfaceType) { - if (result != null) + if (result is not null) { // More than one genericType implemented hasMultiple = true; return null; } + result = currentInterface; } } + return result; } @@ -295,7 +307,7 @@ private static MethodInfo GetAddMethod(Type type, int paramCount, out bool hasMo { MethodInfo result = null; MemberInfo[] addMembers = type.GetMember(KnownStrings.Add, MemberTypes.Method, GetBindingFlags(type)); - if (addMembers != null) + if (addMembers is not null) { foreach (MemberInfo mi in addMembers) { @@ -304,20 +316,24 @@ private static MethodInfo GetAddMethod(Type type, int paramCount, out bool hasMo { continue; } + ParameterInfo[] paramInfos = method.GetParameters(); - if (paramInfos == null || paramInfos.Length != paramCount) + if (paramInfos is null || paramInfos.Length != paramCount) { continue; } - if (result != null) + + if (result is not null) { // More than one Add method hasMoreThanOne = true; return null; } + result = method; } } + hasMoreThanOne = false; return result; } @@ -331,16 +347,18 @@ private static BindingFlags GetBindingFlags(Type type) { flags |= BindingFlags.NonPublic; } + return flags; } private static MethodInfo GetMethod(Type type, string name, Type[] argTypes) { MethodInfo result = type.GetMethod(name, GetBindingFlags(type), null, argTypes, null); - if (result != null && !TypeReflector.IsPublicOrInternal(result)) + if (result is not null && !TypeReflector.IsPublicOrInternal(result)) { result = null; } + return result; } @@ -355,6 +373,7 @@ private static MethodInfo GetPublicMethod(Type type, string name, int argCount) return method; } } + return null; } @@ -362,10 +381,11 @@ private static Type[] TypeOfObjectArray { get { - if (s_typeOfObjectArray == null) + if (s_typeOfObjectArray is null) { s_typeOfObjectArray = new Type[] { typeof(object) }; } + return s_typeOfObjectArray; } } @@ -374,10 +394,11 @@ private static Type[] TypeOfTwoObjectArray { get { - if (s_typeOfTwoObjectArray == null) + if (s_typeOfTwoObjectArray is null) { s_typeOfTwoObjectArray = new Type[] { typeof(object), typeof(object) }; } + return s_typeOfTwoObjectArray; } } @@ -386,10 +407,11 @@ private static MethodInfo IEnumerableGetEnumeratorMethod { get { - if (s_getEnumeratorMethod == null) + if (s_getEnumeratorMethod is null) { s_getEnumeratorMethod = typeof(IEnumerable).GetMethod(KnownStrings.GetEnumerator); } + return s_getEnumeratorMethod; } } @@ -398,10 +420,11 @@ private static MethodInfo IListAddMethod { get { - if (s_listAddMethod == null) + if (s_listAddMethod is null) { s_listAddMethod = typeof(IList).GetMethod(KnownStrings.Add); } + return s_listAddMethod; } } @@ -410,10 +433,11 @@ private static MethodInfo IDictionaryAddMethod { get { - if (s_dictionaryAddMethod == null) + if (s_dictionaryAddMethod is null) { s_dictionaryAddMethod = typeof(IDictionary).GetMethod(KnownStrings.Add); } + return s_dictionaryAddMethod; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/MemberReflector.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/MemberReflector.cs index ca49717a487..e18c07dde5f 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/MemberReflector.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/MemberReflector.cs @@ -4,10 +4,8 @@ #nullable disable -using System.Collections.Generic; using System.ComponentModel; using System.Reflection; -using System.Security; using System.Windows.Markup; namespace System.Xaml.Schema @@ -50,6 +48,7 @@ internal MemberReflector(bool isEvent) { _memberBits = (int)BoolMemberBits.Event; } + _memberBits |= GetValidMask((int)BoolMemberBits.Event); } @@ -79,7 +78,7 @@ internal static MemberReflector UnknownReflector { get { - if (s_UnknownReflector == null) + if (s_UnknownReflector is null) { s_UnknownReflector = new MemberReflector(); s_UnknownReflector._designerSerializationVisibility = DesignerSerializationVisibility.Visible; @@ -97,6 +96,7 @@ internal static MemberReflector UnknownReflector s_UnknownReflector.Invoker = XamlMemberInvoker.UnknownInvoker; s_UnknownReflector.Type = XamlLanguage.Object; } + return s_UnknownReflector; } } @@ -220,10 +220,11 @@ internal void SetFlag(BoolMemberBits flag, bool value) // Assumes method type args (if any) are visible internal static bool IsInternalVisibleTo(MethodInfo method, Assembly accessingAssembly, XamlSchemaContext schemaContext) { - if (accessingAssembly == null) + if (accessingAssembly is null) { return false; } + if (method.IsAssembly || method.IsFamilyOrAssembly) { if (TypeReflector.IsInternal(method.DeclaringType)) @@ -231,9 +232,11 @@ internal static bool IsInternalVisibleTo(MethodInfo method, Assembly accessingAs // We've already done an internals visibility check for the declaring type return true; } + return schemaContext.AreInternalsVisibleTo( method.DeclaringType.Assembly, accessingAssembly); } + return false; } @@ -241,7 +244,7 @@ internal static bool IsInternalVisibleTo(MethodInfo method, Assembly accessingAs // Assumes method type args (if any) are visible internal static bool IsProtectedVisibleTo(MethodInfo method, Type derivedType, XamlSchemaContext schemaContext) { - if (derivedType == null) + if (derivedType is null) { return false; } @@ -252,10 +255,12 @@ internal static bool IsProtectedVisibleTo(MethodInfo method, Type derivedType, X { return false; } + if (method.IsFamily || method.IsFamilyOrAssembly) { return true; } + if (method.IsFamilyAndAssembly) { if (TypeReflector.IsInternal(method.DeclaringType)) @@ -263,9 +268,11 @@ internal static bool IsProtectedVisibleTo(MethodInfo method, Type derivedType, X // We've already done an internals visibility check for the declaring type return true; } + return schemaContext.AreInternalsVisibleTo( method.DeclaringType.Assembly, derivedType.Assembly); } + return false; } @@ -281,10 +288,10 @@ internal static bool GenericArgumentsAreVisibleTo(MethodInfo method, Assembly ac } } } + return true; } - // Used by Reflector for attribute lookups protected override MemberInfo Member { diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/ReferenceEqualityComparer.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/ReferenceEqualityComparer.cs index f21f3e677d3..52307f3fe29 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/ReferenceEqualityComparer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/ReferenceEqualityComparer.cs @@ -5,8 +5,6 @@ #nullable disable using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; namespace System.Xaml.Schema { diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/Reflector.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/Reflector.cs index 84e1fa57bca..82ec57a9f67 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/Reflector.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/Reflector.cs @@ -4,10 +4,8 @@ #nullable disable -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Threading; using System.Windows.Markup; @@ -44,14 +42,15 @@ internal void SetCustomAttributeProviderVolatile(ICustomAttributeProvider value) public bool IsAttributePresent(Type attributeType) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { return CustomAttributeProvider.IsDefined(attributeType, false); } + try { CustomAttributeData cad = GetAttribute(attributeType); - return (cad != null); + return (cad is not null); } catch (CustomAttributeFormatException) { @@ -63,61 +62,72 @@ public bool IsAttributePresent(Type attributeType) // Returns null if attribute wasn't found, string.Empty if attribute string was null or empty public string GetAttributeString(Type attributeType, out bool checkedInherited) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { // Passes inherit=true for reasons explained in comment on XamlType.TryGetAttributeString checkedInherited = true; - object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, true /*inherit*/); + object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, inherit: true); if (attributes.Length == 0) { return null; } + if (attributeType == typeof(ContentPropertyAttribute)) { return ((ContentPropertyAttribute)attributes[0]).Name; } + if (attributeType == typeof(RuntimeNamePropertyAttribute)) { return ((RuntimeNamePropertyAttribute)attributes[0]).Name; } + if (attributeType == typeof(DictionaryKeyPropertyAttribute)) { return ((DictionaryKeyPropertyAttribute)attributes[0]).Name; } + if (attributeType == typeof(XamlSetMarkupExtensionAttribute)) { return ((XamlSetMarkupExtensionAttribute)attributes[0]).XamlSetMarkupExtensionHandler; } + if (attributeType == typeof(XamlSetTypeConverterAttribute)) { return ((XamlSetTypeConverterAttribute)attributes[0]).XamlSetTypeConverterHandler; } + if (attributeType == typeof(UidPropertyAttribute)) { return ((UidPropertyAttribute)attributes[0]).Name; } + if (attributeType == typeof(XmlLangPropertyAttribute)) { return ((XmlLangPropertyAttribute)attributes[0]).Name; } + if (attributeType == typeof(ConstructorArgumentAttribute)) { return ((ConstructorArgumentAttribute)attributes[0]).ArgumentName; } + Debug.Fail($"Unexpected attribute type requested: {attributeType.Name}"); return null; } + try { // CustomAttributeData doesn't have an inherit=true option checkedInherited = false; CustomAttributeData cad = GetAttribute(attributeType); - if (cad == null) + if (cad is null) { return null; } + return Extract(cad) ?? string.Empty; } catch (CustomAttributeFormatException) @@ -129,7 +139,7 @@ public string GetAttributeString(Type attributeType, out bool checkedInherited) public IReadOnlyDictionary GetBracketCharacterAttributes(Type attributeType) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, false); if (attributes.Length == 0) @@ -163,33 +173,38 @@ public IReadOnlyDictionary GetBracketCharacterAttributes(Type attrib public T? GetAttributeValue(Type attributeType) where T : struct { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, false); if (attributes.Length == 0) { return null; } + if (attributeType == typeof(DesignerSerializationVisibilityAttribute)) { DesignerSerializationVisibility result = ((DesignerSerializationVisibilityAttribute)attributes[0]).Visibility; return (T)(object)result; } + if (attributeType == typeof(UsableDuringInitializationAttribute)) { bool result = ((UsableDuringInitializationAttribute)attributes[0]).Usable; return (T)(object)result; } + Debug.Fail($"Unexpected attribute type requested: {attributeType.Name}"); return null; } + try { CustomAttributeData cad = GetAttribute(attributeType); - if (cad == null) + if (cad is null) { return null; } + return Extract(cad); } catch (CustomAttributeFormatException) @@ -201,36 +216,42 @@ public IReadOnlyDictionary GetBracketCharacterAttributes(Type attrib public Type GetAttributeType(Type attributeType) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, false); if (attributes.Length == 0) { return null; } + if (attributeType == typeof(TypeConverterAttribute)) { string typeName = ((TypeConverterAttribute)attributes[0]).ConverterTypeName; return Type.GetType(typeName); } + if (attributeType == typeof(MarkupExtensionReturnTypeAttribute)) { return ((MarkupExtensionReturnTypeAttribute)attributes[0]).ReturnType; } + if (attributeType == typeof(ValueSerializerAttribute)) { return ((ValueSerializerAttribute)attributes[0]).ValueSerializerType; } + Debug.Fail($"Unexpected attribute type requested: {attributeType.Name}"); return null; } + try { CustomAttributeData cad = GetAttribute(attributeType); - if (cad == null) + if (cad is null) { return null; } + return ExtractType(cad); } catch (CustomAttributeFormatException) @@ -242,13 +263,14 @@ public Type GetAttributeType(Type attributeType) public Type[] GetAttributeTypes(Type attributeType, int count) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, false); if (attributes.Length == 0) { return null; } + Debug.Assert(attributeType == typeof(XamlDeferLoadAttribute)); Debug.Assert(count == 2); XamlDeferLoadAttribute tca = (XamlDeferLoadAttribute)attributes[0]; @@ -256,13 +278,15 @@ public Type[] GetAttributeTypes(Type attributeType, int count) Type contentType = Type.GetType(tca.ContentTypeName); return new Type[] { converterType, contentType }; } + try { CustomAttributeData cad = GetAttribute(attributeType); - if (cad == null) + if (cad is null) { return null; } + return ExtractTypes(cad, count); } catch (CustomAttributeFormatException) @@ -274,13 +298,14 @@ public Type[] GetAttributeTypes(Type attributeType, int count) public List GetAllAttributeContents(Type attributeType) { - if (CustomAttributeProvider != null) + if (CustomAttributeProvider is not null) { object[] attributes = CustomAttributeProvider.GetCustomAttributes(attributeType, false); if (attributes.Length == 0) { return null; } + List result = new List(); if (attributeType == typeof(ContentWrapperAttribute)) @@ -289,6 +314,7 @@ public List GetAllAttributeContents(Type attributeType) { result.Add((T)(object)attribute.ContentWrapper); } + return result; } @@ -298,13 +324,14 @@ public List GetAllAttributeContents(Type attributeType) { result.Add((T)(object)attribute.Name); } + return result; } Debug.Fail($"Unexpected attribute type requested: {attributeType.Name}"); return null; - } + try { List cads = new List(); @@ -313,12 +340,14 @@ public List GetAllAttributeContents(Type attributeType) { return null; } + List types = new List(); foreach (CustomAttributeData cad in cads) { T content = Extract(cad); types.Add((T)(object)content); } + return types; } catch (CustomAttributeFormatException) @@ -336,10 +365,11 @@ public List GetAllAttributeContents(Type attributeType) protected static bool? GetFlag(int bitMask, int bitToCheck) { int validBit = GetValidMask(bitToCheck); - if (0 != (bitMask & validBit)) + if ((bitMask & validBit) != 0) { - return 0 != (bitMask & bitToCheck); + return (bitMask & bitToCheck) != 0; } + return null; } @@ -416,10 +446,12 @@ private Type ExtractType(CustomAttributeData cad) { result = ExtractType(cad.ConstructorArguments[0]); } - if (result == null) + + if (result is null) { ThrowInvalidMetadata(cad, 1, typeof(Type)); } + return result; } @@ -429,15 +461,17 @@ private Type[] ExtractTypes(CustomAttributeData cad, int count) { ThrowInvalidMetadata(cad, count, typeof(Type)); } + Type[] result = new Type[count]; for (int i = 0; i < count; i++) { result[i] = ExtractType(cad.ConstructorArguments[i]); - if (result[i] == null) + if (result[i] is null) { ThrowInvalidMetadata(cad, count, typeof(Type)); } } + return result; } @@ -452,6 +486,7 @@ private Type ExtractType(CustomAttributeTypedArgument arg) string typeName = (string)arg.Value; return Type.GetType(typeName); } + return null; } @@ -467,12 +502,13 @@ private T Extract(CustomAttributeData cad) { ThrowInvalidMetadata(cad, 1, typeof(T)); } + return (T)cad.ConstructorArguments[0].Value; } protected void EnsureAttributeData() { - if (_attributeData == null) + if (_attributeData is null) { _attributeData = CustomAttributeData.GetCustomAttributes(Member); } @@ -488,6 +524,7 @@ private CustomAttributeData GetAttribute(Type attributeType) return _attributeData[i]; } } + return null; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/SafeReflectionInvoker.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/SafeReflectionInvoker.cs deleted file mode 100644 index 9eed790c8c3..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/SafeReflectionInvoker.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#nullable disable - -using System.Diagnostics.CodeAnalysis; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security; - -namespace System.Xaml.Schema -{ - static class SafeReflectionInvoker - { - static readonly Assembly SystemXaml = typeof(SafeReflectionInvoker).Assembly; - - public static bool IsInSystemXaml(Type type) - { - if (type.Assembly == SystemXaml) - { - return true; - } - if (type.IsGenericType) - { - foreach (Type typeArg in type.GetGenericArguments()) - { - if (IsInSystemXaml(typeArg)) - { - return true; - } - } - } - return false; - } - // ^^^^^----- End of unused members. -----^^^^^ - - // vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv - internal static bool IsSystemXamlNonPublic(MethodInfo method) - { - Type declaringType = method.DeclaringType; - if (IsInSystemXaml(declaringType) && (!method.IsPublic || !declaringType.IsVisible)) - { - return true; - } - if (method.IsGenericMethod) - { - foreach (Type typeArg in method.GetGenericArguments()) - { - if (IsInSystemXaml(typeArg) && !typeArg.IsVisible) - { - return true; - } - } - } - return false; - } - // ^^^^^----- End of unused members. -----^^^^^ - } -} diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/TypeReflector.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/TypeReflector.cs index e8da843093d..48d180f9719 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/TypeReflector.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/TypeReflector.cs @@ -5,9 +5,7 @@ #nullable disable using System.Collections.Concurrent; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Threading; using System.Xaml.MS.Impl; @@ -110,10 +108,11 @@ internal static TypeReflector UnknownReflector { get { - if (s_UnknownReflector == null) + if (s_UnknownReflector is null) { s_UnknownReflector = new TypeReflector(); } + return s_UnknownReflector; } } @@ -127,11 +126,13 @@ internal static bool IsVisibleTo(Type type, Assembly accessingAssembly, XamlSche { return false; } + if (visibility == TypeVisibility.Internal && !schemaContext.AreInternalsVisibleTo(type.Assembly, accessingAssembly)) { return false; } + if (type.IsGenericType) { foreach (Type typeArg in type.GetGenericArguments()) @@ -146,6 +147,7 @@ internal static bool IsVisibleTo(Type type, Assembly accessingAssembly, XamlSche { return IsVisibleTo(type.GetElementType(), accessingAssembly, schemaContext); } + return true; } @@ -169,11 +171,12 @@ internal ThreadSafeDictionary AttachableMembers { get { - if (_attachableMemberCache == null) + if (_attachableMemberCache is null) { Interlocked.CompareExchange(ref _attachableMemberCache, new ThreadSafeDictionary(), null); } + return _attachableMemberCache; } } @@ -240,11 +243,12 @@ internal ThreadSafeDictionary Members { get { - if (_nonAttachableMemberCache == null) + if (_nonAttachableMemberCache is null) { Interlocked.CompareExchange(ref _nonAttachableMemberCache, new ThreadSafeDictionary(), null); } + return _nonAttachableMemberCache; } } @@ -288,7 +292,7 @@ internal EventHandler XamlSetTypeConverterH internal bool TryGetPositionalParameters(int paramCount, out IList result) { result = null; - if (_positionalParameterTypes == null) + if (_positionalParameterTypes is null) { if (IsUnknown) { @@ -298,12 +302,13 @@ internal bool TryGetPositionalParameters(int paramCount, out IList res Interlocked.CompareExchange(ref _positionalParameterTypes, new ThreadSafeDictionary>(), null); } + return _positionalParameterTypes.TryGetValue(paramCount, out result); } internal IList TryAddPositionalParameters(int paramCount, IList paramList) { - Debug.Assert(_positionalParameterTypes != null, "TryGetPositionalParameters should have been called first"); + Debug.Assert(_positionalParameterTypes is not null, "TryGetPositionalParameters should have been called first"); return _positionalParameterTypes.TryAdd(paramCount, paramList); } @@ -314,6 +319,7 @@ internal bool TryGetAliasedProperty(XamlDirective directive, out XamlMember memb { return true; } + bool result = false; if (directive == XamlLanguage.Key) { @@ -335,10 +341,11 @@ internal bool TryGetAliasedProperty(XamlDirective directive, out XamlMember memb result = _xmlLangProperty.IsSet; member = _xmlLangProperty.Value; } - else if (_aliasedProperties != null) + else if (_aliasedProperties is not null) { result = _aliasedProperties.TryGetValue(directive, out member); } + return result; } @@ -363,11 +370,12 @@ internal void TryAddAliasedProperty(XamlDirective directive, XamlMember member) } else { - if (_aliasedProperties == null) + if (_aliasedProperties is null) { var dict = XamlSchemaContext.CreateDictionary(); Interlocked.CompareExchange(ref _aliasedProperties, dict, null); } + _aliasedProperties.TryAdd(directive, member); } } @@ -394,20 +402,21 @@ internal MethodInfo GetEnumeratorMethod // But we have the lookup logic here so that we don't need to do reflection in ObjectWriter. internal static XamlMember LookupNameScopeProperty(XamlType xamlType) { - if (xamlType.UnderlyingType == null) + if (xamlType.UnderlyingType is null) { return null; } + // We only check this once, at the root of the doc, and only in ObjectWriter. // So it's fine to use live reflection here. object obj = GetCustomAttribute(typeof(XAML3.NameScopePropertyAttribute), xamlType.UnderlyingType); XAML3.NameScopePropertyAttribute nspAttr = obj as XAML3.NameScopePropertyAttribute; - if (nspAttr != null) + if (nspAttr is not null) { Type ownerType = nspAttr.Type; string propertyName = nspAttr.Name; XamlMember prop; - if (ownerType != null) + if (ownerType is not null) { XamlType ownerXamlType = xamlType.SchemaContext.GetXamlType(ownerType); prop = ownerXamlType.GetAttachableMember(propertyName); @@ -416,8 +425,10 @@ internal static XamlMember LookupNameScopeProperty(XamlType xamlType) { prop = xamlType.GetMember(propertyName); } + return prop; } + return null; } @@ -425,32 +436,34 @@ internal static XamlMember LookupNameScopeProperty(XamlType xamlType) internal PropertyInfo LookupProperty(string name) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); PropertyInfo pi = GetNonIndexerProperty(name); - if (pi != null && IsPrivate(pi)) + if (pi is not null && IsPrivate(pi)) { pi = null; } + return pi; } internal EventInfo LookupEvent(string name) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); // In case of shadowing, Type.GetEvent returns the most derived Event EventInfo ei = UnderlyingType.GetEvent(name, AllProperties_BF); - if (ei != null && IsPrivate(ei)) + if (ei is not null && IsPrivate(ei)) { ei = null; } + return ei; } internal void LookupAllMembers(out ICollection newProperties, out ICollection newEvents, out List knownMembers) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); - Debug.Assert(_nonAttachableMemberCache != null, "Members property should have been invoked before this"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); + Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this"); PropertyInfo[] propList = UnderlyingType.GetProperties(AllProperties_BF); EventInfo[] eventList = UnderlyingType.GetEvents(AllProperties_BF); @@ -462,8 +475,8 @@ internal void LookupAllMembers(out ICollection newProperties, // Returns properties that don't yet have corresponding XamlMembers internal IList LookupRemainingProperties() { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); - Debug.Assert(_nonAttachableMemberCache != null, "Members property should have been invoked before this"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); + Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this"); PropertyInfo[] propList = UnderlyingType.GetProperties(AllProperties_BF); return FilterProperties(propList, null, false); } @@ -478,15 +491,17 @@ private IList FilterProperties(PropertyInfo[] propList, List FilterProperties(PropertyInfo[] propList, List FilterProperties(PropertyInfo[] propList, List filteredResult = new List(result.Count); foreach (PropertyInfo property in result.Values) { @@ -526,6 +543,7 @@ private IList FilterProperties(PropertyInfo[] propList, List FilterEvents(EventInfo[] eventList, List FilterEvents(EventInfo[] eventList, List FilterEvents(EventInfo[] eventList, List filteredResult = new List(result.Count); foreach (EventInfo evt in result.Values) { @@ -576,6 +597,7 @@ private ICollection FilterEvents(EventInfo[] eventList, List getters, List> candidates = new List>(); - if (setters != null && getters != null) + if (setters is not null && getters is not null) { foreach (MethodInfo curSetter in setters) { @@ -651,8 +675,8 @@ private void PickAttachablePropertyAccessors(List getters, getter = candidates[0].Key; setter = candidates[0].Value; } - else if (setters == null || setters.Count == 0 - || (getters != null && getters.Count > 0 && UnderlyingType.IsVisible && getters[0].IsPublic && !setters[0].IsPublic)) + else if (setters is null || setters.Count == 0 + || (getters is not null && getters.Count > 0 && UnderlyingType.IsVisible && getters[0].IsPublic && !setters[0].IsPublic)) { getter = getters[0]; setter = null; @@ -666,7 +690,7 @@ private void PickAttachablePropertyAccessors(List getters, private MethodInfo PickAttachableEventAdder(IEnumerable adders) { - if (adders != null) + if (adders is not null) { // See disambiguation note in PickAttachablePropertyAccessors foreach (MethodInfo adder in adders) @@ -677,16 +701,17 @@ private MethodInfo PickAttachableEventAdder(IEnumerable adders) } } } + return null; } internal bool LookupAttachableProperty(string name, out MethodInfo getter, out MethodInfo setter) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); List setters = LookupStaticSetters(name); List getters = LookupStaticGetters(name); - if ((setters == null || setters.Count == 0) && (getters == null || getters.Count == 0)) + if ((setters is null || setters.Count == 0) && (getters is null || getters.Count == 0)) { getter = null; setter = null; @@ -699,12 +724,13 @@ internal bool LookupAttachableProperty(string name, out MethodInfo getter, out M internal MethodInfo LookupAttachableEvent(string name) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); List adders = LookupStaticAdders(name); - if (adders == null || adders.Count == 0) + if (adders is null || adders.Count == 0) { return null; } + return PickAttachableEventAdder(adders); } @@ -756,7 +782,7 @@ private List LookupStaticAdders(string name) string adderName = KnownStrings.Add + name + KnownStrings.Handler; MemberInfo[] adders = UnderlyingType.GetMember(adderName, MemberTypes.Method, AttachableProperties_BF); List preferredAdders, otherAdders; - PrioritizeAccessors(adders, true /*isEvent*/, false /*isGetter*/, out preferredAdders, out otherAdders); + PrioritizeAccessors(adders, isEvent: true, isGetter: false, out preferredAdders, out otherAdders); return preferredAdders ?? otherAdders; } @@ -764,7 +790,7 @@ private List LookupStaticGetters(string name) { MemberInfo[] getters = UnderlyingType.GetMember(KnownStrings.Get + name, MemberTypes.Method, AttachableProperties_BF); List preferredGetters, otherGetters; - PrioritizeAccessors(getters, false /*isEvent*/, true /*isGetter*/, out preferredGetters, out otherGetters); + PrioritizeAccessors(getters, isEvent: false, isGetter: true, out preferredGetters, out otherGetters); return preferredGetters ?? otherGetters; } @@ -772,7 +798,7 @@ private List LookupStaticSetters(string name) { MemberInfo[] setters = UnderlyingType.GetMember(KnownStrings.Set + name, MemberTypes.Method, AttachableProperties_BF); List preferredSetters, otherSetters; - PrioritizeAccessors(setters, false /*isEvent*/, false /*isGetter*/, out preferredSetters, out otherSetters); + PrioritizeAccessors(setters, isEvent: false, isGetter: false, out preferredSetters, out otherSetters); return preferredSetters ?? otherSetters; } @@ -789,18 +815,20 @@ private void PrioritizeAccessors(MemberInfo[] accessors, bool isEvent, bool isGe { if (accessor.IsPublic && IsAttachablePropertyAccessor(isEvent, isGetter, accessor)) { - if (preferredAccessors == null) + if (preferredAccessors is null) { preferredAccessors = new List(); } + preferredAccessors.Add(accessor); } else if (!accessor.IsPrivate && IsAttachablePropertyAccessor(isEvent, isGetter, accessor)) { - if (otherAccessors == null) + if (otherAccessors is null) { otherAccessors = new List(); } + otherAccessors.Add(accessor); } } @@ -811,10 +839,11 @@ private void PrioritizeAccessors(MemberInfo[] accessors, bool isEvent, bool isGe { if (!accessor.IsPrivate && IsAttachablePropertyAccessor(isEvent, isGetter, accessor)) { - if (preferredAccessors == null) + if (preferredAccessors is null) { preferredAccessors = new List(); } + preferredAccessors.Add(accessor); } } @@ -855,6 +884,7 @@ private static void AddToMultiDict(Dictionary> dict, st // which we are adding to the list list.Clear(); } + list.Add(value); } else @@ -885,10 +915,12 @@ private bool IsAttachablePropertyGetter(MethodInfo mi, out string name) { return false; } + if (!IsAttachablePropertyGetter(mi)) { return false; } + name = mi.Name.Substring(KnownStrings.Get.Length); return true; } @@ -907,10 +939,12 @@ private bool IsAttachablePropertySetter(MethodInfo mi, out string name) { return false; } + if (!IsAttachablePropertySetter(mi)) { return false; } + name = mi.Name.Substring(KnownStrings.Set.Length); return true; } @@ -929,10 +963,12 @@ private bool IsAttachableEventAdder(MethodInfo mi, out string name) { return false; } + if (!IsAttachableEventAdder(mi)) { return false; } + name = mi.Name.Substring(KnownStrings.Add.Length, mi.Name.Length - KnownStrings.Add.Length - KnownStrings.Handler.Length); return true; @@ -949,8 +985,8 @@ private bool IsAttachableEventAdder(MethodInfo mi) // That is the cleanest way to pass back the information we need without JITting or boxing. internal IList LookupAllAttachableMembers(XamlSchemaContext schemaContext) { - Debug.Assert(UnderlyingType != null, "Caller should check for UnderlyingType == null"); - Debug.Assert(_attachableMemberCache != null, "AttachableMembers property should have been invoked before this"); + Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null"); + Debug.Assert(_attachableMemberCache is not null, "AttachableMembers property should have been invoked before this"); List result = new List(); @@ -987,7 +1023,8 @@ private void GetOrCreateAttachableProperties(XamlSchemaContext schemaContext, Li member = null; } } - if (member != null) + + if (member is not null) { result.Add(member); } @@ -1001,6 +1038,7 @@ private void GetOrCreateAttachableProperties(XamlSchemaContext schemaContext, Li { member = schemaContext.GetAttachableProperty(name, nameAndGetterList.Value[0], null); } + result.Add(member); } } @@ -1017,7 +1055,8 @@ private void GetOrCreateAttachableEvents(XamlSchemaContext schemaContext, MethodInfo adder = PickAttachableEventAdder(nameAndAdderList.Value); member = schemaContext.GetAttachableEvent(name, adder); } - if (member != null) + + if (member is not null) { result.Add(member); } @@ -1053,12 +1092,14 @@ private static object GetCustomAttribute(Type attrType, Type reflectedType) { return null; } + if (objs.Length > 1) { string message = SR.Format(SR.TooManyAttributesOnType, reflectedType.Name, attrType.Name); throw new XamlSchemaException(message); } + return objs[0]; } @@ -1077,8 +1118,10 @@ private static TypeVisibility GetVisibility(Type type) // Not public or internal return TypeVisibility.NotVisible; } + type = type.DeclaringType; } + bool outerTypeIsInternal = type.IsNotPublic; return (outerTypeIsInternal || nestedTypeIsInternal) ? TypeVisibility.Internal : TypeVisibility.Public; } @@ -1133,8 +1176,10 @@ public bool IsComplete { Add(name, member); } + result = member; } + return result; } } @@ -1146,22 +1191,25 @@ private void SetComplete() List listOfNulls = null; foreach (KeyValuePair pair in this) { - if (pair.Value == null) + if (pair.Value is null) { - if (listOfNulls == null) + if (listOfNulls is null) { listOfNulls = new List(); } + listOfNulls.Add(pair.Key); } } - if (listOfNulls != null) + + if (listOfNulls is not null) { for (int i = 0; i < listOfNulls.Count; i++) { Remove(listOfNulls[i]); } } + _isComplete = true; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlDirective.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlDirective.cs index 1f198c30e81..b3eb099b4c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlDirective.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlDirective.cs @@ -4,10 +4,8 @@ #nullable disable -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; using System.Xaml.Schema; @@ -42,7 +40,7 @@ public XamlDirective(IEnumerable xamlNamespaces, string name, XamlType x List nsList = new List(xamlNamespaces); foreach (string ns in nsList) { - if (ns == null) + if (ns is null) { throw new ArgumentException(SR.CollectionCannotContainNulls, nameof(xamlNamespaces)); } @@ -65,7 +63,7 @@ public XamlDirective(string xamlNamespace, string name) public override int GetHashCode() { - int result = (Name == null) ? 0 : Name.GetHashCode(); + int result = (Name is null) ? 0 : Name.GetHashCode(); ReadOnlyCollection ns = _xamlNamespaces; for (int i = 0; i < ns.Count; i++) @@ -106,6 +104,7 @@ internal static bool NamespacesAreEqual(XamlDirective directive1, XamlDirective { return false; } + for (int i = 0; i < ns1.Count; i++) { if (ns1[i] != ns2[i]) @@ -113,6 +112,7 @@ internal static bool NamespacesAreEqual(XamlDirective directive1, XamlDirective return false; } } + return true; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlMemberInvoker.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlMemberInvoker.cs index 1bab294dcfd..a9eb275cf99 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlMemberInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlMemberInvoker.cs @@ -4,9 +4,7 @@ #nullable disable -using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Security; using System.Xaml.MS.Impl; namespace System.Xaml.Schema @@ -33,10 +31,11 @@ public static XamlMemberInvoker UnknownInvoker { get { - if (s_Unknown == null) + if (s_Unknown is null) { s_Unknown = new XamlMemberInvoker(); } + return s_Unknown; } } @@ -55,7 +54,7 @@ public virtual object GetValue(object instance) { ArgumentNullException.ThrowIfNull(instance); ThrowIfUnknown(); - if (UnderlyingGetter == null) + if (UnderlyingGetter is null) { throw new NotSupportedException(SR.Format(SR.CantGetWriteonlyProperty, _member)); } @@ -74,7 +73,7 @@ public virtual void SetValue(object instance, object value) { ArgumentNullException.ThrowIfNull(instance); ThrowIfUnknown(); - if (UnderlyingSetter == null) + if (UnderlyingSetter is null) { throw new NotSupportedException(SR.Format(SR.CantSetReadonlyProperty, _member)); } @@ -93,10 +92,11 @@ internal static XamlMemberInvoker DirectiveInvoker { get { - if (s_Directive == null) + if (s_Directive is null) { s_Directive = new DirectiveMemberInvoker(); } + return s_Directive; } } @@ -125,12 +125,13 @@ public virtual ShouldSerializeResult ShouldSerializeValue(object instance) flags |= BindingFlags.Instance; args = Type.EmptyTypes; } + _shouldSerializeMethod.Value = declaringType.GetMethod(methodName, flags, null, args, null); } // Invoke the method if we found one MethodInfo shouldSerializeMethod = _shouldSerializeMethod.Value; - if (shouldSerializeMethod != null) + if (shouldSerializeMethod is not null) { bool result; if (_member.IsAttachable) @@ -144,25 +145,13 @@ public virtual ShouldSerializeResult ShouldSerializeValue(object instance) return result ? ShouldSerializeResult.True : ShouldSerializeResult.False; } - return ShouldSerializeResult.Default; - } - // vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv - private static bool IsSystemXamlNonPublic( - ref ThreeValuedBool methodIsSystemXamlNonPublic, MethodInfo method) - { - if (methodIsSystemXamlNonPublic == ThreeValuedBool.NotSet) - { - bool result = SafeReflectionInvoker.IsSystemXamlNonPublic(method); - methodIsSystemXamlNonPublic = result ? ThreeValuedBool.True : ThreeValuedBool.False; - } - return methodIsSystemXamlNonPublic == ThreeValuedBool.True; + return ShouldSerializeResult.Default; } - // ^^^^^----- End of unused members. -----^^^^^ private bool IsUnknown { - get { return _member == null || _member.UnderlyingMember == null; } + get { return _member is null || _member.UnderlyingMember is null; } } private void ThrowIfUnknown() diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlNamespace.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlNamespace.cs index 2f35e863a32..5cacca44d22 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlNamespace.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlNamespace.cs @@ -5,8 +5,6 @@ #nullable disable using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Diagnostics; using System.Reflection; using System.Xaml.MS.Impl; using MS.Internal.Xaml.Parser; @@ -36,10 +34,11 @@ public XamlNamespace(XamlSchemaContext schemaContext, string clrNs, string assem // For now we just ignore failures, including swalloing assembly load exceptions. // Any types in this namespace will be treated as unknown. But it would be useful to // surface errors here through tracing or an event. - if (_assemblyNamespaces != null) + if (_assemblyNamespaces is not null) { Initialize(); } + IsClrNamespace = true; } @@ -48,7 +47,7 @@ private void Initialize() _typeCache = XamlSchemaContext.CreateDictionary(); } - public bool IsResolved => _assemblyNamespaces != null; + public bool IsResolved => _assemblyNamespaces is not null; public ICollection GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes(); @@ -59,7 +58,7 @@ public XamlType GetXamlType(string typeName, params XamlType[] typeArgs) return null; } - if (typeArgs == null || typeArgs.Length == 0) + if (typeArgs is null || typeArgs.Length == 0) { return TryGetXamlType(typeName) ?? TryGetXamlType(GetTypeExtensionName(typeName)); } @@ -79,14 +78,14 @@ private XamlType TryGetXamlType(string typeName) // Otherwise, look up the type via reflection Type type = TryGetType(typeName); - if (type == null) + if (type is null) { return null; } // And save it in our cache xamlType = SchemaContext.GetXamlType(type); - if (xamlType == null) + if (xamlType is null) { return null; } @@ -107,7 +106,7 @@ private XamlType TryGetXamlType(string typeName, Type[] typeArgs) // Get the open generic type. XamlType openXamlType = TryGetXamlType(typeName); Type openType = openXamlType?.UnderlyingType; - if (openType == null) + if (openType is null) { return null; } @@ -117,7 +116,7 @@ private XamlType TryGetXamlType(string typeName, Type[] typeArgs) if (!string.IsNullOrEmpty(subscript)) { closedType = MakeArrayType(closedType, subscript); - if (closedType == null) + if (closedType is null) { // Invalid array subscript. return null; @@ -157,11 +156,12 @@ private Type[] ConvertArrayOfXamlTypesToTypes(XamlType[] typeArgs) for (int n = 0; n < typeArgs.Length; n++) { // Checking for nulls and unknowns is done in public API layer before we ever get here - Debug.Assert(typeArgs[n] != null); - Debug.Assert(typeArgs[n].UnderlyingType != null); + Debug.Assert(typeArgs[n] is not null); + Debug.Assert(typeArgs[n].UnderlyingType is not null); clrTypeArgs[n] = typeArgs[n].UnderlyingType; } + return clrTypeArgs; } @@ -169,18 +169,19 @@ internal int RevisionNumber { // The only external mutation we allow is adding new namespaces. So the count of // namespaces also serves as a revision number. - get => (_assemblyNamespaces != null) ? _assemblyNamespaces.Count : 0; + get => (_assemblyNamespaces is not null) ? _assemblyNamespaces.Count : 0; } private Type TryGetType(string typeName) { Type type = SearchAssembliesForShortName(typeName); - if (type == null && IsClrNamespace) + if (type is null && IsClrNamespace) { Debug.Assert(_assemblyNamespaces.Count == 1); type = XamlLanguage.LookupClrNamespaceType(_assemblyNamespaces[0], typeName); } - if (type == null) + + if (type is null) { return null; } @@ -193,8 +194,10 @@ private Type TryGetType(string typeName) { return null; } + currentType = currentType.DeclaringType; } + return type; } @@ -206,11 +209,12 @@ private ICollection LookupAllTypes() foreach (AssemblyNamespacePair assemblyNamespacePair in _assemblyNamespaces) { Assembly asm = assemblyNamespacePair.Assembly; - if (asm == null) + if (asm is null) { // This is a dynamic assembly that got unloaded; ignore it continue; } + string clrPrefix = assemblyNamespacePair.ClrNamespace; Type[] types = asm.GetTypes(); @@ -225,13 +229,14 @@ private ICollection LookupAllTypes() } } } + return xamlTypeList.AsReadOnly(); } private List GetClrNamespacePair(string clrNs, string assemblyName) { Assembly asm = SchemaContext.OnAssemblyResolve(assemblyName); - if (asm == null) + if (asm is null) { return null; } @@ -246,19 +251,21 @@ private Type SearchAssembliesForShortName(string shortName) foreach(AssemblyNamespacePair assemblyNamespacePair in _assemblyNamespaces) { Assembly asm = assemblyNamespacePair.Assembly; - if (asm == null) + if (asm is null) { // This is a dynamic assembly that got unloaded; ignore it continue; } + string longName = $"{assemblyNamespacePair.ClrNamespace}.{shortName}"; Type type = asm.GetType(longName); - if (type != null) + if (type is not null) { return type; } } + return null; } @@ -269,7 +276,7 @@ internal void AddAssemblyNamespacePair(AssemblyNamespacePair pair) // then assign it back to the original variable. Assignments are assured to be atomic. List assemblyNamespacesCopy; - if (_assemblyNamespaces == null) + if (_assemblyNamespaces is null) { assemblyNamespacesCopy = new List(); Initialize(); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs index 7c6c00a52ed..61089548954 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs @@ -5,11 +5,8 @@ #nullable disable using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.Serialization; -using System.Security; using System.Windows.Markup; namespace System.Xaml.Schema @@ -17,7 +14,6 @@ namespace System.Xaml.Schema public class XamlTypeInvoker { private static XamlTypeInvoker s_Unknown; - private static object[] s_emptyObjectArray = Array.Empty(); private Dictionary _addMethods; internal MethodInfo EnumeratorMethod { get; set; } @@ -27,10 +23,6 @@ public class XamlTypeInvoker private ThreeValuedBool _isPublic; - // vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv - private ThreeValuedBool _isInSystemXaml; - // ^^^^^----- End of unused members. -----^^^^^ - protected XamlTypeInvoker() { } @@ -44,29 +36,30 @@ public static XamlTypeInvoker UnknownInvoker { get { - if (s_Unknown == null) + if (s_Unknown is null) { s_Unknown = new XamlTypeInvoker(); } + return s_Unknown; } } public EventHandler SetMarkupExtensionHandler { - get { return _xamlType != null ? _xamlType.SetMarkupExtensionHandler : null; } + get { return _xamlType is not null ? _xamlType.SetMarkupExtensionHandler : null; } } public EventHandler SetTypeConverterHandler { - get { return _xamlType != null ? _xamlType.SetTypeConverterHandler : null; } + get { return _xamlType is not null ? _xamlType.SetTypeConverterHandler : null; } } public virtual void AddToCollection(object instance, object item) { ArgumentNullException.ThrowIfNull(instance); IList list = instance as IList; - if (list != null) + if (list is not null) { list.Add(item); return; @@ -77,8 +70,9 @@ public virtual void AddToCollection(object instance, object item) { throw new NotSupportedException(SR.OnlySupportedOnCollections); } + XamlType itemType; - if (item != null) + if (item is not null) { itemType = _xamlType.SchemaContext.GetXamlType(item.GetType()); } @@ -86,11 +80,13 @@ public virtual void AddToCollection(object instance, object item) { itemType = _xamlType.ItemType; } + MethodInfo addMethod = GetAddMethod(itemType); - if (addMethod == null) + if (addMethod is null) { throw new XamlSchemaException(SR.Format(SR.NoAddMethodFound, _xamlType, itemType)); } + addMethod.Invoke(instance, new object[] { item }); } @@ -98,7 +94,7 @@ public virtual void AddToDictionary(object instance, object key, object item) { ArgumentNullException.ThrowIfNull(instance); IDictionary dictionary = instance as IDictionary; - if (dictionary != null) + if (dictionary is not null) { dictionary.Add(key, item); return; @@ -109,8 +105,9 @@ public virtual void AddToDictionary(object instance, object key, object item) { throw new NotSupportedException(SR.OnlySupportedOnDictionaries); } + XamlType itemType; - if (item != null) + if (item is not null) { itemType = _xamlType.SchemaContext.GetXamlType(item.GetType()); } @@ -118,32 +115,35 @@ public virtual void AddToDictionary(object instance, object key, object item) { itemType = _xamlType.ItemType; } + MethodInfo addMethod = GetAddMethod(itemType); - if (addMethod == null) + if (addMethod is null) { throw new XamlSchemaException(SR.Format(SR.NoAddMethodFound, _xamlType, itemType)); } + addMethod.Invoke(instance, new object[] { key, item }); } public virtual object CreateInstance(object[] arguments) { ThrowIfUnknown(); - if (!_xamlType.UnderlyingType.IsValueType && (arguments == null || arguments.Length == 0)) + if (!_xamlType.UnderlyingType.IsValueType && (arguments is null || arguments.Length == 0)) { object result = DefaultCtorXamlActivator.CreateInstance(this); - if (result != null) + if (result is not null) { return result; } } + return Activator.CreateInstance(_xamlType.UnderlyingType, arguments); } public virtual MethodInfo GetAddMethod(XamlType contentType) { ArgumentNullException.ThrowIfNull(contentType); - if (IsUnknown || _xamlType.ItemType == null) + if (IsUnknown || _xamlType.ItemType is null) { return null; } @@ -163,7 +163,7 @@ public virtual MethodInfo GetAddMethod(XamlType contentType) // Populate the dictionary of all available Add methods MethodInfo addMethod; - if (_addMethods == null) + if (_addMethods is null) { Dictionary addMethods = new Dictionary(); addMethods.Add(_xamlType.ItemType, _xamlType.AddMethod); @@ -171,13 +171,14 @@ public virtual MethodInfo GetAddMethod(XamlType contentType) { addMethod = CollectionReflector.GetAddMethod( _xamlType.UnderlyingType, type.UnderlyingType); - if (addMethod != null) + if (addMethod is not null) { // Use TryAdd as AllowedContentTypes can contain // duplicate types. addMethods.TryAdd(type, addMethod); } } + _addMethods = addMethods; } @@ -213,34 +214,20 @@ public virtual IEnumerator GetItems(object instance) { ArgumentNullException.ThrowIfNull(instance); IEnumerable enumerable = instance as IEnumerable; - if (enumerable != null) + if (enumerable is not null) { return enumerable.GetEnumerator(); } + ThrowIfUnknown(); if (!_xamlType.IsCollection && !_xamlType.IsDictionary) { throw new NotSupportedException(SR.OnlySupportedOnCollectionsAndDictionaries); } - MethodInfo getEnumMethod = GetEnumeratorMethod(); - return (IEnumerator)getEnumMethod.Invoke(instance, s_emptyObjectArray); - } - // vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv - private bool IsInSystemXaml - { - get - { - if (_isInSystemXaml == ThreeValuedBool.NotSet) - { - Type type = _xamlType.UnderlyingType.UnderlyingSystemType; - bool result = SafeReflectionInvoker.IsInSystemXaml(type); - _isInSystemXaml = result ? ThreeValuedBool.True : ThreeValuedBool.False; - } - return _isInSystemXaml == ThreeValuedBool.True; - } + MethodInfo getEnumMethod = GetEnumeratorMethod(); + return (IEnumerator)getEnumMethod.Invoke(instance, Array.Empty()); } - // ^^^^^----- End of unused members. -----^^^^^ private bool IsPublic { @@ -251,13 +238,14 @@ private bool IsPublic Type type = _xamlType.UnderlyingType.UnderlyingSystemType; _isPublic = type.IsVisible ? ThreeValuedBool.True : ThreeValuedBool.False; } + return _isPublic == ThreeValuedBool.True; } } private bool IsUnknown { - get { return _xamlType == null || _xamlType.UnderlyingType == null; } + get { return _xamlType is null || _xamlType.UnderlyingType is null; } } private void ThrowIfUnknown() @@ -274,13 +262,13 @@ private static class DefaultCtorXamlActivator private static ConstructorInfo s_actionCtor = typeof(Action).GetConstructor(new Type[] { typeof(object), typeof(IntPtr) }); - public static object CreateInstance(XamlTypeInvoker type) { if (!EnsureConstructorDelegate(type)) { return null; } + object inst = CallCtorDelegate(type); return inst; } @@ -300,19 +288,22 @@ private static void InvokeDelegate(Action action, object argument) // returns true if a delegate is available, false if not private static bool EnsureConstructorDelegate(XamlTypeInvoker type) { - if (type._constructorDelegate != null) + if (type._constructorDelegate is not null) { return true; } + if (!type.IsPublic) { return false; } + if (s_securityFailureWithCtorDelegate == ThreeValuedBool.NotSet) { s_securityFailureWithCtorDelegate = ThreeValuedBool.False; } + if (s_securityFailureWithCtorDelegate == ThreeValuedBool.True) { return false; @@ -321,11 +312,12 @@ private static bool EnsureConstructorDelegate(XamlTypeInvoker type) Type underlyingType = type._xamlType.UnderlyingType.UnderlyingSystemType; // Look up public ctors only, for equivalence with Activator.CreateInstance ConstructorInfo tConstInfo = underlyingType.GetConstructor(Type.EmptyTypes); - if (tConstInfo == null) + if (tConstInfo is null) { // Throwing MissingMethodException for equivalence with Activator.CreateInstance throw new MissingMethodException(SR.Format(SR.NoDefaultConstructor, underlyingType.FullName)); } + if ((tConstInfo.IsSecurityCritical && !tConstInfo.IsSecuritySafeCritical) || (tConstInfo.Attributes & MethodAttributes.HasSecurity) == MethodAttributes.HasSecurity || (underlyingType.Attributes & TypeAttributes.HasSecurity) == TypeAttributes.HasSecurity) @@ -335,6 +327,7 @@ private static bool EnsureConstructorDelegate(XamlTypeInvoker type) type._isPublic = ThreeValuedBool.False; return false; } + IntPtr constPtr = tConstInfo.MethodHandle.GetFunctionPointer(); // This requires Reflection Permission Action ctorDelegate = ctorDelegate = diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeTypeConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeTypeConverter.cs index 252eab6720d..ce325723e8d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeTypeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeTypeConverter.cs @@ -20,10 +20,10 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c { string typeName = value as string; - if (context != null && typeName != null) + if (context is not null && typeName is not null) { XamlType result = ConvertStringToXamlType(context, typeName); - if (result != null) + if (result is not null) { return result; } @@ -41,10 +41,10 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul { XamlType xamlType = value as XamlType; - if (context != null && xamlType != null && destinationType == typeof(string)) + if (context is not null && xamlType is not null && destinationType == typeof(string)) { string result = ConvertXamlTypeToString(context, xamlType); - if (result != null) + if (result is not null) { return result; } @@ -56,10 +56,11 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul internal static string ConvertXamlTypeToString(ITypeDescriptorContext context, XamlType xamlType) { var prefixLookup = GetService(context); - if (prefixLookup == null) + if (prefixLookup is null) { return null; } + XamlTypeName typeName = new XamlTypeName(xamlType); return typeName.ToString(prefixLookup); } @@ -67,20 +68,23 @@ internal static string ConvertXamlTypeToString(ITypeDescriptorContext context, X private static XamlType ConvertStringToXamlType(ITypeDescriptorContext context, string typeName) { var namespaceResolver = GetService(context); - if (namespaceResolver == null) + if (namespaceResolver is null) { return null; } + XamlTypeName xamlTypeName = XamlTypeName.Parse(typeName, namespaceResolver); var schemaContextProvider = GetService(context); - if (schemaContextProvider == null) + if (schemaContextProvider is null) { return null; } - if (schemaContextProvider.SchemaContext == null) + + if (schemaContextProvider.SchemaContext is null) { return null; } + return GetXamlTypeOrUnknown(schemaContextProvider.SchemaContext, xamlTypeName); } @@ -92,10 +96,11 @@ private static TService GetService(ITypeDescriptorContext context) whe private static XamlType GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, XamlTypeName typeName) { XamlType result = schemaContext.GetXamlType(typeName); - if (result != null) + if (result is not null) { return result; } + XamlType[] typeArgs = null; if (typeName.HasTypeArgs) { @@ -105,6 +110,7 @@ private static XamlType GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, Xa typeArgs[i] = GetXamlTypeOrUnknown(schemaContext, typeName.TypeArguments[i]); } } + result = new XamlType(typeName.Namespace, typeName.Name, typeArgs, schemaContext); return result; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlValueConverter.cs index 995a58f8a18..a5f691db79c 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlValueConverter.cs @@ -29,7 +29,7 @@ public XamlValueConverter(Type converterType, XamlType targetType) public XamlValueConverter(Type converterType, XamlType targetType, string name) { - if (converterType == null && targetType == null && name == null) + if (converterType is null && targetType is null && name is null) { throw new ArgumentException(SR.Format(SR.ArgumentRequired, $"{nameof(converterType)}, {nameof(targetType)}, {nameof(name)}")); } @@ -61,7 +61,7 @@ internal virtual bool IsPublic { if (_isPublic == ThreeValuedBool.NotSet) { - _isPublic = (ConverterType == null || ConverterType.IsVisible) ? ThreeValuedBool.True : ThreeValuedBool.False; + _isPublic = (ConverterType is null || ConverterType.IsVisible) ? ThreeValuedBool.True : ThreeValuedBool.False; } return _isPublic == ThreeValuedBool.True; @@ -71,11 +71,11 @@ internal virtual bool IsPublic protected virtual TConverterBase CreateInstance() { if (ConverterType == typeof(EnumConverter) && - TargetType.UnderlyingType != null && TargetType.UnderlyingType.IsEnum) + TargetType.UnderlyingType is not null && TargetType.UnderlyingType.IsEnum) { return (TConverterBase)(object)new EnumConverter(TargetType.UnderlyingType); } - else if (ConverterType != null) + else if (ConverterType is not null) { if (!typeof(TConverterBase).IsAssignableFrom(ConverterType)) { @@ -91,9 +91,9 @@ protected virtual TConverterBase CreateInstance() private string GetDefaultName() { - if (ConverterType != null) + if (ConverterType is not null) { - if (TargetType != null) + if (TargetType is not null) { return $"{ConverterType.Name}({TargetType.Name})"; } @@ -118,11 +118,12 @@ public override bool Equals(object obj) public override int GetHashCode() { int result = Name.GetHashCode(); - if (ConverterType != null) + if (ConverterType is not null) { result ^= ConverterType.GetHashCode(); } - if (TargetType != null) + + if (TargetType is not null) { result ^= TargetType.GetHashCode(); } @@ -138,6 +139,7 @@ public override int GetHashCode() { return converter2 is null; } + if (converter2 is null) { return false; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XmlNamespace.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XmlNamespace.cs index 0c5dd480ced..4b43f19d739 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XmlNamespace.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XmlNamespace.cs @@ -75,7 +75,7 @@ public override XamlProperty GetDirectiveProperty(string name) if (directive == null) { directive = new UnknownProperty(name, - null, /*declaringType - xml directives don't have one. */ + declaringType: null, /* xml directives don't have a declaring type. */ XmlDirectives.Uri); } return directive; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/WriterDelegate.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/WriterDelegate.cs index 73aa95053f3..34841dbffb4 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/WriterDelegate.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/WriterDelegate.cs @@ -75,7 +75,7 @@ protected override void Dispose(bool disposing) { _addDelegate(XamlNodeType.None, XamlNode.InternalNodeType.EndOfStream); _addDelegate = delegate { throw new XamlException(SR.WriterIsClosed); }; - if (_addLineInfoDelegate != null) + if (_addLineInfoDelegate is not null) { _addLineInfoDelegate = delegate { throw new XamlException(SR.WriterIsClosed); }; } @@ -109,7 +109,7 @@ public bool ShouldProvideLineInfo get { ThrowIsDisposed(); - return _addLineInfoDelegate != null; + return _addLineInfoDelegate is not null; } } #endregion @@ -118,6 +118,5 @@ private void ThrowIsDisposed() { ObjectDisposedException.ThrowIf(IsDisposed, typeof(XamlWriter)); // Can't say ReaderMultiIndexDelegate because its internal. } - } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlBackgroundReader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlBackgroundReader.cs index c4e5a02f155..34d542c6bcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlBackgroundReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlBackgroundReader.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Diagnostics; using System.Threading; namespace System.Xaml @@ -60,6 +59,7 @@ private void Initialize(XamlReader wrappedReader, int bufferSize) { lineInfoAddDelegate = new XamlLineInfoAddDelegate(AddLineInfo); } + _writer = new WriterDelegate(xamlNodeAddDelegate, lineInfoAddDelegate, _wrappedReader.SchemaContext); XamlNodeNextDelegate xamlNodeNextDelegate; @@ -71,6 +71,7 @@ private void Initialize(XamlReader wrappedReader, int bufferSize) { xamlNodeNextDelegate = new XamlNodeNextDelegate(Next); } + _internalReader = new ReaderDelegate(_wrappedReader.SchemaContext, xamlNodeNextDelegate, _wrappedReaderHasLineInfo); // Standin so it won't start null @@ -84,10 +85,11 @@ public void StartThread() public void StartThread(string threadName) { - if (_thread != null) + if (_thread is not null) { throw new InvalidOperationException(SR.ThreadAlreadyStarted); } + ParameterizedThreadStart start = new ParameterizedThreadStart(XamlReaderThreadStart); _thread = new Thread(start); _thread.Name = threadName; @@ -146,11 +148,13 @@ private void Add(XamlNodeType nodeType, object data) { return; } + if (nodeType != XamlNodeType.None) { AddToBuffer(new XamlNode(nodeType, data)); return; } + Debug.Assert(XamlNode.IsEof_Helper(nodeType, data)); AddToBuffer(new XamlNode(XamlNode.InternalNodeType.EndOfStream)); _providerFullEvent.Set(); @@ -162,6 +166,7 @@ private void AddLineInfo(int lineNumber, int linePosition) { return; } + LineInfo lineInfo = new LineInfo(lineNumber, linePosition); XamlNode node = new XamlNode(lineInfo); AddToBuffer(node); @@ -178,21 +183,23 @@ private XamlNode Next() { return _currentNode; } + _providerFullEvent.WaitOne(); // Wait for provider to fill up. SwapBuffers(); _dataReceivedEvent.Set(); // Let the Reader run. } + _currentNode = _outgoing[_outIdx++]; if (_currentNode.IsEof) { - if (_thread != null) + if (_thread is not null) { // If the input ended due to an (caught) exception on the background thread, // then at the end of reading the input re-throw the exception on the // foreground thread. _thread.Join(); - if (_caughtException != null) + if (_caughtException is not null) { Exception ex = _caughtException; _caughtException = null; @@ -219,8 +226,8 @@ private XamlNode Next_ProcessLineInfo() { done = true; } - } + return _currentNode; } @@ -229,17 +236,19 @@ private void InterruptableTransform(XamlReader reader, XamlWriter writer, bool c IXamlLineInfo xamlLineInfo = reader as IXamlLineInfo; IXamlLineInfoConsumer xamlLineInfoConsumer = writer as IXamlLineInfoConsumer; bool shouldPassLineNumberInfo = false; - if ((xamlLineInfo != null && xamlLineInfo.HasLineInfo) - && (xamlLineInfoConsumer != null && xamlLineInfoConsumer.ShouldProvideLineInfo)) + if ((xamlLineInfo is not null && xamlLineInfo.HasLineInfo) + && (xamlLineInfoConsumer is not null && xamlLineInfoConsumer.ShouldProvideLineInfo)) { shouldPassLineNumberInfo = true; } + while (reader.Read()) { if (IsDisposed) { break; } + if (shouldPassLineNumberInfo) { if (xamlLineInfo.LineNumber != 0) @@ -247,6 +256,7 @@ private void InterruptableTransform(XamlReader reader, XamlWriter writer, bool c xamlLineInfoConsumer.SetLineInfo(xamlLineInfo.LineNumber, xamlLineInfo.LinePosition); } } + writer.WriteNode(reader); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlException.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlException.cs index 98468a7cea7..ca85e41de68 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlException.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlException.cs @@ -5,7 +5,6 @@ #nullable disable using System.Runtime.Serialization; -using System.Security; using MS.Internal.Xaml.Parser; namespace System.Xaml @@ -24,7 +23,7 @@ public XamlException(string message, Exception innerException) : base(message, innerException) { XamlException xex = innerException as XamlException; - if (xex != null) + if (xex is not null) { LineNumber = xex.LineNumber; LinePosition = xex.LinePosition; @@ -47,8 +46,10 @@ public override string Message { return SR.Format(SR.LineNumberAndPosition, base.Message, LineNumber, LinePosition); } + return SR.Format(SR.LineNumberOnly, base.Message, LineNumber); } + return base.Message; } } @@ -144,7 +145,7 @@ public class XamlDuplicateMemberException : XamlException public XamlDuplicateMemberException() { } public XamlDuplicateMemberException(XamlMember member, XamlType type) - : base(SR.Format(SR.DuplicateMemberSet, (member != null) ? member.Name : null, (type != null) ? type.Name : null)) + : base(SR.Format(SR.DuplicateMemberSet, (member is not null) ? member.Name : null, (type is not null) ? type.Name : null)) { DuplicateMember = member; ParentType = type; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlLanguage.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlLanguage.cs index 3e4bf51ba45..d57bcdd0481 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlLanguage.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlLanguage.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Reflection; @@ -253,10 +252,12 @@ internal static string TypeAlias(Type type) { return KnownStrings.Member; } + if (type.Equals(typeof(PropertyDefinition))) { return KnownStrings.Property; } + return null; } @@ -368,6 +369,7 @@ internal static XamlType LookupXamlType(string typeNamespace, string typeName) return null; } } + return null; } @@ -388,6 +390,7 @@ internal static Type LookupClrNamespaceType(AssemblyNamespacePair nsPair, string return null; } } + return null; } @@ -415,9 +418,11 @@ private static ReadOnlyCollection GetAllTypes() private static ReadOnlyCollection GetAllDirectives() { XamlDirective[] result = new XamlDirective[] - { Arguments, AsyncRecords, Class, Code, ClassModifier, ConnectionId, FactoryMethod, FieldModifier, + { + Arguments, AsyncRecords, Class, Code, ClassModifier, ConnectionId, FactoryMethod, FieldModifier, Key, Initialization, Items, Members, ClassAttributes, Name, PositionalParameters, Shared, Subclass, - SynchronousMode, TypeArguments, Uid, UnknownContent, Base, Lang, Space}; + SynchronousMode, TypeArguments, Uid, UnknownContent, Base, Lang, Space + }; return new ReadOnlyCollection(result); } @@ -425,7 +430,9 @@ private static XamlSchemaContext GetSchemaContext() { // System.Xaml and WindowsBase Assembly[] assemblies = new Assembly[] - { typeof(XamlLanguage).Assembly, typeof(MarkupExtension).Assembly }; + { + typeof(XamlLanguage).Assembly, typeof(MarkupExtension).Assembly + }; XamlSchemaContextSettings settings = new XamlSchemaContextSettings { SupportMarkupExtensionsWithDuplicateArity = true }; XamlSchemaContext result = new XamlSchemaContext(assemblies, settings); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMarkupExtensionWriter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMarkupExtensionWriter.cs index 083b9f240aa..f7ce28b32d8 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMarkupExtensionWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMarkupExtensionWriter.cs @@ -4,7 +4,6 @@ #nullable disable -using System.Collections.Generic; using System.Text; namespace System.Xaml @@ -95,7 +94,7 @@ string LookupPrefix(XamlType type) { string prefix = xamlXmlWriter.LookupPrefix(type.GetXamlNamespaces(), out _); - if (prefix == null) + if (prefix is null) { if (!meSettings.ContinueWritingWhenPrefixIsNotFound) { @@ -112,7 +111,7 @@ string LookupPrefix(XamlMember property) { string prefix = xamlXmlWriter.LookupPrefix(property.GetXamlNamespaces(), out _); - if (prefix == null) + if (prefix is null) { if (!meSettings.ContinueWritingWhenPrefixIsNotFound) { @@ -129,7 +128,7 @@ void CheckMemberForUniqueness(Node objectNode, XamlMember property) { if (!settings.AssumeValidInput) { - if (objectNode.Members == null) + if (objectNode.Members is null) { objectNode.Members = new XamlPropertySet(); } @@ -137,6 +136,7 @@ void CheckMemberForUniqueness(Node objectNode, XamlMember property) { throw new InvalidOperationException(SR.Format(SR.XamlMarkupExtensionWriterDuplicateMember, property.Name)); } + objectNode.Members.Add(property); } } @@ -175,7 +175,7 @@ public override void WriteValue(object value) { string s = value as string; - if (s == null) + if (s is null) { throw new ArgumentException(SR.XamlMarkupExtensionWriterCannotWriteNonstringValue); } @@ -190,16 +190,19 @@ public XamlMember XamlProperty get; set; } + public XamlPropertySet Members { get; set; } + public XamlNodeType NodeType { get; set; } + public XamlType XamlType { get; @@ -264,6 +267,7 @@ protected static string FormatStringInCorrectSyntax(string s) { sb.Append('\\'); } + sb.Append(s[i]); } @@ -286,6 +290,7 @@ public void WriteString(XamlMarkupExtensionWriter writer, string value) { value = FormatStringInCorrectSyntax(value); } + writer.sb.Append(value); } } @@ -299,6 +304,7 @@ class Start : WriterState Start() { } + public static WriterState State { get { return state; } @@ -433,6 +439,7 @@ class InObjectBeforeMember : InObject InObjectBeforeMember() { } + public static WriterState State { get { return state; } @@ -463,6 +470,7 @@ class InObjectAfterMember : InObject InObjectAfterMember() { } + public static WriterState State { get { return state; } @@ -512,6 +520,7 @@ class InPositionalParametersBeforeValue : InPositionalParameters InPositionalParametersBeforeValue() { } + public static WriterState State { get { return state; } @@ -529,6 +538,7 @@ class InPositionalParametersAfterValue : InPositionalParameters InPositionalParametersAfterValue() { } + public static WriterState State { get { return state; } @@ -547,6 +557,7 @@ public override void WriteEndMember(XamlMarkupExtensionWriter writer) { throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); } + writer.currentState = InObjectAfterMember.State; } } @@ -557,6 +568,7 @@ class InMember : WriterState InMember() { } + public static WriterState State { get { return state; } @@ -576,6 +588,7 @@ public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType writer.failed = true; return; } + string prefix = writer.LookupPrefix(type); writer.sb.Append('{'); @@ -593,6 +606,7 @@ class InMemberAfterValueOrEndObject : WriterState InMemberAfterValueOrEndObject() { } + public static WriterState State { get { return state; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMember.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMember.cs index c6dabe6c2e7..5f6a1a38d9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMember.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlMember.cs @@ -4,11 +4,8 @@ #nullable disable -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Security; using System.Threading; using System.Windows.Markup; using System.Xaml.Schema; @@ -48,7 +45,7 @@ public XamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext) } public XamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) - : this(propertyInfo, schemaContext, invoker, new MemberReflector(false /*isEvent*/)) + : this(propertyInfo, schemaContext, invoker, new MemberReflector(isEvent: false)) { } @@ -71,7 +68,7 @@ public XamlMember(EventInfo eventInfo, XamlSchemaContext schemaContext) } public XamlMember(EventInfo eventInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) - :this(eventInfo, schemaContext, invoker, new MemberReflector(true /*isEvent*/)) + :this(eventInfo, schemaContext, invoker, new MemberReflector(isEvent: true)) { } @@ -96,7 +93,7 @@ public XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo s public XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) - :this(attachablePropertyName, getter, setter, schemaContext, invoker, new MemberReflector(getter, setter, false /*isEvent*/)) + :this(attachablePropertyName, getter, setter, schemaContext, invoker, new MemberReflector(getter, setter, isEvent: false)) { } @@ -105,10 +102,11 @@ internal XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo { ArgumentNullException.ThrowIfNull(schemaContext); MethodInfo accessor = getter ?? setter; - if (accessor == null) + if (accessor is null) { throw new ArgumentNullException(SR.GetterOrSetterRequired, (Exception)null); } + _name = attachablePropertyName ?? throw new ArgumentNullException(nameof(attachablePropertyName)); ValidateGetter(getter, nameof(getter)); @@ -129,7 +127,7 @@ public XamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContex public XamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) - : this(attachableEventName, adder, schemaContext, invoker, new MemberReflector(null, adder, true /*isEvent*/)) + : this(attachableEventName, adder, schemaContext, invoker, new MemberReflector(null, adder, isEvent: true)) { } @@ -164,10 +162,11 @@ public XamlMemberInvoker Invoker get { EnsureReflector(); - if (_reflector.Invoker == null) + if (_reflector.Invoker is null) { _reflector.Invoker = LookupInvoker() ?? XamlMemberInvoker.UnknownInvoker; } + return _reflector.Invoker; } } @@ -183,12 +182,12 @@ public bool IsUnknown public bool IsReadPublic { - get { return IsReadPublicIgnoringType && (_declaringType == null || _declaringType.IsPublic); } + get { return IsReadPublicIgnoringType && (_declaringType is null || _declaringType.IsPublic); } } public bool IsWritePublic { - get { return IsWritePublicIgnoringType && (_declaringType == null || _declaringType.IsPublic); } + get { return IsWritePublicIgnoringType && (_declaringType is null || _declaringType.IsPublic); } } public string Name { get { return _name; } } @@ -201,6 +200,7 @@ public bool IsNameValid { _isNameValid = XamlName.IsValidXamlName(_name) ? ThreeValuedBool.True : ThreeValuedBool.False; } + return _isNameValid == ThreeValuedBool.True; } } @@ -214,6 +214,7 @@ public string PreferredXamlNamespace { return namespaces[0]; } + return null; } } @@ -226,15 +227,18 @@ public XamlType TargetType { return _declaringType; } + EnsureReflector(); - if (_reflector.TargetType == null) + if (_reflector.TargetType is null) { if (_reflector.IsUnknown) { return XamlLanguage.Object; } + _reflector.TargetType = LookupTargetType() ?? XamlLanguage.Object; } + return _reflector.TargetType; } } @@ -244,10 +248,11 @@ public XamlType Type get { EnsureReflector(); - if (_reflector.Type == null) + if (_reflector.Type is null) { _reflector.Type = LookupType() ?? XamlLanguage.Object; } + return _reflector.Type; } } @@ -261,6 +266,7 @@ public XamlValueConverter TypeConverter { _reflector.TypeConverter = LookupTypeConverter(); } + return _reflector.TypeConverter; } } @@ -274,6 +280,7 @@ public XamlValueConverter ValueSerializer { _reflector.ValueSerializer = LookupValueSerializer(); } + return _reflector.ValueSerializer; } } @@ -287,6 +294,7 @@ public XamlValueConverter DeferringLoader { _reflector.DeferringLoader = LookupDeferringLoader(); } + return _reflector.DeferringLoader; } } @@ -299,6 +307,7 @@ public MemberInfo UnderlyingMember { _underlyingMember.SetIfNull(LookupUnderlyingMember()); } + return _underlyingMember.Value; } } @@ -338,7 +347,7 @@ public virtual IList GetXamlNamespaces() public override string ToString() { - Debug.Assert(_declaringType != null, "XamlDirective should not call base.ToString"); + Debug.Assert(_declaringType is not null, "XamlDirective should not call base.ToString"); return $"{_declaringType}.{Name}"; } @@ -347,10 +356,11 @@ public IList DependsOn get { EnsureReflector(); - if (_reflector.DependsOn == null) + if (_reflector.DependsOn is null) { _reflector.DependsOn = LookupDependsOn() ?? XamlType.EmptyList.Value; } + return _reflector.DependsOn; } } @@ -369,6 +379,7 @@ public DesignerSerializationVisibility SerializationVisibility { _reflector.SerializationVisibility = LookupSerializationVisibility(); } + return _reflector.SerializationVisibility ?? DesignerSerializationVisibility.Visible; } } @@ -403,6 +414,7 @@ internal string ConstructorArgument { _reflector.ConstructorArgument = LookupConstructorArgument(); } + return _reflector.ConstructorArgument; } } @@ -426,6 +438,7 @@ internal MethodInfo Getter { _reflector.Getter = LookupUnderlyingGetter(); } + return _reflector.Getter; } } @@ -449,6 +462,7 @@ internal bool HasSerializationVisibility { _reflector.SerializationVisibility = LookupSerializationVisibility(); } + return _reflector.SerializationVisibility.HasValue; } } @@ -462,6 +476,7 @@ internal MethodInfo Setter { _reflector.Setter = LookupUnderlyingSetter(); } + return _reflector.Setter; } } @@ -480,13 +495,15 @@ internal bool IsReadVisibleTo(Assembly accessingAssembly, Type accessingType) { return true; } + MethodInfo getter = Getter; - if (getter != null) + if (getter is not null) { return MemberReflector.GenericArgumentsAreVisibleTo(getter, accessingAssembly, SchemaContext) && (MemberReflector.IsInternalVisibleTo(getter, accessingAssembly, SchemaContext) || MemberReflector.IsProtectedVisibleTo(getter, accessingType, SchemaContext)); } + return false; } @@ -497,13 +514,15 @@ internal bool IsWriteVisibleTo(Assembly accessingAssembly, Type accessingType) { return true; } + MethodInfo setter = Setter; - if (setter != null) + if (setter is not null) { return MemberReflector.GenericArgumentsAreVisibleTo(setter, accessingAssembly, SchemaContext) && (MemberReflector.IsInternalVisibleTo(setter, accessingAssembly, SchemaContext) || MemberReflector.IsProtectedVisibleTo(setter, accessingType, SchemaContext)); } + return false; } @@ -511,10 +530,11 @@ internal bool IsWriteVisibleTo(Assembly accessingAssembly, Type accessingType) protected virtual XamlMemberInvoker LookupInvoker() { - if (UnderlyingMember != null) + if (UnderlyingMember is not null) { return new XamlMemberInvoker(this); } + return null; } @@ -528,15 +548,17 @@ protected virtual XamlValueConverter LookupDeferringLoader( if (AreAttributesAvailable) { Type[] loaderTypes = _reflector.GetAttributeTypes(typeof(XamlDeferLoadAttribute), 2); - if (loaderTypes != null) + if (loaderTypes is not null) { return SchemaContext.GetValueConverter(loaderTypes[0], null); } } - if (Type != null) + + if (Type is not null) { return Type.DeferringLoader; } + return null; } @@ -546,8 +568,9 @@ protected virtual IList LookupDependsOn() { return null; } + List doPropertyNames = _reflector.GetAllAttributeContents(typeof(DependsOnAttribute)); - if (doPropertyNames == null || doPropertyNames.Count == 0) + if (doPropertyNames is null || doPropertyNames.Count == 0) { return null; } @@ -559,11 +582,12 @@ protected virtual IList LookupDependsOn() // Normally we want to throw if property lookup fails to return anything // but here we can not throw because v3.0 does not - if (member != null) + if (member is not null) { result.Add(member); } } + return XamlType.GetReadOnly(result); } @@ -575,6 +599,7 @@ protected virtual IList LookupDependsOn() result = _reflector.GetAttributeValue( typeof(DesignerSerializationVisibilityAttribute)); } + return result; } @@ -584,6 +609,7 @@ protected virtual bool LookupIsAmbient() { return _reflector.IsAttributePresent(typeof(AmbientAttribute)); } + return GetDefaultFlag(BoolMemberBits.Ambient); } @@ -597,37 +623,41 @@ protected virtual bool LookupIsEvent() protected virtual bool LookupIsReadPublic() { MethodInfo getter = Getter; - if (getter != null && !getter.IsPublic) + if (getter is not null && !getter.IsPublic) { return false; } + return !IsWriteOnly; } protected virtual bool LookupIsReadOnly() { - if (UnderlyingMember != null) + if (UnderlyingMember is not null) { - return (Setter == null); + return (Setter is null); } + return GetDefaultFlag(BoolMemberBits.ReadOnly); } protected virtual bool LookupIsUnknown() { - if (_reflector != null) + if (_reflector is not null) { return _reflector.IsUnknown; } - return UnderlyingMember == null; + + return UnderlyingMember is null; } protected virtual bool LookupIsWriteOnly() { - if (UnderlyingMember != null) + if (UnderlyingMember is not null) { - return (Getter == null); + return (Getter is null); } + return GetDefaultFlag(BoolMemberBits.WriteOnly); } @@ -636,10 +666,11 @@ protected virtual bool LookupIsWriteOnly() protected virtual bool LookupIsWritePublic() { MethodInfo setter = Setter; - if (setter != null && !setter.IsPublic) + if (setter is not null && !setter.IsPublic) { return false; } + return !IsReadOnly; } @@ -648,7 +679,7 @@ protected virtual XamlType LookupTargetType() if (IsAttachable) { MethodInfo accessor = UnderlyingMember as MethodInfo; - if (accessor != null) + if (accessor is not null) { ParameterInfo[] parameters = accessor.GetParameters(); if (parameters.Length > 0) @@ -657,8 +688,10 @@ protected virtual XamlType LookupTargetType() return SchemaContext.GetXamlType(result); } } + return XamlLanguage.Object; } + return _declaringType; } @@ -668,12 +701,13 @@ protected virtual XamlValueConverter LookupTypeConverter() if (AreAttributesAvailable) { Type converterType = _reflector.GetAttributeType(typeof(TypeConverterAttribute)); - if (converterType != null) + if (converterType is not null) { result = SchemaContext.GetValueConverter(converterType, null); } } - if (result == null && Type != null) + + if (result is null && Type is not null) { result = Type.TypeConverter; } @@ -687,15 +721,17 @@ protected virtual XamlValueConverter LookupValueSerializer() if (AreAttributesAvailable) { Type converterType = _reflector.GetAttributeType(typeof(ValueSerializerAttribute)); - if (converterType != null) + if (converterType is not null) { result = SchemaContext.GetValueConverter(converterType, null); } } - if (result == null && Type != null) + + if (result is null && Type is not null) { result = Type.ValueSerializer; } + return result; } @@ -709,18 +745,19 @@ protected virtual IReadOnlyDictionary LookupMarkupExtensionBracketCh if (AreAttributesAvailable) { IReadOnlyDictionary bracketCharactersList = _reflector.GetBracketCharacterAttributes(typeof(MarkupExtensionBracketCharactersAttribute)); - if (bracketCharactersList != null) + if (bracketCharactersList is not null) { _reflector.MarkupExtensionBracketCharactersArgument = bracketCharactersList; } } + return _reflector.MarkupExtensionBracketCharactersArgument; } protected virtual XamlType LookupType() { Type systemType = LookupSystemType(); - return (systemType != null) ? SchemaContext.GetXamlType(systemType) : null; + return (systemType is not null) ? SchemaContext.GetXamlType(systemType) : null; } protected virtual MethodInfo LookupUnderlyingGetter() @@ -728,12 +765,13 @@ protected virtual MethodInfo LookupUnderlyingGetter() EnsureReflector(); // Through normal paths, _reflector.Getter should always be null here. // But a user could always call this protected method directly, so check just in case - if (_reflector.Getter != null) + if (_reflector.Getter is not null) { return _reflector.Getter; } + PropertyInfo pi = UnderlyingMember as PropertyInfo; - return (pi != null) ? pi.GetGetMethod(true) : null; + return (pi is not null) ? pi.GetGetMethod(true) : null; } protected virtual MethodInfo LookupUnderlyingSetter() @@ -741,19 +779,20 @@ protected virtual MethodInfo LookupUnderlyingSetter() EnsureReflector(); // Through normal paths, _reflector.Setter should always be null here. // But a user could always call this protected method directly, so check just in case - if (_reflector.Setter != null) + if (_reflector.Setter is not null) { return _reflector.Setter; } + PropertyInfo pi = UnderlyingMember as PropertyInfo; - if (pi != null) + if (pi is not null) { return pi.GetSetMethod(true); } else { EventInfo ei = UnderlyingMember as EventInfo; - return (ei != null) ? ei.GetAddMethod(true) : null; + return (ei is not null) ? ei.GetAddMethod(true) : null; } } @@ -777,6 +816,7 @@ private bool IsReadPublicIgnoringType result = LookupIsReadPublic(); _reflector.SetFlag(BoolMemberBits.ReadPublic, result.Value); } + return result.Value; } } @@ -792,16 +832,18 @@ private bool IsWritePublicIgnoringType result = LookupIsWritePublic(); _reflector.SetFlag(BoolMemberBits.WritePublic, result.Value); } + return result.Value; } } private static void ValidateGetter(MethodInfo method, string argumentName) { - if (method == null) + if (method is null) { return; } + if ((method.GetParameters().Length != 1) || (method.ReturnType == typeof(void))) { throw new ArgumentException(SR.IncorrectGetterParamNum, argumentName); @@ -810,7 +852,7 @@ private static void ValidateGetter(MethodInfo method, string argumentName) private static void ValidateSetter(MethodInfo method, string argumentName) { - if ((method != null) && (method.GetParameters().Length != 2)) + if ((method is not null) && (method.GetParameters().Length != 2)) { throw new ArgumentException(SR.IncorrectSetterParamNum, argumentName); } @@ -833,15 +875,17 @@ private bool AreAttributesAvailable if (!_reflector.CustomAttributeProviderIsSetVolatile) { ICustomAttributeProvider attrProvider = LookupCustomAttributeProvider(); - if (attrProvider == null) + if (attrProvider is null) { // Set the member that _reflector will use. Note this also ensures that // _underlyingMember is initialized, so it's safe to access the field directly below. _reflector.UnderlyingMember = UnderlyingMember; } + _reflector.SetCustomAttributeProviderVolatile(attrProvider); } - return _reflector.CustomAttributeProvider != null || UnderlyingMemberInternal.Value != null; + + return _reflector.CustomAttributeProvider is not null || UnderlyingMemberInternal.Value is not null; } } @@ -878,7 +922,8 @@ private void EnsureDefaultValue() defaultValueAttrib = (DefaultValueAttribute)attribs[0]; } } - if (defaultValueAttrib != null) + + if (defaultValueAttrib is not null) { _reflector.DefaultValue = defaultValueAttrib.Value; } @@ -892,7 +937,7 @@ private void EnsureDefaultValue() // We call this method a lot. Keep it really small, to make sure it inlines. private void EnsureReflector() { - if (_reflector == null) + if (_reflector is null) { CreateReflector(); } @@ -907,6 +952,7 @@ private bool GetFlag(BoolMemberBits flagBit) result = LookupBooleanValue(flagBit); _reflector.SetFlag(flagBit, result.Value); } + return result.Value; } @@ -938,6 +984,7 @@ private bool LookupBooleanValue(BoolMemberBits flag) result = GetDefaultFlag(flag); break; } + return result; } @@ -948,6 +995,7 @@ private string LookupConstructorArgument() { result = _reflector.GetAttributeString(typeof(ConstructorArgumentAttribute), out _); } + return result; } @@ -955,28 +1003,32 @@ private Type LookupSystemType() { MemberInfo underlyingMember = UnderlyingMember; PropertyInfo pi = underlyingMember as PropertyInfo; - if (pi != null) + if (pi is not null) { return pi.PropertyType; } + EventInfo ei = underlyingMember as EventInfo; - if (ei != null) + if (ei is not null) { return ei.EventHandlerType; } + MethodInfo mi = underlyingMember as MethodInfo; - if (mi != null) + if (mi is not null) { - if (mi.ReturnType != null && mi.ReturnType != typeof(void)) + if (mi.ReturnType is not null && mi.ReturnType != typeof(void)) { return mi.ReturnType; } + ParameterInfo[] parameters = mi.GetParameters(); if (parameters.Length == 2) { return parameters[1].ParameterType; } } + return null; } @@ -990,8 +1042,8 @@ public override bool Equals(object obj) public override int GetHashCode() { - Debug.Assert(DeclaringType != null, "XamlDirective should not call into base.GetHashCode"); - return (Name == null ? 0 : Name.GetHashCode()) ^ (int)_memberType ^ DeclaringType.GetHashCode(); + Debug.Assert(DeclaringType is not null, "XamlDirective should not call into base.GetHashCode"); + return (Name is null ? 0 : Name.GetHashCode()) ^ (int)_memberType ^ DeclaringType.GetHashCode(); } public bool Equals(XamlMember other) @@ -1005,14 +1057,17 @@ public bool Equals(XamlMember other) { return true; } + if (xamlMember1 is null || xamlMember2 is null) { return false; } + if (xamlMember1._memberType != xamlMember2._memberType || xamlMember1.Name != xamlMember2.Name) { return false; } + if (xamlMember1.IsDirective) { Debug.Assert(xamlMember2.IsDirective); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeList.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeList.cs index 57dadef8275..33dc92125a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeList.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeList.cs @@ -4,9 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Xaml { // provides a place to Write a list of Xaml nodes @@ -59,10 +56,12 @@ public XamlReader GetReader() { throw new XamlException(SR.CloseXamlWriterBeforeReading); } - if (_writer.SchemaContext == null) + + if (_writer.SchemaContext is null) { throw new XamlException(SR.SchemaContextNotInitialized); } + return new ReaderMultiIndexDelegate(_writer.SchemaContext, Index, _nodeList.Count, _hasLineInfo); } @@ -76,6 +75,7 @@ private void Add(XamlNodeType nodeType, object data) _nodeList.Add(node); return; } + Debug.Assert(XamlNode.IsEof_Helper(nodeType, data)); _readMode = true; } @@ -106,6 +106,7 @@ private XamlNode Index(int idx) { throw new XamlException(SR.CloseXamlWriterBeforeReading); } + return _nodeList[idx]; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeQueue.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeQueue.cs index 3e9519c092f..99d35a52db7 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeQueue.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlNodeQueue.cs @@ -4,9 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; - namespace System.Xaml { // Provides a FIFO buffer for writing nodes and reading them back. @@ -35,10 +32,11 @@ public XamlReader Reader { get { - if (_reader == null) + if (_reader is null) { _reader = new ReaderDelegate(_writer.SchemaContext, Next, _hasLineInfo); } + return _reader; } } @@ -68,6 +66,7 @@ private void Add(XamlNodeType nodeType, object data) _nodeQueue.Enqueue(node); return; } + Debug.Assert(XamlNode.IsEof_Helper(nodeType, data)); _nodeQueue.Enqueue(_endOfStreamNode); } @@ -81,7 +80,8 @@ private void AddLineInfo(int lineNumber, int linePosition) { _hasLineInfo = true; } - if (_reader != null && !_reader.HasLineInfo) + + if (_reader is not null && !_reader.HasLineInfo) { _reader.HasLineInfo = true; } @@ -98,6 +98,7 @@ private XamlNode Next() { node = _endOfStreamNode; } + return node; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlObjectReader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlObjectReader.cs index 56544adb258..6509691e513 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlObjectReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlObjectReader.cs @@ -5,13 +5,10 @@ #nullable disable using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Security; using System.Text; using System.Windows.Markup; using System.Xaml.MS.Impl; @@ -22,8 +19,6 @@ namespace System.Xaml { - using REPLACEMENT = Replacements; - public class XamlObjectReader : XamlReader { XamlObjectReaderSettings settings; @@ -99,6 +94,7 @@ public override bool Read() { currentXamlNode = new XamlNode(XamlNode.InternalNodeType.EndOfStream); } + return false; } @@ -106,11 +102,11 @@ public override bool Read() currentXamlNode = node.XamlNode; ObjectMarkupInfo objectNode = node as ObjectMarkupInfo; - currentInstance = objectNode != null ? objectNode.Object : null; + currentInstance = objectNode is not null ? objectNode.Object : null; var subNodes = node.Decompose(); - if (subNodes != null) + if (subNodes is not null) { // we want to push the nodes onto the stack in reverse order subNodes.Reverse(); @@ -210,6 +206,7 @@ internal static bool GetDefaultValue(XamlMember member, out object value) value = result.DefaultValue; return true; } + value = null; return false; } @@ -235,14 +232,14 @@ public override void EnsureNoDuplicateNames(Stack> namesInCurren class ObjectReferenceEqualityComparer : IEqualityComparer { - new public bool Equals(object x, object y) + public new bool Equals(object x, object y) { return ReferenceEquals(x, y); } public int GetHashCode(object obj) { - if (obj == null) { return 0; } + if (obj is null) { return 0; } return obj.GetHashCode(); } } @@ -283,7 +280,7 @@ public bool IsAttributableMarkupExtension } ObjectMarkupInfo r = children[0] as ObjectMarkupInfo; - return (r != null && r.IsAttributableMarkupExtension); + return (r is not null && r.IsAttributableMarkupExtension); } } @@ -302,6 +299,7 @@ public bool IsAttributable return false; } } + return true; } @@ -312,7 +310,7 @@ public bool IsAttributable if (Children.Count == 0 || Children[0] is ValueMarkupInfo) { return true; } ObjectMarkupInfo r = Children[0] as ObjectMarkupInfo; - if (r == null) + if (r is null) { throw new InvalidOperationException(SR.ExpectedObjectMarkupInfo); } @@ -345,7 +343,7 @@ public static XamlTemplateMarkupInfo ConvertToXamlReader( object propertyValue, XamlValueConverter deferringLoader, SerializerContext context) { XamlDeferringLoader converter = deferringLoader.ConverterInstance; - if (converter == null) + if (converter is null) { throw new XamlObjectReaderException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); } @@ -388,6 +386,7 @@ public static MemberMarkupInfo ForAttachedProperty return ForSequence(value, attachedProperty, context, true); } } + return null; } @@ -401,10 +400,10 @@ public static MemberMarkupInfo ForDictionaryItems( object propertyValue; // Type sourceType; - if (property != null) + if (property is not null) { propertyValue = context.Runtime.GetValue(sourceOrValue, property); - if (propertyValue == null) { return null; } + if (propertyValue is null) { return null; } // sourceType = sourceOrValue.GetType(); } else @@ -442,12 +441,12 @@ public static MemberMarkupInfo ForDictionaryItems( ObjectOrValueMarkupInfo keyValue; XamlType actualKeyType = null; - if (entry.Key != null) + if (entry.Key is not null) { actualKeyType = context.GetXamlType(entry.Key.GetType()); } - if (entry.Key != null && actualKeyType != keyType) + if (entry.Key is not null && actualKeyType != keyType) { TypeConverter tc = TypeConverterExtensions.GetConverterInstance(actualKeyType.TypeConverter); keyValue = ObjectMarkupInfo.ForObject(entry.Key, context, tc); @@ -476,20 +475,20 @@ public static MemberMarkupInfo ForDictionaryItems( public static bool ShouldOmitKey(DictionaryEntry entry, SerializerContext context) { - if (entry.Value != null) + if (entry.Value is not null) { XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); XamlMember dkp = typeOfValue.GetAliasedProperty(XamlLanguage.Key); - if (dkp != null) + if (dkp is not null) { if (ObjectMarkupInfo.CanPropertyXamlRoundtrip(dkp, context)) { object dkpObject = context.Runtime.GetValue(entry.Value, dkp); - if (dkpObject == null) + if (dkpObject is null) { - return entry.Key == null; + return entry.Key is null; } else if (dkpObject.Equals(entry.Key)) { @@ -498,6 +497,7 @@ public static bool ShouldOmitKey(DictionaryEntry entry, SerializerContext contex } } } + return false; } @@ -534,8 +534,8 @@ public static MemberMarkupInfo ForProperty( static MemberMarkupInfo ForSequence(object source, XamlMember property, SerializerContext context, bool isAttachable) { - var itemsInfo = ForSequenceItems(source, isAttachable ? null : property, property.Type, context, false /*allowReadOnly*/); - if (itemsInfo != null && itemsInfo.Children.Count != 0) + var itemsInfo = ForSequenceItems(source, isAttachable ? null : property, property.Type, context, allowReadOnly: false); + if (itemsInfo is not null && itemsInfo.Children.Count != 0) { return new MemberMarkupInfo { @@ -563,7 +563,7 @@ static MemberMarkupInfo ForSequence(object source, XamlMember property, Serializ static MemberMarkupInfo ForDictionary(object source, XamlMember property, SerializerContext context, bool isAttachable) { var itemsInfo = ForDictionaryItems(source, isAttachable ? null : property, property.Type, context); - if (itemsInfo != null && itemsInfo.Children.Count != 0) + if (itemsInfo is not null && itemsInfo.Children.Count != 0) { return new MemberMarkupInfo { @@ -590,7 +590,7 @@ static MemberMarkupInfo ForDictionary(object source, XamlMember property, Serial static MemberMarkupInfo ForXmlSerializable(object source, XamlMember property, SerializerContext context) { var serializer = (IXmlSerializable)context.Runtime.GetValue(source, property); - if (serializer == null) { return null; } + if (serializer is null) { return null; } var sb = new StringBuilder(); var writerSettings = new XmlWriterSettings @@ -675,25 +675,23 @@ static void RemoveObjectNodesForCollectionOrDictionary(MemberMarkupInfo memberIn if (memberInfo.Children.Count == 1) { var objectInfo = memberInfo.Children[0] as ObjectMarkupInfo; - if (objectInfo != null && objectInfo.Properties.Count == 1 && memberType == objectInfo.XamlNode.XamlType) + if (objectInfo is not null && objectInfo.Properties.Count == 1 && memberType == objectInfo.XamlNode.XamlType) { - if (objectInfo.Properties[0].XamlNode.Member == XamlLanguage.Items) { var itemsMemberInfo = objectInfo.Properties[0] as MemberMarkupInfo; - if(itemsMemberInfo != null && itemsMemberInfo.Children.Count > 0) + if(itemsMemberInfo is not null && itemsMemberInfo.Children.Count > 0) { // Check if the first element of the collection/dictionary is a ME and replace the SO with GO only if it is not an ME. // This is to handle cases where the first element is, say, null. If we remove the SO, then there is no way to // know if the collection is null or the first element is null. var itemInfo = itemsMemberInfo.Children[0] as ObjectMarkupInfo; - if(itemInfo == null || itemInfo.XamlNode.XamlType == null || !itemInfo.XamlNode.XamlType.IsMarkupExtension) + if(itemInfo is null || itemInfo.XamlNode.XamlType is null || !itemInfo.XamlNode.XamlType.IsMarkupExtension) { // change the member to GetObject objectInfo.XamlNode = new XamlNode(XamlNodeType.GetObject); } } - } } } @@ -708,17 +706,17 @@ public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember { object propertyValue; - if (property != null) + if (property is not null) { propertyValue = context.Runtime.GetValue(sourceOrValue, property); - if (propertyValue == null) { return null; } + if (propertyValue is null) { return null; } } else { propertyValue = sourceOrValue; } - if (!allowReadOnly && xamlType.IsReadOnlyMethod != null) + if (!allowReadOnly && xamlType.IsReadOnlyMethod is not null) { bool isReadOnly = (bool)xamlType.IsReadOnlyMethod.Invoke(propertyValue, null); if (isReadOnly) @@ -749,9 +747,9 @@ public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember ObjectOrValueMarkupInfo unwrappedItemInfo = null; - if (xamlType.ContentWrappers != null) + if (xamlType.ContentWrappers is not null) { - if (itemInfo.Properties != null && itemInfo.Properties.Count == 1) + if (itemInfo.Properties is not null && itemInfo.Properties.Count == 1) { var memberInfo = (MemberMarkupInfo)itemInfo.Properties[0]; if (memberInfo.XamlNode.Member == itemInfo.XamlNode.XamlType.ContentProperty) @@ -795,6 +793,7 @@ public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember { isPreviousItemValue = false; } + itemsInfo.Children.Add(unwrappedItemInfo ?? itemInfo); } @@ -847,7 +846,7 @@ static ObjectOrValueMarkupInfo GetPropertyValueInfo( return GetPropertyValueInfoInternal(propertyValue, TypeConverterExtensions.GetConverterInstance(xamlProperty.ValueSerializer), TypeConverterExtensions.GetConverterInstance(xamlProperty.TypeConverter), - xamlProperty != null && xamlProperty.DeferringLoader != null, + xamlProperty is not null && xamlProperty.DeferringLoader is not null, xamlProperty, context); } @@ -858,7 +857,7 @@ static ObjectOrValueMarkupInfo GetPropertyValueInfoInternal( ObjectOrValueMarkupInfo valueInfo = null; context.Instance = propertyValue; - if (isXamlTemplate && propertyValue != null) + if (isXamlTemplate && propertyValue is not null) { valueInfo = ConvertToXamlReader(propertyValue, xamlProperty.DeferringLoader, context); } @@ -876,12 +875,12 @@ static ObjectOrValueMarkupInfo GetPropertyValueInfoInternal( valueInfo = new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, propertyValue) }; } - else if (propertyConverter != null && context.TryConvertToMarkupExtension(propertyConverter, ref propertyValue)) + else if (propertyConverter is not null && context.TryConvertToMarkupExtension(propertyConverter, ref propertyValue)) { context.Instance = null; valueInfo = ObjectMarkupInfo.ForObject(propertyValue, context); } - else if (propertyConverter != null && context.TryTypeConvertToString(propertyConverter, ref propertyValue)) + else if (propertyConverter is not null && context.TryTypeConvertToString(propertyConverter, ref propertyValue)) { ThrowIfPropertiesAreAttached(context.Instance, xamlProperty, context); context.Instance = null; @@ -902,15 +901,16 @@ static ObjectOrValueMarkupInfo GetPropertyValueInfoInternal( valueInfo = ObjectMarkupInfo.ForObject(propertyValue, context, propertyConverter); } } + return valueInfo; } static void ThrowIfPropertiesAreAttached(object value, XamlMember property, SerializerContext context) { var props = context.Runtime.GetAttachedProperties(value); - if (props != null) + if (props is not null) { - if (property != null) + if (property is not null) { throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnTypeConvertedOrStringProperty, property.Name, value.ToString(), props[0].Key.ToString())); } @@ -1030,7 +1030,7 @@ void ReorderPropertiesWithDO() List removedProperties; SelectAndRemovePropertiesWithDO(out removedProperties); - if (removedProperties != null) + if (removedProperties is not null) { InsertPropertiesWithDO(removedProperties); } @@ -1068,6 +1068,7 @@ bool IsMemberOnlyDependentOnAttributableMembers(XamlMember member, HashSet FindAllAttributableProperties(out int posOfFirstNonAttributableP { break; } + namesOfAttributableProperties.Add(memberInfo.XamlNode.Member.Name); } + posOfFirstNonAttributableProperty = i; return namesOfAttributableProperties; } @@ -1098,10 +1101,11 @@ void SelectAndRemovePropertiesWithDO(out List removedProperties) var property = properties[i]; if (property.XamlNode.Member.DependsOn.Count > 0) { - if (propertiesWithDO == null) + if (propertiesWithDO is null) { propertiesWithDO = new PartiallyOrderedList(); } + string dependentPropertyName = property.XamlNode.Member.Name; propertiesWithDO.Add(dependentPropertyName, property); @@ -1118,14 +1122,13 @@ void SelectAndRemovePropertiesWithDO(out List removedProperties) } } - if (propertiesWithDO == null) + if (propertiesWithDO is null) { return; } removedProperties = new List(propertiesWithDO); return; - } public virtual bool IsAttributableMarkupExtension @@ -1153,6 +1156,7 @@ public virtual bool IsAttributableMarkupExtension return false; } } + isAttributableMarkupExtension = true; return true; } @@ -1180,7 +1184,7 @@ public override void FindNamespace(SerializerContext context) void FindNamespaceForTypeArguments(IList types, SerializerContext context) { - if (types == null || types.Count == 0) + if (types is null || types.Count == 0) { return; } @@ -1202,10 +1206,10 @@ void AddItemsProperty(object value, SerializerContext context, XamlType xamlType } else if (xamlType.IsCollection) { - propertyInfo = MemberMarkupInfo.ForSequenceItems(value, null, xamlType, context, true /*allowReadOnly*/); + propertyInfo = MemberMarkupInfo.ForSequenceItems(value, null, xamlType, context, allowReadOnly: true); } - if (propertyInfo != null && propertyInfo.Children.Count != 0) + if (propertyInfo is not null && propertyInfo.Children.Count != 0) { properties.Add(propertyInfo); } @@ -1216,10 +1220,11 @@ ParameterInfo[] GetMethodParams(MemberInfo memberInfo) ParameterInfo[] methodParams = null; MethodBase method = memberInfo as MethodBase; - if (method != null) + if (method is not null) { methodParams = method.GetParameters(); } + return methodParams; } @@ -1227,7 +1232,7 @@ void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, { methodParams = null; - if (memberInfo == null) + if (memberInfo is null) { // default ctor methodParams = Array.Empty(); @@ -1259,10 +1264,11 @@ void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, } else if (valueType.IsValueType) { - if (arguments != null && arguments.Count > 0) + if (arguments is not null && arguments.Count > 0) { throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorIncompatibleArguments); } + return; } else @@ -1270,7 +1276,7 @@ void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorInvalidMethod); } - if (arguments != null) + if (arguments is not null) { if (arguments.Count != methodParams.Length) { @@ -1281,7 +1287,7 @@ void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, foreach (var argument in arguments) { var parameterInfo = methodParams[argPos++]; - if (argument == null) + if (argument is null) { if (parameterInfo.ParameterType.IsValueType) { @@ -1302,7 +1308,7 @@ void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, void AddArgumentsMembers(ICollection arguments, SerializerContext context) { - if (arguments != null && arguments.Count > 0) + if (arguments is not null && arguments.Count > 0) { var itemsProperty = new MemberMarkupInfo { @@ -1325,7 +1331,7 @@ void AddArgumentsMembers(ICollection arguments, SerializerContext context) bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollection arguments, SerializerContext context) { - if (arguments != null && arguments.Count > 0) + if (arguments is not null && arguments.Count > 0) { ParameterInfo[] cstrParams = GetMethodParams(member); @@ -1346,14 +1352,14 @@ bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollectio object meObject = argument; context.Instance = argument; - if (converter != null && valueSerializer != null && context.CanRoundtripUsingValueSerializer(valueSerializer, converter, argument)) + if (converter is not null && valueSerializer is not null && context.CanRoundtripUsingValueSerializer(valueSerializer, converter, argument)) { // ValueSerializer is always preferred over TypeConverters string stringValue = context.ConvertToString(valueSerializer, argument); context.Instance = null; positionalParametersProperty.Children.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.Value, stringValue) }); } - else if ((converter != null && context.TryConvertToMarkupExtension(converter, ref meObject)) || meObject is MarkupExtension) + else if ((converter is not null && context.TryConvertToMarkupExtension(converter, ref meObject)) || meObject is MarkupExtension) { context.Instance = null; objectInfo = ForObject(meObject, context); @@ -1361,9 +1367,10 @@ bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollectio { return false; } + positionalParametersProperty.Children.Add(objectInfo); } - else if (converter != null && context.CanRoundTripString(converter)) + else if (converter is not null && context.CanRoundTripString(converter)) { var stringValue = context.ConvertTo(converter, argument); context.Instance = null; @@ -1384,6 +1391,7 @@ bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollectio Properties.Add(positionalParametersProperty); return true; } + return false; } @@ -1400,11 +1408,12 @@ bool TryGetInstanceDescriptorInfo(object value, SerializerContext context, TypeC isComplete = false; context.Instance = value; - if (converter != null && context.CanConvertTo(converter, typeof(InstanceDescriptor))) + if (converter is not null && context.CanConvertTo(converter, typeof(InstanceDescriptor))) { ConvertToInstanceDescriptor(context, value, converter, out member, out arguments, out isComplete); result = true; } + return result; } @@ -1419,7 +1428,6 @@ void ConvertToInstanceDescriptor(SerializerContext context, object instance, Typ isComplete = descriptor.IsComplete; } - bool TryGetDefaultConstructorInfo(XamlType type, out MemberInfo member, out ICollection arguments, out bool isComplete) { arguments = null; @@ -1434,7 +1442,7 @@ protected void AddRecordMembers(object value, SerializerContext context, TypeCon var valueXamlType = context.GetXamlType(valueType); context.Instance = value; - if (converter == null || !context.CanConvertTo(converter, typeof(InstanceDescriptor))) + if (converter is null || !context.CanConvertTo(converter, typeof(InstanceDescriptor))) { context.Instance = null; converter = TypeConverterExtensions.GetConverterInstance(valueXamlType.TypeConverter); @@ -1450,7 +1458,7 @@ protected void AddRecordMembers(object value, SerializerContext context, TypeCon // we will need to enumerate the properties if we have a runtimeNamePropertyName // if (!isComplete || - valueXamlType.GetAliasedProperty(XamlLanguage.Name) != null || + valueXamlType.GetAliasedProperty(XamlLanguage.Name) is not null || context.Runtime.AttachedPropertyCount(value) > 0) { AddRecordMembers( @@ -1485,7 +1493,7 @@ void AddRecordMembers(object value, // Attempt to create a MemberMarkupInfo for the property, being unable to create // one is indicative that we're done with it var propertyInfo = MemberMarkupInfo.ForProperty(value, property, context); - if (propertyInfo == null) + if (propertyInfo is null) { continue; } @@ -1578,6 +1586,7 @@ void AddRecordConstructionMembers(object value, XamlType valueXamlType, Serializ { GetConstructorInfo(value, valueXamlType, context, out member, out arguments, out isComplete); } + AddArgumentsMembers(arguments, context); } } @@ -1595,12 +1604,14 @@ bool IsPropertyContent(MemberMarkupInfo propertyInfo, XamlType containingType) { return false; } + if (propertyInfo.IsAtomic) { // we do not want type-converted properties as content properties // to conform with 3.0 return XamlLanguage.String.CanAssignTo(property.Type); } + return true; } @@ -1626,6 +1637,7 @@ void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext ctorArgProps.Add(p); } } + foreach (XamlMember p in readOnlyProperties) { if (context.IsPropertyReadVisible(p) && !string.IsNullOrEmpty(GetConstructorArgument(p))) @@ -1662,7 +1674,7 @@ void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext // At least one of the arguments has no matching property... break out of the loop and // we'll move on to the next constructor. // - if (matchingProperty == null) { break; } + if (matchingProperty is null) { break; } constructorArguments.Add(context.Runtime.GetValue(value, matchingProperty)); } @@ -1691,12 +1703,13 @@ void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext } } - if (member == null && !valueXamlType.UnderlyingType.IsValueType) + if (member is null && !valueXamlType.UnderlyingType.IsValueType) { if (ctorArgProps.Count == 0) { throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType())); } + throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType())); } } @@ -1730,7 +1743,7 @@ static void CheckTypeCanRoundtrip(ObjectMarkupInfo objInfo) public void AssignName(SerializerContext context) { - if (Name == null) + if (Name is null) { Name = context.AllocateIdentifier(); AddNameProperty(context); @@ -1739,7 +1752,7 @@ public void AssignName(SerializerContext context) public void AssignName(string name, SerializerContext context) { - if (Name == null) + if (Name is null) { Name = name; @@ -1763,7 +1776,7 @@ public void AddNameProperty(SerializerContext context) // the object, we need to add the object node back if (XamlNode.NodeType == XamlNodeType.GetObject) { - Debug.Assert(Object != null); + Debug.Assert(Object is not null); var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); XamlNode = new XamlNode(XamlNodeType.StartObject, xamlType); } @@ -1864,7 +1877,7 @@ static ObjectMarkupInfo ForArray(Array value, SerializerContext context) static void AddAttachedProperties(object value, ObjectMarkupInfo objectInfo, SerializerContext context) { var props = context.Runtime.GetAttachedProperties(value); - if (props != null) + if (props is not null) { foreach (var ap in props) { @@ -1873,9 +1886,10 @@ static void AddAttachedProperties(object value, ObjectMarkupInfo objectInfo, Ser { continue; } + XamlMember attachedProperty = owningType.GetAttachableMember(ap.Key.MemberName); - if (attachedProperty == null) + if (attachedProperty is null) { throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderAttachedPropertyNotFound, owningType, ap.Key.MemberName)); } @@ -1886,7 +1900,7 @@ static void AddAttachedProperties(object value, ObjectMarkupInfo objectInfo, Ser } var propertyInfo = MemberMarkupInfo.ForAttachedProperty(value, attachedProperty, ap.Value, context); - if (propertyInfo != null) + if (propertyInfo is not null) { objectInfo.Properties.Add(propertyInfo); } @@ -1901,13 +1915,13 @@ static ObjectMarkupInfo ForNull() public static ObjectMarkupInfo ForObject(object value, SerializerContext context, TypeConverter instanceConverter = null, bool isRoot = false) { - if (value == null) + if (value is null) { return ForNull(); } ObjectMarkupInfo existingInfo = context.ReferenceTable.Find(value); - if (existingInfo != null) + if (existingInfo is not null) { existingInfo.AssignName(context); return new ReferenceMarkupInfo(existingInfo); @@ -1923,7 +1937,7 @@ public static ObjectMarkupInfo ForObject(object value, SerializerContext context // } var valueAsArray = value as Array; - if (valueAsArray != null) + if (valueAsArray is not null) { return ForArray(valueAsArray, context); } @@ -1933,7 +1947,7 @@ public static ObjectMarkupInfo ForObject(object value, SerializerContext context ValueSerializer valueSerializer = null; TypeConverter converter = null; - if (valueType.ContentProperty == null || + if (valueType.ContentProperty is null || (valueType.ContentProperty.TypeConverter != BuiltInValueConverter.String && valueType.ContentProperty.TypeConverter != BuiltInValueConverter.Object)) { @@ -1943,22 +1957,23 @@ public static ObjectMarkupInfo ForObject(object value, SerializerContext context context.Instance = value; ObjectMarkupInfo objectInfo; - if (valueType.DeferringLoader != null) + if (valueType.DeferringLoader is not null) { objectInfo = MemberMarkupInfo.ConvertToXamlReader(value, valueType.DeferringLoader, context); } - else if (converter != null && valueSerializer != null && context.CanRoundtripUsingValueSerializer(valueSerializer, converter, value)) + else if (converter is not null && valueSerializer is not null && context.CanRoundtripUsingValueSerializer(valueSerializer, converter, value)) { if (isRoot) { context.ReserveDefaultPrefixForRootObject(value); } + // ValueSerializer is always preferred over TypeConverters string stringValue = context.ConvertToString(valueSerializer, value); context.Instance = null; objectInfo = ForTypeConverted((string)stringValue, value, context); } - else if (converter != null && context.TryConvertToMarkupExtension(converter, ref value)) + else if (converter is not null && context.TryConvertToMarkupExtension(converter, ref value)) { context.Instance = null; @@ -1974,12 +1989,13 @@ public static ObjectMarkupInfo ForObject(object value, SerializerContext context context.Instance = null; objectInfo = ForObject(new TypeExtension(type), context); } - else if (converter != null && context.CanRoundTripString(converter)) + else if (converter is not null && context.CanRoundTripString(converter)) { if (isRoot) { context.ReserveDefaultPrefixForRootObject(value); } + var stringValue = context.ConvertTo(converter, value); context.Instance = null; objectInfo = ForTypeConverted((string)stringValue, value, context); @@ -1995,13 +2011,14 @@ public static ObjectMarkupInfo ForObject(object value, SerializerContext context { context.ReserveDefaultPrefixForRootObject(value); } + context.Instance = null; objectInfo = ForObjectInternal(value, context, instanceConverter); } // check if any type converter has asked for the name of the current object string assignedName = context.ReferenceTable.FindInServiceProviderTable(value); - if (assignedName != null) + if (assignedName is not null) { objectInfo.AssignName(assignedName, context); } @@ -2100,7 +2117,7 @@ propertyInfo.Children[0] is ObjectMarkupInfo objectInfo && static bool PropertyUsedInMethodSignature(XamlMember property, ParameterInfo[] methodParameters) { - if (methodParameters != null) + if (methodParameters is not null) { if (!string.IsNullOrEmpty(GetConstructorArgument(property))) { @@ -2131,6 +2148,7 @@ static string ValidateNamePropertyAndFindName(MemberMarkupInfo propertyInfo) return name; } } + XamlMember property = propertyInfo.XamlNode.Member; throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderXamlNamePropertyMustBeString, property.Name, property.DeclaringType)); } @@ -2326,6 +2344,7 @@ static List GetXamlSerializableProperties(XamlType type, SerializerC propertyList.Add(property); } } + return propertyList; } } @@ -2350,6 +2369,7 @@ public override List Decompose() return base.Decompose(); } + // public override bool IsAttributableMarkupExtension // { // get @@ -2435,10 +2455,11 @@ public void Add(object value, ObjectMarkupInfo info) public void AddToServiceProviderTable(object value, string name) { - if (serviceProviderTable == null) + if (serviceProviderTable is null) { serviceProviderTable = new Dictionary(new ObjectReferenceEqualityComparer()); } + serviceProviderTable.Add(value, name); } @@ -2448,8 +2469,9 @@ public ObjectMarkupInfo Find(object value) if (!objectGraphTable.TryGetValue(value, out result)) { // this is a recursive search, because objects in the parent namescopes are still visible - if (parent != null) { return parent.Find(value); } + if (parent is not null) { return parent.Find(value); } } + return result; } @@ -2457,7 +2479,7 @@ public string FindInServiceProviderTable(object value) { string result = null; - if (serviceProviderTable != null) + if (serviceProviderTable is not null) { serviceProviderTable.TryGetValue(value, out result); } @@ -2490,7 +2512,7 @@ public SerializerContext(XamlSchemaContext schemaContext, XamlObjectReaderSettin prefixToNamespaceMap = new Dictionary(); ReferenceTable = new ReferenceTable(null); this.schemaContext = schemaContext; - runtime = new ClrObjectRuntime(null, false /*isWriter*/); + runtime = new ClrObjectRuntime(null, isWriter: false); this.settings = settings; } @@ -2577,6 +2599,7 @@ public bool TryHoistNamespaceDeclaration(NamespaceDeclaration namespaceDeclarati { return true; } + return false; } @@ -2601,7 +2624,7 @@ public string FindPrefix(string ns) prefix = string.Empty; } - if (prefix == null) + if (prefix is null) { prefix = basePrefix; @@ -2627,11 +2650,12 @@ public string FindPrefix(string ns) public XamlType GetXamlType(Type clrType) { XamlType result = schemaContext.GetXamlType(clrType); - if (result == null) + if (result is null) { throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeNotAllowed, schemaContext.GetType(), clrType)); } + return result; } @@ -2642,6 +2666,7 @@ public XamlType LocalAssemblyAwareGetXamlType(Type clrType) { throw new XamlObjectReaderException(SR.Format(SR.ObjectReader_TypeNotVisible, clrType.FullName)); } + return result; } @@ -2656,6 +2681,7 @@ public bool CanRoundTripString(TypeConverter converter) { return false; } // ReferenceConverter lies. + return Runtime.CanConvertFrom(TypeDescriptorContext, converter) && Runtime.CanConvertTo(TypeDescriptorContext, converter, typeof(string)); } @@ -2663,8 +2689,8 @@ public bool CanRoundTripString(TypeConverter converter) public bool CanRoundtripUsingValueSerializer(ValueSerializer valueSerializer, TypeConverter typeConverter, object value) { // ValueSerializer must know how to convert to string and the TypeConverter must know how to convert from string - return (valueSerializer != null && - typeConverter != null && + return (valueSerializer is not null && + typeConverter is not null && Runtime.CanConvertToString(ValueSerializerContext, valueSerializer, value) && Runtime.CanConvertFrom(TypeDescriptorContext, typeConverter)); } @@ -2681,7 +2707,7 @@ public T ConvertTo(TypeConverter converter, object value) public bool TryValueSerializeToString(ValueSerializer valueSerializer, TypeConverter propertyConverter, SerializerContext context, ref object value) { - if (value == null) { return false; } + if (value is null) { return false; } // skip using ValueSerializer if value is string if (value is string) { return true; } @@ -2699,7 +2725,7 @@ public bool TryValueSerializeToString(ValueSerializer valueSerializer, TypeConve public bool TryTypeConvertToString(TypeConverter converter, ref object value) { - if (value == null) { return false; } + if (value is null) { return false; } // Regardless of what the type converter says, if the value of the property is now a string, then // we can just write the string straight in. @@ -2713,7 +2739,7 @@ public bool TryTypeConvertToString(TypeConverter converter, ref object value) public bool TryConvertToMarkupExtension(TypeConverter converter, ref object value) { - if (value == null) { return false; } + if (value is null) { return false; } if (!Runtime.CanConvertTo(TypeDescriptorContext, converter, typeof(MarkupExtension))) { return false; } value = ConvertTo(converter, value); @@ -2733,19 +2759,19 @@ public string GetName(object objectToName) XamlType type = GetXamlType(objectToName.GetType()); XamlMember runtimeNameProperty = type.GetAliasedProperty(XamlLanguage.Name); - if (runtimeNameProperty != null) + if (runtimeNameProperty is not null) { runtimeName = Runtime.GetValue(objectToName, runtimeNameProperty) as string; } - if (runtimeName != null) + if (runtimeName is not null) { return runtimeName; } // Is the object already being referenced? ObjectMarkupInfo existingInfo = ReferenceTable.Find(objectToName); - if (existingInfo != null) + if (existingInfo is not null) { existingInfo.AssignName(this); return existingInfo.Name; @@ -2755,7 +2781,7 @@ public string GetName(object objectToName) string allocatedName = null; allocatedName = ReferenceTable.FindInServiceProviderTable(objectToName); - if (allocatedName == null) + if (allocatedName is null) { // the object has not been seen at the current stage due to either // 1. the object is present in other parts of the object graph yet to be constructed @@ -2766,6 +2792,7 @@ public string GetName(object objectToName) allocatedName = AllocateIdentifier(); ReferenceTable.AddToServiceProviderTable(objectToName, allocatedName); } + return allocatedName; } @@ -2776,6 +2803,7 @@ public bool IsPropertyReadVisible(XamlMember property) { allowProtectedMemberOnType = RootType; } + return property.IsReadVisibleTo(LocalAssembly, allowProtectedMemberOnType); } @@ -2786,6 +2814,7 @@ public bool IsPropertyWriteVisible(XamlMember property) { allowProtectedMemberOnType = RootType; } + return property.IsWriteVisibleTo(LocalAssembly, allowProtectedMemberOnType); } } @@ -2988,6 +3017,7 @@ public override List Decompose() { nodes.Insert(objectPosition, property); } + return nodes; } @@ -3026,7 +3056,7 @@ public Entry(TKey key, TValue value) public override bool Equals(object obj) { Entry other = obj as Entry; - return other != null && other.Key.Equals(Key); + return other is not null && other.Key.Equals(Key); } public override int GetHashCode() @@ -3070,6 +3100,7 @@ private int GetEntryIndex(TKey key) result = _entries.Count; _entries.Add(entry); } + return result; } @@ -3084,10 +3115,11 @@ public void SetOrder(TKey predecessor, TKey key) Entry keyEntry = _entries[keyIndex]; // add the constraint - if (keyEntry.Predecessors == null) + if (keyEntry.Predecessors is null) { keyEntry.Predecessors = new List(); } + keyEntry.Predecessors.Add(predIndex); // mark the list to force a sort before the next @@ -3129,7 +3161,7 @@ private void DepthFirstSearch(int index) _entries[index].Link = Entry.INDFS; // search the predecessors - if (_entries[index].Predecessors != null) + if (_entries[index].Predecessors is not null) { foreach (int predIndex in _entries[index].Predecessors) { @@ -3150,6 +3182,7 @@ private void DepthFirstSearch(int index) _lastIndex = index; } + /* Note: if it is desired to detect cycles, this is the place to do it. else if (_entries[index].Link == Entry.INDFS) @@ -3177,7 +3210,7 @@ public IEnumerator GetEnumerator() while (index >= 0) { Entry entry = _entries[index]; - if (entry.Value != null) + if (entry.Value is not null) yield return entry.Value; index = entry.Link; @@ -3200,7 +3233,7 @@ internal static class TypeConverterExtensions { public static TConverter GetConverterInstance(XamlValueConverter converter) where TConverter : class { - return (converter == null) ? null : converter.ConverterInstance; + return (converter is null) ? null : converter.ConverterInstance; } } @@ -3216,11 +3249,13 @@ internal static XamlMember GetNearestMember(XamlMember member, GetNearestBaseMem { return member; } + MethodInfo accessor = member.Getter ?? member.Setter; - if (accessor == null || !accessor.IsVirtual) + if (accessor is null || !accessor.IsVirtual) { return member; } + Type baseDeclaringType = accessor.GetBaseDefinition().DeclaringType; if (member.DeclaringType.UnderlyingType == baseDeclaringType) { @@ -3228,27 +3263,31 @@ internal static XamlMember GetNearestMember(XamlMember member, GetNearestBaseMem } XamlType baseType = member.DeclaringType.BaseType; - while (baseType != null && baseType != XamlLanguage.Object) + while (baseType is not null && baseType != XamlLanguage.Object) { XamlMember baseMember = baseType.GetMember(member.Name); - if (baseMember == null) + if (baseMember is null) { baseMember = GetExcludedReadOnlyMember(baseType, member.Name); - if (baseMember == null) + if (baseMember is null) { break; } } + if (MeetsCriterion(baseMember, criterion)) { return baseMember; } + if (baseType.UnderlyingType == baseDeclaringType) { break; } + baseType = baseMember.DeclaringType.BaseType; } + return member; } @@ -3261,6 +3300,7 @@ private static XamlMember GetExcludedReadOnlyMember(XamlType type, string name) return member; } } + return null; } @@ -3269,7 +3309,7 @@ private static bool MeetsCriterion(XamlMember member, GetNearestBaseMemberCriter switch (criterion) { case GetNearestBaseMemberCriterion.HasConstructorArgument: - return member.ConstructorArgument != null; + return member.ConstructorArgument is not null; case GetNearestBaseMemberCriterion.HasDefaultValue: return member.HasDefaultValue; case GetNearestBaseMemberCriterion.HasSerializationVisibility: diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlReader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlReader.cs index d44cb29e278..469714a720b 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlReader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlReader.cs @@ -41,6 +41,7 @@ public virtual void Skip() SkipFromTo(XamlNodeType.StartMember, XamlNodeType.EndMember); break; } + Read(); } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlRuntime.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlRuntime.cs index 580636274e0..146d9e96858 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlRuntime.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlRuntime.cs @@ -4,9 +4,7 @@ #nullable disable -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Windows.Markup; using System.Xaml; @@ -21,31 +19,31 @@ internal interface IAddLineInfo internal abstract class XamlRuntime { - abstract public IAddLineInfo LineInfo { get; set; } + public abstract IAddLineInfo LineInfo { get; set; } - abstract public object CreateInstance(XamlType xamlType, object[] args); + public abstract object CreateInstance(XamlType xamlType, object[] args); - abstract public object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args); + public abstract object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args); // CreateFromValue is expected to convert the provided value via any applicable converter (on property or type) or provide the original value if there is no converter - abstract public object CreateFromValue(ServiceProviderContext serviceContext, XamlValueConverter ts, + public abstract object CreateFromValue(ServiceProviderContext serviceContext, XamlValueConverter ts, object value, XamlMember property); - abstract public bool CanConvertToString(IValueSerializerContext context, ValueSerializer serializer, object instance); + public abstract bool CanConvertToString(IValueSerializerContext context, ValueSerializer serializer, object instance); - abstract public bool CanConvertFrom(ITypeDescriptorContext context, TypeConverter converter); + public abstract bool CanConvertFrom(ITypeDescriptorContext context, TypeConverter converter); - abstract public bool CanConvertTo(ITypeDescriptorContext context, TypeConverter converter, Type type); + public abstract bool CanConvertTo(ITypeDescriptorContext context, TypeConverter converter, Type type); - abstract public string ConvertToString(IValueSerializerContext context, ValueSerializer serializer, object instance); + public abstract string ConvertToString(IValueSerializerContext context, ValueSerializer serializer, object instance); - abstract public T ConvertToValue(ITypeDescriptorContext context, TypeConverter converter, object instance); + public abstract T ConvertToValue(ITypeDescriptorContext context, TypeConverter converter, object instance); - abstract public object DeferredLoad(ServiceProviderContext serviceContext, + public abstract object DeferredLoad(ServiceProviderContext serviceContext, XamlValueConverter deferringLoader, XamlReader deferredContent); - abstract public XamlReader DeferredSave(IServiceProvider context, + public abstract XamlReader DeferredSave(IServiceProvider context, XamlValueConverter deferringLoader, object value); @@ -54,35 +52,35 @@ public object GetValue(object obj, XamlMember property) return GetValue(obj, property, true); } - abstract public object GetValue(object obj, XamlMember property, bool failIfWriteOnly); + public abstract object GetValue(object obj, XamlMember property, bool failIfWriteOnly); - abstract public void SetValue(object obj, XamlMember property, object value); + public abstract void SetValue(object obj, XamlMember property, object value); - abstract public void SetUriBase(XamlType xamlType, object obj, Uri baseUri); + public abstract void SetUriBase(XamlType xamlType, object obj, Uri baseUri); - abstract public void SetXmlInstance(object inst, XamlMember property, XData xData); + public abstract void SetXmlInstance(object inst, XamlMember property, XData xData); - abstract public void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType); + public abstract void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType); - abstract public void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key); + public abstract void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key); - abstract public IList GetCollectionItems(object collection, XamlType collectionType); + public abstract IList GetCollectionItems(object collection, XamlType collectionType); - abstract public IEnumerable GetDictionaryItems(object dictionary, XamlType dictionaryType); + public abstract IEnumerable GetDictionaryItems(object dictionary, XamlType dictionaryType); - abstract public int AttachedPropertyCount(object instance); + public abstract int AttachedPropertyCount(object instance); - abstract public KeyValuePair[] GetAttachedProperties(object instance); + public abstract KeyValuePair[] GetAttachedProperties(object instance); - abstract public void SetConnectionId(object root, int connectionId, object instance); + public abstract void SetConnectionId(object root, int connectionId, object instance); - abstract public void InitializationGuard(XamlType xamlType, object obj, bool begin); + public abstract void InitializationGuard(XamlType xamlType, object obj, bool begin); - abstract public object CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider); + public abstract object CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider); - abstract public ShouldSerializeResult ShouldSerialize(XamlMember member, object instance); + public abstract ShouldSerializeResult ShouldSerialize(XamlMember member, object instance); - abstract public TConverterBase GetConverterInstance(XamlValueConverter converter) + public abstract TConverterBase GetConverterInstance(XamlValueConverter converter) where TConverterBase : class; } } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContext.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContext.cs index 6823af1f5fe..d815159c135 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContext.cs @@ -5,10 +5,8 @@ #nullable disable using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reflection; -using System.Security; using System.Text; using System.Threading; using System.Xaml.MS.Impl; @@ -53,13 +51,14 @@ public XamlSchemaContext(IEnumerable referenceAssemblies) public XamlSchemaContext(IEnumerable referenceAssemblies, XamlSchemaContextSettings settings) { - if (referenceAssemblies != null) + if (referenceAssemblies is not null) { // ReadOnlyCollection wants an IList but we have an IEnumerable. List listOfAssemblies = new List(referenceAssemblies); _referenceAssemblies = new ReadOnlyCollection(listOfAssemblies); } - _settings = (settings != null) + + _settings = (settings is not null) ? new XamlSchemaContextSettings(settings) : new XamlSchemaContextSettings(); _syncExaminingAssemblies = new object(); @@ -75,7 +74,7 @@ public XamlSchemaContext(IEnumerable referenceAssemblies, XamlSchemaCo { try { - if (_assemblyLoadHandler != null && !Environment.HasShutdownStarted) + if (_assemblyLoadHandler is not null && !Environment.HasShutdownStarted) { _assemblyLoadHandler.Unhook(); } @@ -105,7 +104,7 @@ public virtual IEnumerable GetAllXamlNamespaces() { UpdateXmlNsInfo(); IList result = _nonClrNamespaces; - if (result == null) + if (result is null) { // To avoid a race condition when assigning this list, don't allow any additional // namespaces to be added while we're iterating the current list @@ -119,10 +118,12 @@ public virtual IEnumerable GetAllXamlNamespaces() result.Add(ns.Key); } } + result = new ReadOnlyCollection(result); _nonClrNamespaces = result; } } + return result; } @@ -138,10 +139,11 @@ public virtual string GetPreferredPrefix(string xmlns) { ArgumentNullException.ThrowIfNull(xmlns); UpdateXmlNsInfo(); - if (_preferredPrefixes == null) + if (_preferredPrefixes is null) { InitializePreferredPrefixes(); } + string result; if (!_preferredPrefixes.TryGetValue(xmlns, out result)) { @@ -161,8 +163,10 @@ public virtual string GetPreferredPrefix(string xmlns) result = KnownStrings.DefaultPrefix; } } + result = TryAdd(_preferredPrefixes, xmlns, result); } + return result; } @@ -172,6 +176,7 @@ string GetPrefixForClrNs(string clrNs, string assemblyName) { return KnownStrings.LocalPrefix; } + var sb = new StringBuilder(); foreach (string segment in clrNs.Split('.')) { @@ -180,6 +185,7 @@ string GetPrefixForClrNs(string clrNs, string assemblyName) sb.Append(char.ToLower(segment[0], TypeConverterHelper.InvariantEnglishUS)); } } + if (sb.Length > 0) { string result = sb.ToString(); @@ -216,6 +222,7 @@ void InitializePreferredPrefixes() { UpdatePreferredPrefixes(nsInfo, preferredPrefixes); } + _preferredPrefixes = preferredPrefixes; } } @@ -230,6 +237,7 @@ void UpdatePreferredPrefixes(XmlNsInfo newNamespaces, ConcurrentDictionary revision) @@ -355,7 +369,7 @@ private ConcurrentDictionary XmlNsCompatDict { get { - if (_xmlNsCompatDict == null) + if (_xmlNsCompatDict is null) Interlocked.CompareExchange(ref _xmlNsCompatDict, CreateDictionary(), null); return _xmlNsCompatDict; } @@ -382,7 +396,7 @@ public virtual bool TryGetCompatibleXamlNamespace(string xamlNamespace, out stri compatibleNamespace = GetCompatibleNamespace(xamlNamespace); // Fall back to just using the requested namespace; - if (compatibleNamespace == null) + if (compatibleNamespace is null) { compatibleNamespace = xamlNamespace; } @@ -415,14 +429,15 @@ private string GetCompatibleNamespace(string oldNs) foreach (XmlNsInfo nsInfo in EnumerateXmlnsInfos()) { Assembly curAssembly = nsInfo.Assembly; - if (curAssembly == null) + if (curAssembly is null) { continue; } + IDictionary oldToNewNs = null; // When trawling the entire AppDomain, suppress exceptions from assemblies with bad attributes - if (ReferenceAssemblies == null) + if (ReferenceAssemblies is null) { try { @@ -434,6 +449,7 @@ private string GetCompatibleNamespace(string oldNs) { throw; } + // just skip to the next assembly continue; } @@ -446,16 +462,18 @@ private string GetCompatibleNamespace(string oldNs) string newNs; if (oldToNewNs.TryGetValue(oldNs, out newNs)) { - if (result != null && result != newNs) + if (result is not null && result != newNs) { throw new XamlSchemaException(SR.Format(SR.DuplicateXmlnsCompatAcrossAssemblies, resultAssembly.FullName, curAssembly.FullName, oldNs)); } + result = newNs; resultAssembly = curAssembly; } } } + return result; } @@ -480,7 +498,7 @@ private ConcurrentDictionary>(), null); return _masterBracketCharacterCache; } @@ -491,7 +509,7 @@ private ConcurrentDictionary MasterTypeList { get { - if (_masterTypeList == null) + if (_masterTypeList is null) Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary(ReferenceEqualityComparer.Instance), null); return _masterTypeList; } @@ -502,7 +520,7 @@ private ConcurrentDictionary, objec { get { - if (_masterValueConverterList == null) + if (_masterValueConverterList is null) Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary, object>(), null); return _masterValueConverterList; } @@ -513,7 +531,7 @@ private ConcurrentDictionary, Xam { get { - if (_masterMemberList == null) + if (_masterMemberList is null) Interlocked.CompareExchange(ref _masterMemberList, CreateDictionary, XamlMember>(), null); return _masterMemberList; } @@ -535,6 +553,7 @@ internal XamlType GetXamlType(Type type, string alias) xamlType = new XamlType(alias, type, this, null, null); xamlType = TryAdd(MasterTypeList, type, xamlType); } + return xamlType; } @@ -573,10 +592,10 @@ private Dictionary BuildBracketCharacterCacheF string constructorArgumentName = member.ConstructorArgument; string propertyName = member.Name; IReadOnlyDictionary markupExtensionBracketCharactersList = member.MarkupExtensionBracketCharacters; - SpecialBracketCharacters splBracketCharacters = markupExtensionBracketCharactersList != null && markupExtensionBracketCharactersList.Count > 0 + SpecialBracketCharacters splBracketCharacters = markupExtensionBracketCharactersList is not null && markupExtensionBracketCharactersList.Count > 0 ? new SpecialBracketCharacters(markupExtensionBracketCharactersList) : null; - if (splBracketCharacters != null) + if (splBracketCharacters is not null) { splBracketCharacters.EndInit(); map.Add(propertyName, splBracketCharacters); @@ -601,6 +620,7 @@ protected internal XamlValueConverter GetValueConverter(converterType, targetType); result = TryAdd(MasterValueConverterList, key, result); } + return (XamlValueConverter)result; } @@ -613,6 +633,7 @@ internal virtual XamlMember GetProperty(PropertyInfo pi) member = new XamlMember(pi, this); member = TryAdd(MasterMemberList, xpik, member); } + return member; } @@ -625,6 +646,7 @@ internal virtual XamlMember GetEvent(EventInfo ei) member = new XamlMember(ei, this); member = TryAdd(MasterMemberList, xpik, member); } + return member; } @@ -638,6 +660,7 @@ internal virtual XamlMember GetAttachableProperty(string name, MethodInfo getter property = new XamlMember(name, getter, setter, this); property = TryAdd(MasterMemberList, xpik, property); } + return property; } @@ -650,6 +673,7 @@ internal virtual XamlMember GetAttachableEvent(string name, MethodInfo adder) property = new XamlMember(name, adder, this); property = TryAdd(MasterMemberList, xpik, property); } + return property; } @@ -702,7 +726,7 @@ private ConcurrentDictionary XmlnsInfo { get { - if (_xmlnsInfo == null) + if (_xmlnsInfo is null) Interlocked.CompareExchange(ref _xmlnsInfo, CreateDictionary(ReferenceEqualityComparer.Instance), null); return _xmlnsInfo; } @@ -713,7 +737,7 @@ private ConcurrentDictionary XmlnsInfoForDynamicAssemblie { get { - if (_xmlnsInfoForDynamicAssemblies == null) + if (_xmlnsInfoForDynamicAssemblies is null) Interlocked.CompareExchange(ref _xmlnsInfoForDynamicAssemblies, CreateDictionary(), null); return _xmlnsInfoForDynamicAssemblies; } @@ -725,7 +749,7 @@ private ConcurrentDictionary NamespaceByUriList { get { - if (_namespaceByUriList == null) + if (_namespaceByUriList is null) Interlocked.CompareExchange(ref _namespaceByUriList, CreateDictionary(), null); return _namespaceByUriList; } @@ -739,10 +763,11 @@ private ConcurrentDictionary XmlnsInfoForUnreferencedAssemb { get { - if (_xmlnsInfoForUnreferencedAssemblies == null) + if (_xmlnsInfoForUnreferencedAssemblies is null) { Interlocked.CompareExchange(ref _xmlnsInfoForUnreferencedAssemblies, CreateDictionary(ReferenceEqualityComparer.Instance), null); } + return _xmlnsInfoForUnreferencedAssemblies; } } @@ -753,12 +778,14 @@ internal bool AreInternalsVisibleTo(Assembly fromAssembly, Assembly toAssembly) { return true; } + XmlNsInfo nsInfo = GetXmlNsInfo(fromAssembly); ICollection friends = nsInfo.InternalsVisibleTo; if (friends.Count == 0) { return false; } + // Not using Assembly.GetName() because it doesn't work in partial-trust AssemblyName toAssemblyName = new AssemblyName(toAssembly.FullName); foreach (AssemblyName friend in friends) @@ -766,15 +793,17 @@ internal bool AreInternalsVisibleTo(Assembly fromAssembly, Assembly toAssembly) if (friend.Name == toAssemblyName.Name) { byte[] expectedToken = friend.GetPublicKeyToken(); - if (expectedToken == null) + if (expectedToken is null) { // InternalsVisibleToAttribute doesn't specify a public key, so don't check it return true; } + byte[] actualToken = toAssemblyName.GetPublicKeyToken(); return SafeSecurityHelper.IsSameKeyToken(expectedToken, actualToken); } } + return false; } @@ -784,7 +813,7 @@ private static void CleanupCollectedAssemblies(object schemaContextWeakRef) { WeakReference weakRef = (WeakReference)schemaContextWeakRef; XamlSchemaContext schemaContext = weakRef.Target as XamlSchemaContext; - if (schemaContext != null) + if (schemaContext is not null) { schemaContext.CleanupCollectedAssemblies(); } @@ -806,7 +835,7 @@ private void CleanupCollectedAssemblies() for (int i = _unexaminedAssemblies.Count - 1; i >= 0; i--) { Assembly assembly = _unexaminedAssemblies[i]; - if (assembly == null) + if (assembly is null) { _unexaminedAssemblies.RemoveAt(i); } @@ -817,9 +846,10 @@ private void CleanupCollectedAssemblies() } } } + lock (_syncExaminingAssemblies) { - if (_xmlnsInfoForDynamicAssemblies != null) + if (_xmlnsInfoForDynamicAssemblies is not null) { foreach (WeakRefKey weakRefKey in _xmlnsInfoForDynamicAssemblies.Keys) { @@ -835,6 +865,7 @@ private void CleanupCollectedAssemblies() } } } + if (foundLiveDynamicAssemblies) { RegisterAssemblyCleanup(); @@ -859,7 +890,7 @@ private void RegisterAssemblyCleanup() private IEnumerable EnumerateXmlnsInfos() { - if (_xmlnsInfoForDynamicAssemblies == null) + if (_xmlnsInfoForDynamicAssemblies is null) { return XmlnsInfo.Values; } @@ -875,6 +906,7 @@ private IEnumerable EnumerateStaticAndDynamicXmlnsInfos() { yield return result; } + foreach (XmlNsInfo result in XmlnsInfoForDynamicAssemblies.Values) { yield return result; @@ -890,7 +922,7 @@ internal string GetRootNamespace(Assembly asm) internal ReadOnlyCollection GetXamlNamespaces(XamlType type) { Type clrType = type.UnderlyingType; - if (clrType == null || clrType.Assembly == null) + if (clrType is null || clrType.Assembly is null) { return null; } @@ -930,6 +962,7 @@ private XamlNamespace GetXamlNamespace(string xmlns) // unresolved namespace xamlNamespace = new XamlNamespace(this); } + xamlNamespace = TryAdd(NamespaceByUriList, xmlns, xamlNamespace); return xamlNamespace; } @@ -939,9 +972,9 @@ private XmlNsInfo GetXmlNsInfo(Assembly assembly) XmlNsInfo result; if (XmlnsInfo.TryGetValue(assembly, out result) || - (_xmlnsInfoForDynamicAssemblies != null && assembly.IsDynamic && + (_xmlnsInfoForDynamicAssemblies is not null && assembly.IsDynamic && _xmlnsInfoForDynamicAssemblies.TryGetValue(new WeakRefKey(assembly), out result)) || - (_xmlnsInfoForUnreferencedAssemblies != null && _xmlnsInfoForUnreferencedAssemblies.TryGetValue(assembly, out result))) + (_xmlnsInfoForUnreferencedAssemblies is not null && _xmlnsInfoForUnreferencedAssemblies.TryGetValue(assembly, out result))) { return result; } @@ -960,7 +993,7 @@ private XmlNsInfo GetXmlNsInfo(Assembly assembly) // 3. ReflectionOnly assemblies and custom derivations of System.Assembly are in // XmlnsInfoForUnreferencedAssemblies, so that they don't pollute the 'real' cache. bool isReferenced = false; - if (_referenceAssemblies != null) + if (_referenceAssemblies is not null) { foreach (var asm in _referenceAssemblies) { @@ -981,7 +1014,7 @@ private XmlNsInfo GetXmlNsInfo(Assembly assembly) result = new XmlNsInfo(assembly, FullyQualifyAssemblyNamesInClrNamespaces); if (isReferenced) { - if (assembly.IsDynamic && _referenceAssemblies == null) + if (assembly.IsDynamic && _referenceAssemblies is null) { result = TryAdd(XmlnsInfoForDynamicAssemblies, new WeakRefKey(assembly), result); // Ensure we clean up the cache if dynamic assemblies are collected @@ -1018,15 +1051,15 @@ private ReadOnlyCollection GetXmlNsMappings(Assembly assembly, string cl result = list.AsReadOnly(); TryAdd(assemblyMappings, clrNs, result); } + return (ReadOnlyCollection)result; } private void InitializeAssemblyLoadHook() { _syncAccessingUnexaminedAssemblies = new object(); - if (ReferenceAssemblies == null) + if (ReferenceAssemblies is null) { - _assemblyLoadHandler = new AssemblyLoadHandler(this); _assemblyLoadHandler.Hook(); lock (_syncAccessingUnexaminedAssemblies) @@ -1042,6 +1075,7 @@ private void InitializeAssemblyLoadHook() foundDynamic = true; } } + if (foundDynamic) { // Ensure we clean up the cache if dynamic assemblies are collected @@ -1088,15 +1122,16 @@ private void UpdateXmlNsInfo() // If we're trawling thorugh all assemblies in the AppDomain, then we'll ignore // any exceptions from invalid attributes - bool throwOnError = (ReferenceAssemblies != null); + bool throwOnError = (ReferenceAssemblies is not null); for (int i = 0; i < unexaminedAssembliesCopy.Count; i++) { var assembly = unexaminedAssembliesCopy[i]; - if (assembly == null) + if (assembly is null) { // The assembly is a collectible dynamic assembly, and has been GC'ed. Ignore it. continue; } + XmlNsInfo nsInfo = GetXmlNsInfo(assembly); bool foundNewInThisAssembly = false; try @@ -1121,12 +1156,13 @@ private void UpdateXmlNsInfo() _unexaminedAssemblies.Add(unexaminedAssembliesCopy[j]); } } + throw; } } } - if (foundNew && _nonClrNamespaces != null) + if (foundNew && _nonClrNamespaces is not null) { // invalidate this and force it to be re-evaluated _nonClrNamespaces = null; @@ -1138,10 +1174,11 @@ private void UpdateXmlNsInfo() private bool UpdateXmlNsInfo(XmlNsInfo nsInfo) { bool foundNew = UpdateNamespaceByUriList(nsInfo); - if (_preferredPrefixes != null) + if (_preferredPrefixes is not null) { UpdatePreferredPrefixes(nsInfo, _preferredPrefixes); } + return foundNew; } @@ -1158,6 +1195,7 @@ bool UpdateNamespaceByUriList(XmlNsInfo nsInfo) ns.AddAssemblyNamespacePair(pair); foundNew = true; } + return foundNew; } @@ -1221,7 +1259,8 @@ protected internal virtual Assembly OnAssemblyResolve(string assemblyName) { return null; } - if (_referenceAssemblies != null) + + if (_referenceAssemblies is not null) { return ResolveReferenceAssembly(assemblyName); } @@ -1234,25 +1273,28 @@ protected internal virtual Assembly OnAssemblyResolve(string assemblyName) private Assembly ResolveReferenceAssembly(string assemblyName) { AssemblyName parsedAsmName = new AssemblyName(assemblyName); - if (_referenceAssemblyNames == null) + if (_referenceAssemblyNames is null) { AssemblyName[] asmNames = new AssemblyName[_referenceAssemblies.Count]; Interlocked.CompareExchange(ref _referenceAssemblyNames, asmNames, null); } + for (int i = 0; i < _referenceAssemblies.Count; i++) { AssemblyName refAsmName = _referenceAssemblyNames[i]; - if (_referenceAssemblyNames[i] == null) + if (_referenceAssemblyNames[i] is null) { // Multiple threads may be simultaneously populating this array. // That's okay; we're inserting identical data, so duplicate writes are harmless. _referenceAssemblyNames[i] = new AssemblyName(_referenceAssemblies[i].FullName); } + if (AssemblySatisfiesReference(_referenceAssemblyNames[i], parsedAsmName)) { return _referenceAssemblies[i]; } } + return null; } @@ -1262,16 +1304,19 @@ private static bool AssemblySatisfiesReference(AssemblyName assemblyName, Assemb { return false; } - if (reference.Version != null && !reference.Version.Equals(assemblyName.Version)) + + if (reference.Version is not null && !reference.Version.Equals(assemblyName.Version)) { return false; } - if (reference.CultureInfo != null && !reference.CultureInfo.Equals(assemblyName.CultureInfo)) + + if (reference.CultureInfo is not null && !reference.CultureInfo.Equals(assemblyName.CultureInfo)) { return false; } + byte[] requiredToken = reference.GetPublicKeyToken(); - if (requiredToken != null) + if (requiredToken is not null) { byte[] actualToken = assemblyName.GetPublicKeyToken(); if (!SafeSecurityHelper.IsSameKeyToken(requiredToken, actualToken)) @@ -1279,6 +1324,7 @@ private static bool AssemblySatisfiesReference(AssemblyName assemblyName, Assemb return false; } } + return true; } @@ -1290,7 +1336,7 @@ private Assembly ResolveAssembly(string assemblyName) // below, using Assembly.Load. AssemblyName parsedAsmName = new AssemblyName(assemblyName); Assembly result = SafeSecurityHelper.GetLoadedAssembly(parsedAsmName); - if (result != null) + if (result is not null) { return result; } @@ -1298,7 +1344,7 @@ private Assembly ResolveAssembly(string assemblyName) try { byte[] publicKeyToken = parsedAsmName.GetPublicKeyToken(); - if (parsedAsmName.Version != null || parsedAsmName.CultureInfo != null || publicKeyToken != null) + if (parsedAsmName.Version is not null || parsedAsmName.CultureInfo is not null || publicKeyToken is not null) { try { @@ -1312,12 +1358,14 @@ private Assembly ResolveAssembly(string assemblyName) { throw; } + // Version tolerance: fall back to the short name (+ public key, if specified) AssemblyName shortName = new AssemblyName(parsedAsmName.Name); - if (publicKeyToken != null) + if (publicKeyToken is not null) { shortName.SetPublicKeyToken(publicKeyToken); } + return Assembly.Load(shortName); } } @@ -1333,6 +1381,7 @@ private Assembly ResolveAssembly(string assemblyName) { throw; } + // We don't want to throw if the assembly can't be found, we just treat it as unresolved return null; } @@ -1353,7 +1402,7 @@ public AssemblyLoadHandler(XamlSchemaContext schemaContext) private void OnAssemblyLoad(object sender, AssemblyLoadEventArgs args) { XamlSchemaContext schemaContext = (XamlSchemaContext)schemaContextRef.Target; - if (schemaContext != null) + if (schemaContext is not null) { schemaContext.SchemaContextAssemblyLoadEventHandler(sender, args); } @@ -1413,6 +1462,7 @@ bool ICollection.Contains(T item) return true; } } + return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContextSettings.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContextSettings.cs index 8450bb9a5f5..c70dd1fd159 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContextSettings.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSchemaContextSettings.cs @@ -17,7 +17,7 @@ public XamlSchemaContextSettings() public XamlSchemaContextSettings(XamlSchemaContextSettings settings) { - if (settings != null) + if (settings is not null) { SupportMarkupExtensionsWithDuplicateArity = settings.SupportMarkupExtensionsWithDuplicateArity; FullyQualifyAssemblyNamesInClrNamespaces = settings.FullyQualifyAssemblyNamesInClrNamespaces; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlServices.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlServices.cs index d34cd311b58..600d5d9deaa 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlServices.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlServices.cs @@ -101,8 +101,8 @@ public static void Transform(XamlReader xamlReader, XamlWriter xamlWriter, bool IXamlLineInfo xamlLineInfo = xamlReader as IXamlLineInfo; IXamlLineInfoConsumer xamlLineInfoConsumer = xamlWriter as IXamlLineInfoConsumer; bool shouldPassLineNumberInfo = false; - if ((xamlLineInfo != null && xamlLineInfo.HasLineInfo) - && (xamlLineInfoConsumer != null && xamlLineInfoConsumer.ShouldProvideLineInfo)) + if ((xamlLineInfo is not null && xamlLineInfo.HasLineInfo) + && (xamlLineInfoConsumer is not null && xamlLineInfoConsumer.ShouldProvideLineInfo)) { shouldPassLineNumberInfo = true; } @@ -116,6 +116,7 @@ public static void Transform(XamlReader xamlReader, XamlWriter xamlWriter, bool xamlLineInfoConsumer.SetLineInfo(xamlLineInfo.LineNumber, xamlLineInfo.LinePosition); } } + xamlWriter.WriteNode(xamlReader); } @@ -145,6 +146,7 @@ public static void Save(string fileName, object instance) { throw new ArgumentException(SR.StringIsNullOrEmpty, nameof(fileName)); } + using (var writer = XmlWriter.Create(fileName, new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true })) { Save(writer, instance); diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSubreader.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSubreader.cs index 5ed83dca1bc..5879b42f9ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSubreader.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlSubreader.cs @@ -32,6 +32,7 @@ public override bool Read() { return LimitedRead(); } + _firstRead = false; return true; } @@ -79,23 +80,24 @@ public bool HasLineInfo { get { - if (_lineInfoReader == null) + if (_lineInfoReader is null) { return false; } + return _lineInfoReader.HasLineInfo; } - } public int LineNumber { get { - if (_lineInfoReader == null) + if (_lineInfoReader is null) { return 0; } + return _lineInfoReader.LineNumber; } } @@ -104,10 +106,11 @@ public int LinePosition { get { - if (_lineInfoReader == null) + if (_lineInfoReader is null) { return 0; } + return _lineInfoReader.LinePosition; } } @@ -153,6 +156,7 @@ private bool LimitedRead() { _done = true; } + _reader.Read(); return !IsEof; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlType.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlType.cs index 7a927d58d8a..5068ec3c9a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlType.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlType.cs @@ -4,12 +4,9 @@ #nullable disable -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using System.Reflection; -using System.Security; using System.Text; using System.Threading; using System.Windows.Markup; @@ -88,6 +85,7 @@ public XamlType BaseType { _reflector.BaseType = LookupBaseType(); } + return _reflector.BaseType; } } @@ -97,10 +95,11 @@ public XamlTypeInvoker Invoker get { EnsureReflector(); - if (_reflector.Invoker == null) + if (_reflector.Invoker is null) { _reflector.Invoker = LookupInvoker() ?? XamlTypeInvoker.UnknownInvoker; } + return _reflector.Invoker; } } @@ -113,6 +112,7 @@ public bool IsNameValid { _isNameValid = XamlName.IsValidXamlName(_name) ? ThreeValuedBool.True : ThreeValuedBool.False; } + return _isNameValid == ThreeValuedBool.True; } } @@ -137,6 +137,7 @@ public string PreferredXamlNamespace { return namespaces[0]; } + return null; } } @@ -160,6 +161,7 @@ public Type UnderlyingType { _underlyingType.SetIfNull(LookupUnderlyingType()); } + return _underlyingType.Value; } } @@ -177,7 +179,7 @@ internal NullableReference UnderlyingTypeInternal public bool IsCollection { get { return GetCollectionKind() == XamlCollectionKind.Collection; } } public bool IsConstructible { get { return GetFlag(BoolTypeBits.Constructible); } } public bool IsDictionary { get { return GetCollectionKind() == XamlCollectionKind.Dictionary; } } - public bool IsGeneric { get { return TypeArguments != null; } } + public bool IsGeneric { get { return TypeArguments is not null; } } public bool IsMarkupExtension { get { return GetFlag(BoolTypeBits.MarkupExtension); } } public bool IsNameScope { get { return GetFlag(BoolTypeBits.NameScope); } } public bool IsNullable { get { return GetFlag(BoolTypeBits.Nullable); } } @@ -196,11 +198,13 @@ public XamlType KeyType { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by IsDictionary"); - if (_reflector.KeyType == null) + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsDictionary"); + if (_reflector.KeyType is null) { _reflector.KeyType = LookupKeyType() ?? XamlLanguage.Object; } + return _reflector.KeyType; } } @@ -213,11 +217,13 @@ public XamlType ItemType { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by GetCollectionKind"); - if (_reflector.ItemType == null) + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind"); + if (_reflector.ItemType is null) { _reflector.ItemType = LookupItemType() ?? XamlLanguage.Object; } + return _reflector.ItemType; } } @@ -232,12 +238,14 @@ public IList AllowedContentTypes { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by GetCollectionKind"); - if (_reflector.AllowedContentTypes == null) + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind"); + if (_reflector.AllowedContentTypes is null) { _reflector.AllowedContentTypes = LookupAllowedContentTypes() ?? EmptyList.Value; } + return _reflector.AllowedContentTypes; } } @@ -250,12 +258,14 @@ public IList ContentWrappers { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by IsCollection"); - if (_reflector.ContentWrappers == null) + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsCollection"); + if (_reflector.ContentWrappers is null) { _reflector.ContentWrappers = LookupContentWrappers() ?? EmptyList.Value; } + return _reflector.ContentWrappers; } } @@ -269,6 +279,7 @@ public XamlValueConverter TypeConverter { _reflector.TypeConverter = LookupTypeConverter(); } + return _reflector.TypeConverter; } } @@ -282,6 +293,7 @@ public XamlValueConverter ValueSerializer { _reflector.ValueSerializer = LookupValueSerializer(); } + return _reflector.ValueSerializer; } } @@ -295,6 +307,7 @@ public XamlMember ContentProperty { _reflector.ContentProperty = LookupContentProperty(); } + return _reflector.ContentProperty; } } @@ -308,6 +321,7 @@ public XamlValueConverter DeferringLoader { _reflector.DeferringLoader = LookupDeferringLoader(); } + return _reflector.DeferringLoader; } } @@ -320,11 +334,13 @@ public XamlType MarkupExtensionReturnType { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by IsMarkupExtension"); - if (_reflector.MarkupExtensionReturnType == null) + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsMarkupExtension"); + if (_reflector.MarkupExtensionReturnType is null) { _reflector.MarkupExtensionReturnType = LookupMarkupExtensionReturnType() ?? XamlLanguage.Object; } + return _reflector.MarkupExtensionReturnType; } } @@ -337,9 +353,10 @@ public XamlMember GetMember(string name) XamlMember result; if (!_reflector.Members.TryGetValue(name, out result) && !_reflector.Members.IsComplete) { - result = LookupMember(name, false /*skipReadOnlyCheck*/); + result = LookupMember(name, skipReadOnlyCheck: false); result = _reflector.Members.TryAdd(name, result); } + return result; } @@ -349,7 +366,7 @@ public ICollection GetAllMembers() if (!_reflector.Members.IsComplete) { IEnumerable members = LookupAllMembers(); - if (members != null) + if (members is not null) { foreach (XamlMember member in members) { @@ -374,6 +391,7 @@ public XamlMember GetAliasedProperty(XamlDirective directive) result = LookupAliasedProperty(directive); _reflector.TryAddAliasedProperty(directive, result); } + return result; } @@ -387,6 +405,7 @@ public XamlMember GetAttachableMember(string name) result = LookupAttachableMember(name); result = _reflector.AttachableMembers.TryAdd(name, result); } + return result; } @@ -396,15 +415,17 @@ public ICollection GetAllAttachableMembers() if (!_reflector.AttachableMembers.IsComplete) { IEnumerable members = LookupAllAttachableMembers(); - if (members != null) + if (members is not null) { foreach (XamlMember member in members) { _reflector.AttachableMembers.TryAdd(member.Name, member); } } + _reflector.AttachableMembers.IsComplete = true; } + return _reflector.AttachableMembers.Values; } @@ -420,7 +441,7 @@ public virtual bool CanAssignTo(XamlType xamlType) do { Type curUnderlyingType = curType.UnderlyingType; - if (baseUnderlyingType != null && curUnderlyingType != null) + if (baseUnderlyingType is not null && curUnderlyingType is not null) { if (curUnderlyingType.Assembly.ReflectionOnly && baseUnderlyingType.Assembly == typeof(XamlType).Assembly) @@ -430,15 +451,18 @@ public virtual bool CanAssignTo(XamlType xamlType) return LooseTypeExtensions.IsAssemblyQualifiedNameAssignableFrom( baseUnderlyingType, curUnderlyingType); } + return baseUnderlyingType.IsAssignableFrom(curUnderlyingType); } + if (curType == xamlType) { return true; } + curType = curType.BaseType; } - while (curType != null); + while (curType is not null); return false; } @@ -451,19 +475,21 @@ public IList GetPositionalParameters(int parameterCount) result = LookupPositionalParameters(parameterCount); result = _reflector.TryAddPositionalParameters(parameterCount, result); } + return result; } public virtual IList GetXamlNamespaces() { - if (_namespaces == null) + if (_namespaces is null) { _namespaces = _schemaContext.GetXamlNamespaces(this); - if (_namespaces == null) + if (_namespaces is null) { _namespaces = new ReadOnlyCollection(new string[] { string.Empty }); } } + return _namespaces; } @@ -490,15 +516,15 @@ internal MethodInfo IsReadOnlyMethod { get { - if (ItemType == null || UnderlyingType == null) + if (ItemType is null || UnderlyingType is null) { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by ItemType"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by ItemType"); if (!_reflector.IsReadOnlyMethodIsSet) { - if (UnderlyingType != null && ItemType.UnderlyingType != null) + if (UnderlyingType is not null && ItemType.UnderlyingType is not null) { _reflector.IsReadOnlyMethod = CollectionReflector. GetIsReadOnlyMethod(UnderlyingType, ItemType.UnderlyingType); @@ -508,6 +534,7 @@ internal MethodInfo IsReadOnlyMethod _reflector.IsReadOnlyMethod = null; } } + return _reflector.IsReadOnlyMethod; } } @@ -520,6 +547,7 @@ internal EventHandler SetMarkupExtensionHandler { _reflector.XamlSetMarkupExtensionHandler = LookupSetMarkupExtensionHandler(); } + return _reflector.XamlSetMarkupExtensionHandler; } } @@ -533,6 +561,7 @@ internal EventHandler SetTypeConverterHandler { _reflector.XamlSetTypeConverterHandler = LookupSetTypeConverterHandler(); } + return _reflector.XamlSetTypeConverterHandler; } } @@ -541,16 +570,18 @@ internal MethodInfo AddMethod { get { - if (UnderlyingType == null) + if (UnderlyingType is null) { return null; } + EnsureReflector(); if (!_reflector.AddMethodIsSet) { XamlCollectionKind collectionKind = GetCollectionKind(); _reflector.AddMethod = CollectionReflector.LookupAddMethod(UnderlyingType, collectionKind); } + return _reflector.AddMethod; } } @@ -559,15 +590,17 @@ internal MethodInfo GetEnumeratorMethod { get { - if (GetCollectionKind() == XamlCollectionKind.None || UnderlyingType == null) + if (GetCollectionKind() == XamlCollectionKind.None || UnderlyingType is null) { return null; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by GetCollectionKind"); + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind"); if (!_reflector.GetEnumeratorMethodIsSet) { _reflector.GetEnumeratorMethod = CollectionReflector.GetEnumeratorMethod(UnderlyingType); } + return _reflector.GetEnumeratorMethod; } } @@ -591,18 +624,20 @@ internal bool IsVisibleTo(Assembly accessingAssembly) { return true; } + Type underlyingType = UnderlyingType; - return accessingAssembly != null && underlyingType != null && + return accessingAssembly is not null && underlyingType is not null && TypeReflector.IsVisibleTo(underlyingType, accessingAssembly, SchemaContext); } internal ICollection GetAllExcludedReadOnlyMembers() { EnsureReflector(); - if (_reflector.ExcludedReadOnlyMembers == null) + if (_reflector.ExcludedReadOnlyMembers is null) { _reflector.ExcludedReadOnlyMembers = LookupAllExcludedReadOnlyMembers() ?? EmptyList.Value; } + return _reflector.ExcludedReadOnlyMembers; } @@ -610,30 +645,34 @@ internal ICollection GetAllExcludedReadOnlyMembers() // public and internal constructors. internal IEnumerable GetConstructors() { - if (UnderlyingType == null) + if (UnderlyingType is null) { return EmptyList.Value; } + if (IsPublic) { return UnderlyingType.GetConstructors(); } + return GetPublicAndInternalConstructors(); } // Looks up a ctor overload from the set provided by GetConstructors. internal ConstructorInfo GetConstructor(Type[] paramTypes) { - if (UnderlyingType == null) + if (UnderlyingType is null) { return null; } + IEnumerable ctors = GetConstructors(); ConstructorInfo[] ctorArray = ctors as ConstructorInfo[]; - if (ctorArray == null) + if (ctorArray is null) { ctorArray = new List(ctors).ToArray(); } + MethodBase result = Type.DefaultBinder.SelectMethod(ConstructorBindingFlags, ctorArray, paramTypes, null); return (ConstructorInfo)result; } @@ -661,7 +700,8 @@ protected virtual XamlMember LookupAliasedProperty(XamlDirective directive) { attributeType = typeof(XmlLangPropertyAttribute); } - if (attributeType != null) + + if (attributeType is not null) { string propertyName; if (TryGetAttributeString(attributeType, out propertyName)) @@ -670,14 +710,17 @@ protected virtual XamlMember LookupAliasedProperty(XamlDirective directive) { return null; } + return GetPropertyOrUnknown(propertyName, skipReadOnlyCheck); } } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.GetAliasedProperty(directive); } + return null; } @@ -689,7 +732,7 @@ protected virtual IList LookupAllowedContentTypes() foreach (XamlType contentWrapper in contentWrappers) { - if (contentWrapper.ContentProperty != null && + if (contentWrapper.ContentProperty is not null && !contentWrapper.ContentProperty.IsUnknown) { XamlType contentType = contentWrapper.ContentProperty.Type; @@ -706,47 +749,52 @@ protected virtual IList LookupAllowedContentTypes() protected virtual XamlType LookupBaseType() { Type underlyingType = UnderlyingType; - if (underlyingType == null) + if (underlyingType is null) { return XamlLanguage.Object; } - if (underlyingType.BaseType != null) + + if (underlyingType.BaseType is not null) { return SchemaContext.GetXamlType(underlyingType.BaseType); } + return null; } protected virtual XamlCollectionKind LookupCollectionKind() { - if (UnderlyingType == null) + if (UnderlyingType is null) { - return (BaseType != null) ? BaseType.GetCollectionKind() : XamlCollectionKind.None; + return (BaseType is not null) ? BaseType.GetCollectionKind() : XamlCollectionKind.None; } MethodInfo addMethod = null; XamlCollectionKind result = CollectionReflector.LookupCollectionKind(UnderlyingType, out addMethod); - if (addMethod != null) + if (addMethod is not null) { _reflector.AddMethod = addMethod; } + return result; } protected virtual bool LookupConstructionRequiresArguments() { Type underlyingType = UnderlyingType; - if (underlyingType == null) + if (underlyingType is null) { return GetDefaultFlag(BoolTypeBits.ConstructionRequiresArguments); } + if (underlyingType.IsValueType) { // Value types have built-in default constructor return false; } + ConstructorInfo defaultCtor = underlyingType.GetConstructor(ConstructorBindingFlags, null, Type.EmptyTypes, null); - return (defaultCtor == null) || !TypeReflector.IsPublicOrInternal(defaultCtor); + return (defaultCtor is null) || !TypeReflector.IsPublicOrInternal(defaultCtor); } protected virtual XamlMember LookupContentProperty() @@ -758,12 +806,15 @@ protected virtual XamlMember LookupContentProperty() { return null; } - return GetPropertyOrUnknown(contentPropertyName, false /*skipReadOnlyCheck*/); + + return GetPropertyOrUnknown(contentPropertyName, skipReadOnlyCheck: false); } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.ContentProperty; } + return null; } @@ -772,9 +823,9 @@ protected virtual IList LookupContentWrappers() List contentWrappers = null; if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); List wrapperTypes = _reflector.GetAllAttributeContents(typeof(ContentWrapperAttribute)); - if (wrapperTypes != null) + if (wrapperTypes is not null) { contentWrappers = new List(wrapperTypes.Count); foreach (Type wrapperType in wrapperTypes) @@ -784,14 +835,14 @@ protected virtual IList LookupContentWrappers() } } - if (BaseType != null) + if (BaseType is not null) { IList baseWrappers = BaseType.ContentWrappers; - if (contentWrappers == null) + if (contentWrappers is null) { return baseWrappers; } - else if (baseWrappers != null) + else if (baseWrappers is not null) { contentWrappers.AddRange(baseWrappers); } @@ -809,27 +860,30 @@ protected virtual XamlValueConverter LookupDeferringLoader( { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); Type[] loaderTypes = _reflector.GetAttributeTypes(typeof(XamlDeferLoadAttribute), 2); - if (loaderTypes != null) + if (loaderTypes is not null) { return SchemaContext.GetValueConverter(loaderTypes[0], null); } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.DeferringLoader; } + return null; } protected virtual bool LookupIsConstructible() { Type underlyingType = UnderlyingType; - if (underlyingType == null) + if (underlyingType is null) { return GetDefaultFlag(BoolTypeBits.Constructible); } + // Type must be concrete, non-nested, and closed if (underlyingType.IsAbstract || underlyingType.IsInterface || @@ -839,27 +893,31 @@ protected virtual bool LookupIsConstructible() { return false; } + // Value types have built-in default constructor if (underlyingType.IsValueType) { return true; } + if (!ConstructionRequiresArguments) { return true; } + // Look for constructors foreach (ConstructorInfo ctor in GetConstructors()) { // found one, that's all we need return true; } + return false; } protected virtual XamlTypeInvoker LookupInvoker() { - return (UnderlyingType != null) ? new XamlTypeInvoker(this) : null; + return (UnderlyingType is not null) ? new XamlTypeInvoker(this) : null; } protected virtual bool LookupIsMarkupExtension() @@ -874,48 +932,53 @@ protected virtual bool LookupIsNameScope() protected virtual bool LookupIsNullable() { - if (UnderlyingType != null) + if (UnderlyingType is not null) { return !UnderlyingType.IsValueType || IsNullableGeneric(); } + return GetDefaultFlag(BoolTypeBits.Nullable); } protected virtual bool LookupIsUnknown() { - if (_reflector != null) + if (_reflector is not null) { return _reflector.IsUnknown; } - return UnderlyingType == null; + + return UnderlyingType is null; } protected virtual bool LookupIsWhitespaceSignificantCollection() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); if (_reflector.IsAttributePresent(typeof(WhitespaceSignificantCollectionAttribute))) { return true; } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.IsWhitespaceSignificantCollection; } + if (IsUnknown) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); return _reflector.GetFlag(BoolTypeBits.WhitespaceSignificantCollection).Value; } + return GetDefaultFlag(BoolTypeBits.WhitespaceSignificantCollection); } protected virtual XamlType LookupKeyType() { MethodInfo addMethod = AddMethod; - if (addMethod != null) + if (addMethod is not null) { ParameterInfo[] addParams = addMethod.GetParameters(); if (addParams.Length == 2) @@ -923,10 +986,11 @@ protected virtual XamlType LookupKeyType() return SchemaContext.GetXamlType(addParams[0].ParameterType); } } - else if (UnderlyingType == null && BaseType != null) + else if (UnderlyingType is null && BaseType is not null) { return BaseType.KeyType; } + return null; } @@ -934,7 +998,7 @@ protected virtual XamlType LookupItemType() { Type result = null; MethodInfo addMethod = AddMethod; - if (addMethod != null) + if (addMethod is not null) { ParameterInfo[] addParams = addMethod.GetParameters(); if (addParams.Length == 2) @@ -946,54 +1010,58 @@ protected virtual XamlType LookupItemType() result = addParams[0].ParameterType; } } - else if (UnderlyingType != null) + else if (UnderlyingType is not null) { if (UnderlyingType.IsArray) { result = UnderlyingType.GetElementType(); } } - else if (BaseType != null) + else if (BaseType is not null) { return BaseType.ItemType; } - return (result != null) ? SchemaContext.GetXamlType(result) : null; + + return (result is not null) ? SchemaContext.GetXamlType(result) : null; } protected virtual XamlType LookupMarkupExtensionReturnType() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); Type returnType = _reflector.GetAttributeType(typeof(MarkupExtensionReturnTypeAttribute)); - if (returnType != null) + if (returnType is not null) { XamlType xamlReturnType = SchemaContext.GetXamlType(returnType); return xamlReturnType; } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.MarkupExtensionReturnType; } + return null; } protected virtual IEnumerable LookupAllAttachableMembers() { - if (UnderlyingType == null) + if (UnderlyingType is null) { - return (BaseType != null) ? BaseType.GetAllAttachableMembers() : null; + return (BaseType is not null) ? BaseType.GetAllAttachableMembers() : null; } + EnsureReflector(); return _reflector.LookupAllAttachableMembers(SchemaContext); } protected virtual IEnumerable LookupAllMembers() { - if (UnderlyingType == null) + if (UnderlyingType is null) { - return (BaseType != null) ? BaseType.GetAllMembers() : null; + return (BaseType is not null) ? BaseType.GetAllMembers() : null; } EnsureReflector(); @@ -1002,7 +1070,7 @@ protected virtual IEnumerable LookupAllMembers() List result; _reflector.LookupAllMembers(out properties, out events, out result); - if (properties != null) + if (properties is not null) { foreach (PropertyInfo pi in properties) { @@ -1013,7 +1081,8 @@ protected virtual IEnumerable LookupAllMembers() } } } - if (events != null) + + if (events is not null) { foreach (EventInfo ei in events) { @@ -1021,17 +1090,19 @@ protected virtual IEnumerable LookupAllMembers() result.Add(member); } } + return result; } protected virtual XamlMember LookupMember(string name, bool skipReadOnlyCheck) { - if (UnderlyingType == null) + if (UnderlyingType is null) { - if (BaseType != null) + if (BaseType is not null) { return skipReadOnlyCheck ? BaseType.LookupMember(name, true) : BaseType.GetMember(name); } + return null; } @@ -1039,7 +1110,7 @@ protected virtual XamlMember LookupMember(string name, bool skipReadOnlyCheck) // will still return the property, not the event. That is by design, for backcompat. EnsureReflector(); PropertyInfo pi = _reflector.LookupProperty(name); - if (pi != null) + if (pi is not null) { XamlMember result = SchemaContext.GetProperty(pi); // Filter out read-only properties except for dictionaries and collections @@ -1047,21 +1118,24 @@ protected virtual XamlMember LookupMember(string name, bool skipReadOnlyCheck) { return null; } + return result; } + EventInfo ei = _reflector.LookupEvent(name); - if (ei != null) + if (ei is not null) { return SchemaContext.GetEvent(ei); } + return null; } protected virtual XamlMember LookupAttachableMember(string name) { - if (UnderlyingType == null) + if (UnderlyingType is null) { - return (BaseType != null) ? BaseType.GetAttachableMember(name) : null; + return (BaseType is not null) ? BaseType.GetAttachableMember(name) : null; } EnsureReflector(); @@ -1073,19 +1147,22 @@ protected virtual XamlMember LookupAttachableMember(string name) { return null; } + return result; } + setter = _reflector.LookupAttachableEvent(name); - if (setter != null) + if (setter is not null) { return SchemaContext.GetAttachableEvent(name, setter); } + return null; } protected virtual IList LookupPositionalParameters(int parameterCount) { - if (UnderlyingType == null) + if (UnderlyingType is null) { return null; } @@ -1095,10 +1172,11 @@ protected virtual IList LookupPositionalParameters(int parameterCount) // save the results of our reflection in a separate dictionary, and only surface each item // as requested. EnsureReflector(); - if (_reflector.ReflectedPositionalParameters == null) + if (_reflector.ReflectedPositionalParameters is null) { _reflector.ReflectedPositionalParameters = LookupAllPositionalParameters(); } + IList result; _reflector.ReflectedPositionalParameters.TryGetValue(parameterCount, out result); return result; @@ -1112,10 +1190,11 @@ protected virtual Type LookupUnderlyingType() protected virtual bool LookupIsPublic() { Type underlyingType = UnderlyingType; - if (underlyingType == null) + if (underlyingType is null) { return GetDefaultFlag(BoolTypeBits.Public); } + return underlyingType.IsVisible; } @@ -1128,21 +1207,24 @@ protected virtual bool LookupIsAmbient() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); if (_reflector.IsAttributePresent(typeof(AmbientAttribute))) { return true; } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.IsAmbient; } + if (IsUnknown) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); return _reflector.GetFlag(BoolTypeBits.Ambient).Value; } + return GetDefaultFlag(BoolTypeBits.Ambient); } @@ -1150,35 +1232,37 @@ protected virtual XamlValueConverter LookupTypeConverter() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); Type converterType = _reflector.GetAttributeType(typeof(TypeConverterAttribute)); - if (converterType != null) + if (converterType is not null) { return SchemaContext.GetValueConverter(converterType, null); } } - if (BaseType != null) + if (BaseType is not null) { XamlValueConverter result = BaseType.TypeConverter; - if (result != null && result.TargetType != XamlLanguage.Object) + if (result is not null && result.TargetType != XamlLanguage.Object) { return result; } } Type underlyingType = UnderlyingType; - if (underlyingType != null) + if (underlyingType is not null) { if (underlyingType.IsEnum) { return SchemaContext.GetValueConverter(typeof(EnumConverter), this); } + XamlValueConverter result = BuiltInValueConverter.GetTypeConverter(underlyingType); - if (result != null) + if (result is not null) { return result; } + if (IsNullableGeneric()) { Type[] typeArgs = underlyingType.GetGenericArguments(); @@ -1187,6 +1271,7 @@ protected virtual XamlValueConverter LookupTypeConverter() return innerXamlType.TypeConverter; } } + return null; } @@ -1194,31 +1279,32 @@ protected virtual XamlValueConverter LookupValueSerializer() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); Type converterType = _reflector.GetAttributeType(typeof(ValueSerializerAttribute)); - if (converterType != null) + if (converterType is not null) { return SchemaContext.GetValueConverter(converterType, null); } } - if (BaseType != null) + if (BaseType is not null) { XamlValueConverter result = BaseType.ValueSerializer; - if (result != null) + if (result is not null) { return result; } } Type underlyingType = UnderlyingType; - if (underlyingType != null) + if (underlyingType is not null) { XamlValueConverter result = BuiltInValueConverter.GetValueSerializer(underlyingType); - if (result != null) + if (result is not null) { return result; } + if (IsNullableGeneric()) { Type[] typeArgs = underlyingType.GetGenericArguments(); @@ -1227,6 +1313,7 @@ protected virtual XamlValueConverter LookupValueSerializer() return innerXamlType.ValueSerializer; } } + return null; } @@ -1236,16 +1323,18 @@ protected virtual bool LookupTrimSurroundingWhitespace() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); if (_reflector.IsAttributePresent(typeof(TrimSurroundingWhitespaceAttribute))) { return true; } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.TrimSurroundingWhitespace; } + return GetDefaultFlag(BoolTypeBits.TrimSurroundingWhitespace); } @@ -1253,23 +1342,25 @@ protected virtual bool LookupUsableDuringInitialization() { if (AreAttributesAvailable) { - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); bool? usable = _reflector.GetAttributeValue(typeof(UsableDuringInitializationAttribute)); if (usable.HasValue) { return usable.Value; } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.IsUsableDuringInitialization; } + return GetDefaultFlag(BoolTypeBits.UsableDuringInitialization); } protected virtual EventHandler LookupSetMarkupExtensionHandler() { - if (UnderlyingType != null) + if (UnderlyingType is not null) { string methodName; if (TryGetAttributeString(typeof(XamlSetMarkupExtensionAttribute), out methodName)) @@ -1278,20 +1369,23 @@ protected virtual EventHandler LookupSetMarkupE { return null; } + return (EventHandler)Delegate.CreateDelegate( typeof(EventHandler), UnderlyingType, methodName); } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.SetMarkupExtensionHandler; } + return null; } protected virtual EventHandler LookupSetTypeConverterHandler() { - if (UnderlyingType != null) + if (UnderlyingType is not null) { string methodName; if (TryGetAttributeString(typeof(XamlSetTypeConverterAttribute), out methodName)) @@ -1300,14 +1394,17 @@ protected virtual EventHandler LookupSetTypeConve { return null; } + return (EventHandler)Delegate.CreateDelegate( typeof(EventHandler), UnderlyingType, methodName); } } - if (BaseType != null) + + if (BaseType is not null) { return BaseType.SetTypeConverterHandler; } + return null; } @@ -1327,7 +1424,8 @@ private bool AreAttributesAvailable _reflector.CustomAttributeProvider = LookupCustomAttributeProvider(); Debug.Assert(UnderlyingTypeInternal.IsSet, "EnsureReflector should have caused UnderlyingType to be initialized"); } - return _reflector.CustomAttributeProvider != null || UnderlyingTypeInternal.Value != null; + + return _reflector.CustomAttributeProvider is not null || UnderlyingTypeInternal.Value is not null; } } @@ -1340,6 +1438,7 @@ private BindingFlags ConstructorBindingFlags { flags |= BindingFlags.NonPublic; } + return flags; } } @@ -1351,21 +1450,23 @@ private void AppendTypeName(StringBuilder sb, bool forceNsInitialization) { ns = PreferredXamlNamespace; } - else if (_namespaces != null && _namespaces.Count > 0) + else if (_namespaces is not null && _namespaces.Count > 0) { ns = _namespaces[0]; } + if (!string.IsNullOrEmpty(ns)) { sb.Append('{'); sb.Append(PreferredXamlNamespace); sb.Append('}'); } - else if (UnderlyingTypeInternal.Value != null) + else if (UnderlyingTypeInternal.Value is not null) { sb.Append(UnderlyingTypeInternal.Value.Namespace); sb.Append('.'); } + sb.Append(Name); if (IsGeneric) { @@ -1378,6 +1479,7 @@ private void AppendTypeName(StringBuilder sb, bool forceNsInitialization) sb.Append(", "); } } + sb.Append(')'); } } @@ -1394,13 +1496,14 @@ private void CreateReflector() { reflector = new TypeReflector(UnderlyingType); } + Interlocked.CompareExchange(ref _reflector, reflector, null); } // We call this method a lot. Keep it really small, to make sure it inlines. private void EnsureReflector() { - if (_reflector == null) + if (_reflector is null) { CreateReflector(); } @@ -1413,6 +1516,7 @@ private XamlCollectionKind GetCollectionKind() { _reflector.CollectionKind = LookupCollectionKind(); } + return _reflector.CollectionKind; } @@ -1425,16 +1529,18 @@ private bool GetFlag(BoolTypeBits flagBit) result = LookupBooleanValue(flagBit); _reflector.SetFlag(flagBit, result.Value); } + return result.Value; } private XamlMember GetPropertyOrUnknown(string propertyName, bool skipReadOnlyCheck) { XamlMember result = skipReadOnlyCheck ? LookupMember(propertyName, true) : GetMember(propertyName); - if (result == null) + if (result is null) { - result = new XamlMember(propertyName, this /*declaringType*/, false /*isAttachable*/); + result = new XamlMember(propertyName, declaringType: this, isAttachable: false); } + return result; } @@ -1456,30 +1562,34 @@ private IEnumerable GetPublicAndInternalConstructors() internal static ReadOnlyCollection GetReadOnly(IList list) { - if (list == null) + if (list is null) { return null; } + if (list.Count > 0) { return new ReadOnlyCollection(list); } + return EmptyList.Value; } private static ReadOnlyCollection GetTypeArguments(IList typeArguments) { - if (typeArguments == null || typeArguments.Count == 0) + if (typeArguments is null || typeArguments.Count == 0) { return null; } + foreach (XamlType typeArg in typeArguments) { - if (typeArg == null) + if (typeArg is null) { throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments")); } } + return new List(typeArguments).AsReadOnly(); } @@ -1490,16 +1600,19 @@ private static ReadOnlyCollection GetTypeArguments(Type type, XamlSche { genericType = genericType.GetElementType(); } + if (!genericType.IsGenericType) { return null; } + Type[] types = genericType.GetGenericArguments(); XamlType[] result = new XamlType[types.Length]; for (int i = 0; i < types.Length; i++) { result[i] = schemaContext.GetXamlType(types[i]); } + return GetReadOnly(result); } @@ -1515,17 +1628,19 @@ private static string GetTypeName(Type type) typeName = GenericTypeNameScanner.StripSubscript(typeName, out subscript); typeName = string.Concat(typeName.AsSpan(0, index), subscript); } + // if nested, add the containing name if (type.IsNested) { typeName = GetTypeName(type.DeclaringType) + KnownStrings.NestedTypeDelimiter + typeName; } + return typeName; } private bool IsNullableGeneric() { - return UnderlyingType != null + return UnderlyingType is not null && (KS.Eq(UnderlyingType.Name, KnownStrings.NullableOfT) && UnderlyingType.Assembly == typeof(Nullable<>).Assembly && UnderlyingType.Namespace == typeof(Nullable<>).Namespace); @@ -1533,7 +1648,7 @@ private bool IsNullableGeneric() private ICollection LookupAllExcludedReadOnlyMembers() { - if (UnderlyingType == null) + if (UnderlyingType is null) { return null; } @@ -1543,10 +1658,11 @@ private ICollection LookupAllExcludedReadOnlyMembers() // By default, any properties remaining will be excluded read-only members IList excludedMembers = _reflector.LookupRemainingProperties(); - if (excludedMembers == null) + if (excludedMembers is null) { return null; } + List result = new List(excludedMembers.Count); for (int i = 0; i < excludedMembers.Count; i++) { @@ -1560,6 +1676,7 @@ private ICollection LookupAllExcludedReadOnlyMembers() Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties"); } } + return new ReadOnlyCollection(result); } @@ -1589,12 +1706,14 @@ private Dictionary> LookupAllPositionalParameters() XamlType xamlType = SchemaContext.GetXamlType(type); typeVector[i] = xamlType; } + if (ctorDict.ContainsKey(typeVector.Length)) { if (!SchemaContext.SupportMarkupExtensionsWithDuplicateArity) { throw new XamlSchemaException(SR.Format(SR.MarkupExtensionWithDuplicateArity, UnderlyingType, typeVector.Length)); } + // Otherwise we just ignore the dupe } else @@ -1602,6 +1721,7 @@ private Dictionary> LookupAllPositionalParameters() ctorDict.Add(typeVector.Length, GetReadOnly(typeVector)); } } + return ctorDict; } @@ -1646,6 +1766,7 @@ private bool LookupBooleanValue(BoolTypeBits typeBit) string err = SR.Format(SR.UsableDuringInitializationOnME, this); throw new XamlSchemaException(err); } + break; case BoolTypeBits.WhitespaceSignificantCollection: @@ -1665,6 +1786,7 @@ private bool LookupBooleanValue(BoolTypeBits typeBit) bit = GetDefaultFlag(typeBit); break; } + return bit; } @@ -1688,19 +1810,20 @@ private bool TryGetAttributeString(Type attributeType, out string result) result = null; return false; } - Debug.Assert(_reflector != null, "_reflector should have been initialized by AreAttributesAvailable"); + + Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable"); // Look up the attribute on this type bool checkedInherited; result = _reflector.GetAttributeString(attributeType, out checkedInherited); - if (checkedInherited || result != null) + if (checkedInherited || result is not null) { return true; } // Look up the attribute on our base type XamlType baseType = BaseType; - if (baseType != null) + if (baseType is not null) { return baseType.TryGetAttributeString(attributeType, out result); } @@ -1722,20 +1845,22 @@ public override int GetHashCode() if (IsUnknown) { int result = _name.GetHashCode(); - if (_namespaces != null && _namespaces.Count > 0) + if (_namespaces is not null && _namespaces.Count > 0) { result ^= _namespaces[0].GetHashCode(); } - if (_typeArguments != null && _typeArguments.Count > 0) + + if (_typeArguments is not null && _typeArguments.Count > 0) { foreach (XamlType typeArgument in _typeArguments) { result ^= typeArgument.GetHashCode(); } } + return result; } - else if (UnderlyingType != null) + else if (UnderlyingType is not null) { // flip one bit on the hash to avoid collisions with the underlying type return UnderlyingType.GetHashCode() ^ 8; @@ -1759,22 +1884,24 @@ public bool Equals(XamlType other) { return true; } + if (xamlType1 is null || xamlType2 is null) { return false; } + if (xamlType1.IsUnknown) { if (xamlType2.IsUnknown) { - if (xamlType1._namespaces != null) + if (xamlType1._namespaces is not null) { - if (xamlType2._namespaces == null || xamlType1._namespaces[0] != xamlType2._namespaces[0]) + if (xamlType2._namespaces is null || xamlType1._namespaces[0] != xamlType2._namespaces[0]) { return false; } } - else if (xamlType2._namespaces != null) + else if (xamlType2._namespaces is not null) { return false; } @@ -1782,12 +1909,14 @@ public bool Equals(XamlType other) return (xamlType1._name == xamlType2._name) && TypeArgumentsAreEqual(xamlType1, xamlType2); } + return false; } else if (xamlType2.IsUnknown) { return false; } + // If the types are known but don't have underlying types, this will return false. // We don't want to get into the business of comparing custom user types, especially // since the one way we could possibly do that (namespaces) can have side effects @@ -1811,10 +1940,12 @@ private static bool TypeArgumentsAreEqual(XamlType xamlType1, XamlType xamlType2 { return false; } + if (xamlType1._typeArguments.Count != xamlType2._typeArguments.Count) { return false; } + for (int i = 0; i < xamlType1._typeArguments.Count; i++) { if (xamlType1._typeArguments[i] != xamlType2._typeArguments[i]) @@ -1822,6 +1953,7 @@ private static bool TypeArgumentsAreEqual(XamlType xamlType1, XamlType xamlType2 return false; } } + return true; } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlTypeName.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlTypeName.cs index ea842bfe22e..33c7f6d9cf0 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlTypeName.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlTypeName.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; using System.Text; using MS.Internal.Xaml.Parser; @@ -32,7 +30,7 @@ public XamlTypeName(string xamlNamespace, string name, IEnumerable { Name = name; Namespace = xamlNamespace; - if (typeArguments != null) + if (typeArguments is not null) { List typeArgList = new List(typeArguments); _typeArguments = typeArgList; @@ -44,7 +42,7 @@ public XamlTypeName(XamlType xamlType) ArgumentNullException.ThrowIfNull(xamlType); Name = xamlType.Name; Namespace = xamlType.GetXamlNamespaces()[0]; - if (xamlType.TypeArguments != null) + if (xamlType.TypeArguments is not null) { foreach (XamlType argumentType in xamlType.TypeArguments) { @@ -57,10 +55,11 @@ public IList TypeArguments { get { - if (_typeArguments == null) + if (_typeArguments is null) { _typeArguments = new List(); } + return _typeArguments; } } @@ -74,7 +73,7 @@ public override string ToString() public string ToString(INamespacePrefixLookup prefixLookup) { - if (prefixLookup == null) + if (prefixLookup is null) { return ConvertToStringInternal(null); } @@ -98,10 +97,11 @@ public static XamlTypeName Parse(string typeName, IXamlNamespaceResolver namespa string error; XamlTypeName result = ParseInternal(typeName, namespaceResolver.GetNamespace, out error); - if (result == null) + if (result is null) { throw new FormatException(error); } + return result; } @@ -112,10 +112,11 @@ public static IList ParseList(string typeNameList, IXamlNamespaceR string error; IList result = ParseListInternal(typeNameList, namespaceResolver.GetNamespace, out error); - if (result == null) + if (result is null) { throw new FormatException(error); } + return result; } @@ -126,7 +127,7 @@ public static bool TryParse(string typeName, IXamlNamespaceResolver namespaceRes ArgumentNullException.ThrowIfNull(namespaceResolver); result = ParseInternal(typeName, namespaceResolver.GetNamespace, out _); - return (result != null); + return (result is not null); } public static bool TryParseList(string typeNameList, IXamlNamespaceResolver namespaceResolver, @@ -136,14 +137,14 @@ public static bool TryParseList(string typeNameList, IXamlNamespaceResolver name ArgumentNullException.ThrowIfNull(namespaceResolver); result = ParseListInternal(typeNameList, namespaceResolver.GetNamespace, out _); - return (result != null); + return (result is not null); } internal bool HasTypeArgs { get { - return _typeArguments != null && _typeArguments.Count > 0; + return _typeArguments is not null && _typeArguments.Count > 0; } } @@ -169,6 +170,7 @@ internal static void ConvertListToStringInternal(StringBuilder result, IList prefixResolver, out string error) { XamlTypeName xamlTypeName = GenericTypeNameParser.ParseIfTrivalName(typeName, prefixResolver, out error); - if (xamlTypeName != null) + if (xamlTypeName is not null) { return xamlTypeName; } @@ -203,15 +205,17 @@ internal string ConvertToStringInternal(Func prefixGenerator) internal void ConvertToStringInternal(StringBuilder result, Func prefixGenerator) { - if (Namespace == null) + if (Namespace is null) { throw new InvalidOperationException(SR.XamlTypeNameNamespaceIsNull); } + if (string.IsNullOrEmpty(Name)) { throw new InvalidOperationException(SR.XamlTypeNameNameIsNullOrEmpty); } - if (prefixGenerator == null) + + if (prefixGenerator is null) { result.Append('{'); result.Append(Namespace); @@ -220,16 +224,18 @@ internal void ConvertToStringInternal(StringBuilder result, Func else { string prefix = prefixGenerator.Invoke(Namespace); - if (prefix == null) + if (prefix is null) { throw new InvalidOperationException(SR.Format(SR.XamlTypeNameCannotGetPrefix, Namespace)); } + if (prefix.Length != 0) { result.Append(prefix); result.Append(':'); } } + if (HasTypeArgs) { // The subscript goes after the type args diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlXmlWriter.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlXmlWriter.cs index e86e45229d7..9709881946d 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlXmlWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/XamlXmlWriter.cs @@ -4,8 +4,6 @@ #nullable disable -using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Reflection; using System.Text; @@ -54,7 +52,7 @@ public XamlXmlWriter(Stream stream, XamlSchemaContext schemaContext, XamlXmlWrit { ArgumentNullException.ThrowIfNull(stream); - if (settings != null && settings.CloseOutput) + if (settings is not null && settings.CloseOutput) { InitializeXamlXmlWriter(XmlWriter.Create(stream, new XmlWriterSettings { CloseOutput = true }), schemaContext, settings); } @@ -73,7 +71,7 @@ public XamlXmlWriter(TextWriter textWriter, XamlSchemaContext schemaContext, Xam { ArgumentNullException.ThrowIfNull(textWriter); - if (settings != null && settings.CloseOutput) + if (settings is not null && settings.CloseOutput) { InitializeXamlXmlWriter(XmlWriter.Create(textWriter, new XmlWriterSettings { CloseOutput = true }), schemaContext, settings); } @@ -100,7 +98,7 @@ void InitializeXamlXmlWriter(XmlWriter xmlWriter, XamlSchemaContext schemaContex this.schemaContext = schemaContext ?? throw new ArgumentNullException(nameof(schemaContext)); output = xmlWriter; - this.settings = settings == null ? new XamlXmlWriterSettings() : settings.Copy() as XamlXmlWriterSettings; + this.settings = settings is null ? new XamlXmlWriterSettings() : settings.Copy() as XamlXmlWriterSettings; currentState = Start.State; @@ -128,6 +126,7 @@ protected override void Dispose(bool disposing) { Flush(); } + ((IDisposable)meWriter).Dispose(); } } @@ -171,7 +170,7 @@ public override void WriteStartObject(XamlType type) currentState.WriteObject(this, type, false); - if (type.TypeArguments != null) + if (type.TypeArguments is not null) { WriteTypeArguments(type); } @@ -206,7 +205,7 @@ public override void WriteEndMember() public override void WriteValue(object value) { CheckIsDisposed(); - if (value == null) + if (value is null) { WriteStartObject(XamlLanguage.Null); WriteEndObject(); @@ -214,10 +213,11 @@ public override void WriteValue(object value) else { string s = value as string; - if (s == null) + if (s is null) { throw new ArgumentException(SR.XamlXmlWriterCannotWriteNonstringValue, nameof(value)); } + currentState.WriteValue(this, s); } } @@ -228,12 +228,12 @@ public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration) ArgumentNullException.ThrowIfNull(namespaceDeclaration); - if (namespaceDeclaration.Prefix == null) + if (namespaceDeclaration.Prefix is null) { throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull, nameof(namespaceDeclaration)); } - if (namespaceDeclaration.Namespace == null) + if (namespaceDeclaration.Namespace is null) { throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull, nameof(namespaceDeclaration)); } @@ -270,10 +270,12 @@ static bool StringStartsWithCurly(string s) { return false; } + if (s[0] == '{') { return true; } + return false; } @@ -293,6 +295,7 @@ internal static bool HasSignificantWhitespace(string s) { return false; } + return ContainsLeadingSpace(s) || ContainsTrailingSpace(s) || ContainsConsecutiveInnerSpaces(s) @@ -318,6 +321,7 @@ internal static bool ContainsConsecutiveInnerSpaces(string s) return true; } } + return false; } @@ -330,6 +334,7 @@ internal static bool ContainsWhitespaceThatIsNotSpace(string s) return true; } } + return false; } @@ -348,7 +353,7 @@ static XamlType GetContainingXamlType(XamlXmlWriter writer) if (enumerator.Current.AllocatingNodeType == XamlNodeType.StartMember && enumerator.Current.Member != XamlLanguage.Items) { - containingXamlType = (enumerator.Current.Member == null) || enumerator.Current.Member.IsUnknown ? null : enumerator.Current.Member.Type; + containingXamlType = (enumerator.Current.Member is null) || enumerator.Current.Member.IsUnknown ? null : enumerator.Current.Member.Type; break; } else if (enumerator.Current.AllocatingNodeType == XamlNodeType.StartObject) @@ -357,6 +362,7 @@ static XamlType GetContainingXamlType(XamlXmlWriter writer) break; } } + return containingXamlType; } @@ -380,8 +386,8 @@ void AssignNamespacePrefix(string ns, string prefix) bool IsShadowed(string ns, string prefix) { - Debug.Assert(ns != null); - Debug.Assert(prefix != null); + Debug.Assert(ns is not null); + Debug.Assert(prefix is not null); string registeredNamespace; foreach (Frame frame in namespaceScopes) @@ -405,7 +411,7 @@ string FindPrefix(IList namespaces, out string chosenNamespace) { string prefix = LookupPrefix(namespaces, out chosenNamespace); - if (prefix == null) + if (prefix is null) { chosenNamespace = namespaces[0]; prefix = DefinePrefix(chosenNamespace); @@ -442,6 +448,7 @@ internal string LookupPrefix(IList namespaces, out string chosenNamespac } } } + return null; } @@ -502,7 +509,7 @@ void CheckMemberForUniqueness(XamlMember property) Debug.Assert(objectFrame.AllocatingNodeType == XamlNodeType.StartObject || objectFrame.AllocatingNodeType == XamlNodeType.GetObject); - if (objectFrame.Members == null) + if (objectFrame.Members is null) { objectFrame.Members = new XamlPropertySet(); } @@ -510,6 +517,7 @@ void CheckMemberForUniqueness(XamlMember property) { throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterDuplicateMember, property.Name)); } + objectFrame.Members.Add(property); } } @@ -551,7 +559,7 @@ void WriteUndefinedNamespaces(XamlType type) var namespaces = type.GetXamlNamespaces(); string prefix = LookupPrefix(namespaces, out chosenNamespace); - if (prefix == null) + if (prefix is null) { chosenNamespace = namespaces[0]; prefix = DefinePrefix(chosenNamespace); @@ -563,7 +571,7 @@ void WriteUndefinedNamespaces(XamlType type) currentState.WriteNamespace(this, new NamespaceDeclaration(chosenNamespace, prefix)); } - if (type.TypeArguments != null) + if (type.TypeArguments is not null) { foreach (XamlType arg in type.TypeArguments) { @@ -577,7 +585,7 @@ bool TypeArgumentsContainNamespaceThatNeedsDefinition(XamlType type) string chosenNamespace; string prefix = LookupPrefix(type.GetXamlNamespaces(), out chosenNamespace); - if (prefix == null || IsShadowed(chosenNamespace, prefix)) + if (prefix is null || IsShadowed(chosenNamespace, prefix)) { // if we found a namespace that is not previously defined, // or a namespace with prefix that is shadowed @@ -585,7 +593,7 @@ bool TypeArgumentsContainNamespaceThatNeedsDefinition(XamlType type) return true; } - if (type.TypeArguments != null) + if (type.TypeArguments is not null) { foreach (XamlType arg in type.TypeArguments) { @@ -633,7 +641,7 @@ void ConvertXamlTypeToStringHelper(XamlType type, StringBuilder builder) typeNamePrefixed = GenericTypeNameScanner.StripSubscript(typeNamePrefixed, out subscript); builder.Append(typeNamePrefixed); - if (type.TypeArguments != null) + if (type.TypeArguments is not null) { bool added = false; builder.Append('('); @@ -643,26 +651,29 @@ void ConvertXamlTypeToStringHelper(XamlType type, StringBuilder builder) { builder.Append(", "); } + ConvertXamlTypeToStringHelper(arg, builder); added = true; } + builder.Append(')'); } // re-attach the subscript - if (subscript != null) + if (subscript is not null) { builder.Append(subscript); } } - static internal string GetTypeName(XamlType type) + internal static string GetTypeName(XamlType type) { string typeName = type.Name; if (type.IsMarkupExtension && type.Name.EndsWith("Extension", false, TypeConverterHelper.InvariantEnglishUS)) { typeName = type.Name.Substring(0, type.Name.Length - "Extension".Length); } + return typeName; } @@ -714,6 +725,7 @@ public bool TryLookupPrefix(string ns, out string prefix) prefix = "xml"; return true; } + return namespaceMap.TryGetValue(ns, out prefix); } @@ -724,6 +736,7 @@ public bool TryLookupNamespace(string prefix, out string ns) ns = XamlLanguage.Xml1998Namespace; return true; } + return prefixMap.TryGetValue(prefix, out ns); } @@ -756,6 +769,7 @@ public List> GetSortedPrefixMap() { prefixMapList.Add(pair); } + prefixMapList.Sort(CompareByKey); return prefixMapList; } @@ -848,6 +862,7 @@ protected static void WriteMemberAsAttribute(XamlXmlWriter writer) { local = $"{GetTypeName(property.DeclaringType)}.{property.Name}"; } + WriteStartAttribute(writer, prefix, local, ns); } else @@ -898,6 +913,7 @@ protected internal void WriteNode(XamlXmlWriter writer, XamlNode node) { type = frame.Member.Type; } + writer.currentState.WriteObject(writer, type, true); break; @@ -932,6 +948,7 @@ class Start : WriterState Start() { } + public static WriterState State { get { return state; } @@ -967,6 +984,7 @@ class End : WriterState End() { } + public static WriterState State { get { return state; } @@ -979,6 +997,7 @@ class InRecord : WriterState InRecord() { } + public static WriterState State { get { return state; } @@ -1012,10 +1031,11 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) Type = writer.namespaceScopes.Peek().Type, }); } + writer.namespaceScopes.Peek().Member = property; XamlType parentType = writer.namespaceScopes.Peek().Type; - if ((property == XamlLanguage.Items && parentType != null && parentType.IsWhitespaceSignificantCollection) || + if ((property == XamlLanguage.Items && parentType is not null && parentType.IsWhitespaceSignificantCollection) || (property == XamlLanguage.UnknownContent)) { writer.isFirstElementOfWhitespaceSignificantCollection = true; @@ -1056,7 +1076,7 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) // but in order to expand parameters, the markup extension needs to have a default constructor - if (containingType != null && containingType.ConstructionRequiresArguments) + if (containingType is not null && containingType.ConstructionRequiresArguments) { throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor); } @@ -1103,6 +1123,7 @@ class InRecordTryAttributes : WriterState InRecordTryAttributes() { } + public static WriterState State { get { return state; } @@ -1119,7 +1140,7 @@ public override void WriteNamespace(XamlXmlWriter writer, NamespaceDeclaration n public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) { XamlType parentType = writer.namespaceScopes.Peek().Type; - if ((property == XamlLanguage.Items && parentType != null && parentType.IsWhitespaceSignificantCollection) || + if ((property == XamlLanguage.Items && parentType is not null && parentType.IsWhitespaceSignificantCollection) || (property == XamlLanguage.UnknownContent)) { writer.isFirstElementOfWhitespaceSignificantCollection = true; @@ -1130,7 +1151,7 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) string chosenNamespace; string prefix = writer.LookupPrefix(property.GetXamlNamespaces(), out chosenNamespace); - if (prefix == null || writer.IsShadowed(chosenNamespace, prefix)) + if (prefix is null || writer.IsShadowed(chosenNamespace, prefix)) { // if the property's prefix is not already defined, or it's shadowed // we need to write this property as an element so that the prefix can be defined in the property's scope. @@ -1164,7 +1185,7 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) writer.namespaceScopes.Pop(); // but in order to expand properties, the markup extension needs to have a default constructor - if (containingType != null && containingType.ConstructionRequiresArguments) + if (containingType is not null && containingType.ConstructionRequiresArguments) { throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor); } @@ -1183,7 +1204,7 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) { writer.currentState = TryContentPropertyInTryAttributesState.State; } - else if (property.IsDirective && (property.Type != null && (property.Type.IsCollection || property.Type.IsDictionary))) + else if (property.IsDirective && (property.Type is not null && (property.Type.IsCollection || property.Type.IsDictionary))) { writer.WriteDeferredNamespaces(XamlNodeType.StartObject); WriteMemberAsElement(writer); @@ -1196,7 +1217,6 @@ public override void WriteStartMember(XamlXmlWriter writer, XamlMember property) // writer.currentState = InMemberTryAttributes.State; } - } public override void WriteEndObject(XamlXmlWriter writer) @@ -1215,6 +1235,7 @@ class InMember : WriterState InMember() { } + public static WriterState State { get { return state; } @@ -1228,6 +1249,7 @@ public override void WriteNamespace(XamlXmlWriter writer, NamespaceDeclaration n { writer.namespaceScopes.Push(new Frame { AllocatingNodeType = XamlNodeType.StartObject }); } + writer.AssignNamespacePrefix(namespaceDeclaration.Namespace, namespaceDeclaration.Prefix); } @@ -1256,7 +1278,7 @@ public override void WriteValue(XamlXmlWriter writer, string value) { XamlType containingXamlType = GetContainingXamlType(writer); // Treat unknown types as WhitespaceSignificantCollections - if (containingXamlType != null && !containingXamlType.IsWhitespaceSignificantCollection) + if (containingXamlType is not null && !containingXamlType.IsWhitespaceSignificantCollection) { WriteXmlSpaceOrThrow(writer, value); writer.output.WriteValue(value); @@ -1284,6 +1306,7 @@ public override void WriteValue(XamlXmlWriter writer, string value) writer.output.WriteValue(value); writer.currentState = InMemberAfterValue.State; } + if (ContainsTrailingSpace(value)) { writer.deferredValue = value; @@ -1302,6 +1325,7 @@ public override void WriteValue(XamlXmlWriter writer, string value) writer.currentState = InMemberAfterValue.State; } } + if (writer.currentState != InMemberAfterValueWithSignificantWhitespace.State) { writer.isFirstElementOfWhitespaceSignificantCollection = false; @@ -1331,20 +1355,24 @@ Frame FindFrameWithXmlSpacePreserve(XamlXmlWriter writer) { continue; } + if (frame.AllocatingNodeType == XamlNodeType.StartMember) { if (frame.IsContent) { continue; } + var member = frame.Member; if (IsImplicit(member)) { continue; } } + break; } + return frameEnumerator.Current; } @@ -1376,7 +1404,7 @@ public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObj if (frame.AllocatingNodeType == XamlNodeType.StartMember) { XamlType memberType = frame.Member.Type; - if (memberType != null && !memberType.IsCollection && !memberType.IsDictionary) + if (memberType is not null && !memberType.IsCollection && !memberType.IsDictionary) { throw new InvalidOperationException(SR.XamlXmlWriterIsObjectFromMemberSetForArraysOrNonCollections); } @@ -1389,7 +1417,6 @@ public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObj WriteStartElementForObject(writer, type); writer.currentState = InRecordTryAttributes.State; } - } } @@ -1402,6 +1429,7 @@ class InMemberAfterValue : WriterState InMemberAfterValue() { } + public static WriterState State { get { return state; } @@ -1424,6 +1452,7 @@ public override void WriteEndMember(XamlXmlWriter writer) { writer.output.WriteEndElement(); } + writer.currentState = InRecord.State; } @@ -1445,6 +1474,7 @@ class InMemberAfterValueWithSignificantWhitespace : WriterState InMemberAfterValueWithSignificantWhitespace() { } + public static WriterState State { get { return state; } @@ -1493,6 +1523,7 @@ class InMemberAfterEndObject : WriterState InMemberAfterEndObject() { } + public static WriterState State { get { return state; } @@ -1530,6 +1561,7 @@ class InMemberAttributedMember : WriterState InMemberAttributedMember() { } + public static WriterState State { get { return state; } @@ -1547,7 +1579,6 @@ public override void WriteEndMember(XamlXmlWriter writer) writer.output.WriteValue(writer.deferredValue); } - Debug.Assert(writer.namespaceScopes.Count > 0); Frame memberFrame = writer.namespaceScopes.Pop(); Debug.Assert(memberFrame.AllocatingNodeType == XamlNodeType.StartMember || @@ -1564,6 +1595,7 @@ class InMemberTryAttributes : WriterState InMemberTryAttributes() { } + public static WriterState State { get { return state; } @@ -1592,7 +1624,7 @@ public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObj { // We should remove the !type.IsGeneric check once // XamlReader is fixed to handle Generic MEs. - if (type != null && type.IsMarkupExtension && !type.IsGeneric) + if (type is not null && type.IsMarkupExtension && !type.IsGeneric) { writer.meWriter.Reset(); writer.meNodesStack.Push(new List()); @@ -1607,6 +1639,7 @@ public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObj writer.currentState = InMember.State; writer.currentState.WriteObject(writer, type, isObjectFromMember); } + writer.isFirstElementOfWhitespaceSignificantCollection = false; } } @@ -1622,6 +1655,7 @@ class InMemberTryAttributesAfterValue : WriterState InMemberTryAttributesAfterValue() { } + public static WriterState State { get { return state; } @@ -1667,6 +1701,7 @@ class TryContentProperty : WriterState TryContentProperty() { } + public static WriterState State { get { return state; } @@ -1691,6 +1726,7 @@ public override void WriteValue(XamlXmlWriter writer, string value) writer.namespaceScopes.Peek().IsContent = false; WriteMemberAsElement(writer); } + writer.currentState = InMember.State; writer.currentState.WriteValue(writer, value); } @@ -1709,6 +1745,7 @@ class TryContentPropertyInTryAttributesState : WriterState TryContentPropertyInTryAttributesState() { } + public static WriterState State { get { return state; } @@ -1737,7 +1774,7 @@ public override void WriteValue(XamlXmlWriter writer, string value) } else { - Debug.Assert(value != null); + Debug.Assert(value is not null); writer.namespaceScopes.Peek().IsContent = false; writer.currentState = InMemberTryAttributes.State; writer.currentState.WriteValue(writer, value); @@ -1759,6 +1796,7 @@ class TryCurlyForm : WriterState TryCurlyForm() { } + public static WriterState State { get { return state; } @@ -1809,7 +1847,7 @@ public override void WriteEndObject(XamlXmlWriter writer) } // Did writing the markup extension succeed? - if (writer.meWriter.MarkupExtensionString != null) + if (writer.meWriter.MarkupExtensionString is not null) { writer.meNodesStack.Pop(); writer.deferredValue = writer.meWriter.MarkupExtensionString; @@ -1885,10 +1923,10 @@ void ExpandPositionalParametersIntoProperties(XamlXmlWriter writer) Debug.Assert(frame.AllocatingNodeType == XamlNodeType.StartObject); XamlType objectXamlType = frame.Type; - Debug.Assert(objectXamlType != null); + Debug.Assert(objectXamlType is not null); Type objectClrType = objectXamlType.UnderlyingType; - if (objectClrType == null) + if (objectClrType is null) { throw new XamlXmlWriterException(SR.Format( SR.ExpandPositionalParametersWithoutUnderlyingType, objectXamlType.GetQualifiedName())); @@ -1920,18 +1958,19 @@ void ExpandPositionalParametersIntoProperties(XamlXmlWriter writer) } } - if (matchingProperty == null) + if (matchingProperty is null) { throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters); } XamlMember member = objectXamlType.GetMember(matchingProperty.Name); - Debug.Assert(member != null); + Debug.Assert(member is not null); if (member.IsReadOnly) { throw new XamlXmlWriterException(SR.ExpandPositionalParametersWithReadOnlyProperties); } + writer.ppStateInfo.NodesList[i].Insert(0, new XamlNode(XamlNodeType.StartMember, member)); writer.ppStateInfo.NodesList[i].Add(new XamlNode(XamlNodeType.EndMember)); } @@ -1941,7 +1980,7 @@ ParameterInfo[] GetParametersInfo(XamlType objectXamlType, int numOfParameters) { IList paramXamlTypes = objectXamlType.GetPositionalParameters(numOfParameters); - if (paramXamlTypes == null) + if (paramXamlTypes is null) { throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters); } @@ -1952,7 +1991,7 @@ ParameterInfo[] GetParametersInfo(XamlType objectXamlType, int numOfParameters) foreach (var xamlType in paramXamlTypes) { Type underlyingType = xamlType.UnderlyingType; - if (underlyingType != null) + if (underlyingType is not null) { paramClrTypes[i++] = underlyingType; } @@ -1964,7 +2003,7 @@ ParameterInfo[] GetParametersInfo(XamlType objectXamlType, int numOfParameters) ConstructorInfo constructor = objectXamlType.GetConstructor(paramClrTypes); - if (constructor == null) + if (constructor is null) { throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters); } @@ -1987,6 +2026,7 @@ List GetAllPropertiesWithCAA(XamlType objectXamlType) ctorArgProps.Add(p); } } + foreach (XamlMember p in readOnlyProperties) { if (!string.IsNullOrEmpty(XamlObjectReader.GetConstructorArgument(p))) @@ -1994,6 +2034,7 @@ List GetAllPropertiesWithCAA(XamlType objectXamlType) ctorArgProps.Add(p); } } + return ctorArgProps; } diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/BulletChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/BulletChrome.cs index 3a428379f3c..5ac75b8087d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/BulletChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/BulletChrome.cs @@ -1,17 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Windows.Controls; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ButtonChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ButtonChrome.cs index 0d41e901c62..11f183933e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ButtonChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ButtonChrome.cs @@ -2,22 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Shapes; using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; - -using System.ComponentModel; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; -using System.Runtime.InteropServices; -using System.Security; - namespace Microsoft.Windows.Themes { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/DataGridHeaderBorder.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/DataGridHeaderBorder.cs index 8e82e7b4f2a..21947a6020d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/DataGridHeaderBorder.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/DataGridHeaderBorder.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ListBoxChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ListBoxChrome.cs index 0552d0ae17d..134c562a568 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ListBoxChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ListBoxChrome.cs @@ -1,17 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Windows.Controls; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs index 8821fd1f0c9..39b79ec2f9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs @@ -1,13 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System; using System.Globalization; -using System.Threading; using System.Windows; -using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Media; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollChrome.cs index 94b6f8cc32a..b41a2a7c7d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollChrome.cs @@ -3,15 +3,10 @@ // See the LICENSE file in the project root for more information. using System; -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollGlyph.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollGlyph.cs index ee79c95c964..64c8f81f800 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollGlyph.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero/Microsoft/Windows/Themes/ScrollGlyph.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/BulletChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/BulletChrome.cs index 9978ce30f28..5ac75b8087d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/BulletChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/BulletChrome.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Windows.Shapes; using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; - -using System.ComponentModel; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ButtonChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ButtonChrome.cs index b8fbc5f342b..11f183933e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ButtonChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ButtonChrome.cs @@ -1,23 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Windows.Controls; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; -using System.Runtime.InteropServices; -using System.Security; - namespace Microsoft.Windows.Themes { /// diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/DataGridHeaderBorder.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/DataGridHeaderBorder.cs index 8e82e7b4f2a..21947a6020d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/DataGridHeaderBorder.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/DataGridHeaderBorder.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ListBoxChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ListBoxChrome.cs index 0552d0ae17d..134c562a568 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ListBoxChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ListBoxChrome.cs @@ -1,17 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Windows.Controls; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; using System; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs index 8821fd1f0c9..39b79ec2f9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ProgressBarHighlightConverter.cs @@ -1,13 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System; using System.Globalization; -using System.Threading; using System.Windows; -using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Media; using System.Windows.Media.Animation; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollChrome.cs index 1d17f66453a..b41a2a7c7d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollChrome.cs @@ -1,17 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System; -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; -using MS.Internal; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollGlyph.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollGlyph.cs index ee79c95c964..64c8f81f800 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollGlyph.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Aero2/Microsoft/Windows/Themes/ScrollGlyph.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/DataGridHeaderBorder.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/DataGridHeaderBorder.cs index d7df8384855..98b588131b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/DataGridHeaderBorder.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/DataGridHeaderBorder.cs @@ -1,11 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollChrome.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollChrome.cs index f416d822f49..7117a37d3e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollChrome.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollChrome.cs @@ -1,17 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - + using System; -using System.Windows.Shapes; -using System.Windows.Controls; -using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Media; -using System.Windows.Media.Animation; -using MS.Internal; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollGlyph.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollGlyph.cs index be200549893..e9121ed2396 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollGlyph.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.AeroLite/Microsoft/Windows/Themes/ScrollGlyph.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System; namespace Microsoft.Windows.Themes { diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs index fe6ced0762a..cae80461e61 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs @@ -1,15 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Windows.Shapes; + using System.Windows.Controls; using System.Diagnostics; -using System.Threading; using System.Windows; using System.Windows.Media; -using MS.Internal; using System; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/DataGridHeaderBorder.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/DataGridHeaderBorder.cs index 2ad475f26f3..f3969b6f2a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/DataGridHeaderBorder.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/DataGridHeaderBorder.cs @@ -1,12 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using MS.Internal; -using System; -using System.Collections.Generic; + using System.ComponentModel; -using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs index 65fab25d822..684c29b062d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Data; using System.Globalization; @@ -17,7 +13,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur return 0.0; } - if (values[1] is not double factor) + if (values[1] is not double factor || factor == double.NaN) { return 0.0; } diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/FallbackBrushConverter.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/FallbackBrushConverter.cs index a2f3d2a0672..e3c48d6b1ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/FallbackBrushConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/FallbackBrushConverter.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Data; using System.Globalization; using System.Windows.Media; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml index 7ed4ac8610e..305a819d347 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml @@ -506,6 +506,7 @@ + #FF2B2B2B @@ -578,7 +579,7 @@ - + @@ -597,6 +598,8 @@ + + diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml index 48a44717089..9c642b38235 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml @@ -83,7 +83,7 @@ - + @@ -381,10 +381,12 @@ + #FF2B2B2B + @@ -453,7 +455,7 @@ - + @@ -471,7 +473,9 @@ - + + + @@ -533,6 +537,9 @@ + + + @@ -634,9 +641,10 @@ #2D3236 #2D3236 + Transparent #2D3236 - Transparent + #2D3236 #2D3236 #2D3236 #2D3236 diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml index 2a955592265..b205e7d492d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml @@ -576,7 +576,7 @@ - + @@ -595,6 +595,8 @@ + + diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Expander.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Expander.xaml index 1efa22bd69c..f43ff57eeca 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Expander.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Expander.xaml @@ -316,6 +316,8 @@ + + - - 0.0 - - + - + - + - + + + + + + + + + + + + + + + + + @@ -366,7 +381,7 @@ - + - + - + - - + + - + + Value="1.0" /> @@ -456,8 +471,8 @@ - - + + - + + Value="1.0" /> @@ -501,7 +516,7 @@ - + - + @@ -558,14 +573,14 @@ Value="{StaticResource DefaultExpanderToggleButtonUpStyle}" TargetName="HeaderSite"/> @@ -581,7 +596,7 @@ Value="{StaticResource DefaultExpanderToggleButtonLeftStyle}" TargetName="HeaderSite"/> diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/RadioButton.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/RadioButton.xaml index 19f215b531b..137030eaa73 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/RadioButton.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/RadioButton.xaml @@ -235,8 +235,8 @@ - - + + diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/TabControl.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/TabControl.xaml index ac0cf317d88..acc677f7b0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/TabControl.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/TabControl.xaml @@ -179,7 +179,7 @@ - - + - + - + - +