public static WebSecurityAddInCollection CreateWebSecurityAddInCollection(WebSecurityAddInData addIns, StateBag viewStateContext, string languageCode)
 {
     WebSecurityAddInCollection ins = new WebSecurityAddInCollection();
     foreach (WebSecurityAddInData.WebSecurityAddInsRow row in addIns.WebSecurityAddIns)
     {
         ins.Add(Create(row, viewStateContext, languageCode));
     }
     return ins;
 }
示例#2
0
        public static WebSecurityAddInCollection CreateWebSecurityAddInCollection(WebSecurityAddInData addIns, StateBag viewStateContext, string languageCode)
        {
            WebSecurityAddInCollection ins = new WebSecurityAddInCollection();

            foreach (WebSecurityAddInData.WebSecurityAddInsRow row in addIns.WebSecurityAddIns)
            {
                ins.Add(Create(row, viewStateContext, languageCode));
            }
            return(ins);
        }
 /// <summary>
 /// Get the security addins that where setup for this survey
 /// and retrieve create their type instance from the security factory
 /// </summary>
 protected virtual void InitSecurityAddIns()
 {
     this._securityAddIns = WebSecurityAddInFactory.CreateWebSecurityAddInCollection(new SecurityAddIns().GetEnabledWebSecurityAddIns(this.SurveyId), this.ViewState, this.LanguageCode);
     for (int i = 0; i < this._securityAddIns.Count; i++)
     {
         this._securityAddIns[i].UserAuthenticated += new UserAuthenticatedEventHandler(this.OnUserAuthenticated);
     }
 }
 /// <summary>
 /// Unloads the available security addins and allow them
 /// to make some operations after the voter and its answers
 /// has been stored in the database
 /// </summary>
 protected virtual void UnLoadSecurityAddIns(VoterAnswersData voterData)
 {
     this._securityAddIns = WebSecurityAddInFactory.CreateWebSecurityAddInCollection(new SecurityAddIns().GetEnabledWebSecurityAddIns(this.SurveyId), this.ViewState, this.LanguageCode);
     for (int i = 0; i < this._securityAddIns.Count; i++)
     {
         this._securityAddIns[i].ProcessVoterData(voterData);
     }
 }