私は C# の基本クラスとのインターフェイスを持っています。組み込みの拡張性のために、IronPython で派生クラスを実装できるようにしたいと考えています。
C# では、次のようなものがあります。
public interface IInterface
{
    bool SomeProperty { get; set; }
    bool SomeMethod(DateTime atTime);
}
public abstract class BaseClass : IInterface
{
    public BaseClass() {}
    private bool someProperty = true;
    public virtual bool SomeProperty
    {
        get { return someProperty; }
        set { someProperty = value; }
    }
    public virtual bool SomeMethod(DateTime atTime)
    {
        return true;
    }
}
次に、コントローラ型クラス
public class SomeOtherClass
{
    List<IInterface> interfaceCollection = new List<IInterface>();
    ... factory here to create C# classes and IPy classes derived from BaseClass or IInterface ...
    interfaceCollection.Add(somePytonDerivedClass);
    foreach (var intExersize in interfaceCollection)
    {
        if (intExersize.SomeProperty == true)
        {
            intExersize.SomeMethod(DateTime.Now);
        }
    }
}
IronPython で impl を実行したい - 次のようなもの:
class BaseClassIPy (BaseClass):
def __new__(self):
    print("Made it into the class")
    return BaseClass.__new__(self)
def __init__(self):
    pass
def get_SomeProperty(self):
    return BaseClass.SomeProperty
def set_SomeProperty(self, value):
    BaseClass.SomeProperty = value
def SomeMethod(self, atTime):
    return BaseClass.SomeMethod(atTime)
newメソッドとinitメソッドが正しく呼び出されている-
しかし、IPy クラスのプロパティとメソッドを呼び出すと、呼び出しは基本クラスに直接行くように見えます...
構文の問題ですか?つまり、IPy コードが間違っていますか?
それとも、何かが完全に欠けていますか?
よろしく、 チャド
---------------- 編集 ------ Python クラスをインストールするメソッド:
private IInterface GetScriptPlugInNode()
{
    IInterface node = null;
    string plugInScript = "c:\\BaseClassIPy.py";
    string plugInClass = "BaseClassIPy";
    var options = new Dictionary<string, object>();
    ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options);
    setup.HostType = typeof(SelfContainedScriptHost);  //PAL impl
    setup.DebugMode = true;
    var pyRuntime = new ScriptRuntime(setup);
    var engineInstance = Python.GetEngine(pyRuntime);
    // Redirect search path to use embedded resources
    engineInstance.SetSearchPaths(new[] { String.Empty });
    var scope = engineInstance.CreateScope();
    ScriptSource source = engineInstance.CreateScriptSourceFromFile(plugInScript);
    source.Execute(scope);
    var typeClass = scope.GetVariable(plugInClass);
    var instance = engineInstance.Operations.CreateInstance(typeClass);
    node = instance;
    return node;
}