User: xtoff
Date: 2009/12/30 03:16 AM
Removed:
/DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/
ReflectionOverProxyTestCase.cs
/DynamicProxy/trunk/src/Castle.DynamicProxy/ComponentModel/
Modified:
/DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/
Castle.DynamicProxy.Tests-vs2008.csproj
/DynamicProxy/trunk/src/Castle.DynamicProxy/
Castle.DynamicProxy-vs2008.csproj
/DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/
BaseProxyGenerator.cs
Log:
- reverted last commit. Since in Silverlight there's no TypeDescriptor
infrastructure, that approach won't work in Silverlight.
I think it's best to revert from implementing interface members explicitly,
and do that only if otherwise we'd have a collision.
File Changes:
Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy/
=======================================================
File [modified]: Castle.DynamicProxy-vs2008.csproj
Delta lines: +0 -3
===================================================================
--- DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/BaseProxyGenerator.cs
2009-12-30 09:23:44 UTC (rev 6544)
+++ DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/BaseProxyGenerator.cs
2009-12-30 10:16:29 UTC (rev 6545)
@@ -16,7 +16,6 @@
{
using System;
using System.Collections.Generic;
- using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Serialization;
@@ -24,7 +23,6 @@
using Castle.Core.Interceptor;
using Castle.Core.Logging;
- using Castle.DynamicProxy.ComponentModel;
using Castle.DynamicProxy.Contributors;
using Castle.DynamicProxy.Generators.Emitters;
using Castle.DynamicProxy.Generators.Emitters.CodeBuilders;
@@ -384,7 +382,6 @@
protected virtual void CreateTypeAttributes(ClassEmitter
emitter)
{
emitter.AddCustomAttributes(ProxyGenerationOptions);
-
emitter.DefineCustomAttribute<TypeDescriptionProviderAttribute>(new
object[]{typeof(ProxyTypeDescriptionProvider)});
#if !SILVERLIGHT
emitter.DefineCustomAttribute<XmlIncludeAttribute>(new
object[] { targetType });
Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/
=============================================================
File [modified]: Castle.DynamicProxy.Tests-vs2008.csproj
Delta lines: +0 -66
===================================================================
---
DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/ReflectionOverProxyTestCase.cs
2009-12-30 09:23:44 UTC (rev 6544)
+++
DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/ReflectionOverProxyTestCase.cs
2009-12-30 10:16:29 UTC (rev 6545)
@@ -1,66 +0,0 @@
-// Copyright 2004-2009 Castle Project - http://www.castleproject.org/
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-namespace Castle.DynamicProxy.Tests
-{
- using System;
- using System.ComponentModel;
-
- using Castle.DynamicProxy.Tests.Interfaces;
-
- using NUnit.Framework;
-
- [TestFixture]
- public class ReflectionOverProxyTestCase:BasePEVerifyTestCase
- {
- [Test]
- public void Proxy_should_have_TypeDescriptionProviderAttribute()
- {
- var type =
generator.CreateClassProxy(typeof(SimpleClass)).GetType();
- Assert.IsTrue(Attribute.IsDefined(type,
typeof(TypeDescriptionProviderAttribute)));
-
- type =
generator.CreateInterfaceProxyWithoutTarget(typeof(IOne)).GetType();
- Assert.IsTrue(Attribute.IsDefined(type,
typeof(TypeDescriptionProviderAttribute)));
-
- type =
generator.CreateInterfaceProxyWithTargetInterface(typeof(IOne),new
One()).GetType();
- Assert.IsTrue(Attribute.IsDefined(type,
typeof(TypeDescriptionProviderAttribute)));
-
- type =
generator.CreateInterfaceProxyWithTarget(typeof(IOne),new One()).GetType();
- Assert.IsTrue(Attribute.IsDefined(type,
typeof(TypeDescriptionProviderAttribute)));
- }
-
- [Test]
- public void
Proxy_with_explicitly_implemented_interface_should_return_short_names_via_descriptor()
- {
- var type =
generator.CreateClassProxy(typeof(HasPropertyBar), new[] { typeof(IHasProperty)
}).GetType();
- var properties = TypeDescriptor.GetProperties(type);
- Assert.IsNotEmpty(properties);
- foreach (PropertyDescriptor property in properties)
- {
- Assert.That(property.Name.IndexOf(".") == -1,
"Name should have no dots: {0}", property.Name);
- }
- }
-
- [Test]
- public void
Should_be_able_to_set_get_interface_property_with_short_name_via_TypeDescriptor()
- {
- var proxy =
generator.CreateClassProxy(typeof(HasPropertyBar), new[] { typeof(IHasProperty)
}) as IHasProperty;
- var properties = TypeDescriptor.GetProperties(proxy);
- var property = properties.Find("Prop", true);
- property.SetValue(proxy, 7);
- Assert.AreEqual(7, proxy.Prop);
- }
-
- }
-}
File [removed]: ReflectionOverProxyTestCase.cs
Delta lines: +0 -0
===================================================================
Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/
==================================================================
File [modified]: BaseProxyGenerator.cs
Delta lines: +0 -1
===================================================================
---
DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/Castle.DynamicProxy.Tests-vs2008.csproj
2009-12-30 09:23:44 UTC (rev 6544)
+++
DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/Castle.DynamicProxy.Tests-vs2008.csproj
2009-12-30 10:16:29 UTC (rev 6545)
@@ -232,7 +232,6 @@
<Compile Include="ProxyKind.cs" />
<Compile Include="ProxyNothingHook.cs" />
<Compile Include="ProxyTargetAccessorHandlingTestCase.cs" />
- <Compile Include="ReflectionOverProxyTestCase.cs" />
<Compile Include="RhinoMocksTestCase.cs" />
<Compile Include="SerializableClassTestCase.cs" />
--
You received this message because you are subscribed to the Google Groups
"Castle Project Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-commits?hl=en.