Inheritance: Castle.DynamicProxy.Contributors.ClassMembersCollector
		protected override IEnumerable<MembersCollector> CollectElementsToProxyInternal(IProxyGenerationHook hook)
		{
			Debug.Assert(hook != null, "hook != null");

			var targetItem = new WrappedClassMembersCollector(targetType) { Logger = Logger };
			targetItem.CollectMembersToProxy(hook);
			yield return targetItem;

			foreach (var @interface in interfaces)
			{
				var item = new InterfaceMembersOnClassCollector(@interface, true,
					targetType.GetTypeInfo().GetRuntimeInterfaceMap(@interface)) { Logger = Logger };
				item.CollectMembersToProxy(hook);
				yield return item;
			}
		}
Exemplo n.º 2
0
        protected override IEnumerable <MembersCollector> GetCollectors()
        {
            var targetItem = new WrappedClassMembersCollector(targetType)
            {
                Logger = Logger
            };

            yield return(targetItem);

            foreach (var @interface in interfaces)
            {
                var item = new InterfaceMembersOnClassCollector(@interface, true,
                                                                targetType.GetInterfaceMap(@interface))
                {
                    Logger = Logger
                };
                yield return(item);
            }
        }
Exemplo n.º 3
0
        protected override IEnumerable <MembersCollector> CollectElementsToProxyInternal(IProxyGenerationHook hook)
        {
            Debug.Assert(hook != null, "hook != null");

            var targetItem = new WrappedClassMembersCollector(targetType)
            {
                Logger = Logger
            };

            targetItem.CollectMembersToProxy(hook);
            yield return(targetItem);

            foreach (var @interface in interfaces)
            {
                var item = new InterfaceMembersOnClassCollector(@interface, true,
                                                                targetType.GetTypeInfo().GetRuntimeInterfaceMap(@interface))
                {
                    Logger = Logger
                };
                item.CollectMembersToProxy(hook);
                yield return(item);
            }
        }