﻿// Decompiled with JetBrains decompiler
// Type: log4net.Util.TypeConverters.EncodingConverter
// Assembly: log4net_webplayer, Version=1.2.10.9, Culture=neutral, PublicKeyToken=null
// MVID: 264EA252-48EC-47A6-AEFF-91CFCAAFCFCB
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\log4net_webplayer.dll

using System;
using System.Text;

namespace log4net.Util.TypeConverters
{
  internal class EncodingConverter : IConvertFrom
  {
    public bool CanConvertFrom(Type sourceType)
    {
      return sourceType == typeof (string);
    }

    public object ConvertFrom(object source)
    {
      string name = source as string;
      if (name != null)
        return (object) Encoding.GetEncoding(name);
      throw ConversionNotSupportedException.Create(typeof (Encoding), source);
    }
  }
}
