public ShopgunAppWebService() { _certificationMarkDomainService = Container.Resolve<ICertificationMarkDomainService>(); _shopgunWebOperationContext = Container.Resolve<IShopgunWebOperationContext>(); _statisticsDomainService = Container.Resolve<IStatisticsDomainService>(); _adviceSearchApplicationService = Container.Resolve<IAdviceSearchApplicationService>(); _membershipProviderApplicationService = Container.Resolve<IMembershipProviderApplicationService>(); }
public RoleProviderApplicationService(IRepository<Role> roleRepository, IRepository<UsersInRole> usersInRolesrepository) { _roleRepository = roleRepository; _usersInRoleRepository = usersInRolesrepository; IContainer container = _configuration.Container; _membershipProviderApplicationService = container.Resolve<IMembershipProviderApplicationService>(); }
public ShopgunAppWebService() { _certificationMarkDomainService = Container.Resolve <ICertificationMarkDomainService>(); _shopgunWebOperationContext = Container.Resolve <IShopgunWebOperationContext>(); _statisticsDomainService = Container.Resolve <IStatisticsDomainService>(); _adviceSearchApplicationService = Container.Resolve <IAdviceSearchApplicationService>(); _membershipProviderApplicationService = Container.Resolve <IMembershipProviderApplicationService>(); }
public RoleProviderApplicationService(IRepository <Role> roleRepository, IRepository <UsersInRole> usersInRolesrepository) { _roleRepository = roleRepository; _usersInRoleRepository = usersInRolesrepository; IContainer container = _configuration.Container; _membershipProviderApplicationService = container.Resolve <IMembershipProviderApplicationService>(); }
/// <summary> /// Provider.ProviderBase Initialize Method. /// </summary> /// <param name="name"></param> /// <param name="config"></param> public override void Initialize(string name, NameValueCollection config) { IContainer container = _configuration.Container; _roleProviderApplicationService = container.Resolve <IRoleProviderApplicationService>(); _membershipProviderApplicationService = container.Resolve <IMembershipProviderApplicationService>(); // // Initialize values from web.config. // if (config == null) { throw new ArgumentNullException("config"); } if (string.IsNullOrEmpty(name)) { name = "ShopgunRoleprovider"; } if (String.IsNullOrEmpty(config["description"])) { config.Remove("description"); config.Add("description", "Shopgun Role provider"); } // Initialize the abstract base class. base.Initialize(name, config); if (config["applicationName"] == null || config["applicationName"].Trim() == "") { _applicationName = System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath; } else { _applicationName = config["applicationName"]; } if (config["writeExceptionsToEventLog"] == null) { return; } if (config["writeExceptionsToEventLog"].ToUpper() == "TRUE") { _pWriteExceptionsToEventLog = true; } }
/// <summary> /// Provider.ProviderBase Initialize Method. /// </summary> /// <param name="name"></param> /// <param name="config"></param> public override void Initialize(string name, NameValueCollection config) { IContainer container = _configuration.Container; _roleProviderApplicationService = container.Resolve<IRoleProviderApplicationService>(); _membershipProviderApplicationService = container.Resolve<IMembershipProviderApplicationService>(); // // Initialize values from web.config. // if (config == null) throw new ArgumentNullException("config"); if (string.IsNullOrEmpty(name)) name = "ShopgunRoleprovider"; if (String.IsNullOrEmpty(config["description"])) { config.Remove("description"); config.Add("description", "Shopgun Role provider"); } // Initialize the abstract base class. base.Initialize(name, config); if (config["applicationName"] == null || config["applicationName"].Trim() == "") { _applicationName = System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath; } else { _applicationName = config["applicationName"]; } if (config["writeExceptionsToEventLog"] == null) return; if (config["writeExceptionsToEventLog"].ToUpper() == "TRUE") { _pWriteExceptionsToEventLog = true; } }
public ShopgunMembershipWebService(IMembershipProviderApplicationService membershipProviderApplicationService) { _membershipProviderApplicationService = membershipProviderApplicationService; }
public ShopgunMembershipWebService() { _membershipProviderApplicationService = Container.Resolve <IMembershipProviderApplicationService>(); }
public UserController(IMembershipProviderApplicationService membershipProviderApplicationService, IMentorApplicationService mentorApplicationService, IRoleProviderApplicationService roleProviderApplicationService) { _membershipProviderApplicationService = membershipProviderApplicationService; _roleProviderApplicationService = roleProviderApplicationService; _mentorApplicationService = mentorApplicationService; }
/// <summary> /// System.Configuration.Provider.ProviderBase.Initialize Method /// </summary> /// <param name="name"></param> /// <param name="config"></param> public override void Initialize(string name, NameValueCollection config) { _encryptionKeyData = HexToByte(EncryptionKey); _ivKeyData = HexToByte(Ivkey); IContainer container = _configuration.Container; _membershipProviderApplicationService = container.Resolve <IMembershipProviderApplicationService>(); // // Initialize values from web.config. // if (config == null) { throw new ArgumentNullException("config"); } if (name == null || name.Length == 0) { name = "ShopgunMembershipProvider"; } if (String.IsNullOrEmpty(config["description"])) { config.Remove("description"); config.Add("description", "Shopgun Membership provider"); } // Initialize the abstract base class. base.Initialize(name, config); m_ApplicationName = GetConfigValue(config["applicationName"], System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); m_MaxInvalidPasswordAttempts = Convert.ToInt32(GetConfigValue(config["maxInvalidPasswordAttempts"], "5")); m_PasswordAttemptWindow = Convert.ToInt32(GetConfigValue(config["passwordAttemptWindow"], "10")); m_MinRequiredNonAlphanumericCharacters = Convert.ToInt32(GetConfigValue(config["minRequiredNonAlphanumericCharacters"], "1")); m_MinRequiredPasswordLength = Convert.ToInt32(GetConfigValue(config["minRequiredPasswordLength"], "7")); m_PasswordStrengthRegularExpression = Convert.ToString(GetConfigValue(config["passwordStrengthRegularExpression"], "")); m_EnablePasswordReset = Convert.ToBoolean(GetConfigValue(config["enablePasswordReset"], "true")); m_EnablePasswordRetrieval = Convert.ToBoolean(GetConfigValue(config["enablePasswordRetrieval"], "true")); m_RequiresQuestionAndAnswer = Convert.ToBoolean(GetConfigValue(config["requiresQuestionAndAnswer"], "false")); m_RequiresUniqueEmail = Convert.ToBoolean(GetConfigValue(config["requiresUniqueEmail"], "true")); _writeExceptionsToEventLog = Convert.ToBoolean(GetConfigValue(config["writeExceptionsToEventLog"], "true")); string tempFormat = config["passwordFormat"]; if (tempFormat == null) { tempFormat = "Hashed"; } switch (tempFormat) { case "Hashed": m_PasswordFormat = MembershipPasswordFormat.Hashed; break; case "Encrypted": m_PasswordFormat = MembershipPasswordFormat.Encrypted; break; case "Clear": m_PasswordFormat = MembershipPasswordFormat.Clear; break; default: throw new ProviderException("Password format not supported."); } }
public ShopgunMembershipWebService() { _membershipProviderApplicationService = Container.Resolve<IMembershipProviderApplicationService>(); }
/// <summary> /// System.Configuration.Provider.ProviderBase.Initialize Method /// </summary> /// <param name="name"></param> /// <param name="config"></param> public override void Initialize(string name, NameValueCollection config) { _encryptionKeyData = HexToByte(EncryptionKey); _ivKeyData = HexToByte(Ivkey); IContainer container = _configuration.Container; _membershipProviderApplicationService = container.Resolve<IMembershipProviderApplicationService>(); // // Initialize values from web.config. // if (config == null) throw new ArgumentNullException("config"); if (name == null || name.Length == 0) name = "ShopgunMembershipProvider"; if (String.IsNullOrEmpty(config["description"])) { config.Remove("description"); config.Add("description", "Shopgun Membership provider"); } // Initialize the abstract base class. base.Initialize(name, config); m_ApplicationName = GetConfigValue(config["applicationName"], System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); m_MaxInvalidPasswordAttempts = Convert.ToInt32(GetConfigValue(config["maxInvalidPasswordAttempts"], "5")); m_PasswordAttemptWindow = Convert.ToInt32(GetConfigValue(config["passwordAttemptWindow"], "10")); m_MinRequiredNonAlphanumericCharacters = Convert.ToInt32(GetConfigValue(config["minRequiredNonAlphanumericCharacters"], "1")); m_MinRequiredPasswordLength = Convert.ToInt32(GetConfigValue(config["minRequiredPasswordLength"], "7")); m_PasswordStrengthRegularExpression = Convert.ToString(GetConfigValue(config["passwordStrengthRegularExpression"], "")); m_EnablePasswordReset = Convert.ToBoolean(GetConfigValue(config["enablePasswordReset"], "true")); m_EnablePasswordRetrieval = Convert.ToBoolean(GetConfigValue(config["enablePasswordRetrieval"], "true")); m_RequiresQuestionAndAnswer = Convert.ToBoolean(GetConfigValue(config["requiresQuestionAndAnswer"], "false")); m_RequiresUniqueEmail = Convert.ToBoolean(GetConfigValue(config["requiresUniqueEmail"], "true")); _writeExceptionsToEventLog = Convert.ToBoolean(GetConfigValue(config["writeExceptionsToEventLog"], "true")); string tempFormat = config["passwordFormat"]; if (tempFormat == null) { tempFormat = "Hashed"; } switch (tempFormat) { case "Hashed": m_PasswordFormat = MembershipPasswordFormat.Hashed; break; case "Encrypted": m_PasswordFormat = MembershipPasswordFormat.Encrypted; break; case "Clear": m_PasswordFormat = MembershipPasswordFormat.Clear; break; default: throw new ProviderException("Password format not supported."); } }