Skip to content

Commit 01da4f7

Browse files
ericstjstephentoub
andauthored
Remove dead code for NetFx ASP.NET (#105115)
Co-authored-by: Stephen Toub <[email protected]>
1 parent 4555974 commit 01da4f7

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ public object SerializedValue
7575
}
7676
}
7777

78-
private static bool IsHostedInAspnet()
79-
{
80-
// See System.Web.Hosting.ApplicationManager::PopulateDomainBindings
81-
return AppDomain.CurrentDomain.GetData(".appDomain") != null;
82-
}
83-
8478
private object Deserialize()
8579
{
8680
object value = null;
@@ -112,25 +106,8 @@ private object Deserialize()
112106
}
113107
}
114108
}
115-
catch (Exception exception)
109+
catch (Exception)
116110
{
117-
try
118-
{
119-
if (IsHostedInAspnet())
120-
{
121-
object[] args = new object[] { Property, this, exception };
122-
123-
const string webBaseEventTypeName = "System.Web.Management.WebBaseEvent, System.Web";
124-
Type type = Type.GetType(webBaseEventTypeName, true);
125-
126-
type.InvokeMember("RaisePropertyDeserializationWebErrorEvent",
127-
BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.InvokeMethod,
128-
null, null, args, CultureInfo.InvariantCulture);
129-
}
130-
}
131-
catch
132-
{
133-
}
134111
}
135112

136113
if (throwBinaryFormatterDeprecationException)

0 commit comments

Comments
 (0)