[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/MarcelMCF/pythonnet/master/src/runtime/PythonTypeAttribute.cs [Back]  [Original]

using System;

namespace Python.Runtime
{
    /// 
    /// Applied to IL-generated properties on Python-derived CLR types when the
    /// property type resolves to  (i.e. the Python type has
    /// no direct CLR equivalent). Stores the originating Python module and type
    /// name so higher-level code can resolve the Python type at runtime.
    /// 
    [AttributeUsage(AttributeTargets.Property)]
    public class PythonTypeAttribute : Attribute
    {
        /// Python type name (e.g. "MyEnum").
        public string TypeName { get; }

        /// Python module containing the type (e.g. "my_plugin").
        public string Module { get; }

        public PythonTypeAttribute(string pyTypeModule, string pyTypeName)
        {
            TypeName = pyTypeName;
            Module = pyTypeModule;
        }
    }
}

Web Proxy Viewer  |  New URL  |  Original Page