File tree Expand file tree Collapse file tree 1 file changed +1
-38
lines changed
mcs/class/referencesource/System.Xml/System/Xml/Core Expand file tree Collapse file tree 1 file changed +1
-38
lines changed Original file line number Diff line number Diff line change @@ -729,47 +729,10 @@ static internal bool EnableLegacyXmlSettings()
729729 return s_enableLegacyXmlSettings . Value ;
730730 }
731731
732- bool enableSettings = false ; // default value
733- #if ! MOBILE
734- if ( ! ReadSettingsFromRegistry ( Registry . LocalMachine , ref enableSettings ) )
735- {
736- // still ok if this call return false too as we'll use the default value which is false
737- ReadSettingsFromRegistry ( Registry . CurrentUser , ref enableSettings ) ;
738- }
739- #endif
740-
741- s_enableLegacyXmlSettings = enableSettings ;
732+ s_enableLegacyXmlSettings = false ;
742733 return s_enableLegacyXmlSettings . Value ;
743734 }
744735
745- #if ! MOBILE
746- [ RegistryPermission ( SecurityAction . Assert , Unrestricted = true ) ]
747- [ SecuritySafeCritical ]
748- private static bool ReadSettingsFromRegistry ( RegistryKey hive , ref bool value )
749- {
750- const string regValueName = "EnableLegacyXmlSettings" ;
751- const string regValuePath = @"SOFTWARE\Microsoft\.NETFramework\XML" ;
752-
753- try
754- {
755- using ( RegistryKey xmlRegKey = hive . OpenSubKey ( regValuePath , false ) )
756- {
757- if ( xmlRegKey != null )
758- {
759- if ( xmlRegKey . GetValueKind ( regValueName ) == RegistryValueKind . DWord )
760- {
761- value = ( ( int ) xmlRegKey . GetValue ( regValueName ) ) == 1 ;
762- return true ;
763- }
764- }
765- }
766- }
767- catch { /* use the default if we couldn't read the key */ }
768-
769- return false ;
770- }
771- #endif // MOBILE
772-
773736#endif // SILVERLIGHT
774737
775738 }
You can’t perform that action at this time.
0 commit comments