Exemplo n.º 1
0
        public void OnComponentRetrieved(ContractIdentity identity, IComponentFactory componentFactory, Type componentTargetType, ref object componentInstance, object originalInstance)
        {
            if (IncludedContracts != null)
            {
                if (!IncludedContracts.Match(identity.Type))
                {
                    return;
                }
            }

            if (IncludedComponents != null)
            {
                if (!IncludedComponents.Match(componentTargetType))
                {
                    return;
                }
            }

            OnComponentRetrievedCount++;
        }
Exemplo n.º 2
0
        public void OnComponentComposed(ContractIdentity identity, IEnumerable <InitializationPointSpecification> initializationPoints, IEnumerable <object> initializationPointResults, Type componentTargetType, object componentInstance, object originalInstance)
        {
            if (IncludedContracts != null)
            {
                if (!IncludedContracts.Match(identity.Type))
                {
                    return;
                }
            }

            if (IncludedComponents != null)
            {
                if (!IncludedComponents.Match(componentTargetType))
                {
                    return;
                }
            }

            OnComponentComposedCount++;
        }