private static object GetConnector <T>(this ComponentEnvironment componentEnvironment, PortConfiguration port)
 {
     return(componentEnvironment.Configuration.GetMetadata().GetConnector <T>(componentEnvironment.Instance, port));
 }
        public static IConsumer <T> GetConsumer <T>(this ComponentEnvironment componentEnvironment, PortConfiguration port)
        {
            var connector = GetConnector <T>(componentEnvironment, port);

            return((IConsumer <T>)connector);
        }
 public static IPortMetadata FindPortMetadata(this ComponentEnvironment componentEnvironment, PortConfiguration port)
 {
     return(componentEnvironment.Configuration.FindPortMetadata(port));
 }