public SlotAccessDelegate(PythonTypeSlot slot, PythonType owner)
 {
     if (owner.IsSystemType)
     {
         _owner = owner;
         _slot  = slot;
     }
     else
     {
         _weakOwner = owner.GetSharedWeakReference();
         _weakSlot  = new WeakReference(slot);
     }
 }
                public MetaGetAttributeDelegate(CodeContext context, PythonTypeSlot slot, PythonType metaType, string name)
                {
                    _name = name;

                    if (metaType.IsSystemType)
                    {
                        _metaType = metaType;
                        _slot     = slot;
                    }
                    else
                    {
                        _weakMetaType = metaType.GetSharedWeakReference();
                        _weakSlot     = new WeakReference(slot);
                    }
                    _invokeSite = CallSite <Func <CallSite, CodeContext, object, string, object> > .Create(context.LanguageContext.InvokeOne);
                }
 public OldClassDelegate(PythonType declType, PythonType oldClass, string name)
 {
     _type     = oldClass.GetSharedWeakReference();
     _declType = declType.GetSharedWeakReference();
     _name     = name;
 }