Example #1
0
 public virtual void Initialize(ProxyClassDescriptor pcd)
 {
     foreach (var subject in _subjects)
     {
         subject.Initialize(this);
     }
 }
Example #2
0
        public bool Equals(ProxyClassDescriptor other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
//            if (!ReferenceEquals(_baseClassType, other._baseClassType))
//                return false;

            if (_mixins.Length != other._mixins.Length)
            {
                return(false);
            }

            for (int i = 0; i < _mixins.Length; i++)
            {
                if (!_mixins[i].Equals(other._mixins[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
        public static ProxyClassDescriptor GetProxyClassDescriptorForSubjectType(Type subjectType)
        {
            var pcd = new ProxyClassDescriptor(
                new StaticInstanceMixin(StaticInstanceOptions.ThreadStatic),
                new ComputeMethodIndexMixin(subjectType));

            return(pcd);
        }
Example #4
0
 protected internal ProxyClassCoder(IProxyModuleCoderAccess pm, ProxyClassDescriptor pcd)
 {
     _pm  = pm;
     _mb  = pm.ModuleBuilder;
     _pcd = pcd;
 }