log4net не проходит проверку при компиляции

https://github.com/apache/log4net

Я компилирую log4net из источника выше, но он не проходит проверку:

[IL]: Ошибка: [log4net.dll: log4net.Plugin.RemoteLoggingServerPlugin :: Attach] [смещение 0x00000029] Метод не отображается.

Код в порядке:

public interface ILoggerRepository
{
    ...
}

public interface IPlugin
{
    void Attach(ILoggerRepository repository);
}

public abstract class PluginSkeleton : IPlugin
{
    public virtual void Attach(ILoggerRepository repository) { }
}

public class RemoteLoggingServerPlugin : PluginSkeleton
{
    override public void Attach(ILoggerRepository repository)
    {
        base.Attach(repository);
        ...
    }
}

https://github.com/apache/log4net/blob/trunk/src/Plugin/IPlugin.cs

https://github.com/apache/log4net/blob/ trunk / src / Plugin / PluginSkeleton.cs

https://github.com/apache/log4net/blob/trunk/src/Plugin/RemoteLoggingServerPlugin.cs

Исследование показывает, что он не может вызвать RemotingServices. Маршал () :

override public void Attach(ILoggerRepository repository)
{
    base.Attach(repository);

    // Create the sink and marshal it
    m_sink = new RemoteLoggingSinkImpl(repository);

    try
    {
         **RemotingServices.Marshal(m_sink, m_sinkUri, typeof(IRemoteLoggingSink));**
    }
    catch(Exception ex)
    {
        LogLog.Error(declaringType, "Failed to Marshal remoting sink", ex);
    }
}

Но здесь нет ничего важного. Более того, вызов RemotingServices.Marshal () с любым типом приводит к тем же проблемам:

Даже если я изменю Attach () на это:

override public void Attach(ILoggerRepository repository)
{
    RemotingServices.Marshal(null, null, typeof(int));
}

Кто-нибудь может определить, что такое проблема?

13
задан famousgarkin 8 January 2012 в 12:45
поделиться