[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/pythonnet/pythonnet/net8.0/src/testing/CodecTest.cs [Back]  [Original]

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Python.Runtime;

namespace Python.Test
{
    public class ListMember
    {
        public ListMember(int value, string name)
        {
            Value = value;
            Name = name;
        }

        public int Value { get; set; }
        public string Name { get; set; }
    }

    public class ListConversionTester
    {
        public int GetLength(IEnumerable o)
        {
            return o.Count();
        }
        public int GetLength(ICollection o)
        {
            return o.Count;
        }
        public int GetLength(IList o)
        {
            return o.Count;
        }
        public int GetLength2(IEnumerable o)
        {
            return o.Count();
        }
        public int GetLength2(ICollection o)
        {
            return o.Count;
        }
        public int GetLength2(IList o)
        {
            return o.Count;
        }
    }

    public static class CodecResetter
    {
        public static void Reset()
        {
            PyObjectConversions.Reset();
        }
    }
}

Web Proxy Viewer  |  New URL  |  Original Page