Is the code in Admin.aspx.cs proper?

Jun 27, 2010 at 7:45 AM

I have tries to integrate the “SyntaxHighlighter 2.0 Extension For BlogEngine.NET”downloaded from this site into my BlogEngine.NET version 1.6.1.  Without modifying the RemoveSetting method in the Admin.aspx.cs file, however, I could not even compile the downloaded source files properly. I am wondering if anybody else had the same problem.

private void RemoveSetting(string settingName)
{
  foreach (ManagedExtension x in ExtensionManager.Extensions)
  {
    if (x.Name == extensionName)
    {
      // "x.Initialized(settingName)" must be changed as follows:
      if (x.Initialized(ExtensionManager.GetSettings(extensionName, settingName)))
      {
        foreach (ExtensionSettings y in x.Settings)
        {
          if (y.Name == settingName)
          {
            x.Settings.Remove(y);
            break;
          }
        }
        ExtensionManager.SaveToStorage(x);
      }
      break;
    }
  }
}