InstancePerLifetimeScope:同一個Lifetime生成的對象是同一個實例函數
SingleInstance:單例模式,每次調用,都會使用同一個實例化的對象;每次都用同一個對象;ui
InstancePerDependency:默認模式,每次調用,都會從新實例化對象;每次請求都建立一個新的對象;spa
builder.RegisterAssemblyTypes(System.Reflection.Assembly.GetExecutingAssembly()).Where(t => t.Name.EndsWith("Service")).AsImplementedInterfaces().InstancePerDependency().PropertiesAutowired();//屬性注入,默認構造函數注入對象