예제 #1
0
        public IEnumerable <Claim> ToClaims()
        {
            if (!string.IsNullOrWhiteSpace(DisplayName))
            {
                yield return(new Claim(SquidexClaimTypes.DisplayName, DisplayName));
            }

            if (!string.IsNullOrWhiteSpace(PictureUrl))
            {
                yield return(new Claim(SquidexClaimTypes.PictureUrl, PictureUrl));
            }

            if (Hidden.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.Hidden, Hidden.ToString()));
            }

            if (Consent.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.Consent, Consent.ToString()));
            }

            if (ConsentForEmails.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.ConsentForEmails, ConsentForEmails.ToString()));
            }

            if (Permissions != null)
            {
                foreach (var permission in Permissions)
                {
                    yield return(new Claim(SquidexClaimTypes.Permissions, permission.Id));
                }
            }
        }
예제 #2
0
        private IEnumerable <Claim> ToClaimsCore(bool initial)
        {
            if (!string.IsNullOrWhiteSpace(DisplayName))
            {
                yield return(new Claim(SquidexClaimTypes.DisplayName, DisplayName));
            }

            if (!string.IsNullOrWhiteSpace(PictureUrl))
            {
                yield return(new Claim(SquidexClaimTypes.PictureUrl, PictureUrl));
            }

            if (Hidden.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.Hidden, Hidden.ToString()));
            }

            if (Invited.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.Invited, Invited.ToString()));
            }

            if (Consent.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.Consent, Consent.ToString()));
            }

            if (ConsentForEmails.HasValue)
            {
                yield return(new Claim(SquidexClaimTypes.ConsentForEmails, ConsentForEmails.ToString()));
            }

            if (Permissions != null)
            {
                if (!initial)
                {
                    yield return(new Claim(SquidexClaimTypes.Permissions, string.Empty));
                }

                foreach (var permission in Permissions)
                {
                    yield return(new Claim(SquidexClaimTypes.Permissions, permission.Id));
                }
            }
        }
예제 #3
0
 public string ToString(string delimiter)
 {
     return(StartDate.ToString() + delimiter + EndDate.ToString() + delimiter + Status.ToString() + delimiter + Progress.ToString() + delimiter + Duration.ToString() + delimiter + Finished.ToString() + delimiter + RecordedDate.ToString() + delimiter + ResponseId.ToString() + delimiter + DistributionChannel.ToString() + delimiter + UserLanguage.ToString() + delimiter + TimePISFirstClick.ToString() + delimiter + TimePISLastClick.ToString() + delimiter + TimePISPageSubmit.ToString() + delimiter + TimePISClickCount.ToString() + delimiter + TimeConsentFirstClick.ToString() + delimiter + TimeConsentLastClick.ToString() + delimiter + TimeConsentPageSubmit.ToString() + delimiter + TimeConsentClickCount.ToString() + delimiter + Consent.ToString() + delimiter + ConsentMistake.ToString() + delimiter + Q177FirstClick.ToString() + delimiter + Q177LastClick.ToString() + delimiter + Q177PageSubmit.ToString() + delimiter + Q177ClickCount.ToString() + delimiter + ProlificId.ToString() + delimiter + TimeContext1FirstClick.ToString() + delimiter + TimeContext1LastClick.ToString() + delimiter + TimeContext1PageSubmit.ToString() + delimiter + TimeContext1ClickCount.ToString() + delimiter + TimeContext2FirstClick.ToString() + delimiter + TimeContext2LastClick.ToString() + delimiter + TimeContext2PageSubmit.ToString() + delimiter + TimeContext2ClickCount.ToString() + delimiter + TimeContext3FirstClick.ToString() + delimiter + TimeContext3LastClick.ToString() + delimiter + TimeContext3PageSubmit.ToString() + delimiter + TimeContext3ClickCount.ToString() + delimiter + TimeControlReportFirstClick.ToString() + delimiter + TimeControlReportLastClick.ToString() + delimiter + TimeControlReportPageSubmit.ToString() + delimiter + TimeControlReportClickCount.ToString() + delimiter + TimeUcdReportP1FirstClick.ToString() + delimiter + TimeUcdReportP1LastClick.ToString() + delimiter + TimeUcdReportP1PageSubmit.ToString() + delimiter + TimeUcdReportP1ClickCount.ToString() + delimiter + TimeUcdReportP2FirstClick.ToString() + delimiter + TimeUcdReportP2LastClick.ToString() + delimiter + TimeUcdReportP2PageSubmit.ToString() + delimiter + TimeUcdReportP2ClickCount.ToString() + delimiter + TimeS1FirstClick.ToString() + delimiter + TimeS1LastClick.ToString() + delimiter + TimeS1PageSubmit.ToString() + delimiter + TimeS1ClickCount.ToString() + delimiter + SubjUnderstanding.ToString() + delimiter + SubjClarity.ToString() + delimiter + SubjTrusted.ToString() + delimiter + TimeS2FirstClick.ToString() + delimiter + TimeS2LastClick.ToString() + delimiter + TimeS2PageSubmit.ToString() + delimiter + TimeS2ClickCount.ToString() + delimiter + SubjNext1.ToString() + delimiter + SubjNext3.ToString() + delimiter + SubjNext2.ToString() + delimiter + SubjNext4.ToString() + delimiter + SubjNext5.ToString() + delimiter + TimeOcStatusFirstClick.ToString() + delimiter + TimeOcStatusLastClick.ToString() + delimiter + TimeOcStatusPageSubmit.ToString() + delimiter + TimeOcStatusClickCount.ToString() + delimiter + OcStatusVerbal.ToString() + delimiter + OcStatusProb.ToString() + delimiter + OcStatusSlider1.ToString() + delimiter + TimeOcChildFirstClick.ToString() + delimiter + TimeOcChildLastClick.ToString() + delimiter + TimeOcChildPageSubmit.ToString() + delimiter + TimeOcChildClickCount.ToString() + delimiter + OcChildVerbal.ToString() + delimiter + OcChildProb.ToString() + delimiter + OcChildSlider1.ToString() + delimiter + TimeOcCompareFirstClick.ToString() + delimiter + TimeOcCompareLastClick.ToString() + delimiter + TimeOcComparePageSubmit.ToString() + delimiter + TimeOcCompareClickCount.ToString() + delimiter + ObjcompCompare.ToString() + delimiter + TimeOcHardFirstClick.ToString() + delimiter + TimeOcHardLastClick.ToString() + delimiter + TimeOcHardPageSubmit.ToString() + delimiter + TimeOcHardClickCount.ToString() + delimiter + Objcomp1000Hard.ToString() + delimiter + Objcomp800Hard.ToString() + delimiter + TimeSch1FirstClick.ToString() + delimiter + TimeSch1LastClick.ToString() + delimiter + TimeSch1PageSubmit.ToString() + delimiter + TimeSch1ClickCount.ToString() + delimiter + Scheuner1.ToString() + delimiter + Scheuner2.ToString() + delimiter + Scheuner3.ToString() + delimiter + TimeSch2FirstClick.ToString() + delimiter + TimeSch2LastClick.ToString() + delimiter + TimeSch2PageSubmit.ToString() + delimiter + TimeSch2ClickCount.ToString() + delimiter + Scheuner4.ToString() + delimiter + Scheuner5.ToString() + delimiter + Scheuner6.ToString() + delimiter + Scheuner7.ToString() + delimiter + Scheuner8.ToString() + delimiter + TimeSch3FirstClick.ToString() + delimiter + TimeSch3LastClick.ToString() + delimiter + TimeSch3PageSubmit.ToString() + delimiter + TimeSch3ClickCount.ToString() + delimiter + Scheuner9.ToString() + delimiter + Scheuner10.ToString() + delimiter + Scheuner11.ToString() + delimiter + Scheuner12.ToString() + delimiter + Scheuner13.ToString() + delimiter + TimeSch4FirstClick.ToString() + delimiter + TimeSch4LastClick.ToString() + delimiter + TimeSch4PageSubmit.ToString() + delimiter + TimeSch4ClickCount.ToString() + delimiter + Scheuner14.ToString() + delimiter + Scheuner15.ToString() + delimiter + Scheuner16.ToString() + delimiter + Scheuner17.ToString() + delimiter + Scheuner18.ToString() + delimiter + TimeLimitationsFirstClick.ToString() + delimiter + TimeLimitationsLastClick.ToString() + delimiter + TimeLimitationsPageSubmit.ToString() + delimiter + TimeLimitationsClickCount.ToString() + delimiter + Limitations.ToString() + delimiter + TimeNoticedFirstClick.ToString() + delimiter + TimeNoticedLastClick.ToString() + delimiter + TimeNoticedPageSubmit.ToString() + delimiter + TimeNoticedClickCount.ToString() + delimiter + ResultNoticed.ToString() + delimiter + ResultUnderstood.ToString() + delimiter + TimeSnumeracyFirstClick.ToString() + delimiter + TimeSnumeracyLastClick.ToString() + delimiter + TimeSnumeracyPageSubmit.ToString() + delimiter + TimeSnumeracyClickCount.ToString() + delimiter + SNumeracy1.ToString() + delimiter + SNumeracy2.ToString() + delimiter + SNumeracy3.ToString() + delimiter + SNumeracy4.ToString() + delimiter + SNumeracy5.ToString() + delimiter + SNumeracy6.ToString() + delimiter + SNumeracy7.ToString() + delimiter + SNumeracy8.ToString() + delimiter + TimePriorexp1FirstClick.ToString() + delimiter + TimePriorexp1LastClick.ToString() + delimiter + TimePriorexp1PageSubmit.ToString() + delimiter + TimePriorexp1ClickCount.ToString() + delimiter + CFExperience.ToString() + delimiter + CFExperienceDetail.ToString() + delimiter + TimePriorexp2FirstClick.ToString() + delimiter + TimePriorexp2LastClick.ToString() + delimiter + TimePriorexp2PageSubmit.ToString() + delimiter + TimePriorexp2ClickCount.ToString() + delimiter + TimeDemo1FirstClick.ToString() + delimiter + TimeDemo1LastClick.ToString() + delimiter + TimeDemo1PageSubmit.ToString() + delimiter + TimeDemo1ClickCount.ToString() + delimiter + Age.ToString() + delimiter + Gender.ToString() + delimiter + GenderOther.ToString() + delimiter + CombinedIncome.ToString() + delimiter + AdultsInHouse.ToString() + delimiter + ChildrenInHouse.ToString() + delimiter + Education.ToString() + delimiter + TimeDemo2FirstClick.ToString() + delimiter + TimeDemo2LastClick.ToString() + delimiter + TimeDemo2PageSubmit.ToString() + delimiter + TimeDemo2ClickCount.ToString() + delimiter + Comments.ToString() + delimiter + Design.ToString() + delimiter + TestResult.ToString() + delimiter + OCStatusAbsoluteTime.ToString() + delimiter + OCChildAbsoluteTime.ToString() + delimiter + OCCompareAbsoluteTime.ToString());
 }