Skip to content

Commit

Permalink
Fix spelling: replacementAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
igitur committed Mar 25, 2024
1 parent b688986 commit 1fcd5e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CoreRemoting/Serialization/CrossFrameworkSerialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ public static class CrossFrameworkSerialization
/// Redirects all loading attempts from a specified assembly name to another assembly name.
/// </summary>
/// <param name="assemblyShortName">Name of the assembly that should be redirected</param>
/// <param name="replacmentAssemblyShortName">Name of the assembly that should be used as replacement</param>
public static void RedirectAssembly(string assemblyShortName, string replacmentAssemblyShortName)
/// <param name="replacementAssemblyShortName">Name of the assembly that should be used as replacement</param>
public static void RedirectAssembly(string assemblyShortName, string replacementAssemblyShortName)
{
Assembly HandleAssemblyResolve(object _, ResolveEventArgs args)
{
var requestedAssembly = new AssemblyName(args.Name);

if (requestedAssembly.Name == assemblyShortName)
{
try
{
var replacmentAssembly = Assembly.Load(replacmentAssemblyShortName);
return replacmentAssembly;
var replacementAssembly = Assembly.Load(replacementAssemblyShortName);
return replacementAssembly;
}
catch (Exception)
{
Expand All @@ -45,12 +45,12 @@ public static void RedirectPrivateCoreLibToMscorlib()
{
RedirectAssembly("System.Private.CoreLib", "mscorlib");
}

/// <summary>
/// Redirects assembly "mscorlib" to "System.Private.CoreLib".
/// </summary>
public static void RedirectMscorlibToPrivateCoreLib()
{
RedirectAssembly("mscorlib", "System.Private.CoreLib");
}
}
}

0 comments on commit 1fcd5e3

Please sign in to comment.