public object GetInstance(InstanceContext instanceContext, Message message)
        {
            DIExtension   diExtension  = instanceContext.Extensions.Find <DIExtension>();
            IServiceScope serviceScope = diExtension.GetServiceScope(this.serviceProvider);

            return(serviceScope.ServiceProvider.GetService(this.contractType));
        }
        public void ReleaseInstance(InstanceContext instanceContext, object instance)
        {
            DIExtension diExtension = instanceContext.Extensions.Find <DIExtension>();

            diExtension.ReleaseServiceScope();
        }