public override int GetHashCode()
        {
            // ensure initialization before accessing MixinData
            Initialize();

            var result = Hook != null?Hook.GetType().GetHashCode() : 0;

            result = 29 * result + (Selector != null ? 1 : 0);
            result = 29 * result + MixinData.GetHashCode();
            result = 29 * result + (BaseTypeForInterfaceProxy != null ? BaseTypeForInterfaceProxy.GetHashCode() : 0);
            result = 29 * result + CollectionExtensions.GetContentsHashCode(AdditionalAttributes);
            return(result);
        }
//#endif

        public void Initialize()
        {
            if (mixinData == null)
            {
                try
                {
                    mixinData = new MixinData(mixins);
                }
                catch (ArgumentException ex)
                {
                    throw new InvalidMixinConfigurationException(
                              "There is a problem with the mixins added to this ProxyGenerationOptions: " + ex.Message, ex);
                }
            }
        }
        public void AddMixinInstance(object instance)
        {
            if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }

            if (mixins == null)
            {
                mixins = new List <object>();
            }

            mixins.Add(instance);
            mixinData = null;
        }