protected override IEnumerable<MembersCollector> CollectElementsToProxyInternal(IProxyGenerationHook hook)
		{
			Debug.Assert(hook != null, "hook != null");

			var targetItem = new ClassMembersCollector(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 ClassMembersCollector(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);
            }
        }
        protected override IEnumerable <MembersCollector> CollectElementsToProxyInternal(IProxyGenerationHook hook)
        {
            Debug.Assert(hook != null, "hook != null");

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

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

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