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

using System;
using System.IO;

namespace Python.Test
{
    /// 
    /// These classes support the CLR constructor unit tests.
    /// 
    public class EnumConstructorTest
    {
        public TypeCode value;

        public EnumConstructorTest(TypeCode v)
        {
            value = v;
        }
    }


    public class FlagsConstructorTest
    {
        public FileAccess value;

        public FlagsConstructorTest(FileAccess v)
        {
            value = v;
        }
    }


    public class StructConstructorTest
    {
        public Guid value;

        public StructConstructorTest(Guid v)
        {
            value = v;
        }
    }

    public struct GenericStructConstructorTest where T : struct
    {
        public T Value;

        public GenericStructConstructorTest(T value)
        {
            this.Value = value;
        }
    }


    public class SubclassConstructorTest
    {
        public Exception value;

        public SubclassConstructorTest(Exception v)
        {
            value = v;
        }
    }

    public class MultipleConstructorsTest
    {
        public string value;
        public Type[] type;

        public MultipleConstructorsTest()
        {
            value = "";
            type = new Type[1] { null };
        }

        public MultipleConstructorsTest(string s, params Type[] tp)
        {
            value = s;
            type = tp;
        }
    }

    public class DefaultConstructorMatching
    {
        public double a;
        public DefaultConstructorMatching() { a = 1; }
        public DefaultConstructorMatching(double a) { this.a = a; }
    }
}

Web Proxy Viewer  |  New URL  |  Original Page