/// <summary>
        /// Sync extension
        /// </summary>
        /// <typeparam name="TUser">The type of the user.</typeparam>
        /// <typeparam name="TRole">The type of the role.</typeparam>
        /// <typeparam name="TKey">The type of the key.</typeparam>
        /// <typeparam name="TUserLogin">The type of the user login.</typeparam>
        /// <typeparam name="TUserRole">The type of the user role.</typeparam>
        /// <typeparam name="TUserClaim">The type of the user claim.</typeparam>
        /// <param name="manager">The manager.</param>
        /// <param name="hostId">The host identifier.</param>
        /// <param name="login">The login.</param>
        /// <returns></returns>
        public static TUser Find <TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>(this UserManagerMultiHost <TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> manager, TKey hostId, UserLoginInfo login)
            where TUser : IdentityUserMultiHost <TKey, TUserLogin, TUserRole, TUserClaim>, new()
            where TRole : IdentityRoleMultiHost <TKey, TUserRole>, IRoleMultiHost <TKey>, new()
            where TKey : IEquatable <TKey>
            where TUserLogin : IdentityUserLoginMultiHost <TKey>, IUserLoginMultiHost <TKey>, new()
            where TUserRole : IdentityUserRoleMultiHost <TKey>, IUserRoleMultiHost <TKey>, new()
            where TUserClaim : IdentityUserClaimMultiHost <TKey>, IUserClaimMultiHost <TKey>, new()
        {
            Contract.Requires <ArgumentNullException>(manager != null, "manager");
            Contract.Requires <ArgumentNullException>(!hostId.Equals(default(TKey)), "hostId");
            Contract.Requires <ArgumentNullException>(login != null, "login");

            return(AsyncHelper.RunSync(() => manager.FindAsync(hostId, login)));
        }
        /// <summary>
        /// Return a user with the specified username and password or null if there is no match.
        /// </summary>
        /// <typeparam name="TUser">The type of the user.</typeparam>
        /// <typeparam name="TRole">The type of the role.</typeparam>
        /// <typeparam name="TKey">The type of the key.</typeparam>
        /// <typeparam name="TUserLogin">The type of the user login.</typeparam>
        /// <typeparam name="TUserRole">The type of the user role.</typeparam>
        /// <typeparam name="TUserClaim">The type of the user claim.</typeparam>
        /// <param name="manager">The manager.</param>
        /// <param name="hostId">The host identifier.</param>
        /// <param name="userName">Name of the user.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
        public static TUser Find <TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>(this UserManagerMultiHost <TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> manager, TKey hostId, string userName, string password)
            where TUser : IdentityUserMultiHost <TKey, TUserLogin, TUserRole, TUserClaim>, new()
            where TRole : IdentityRoleMultiHost <TKey, TUserRole>, IRoleMultiHost <TKey>, new()
            where TKey : IEquatable <TKey>
            where TUserLogin : IdentityUserLoginMultiHost <TKey>, IUserLoginMultiHost <TKey>, new()
            where TUserRole : IdentityUserRoleMultiHost <TKey>, IUserRoleMultiHost <TKey>, new()
            where TUserClaim : IdentityUserClaimMultiHost <TKey>, IUserClaimMultiHost <TKey>, new()
        {
            Contract.Requires <ArgumentNullException>(manager != null, "manager");
            Contract.Requires <ArgumentNullException>(!hostId.Equals(default(TKey)), "hostId");
            Contract.Requires <ArgumentNullException>(!userName.IsNullOrWhiteSpace(), "userName");
            Contract.Requires <ArgumentNullException>(!password.IsNullOrWhiteSpace(), "password");

            return(AsyncHelper.RunSync(() => manager.FindAsync(hostId, userName, password)));
        }