private object InstantiateProxy(CompositeType compositeType, MockFactory mockFactory, MockStyle mockStyle, string name, object[] constructorArgs)
		{
			LinFuMockObjectInterceptor interceptor = new LinFuMockObjectInterceptor(mockFactory, compositeType, name, mockStyle);
			object proxy;

			if (compositeType.PrimaryType.IsClass)
			{
				Type[] additionalInterfaceTypes = BuildAdditionalTypeArrayForProxyType(compositeType);
				if (compositeType.PrimaryType.IsSealed)
				{
					throw new ArgumentException("Cannot mock sealed classes.");
				}

				proxy = factory.CreateProxy(compositeType.PrimaryType, interceptor, additionalInterfaceTypes);
			}
			else
			{
				Type[] additionalInterfaceTypes = BuildAdditionalTypeArrayForProxyType(compositeType);
				proxy = factory.CreateProxy(typeof(InterfaceMockBase), interceptor, additionalInterfaceTypes);
			}

			return proxy;
		}
        private object InstantiateProxy(CompositeType compositeType, MockFactory mockFactory, MockStyle mockStyle, string name, object[] constructorArgs)
        {
            LinFuMockObjectInterceptor interceptor = new LinFuMockObjectInterceptor(mockFactory, compositeType, name, mockStyle);
            object proxy;

            if (compositeType.PrimaryType.IsClass)
            {
                Type[] additionalInterfaceTypes = BuildAdditionalTypeArrayForProxyType(compositeType);
                if (compositeType.PrimaryType.IsSealed)
                {
                    throw new ArgumentException("Cannot mock sealed classes.");
                }

                proxy = factory.CreateProxy(compositeType.PrimaryType, interceptor, additionalInterfaceTypes);
            }
            else
            {
                Type[] additionalInterfaceTypes = BuildAdditionalTypeArrayForProxyType(compositeType);
                proxy = factory.CreateProxy(typeof(InterfaceMockBase), interceptor, additionalInterfaceTypes);
            }

            return(proxy);
        }