membershipreboot.owin을 사용하는 사용자 정의 사용자 계정으로 다중 소유자 예제를 만들었습니까?MembershipReboot.Owin에 사용자 지정 UserAccount를 등록하는 방법은 무엇입니까?
맞춤 계정을 사용할 때 멤버십 미들웨어를 구성하는 방법을 파악하는 데 어려움이 있습니다. 기본 예제가 적용되지 않습니다. 그리고 나는 충분히 펑키 한 Funcs로 경험하지 못했을 것 같습니다. 어떤 도움을 주시면 감사하겠습니다.
Thx.
public static class MembershipRebootOwinExtensions
{
public static void UseMembershipReboot<TAccount>(
this IAppBuilder app,
Func<IDictionary<string, object>, UserAccountService<TAccount>> userAccountServiceFactory,
Func<IDictionary<string, object>, AuthenticationService<TAccount>> authenticationServiceFactory = null
)
where TAccount : UserAccount
{
app.Use<MembershipRebootMiddleware<TAccount>>(userAccountServiceFactory, authenticationServiceFactory);
app.UseMembershipReboot();
}
public static void UseMembershipReboot<TAccount>(
this IAppBuilder app,
CookieAuthenticationOptions cookieOptions,
Func<IDictionary<string, object>, UserAccountService<TAccount>> userAccountServiceFactory,
Func<IDictionary<string, object>, AuthenticationService<TAccount>> authenticationServiceFactory = null
)
where TAccount : UserAccount
{
app.Use<MembershipRebootMiddleware<TAccount>>(userAccountServiceFactory, authenticationServiceFactory);
app.UseMembershipReboot(cookieOptions);
}
가 어떻게 두 FUNC 년대에 채울 것 : 같은
OwinExtentionMethods
보인다?Func<IDictionary<string, object>, UserAccountService<TAccount>>
및
Func<IDictionary<string, object>, AuthenticationService<TAccount>>
그 샘플은 Owin을 사용하지 않습니다! 권리? –
아니요. 그러나 모든 제네릭과 함께 사용자 지정 사용자 계정을 사용하는 방법을 보여줍니다. –
어쩌면 그 Func의 내 부족한 이해하지만 예제가 도움이되지 않습니다. Generic DataSource 클래스, generic 저장소 클래스를 인스턴스화하는 방법 만 보여줍니다. 내 문제는 제네릭 매개 변수로 funcs를 제공하는 방법을 이해하는 데 어려움이 있습니다. –