Nop Commerce
과 협력 중이며 누군가 내 혼란을 도와 줄 수 있는지 궁금합니다.Nop Commerce 설정이 데이터베이스에서로드되는 방식 이해
웹 응용 프로그램을 시작할 때 설정이로드되는 방식을 알아 내려고 여러 번 코드를 디버깅했습니다. 나는 단지 그것을 얻지 않는다!
모든 설정 클래스는 ISettings
인터페이스를 구현합니다. 예를 들어 고객 설정을 할 수있게 해줍니다. CustomerSettings
클래스로 나타났습니다. 데이터베이스에는 Setting table
이 있습니다. 고객 설정에 대한 데이터는이 같은 somethng 보이는 :
customersettings.usernamesenabled
customersettings.checkusernameavailabilityenabled
customersettings.allowuserstochangeusernames
... and so on...
방법과 CustomerSettings
클래스와 CustomerSettings 클래스의 UsernamesEnabled
속성에 매핑 usernamesenabled
같은 속성에 customersettings
에서 매핑이 각 설정은? 왜이 방법으로 구현 되었습니까? 누군가가 올바른 방향으로 날 지점 수 있다면
builder.RegisterGeneric(typeof(ConfigurationProvider<>)).As(typeof(IConfigurationProvider<>));
builder.RegisterSource(new SettingsSource());
다음 주시면 감사하겠습니다 :
나는 그것이 DependencyRegistrar
클래스에 다음 코드를 함께 할 수있는 뭔가가 알고있다.
예 감사 드리며 이것을 알아 냈습니다. –