private static IEnumerable <KeyValuePair <string, object> > MapParameters(DomainDateProviderSubdomainRecord record)
        {
            yield return(KeyValuePair.Create <string, object>("domain", record.Domain));

            yield return(KeyValuePair.Create <string, object>("date", record.Date.ToString("yyyy-MM-dd")));

            yield return(KeyValuePair.Create <string, object>("provider", record.Provider));

            yield return(KeyValuePair.Create <string, object>("subdomain", record.Subdomain));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_pass_none", record.SpfPassDkimPassNone));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_fail_none", record.SpfPassDkimFailNone));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_pass_none", record.SpfFailDkimPassNone));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_fail_none", record.SpfFailDkimFailNone));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_pass_quarantine", record.SpfPassDkimPassQuarantine));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_fail_quarantine", record.SpfPassDkimFailQuarantine));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_pass_quarantine", record.SpfFailDkimPassQuarantine));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_fail_quarantine", record.SpfFailDkimFailQuarantine));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_pass_reject", record.SpfPassDkimPassReject));

            yield return(KeyValuePair.Create <string, object>("spf_pass_dkim_fail_reject", record.SpfPassDkimFailReject));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_pass_reject", record.SpfFailDkimPassReject));

            yield return(KeyValuePair.Create <string, object>("spf_fail_dkim_fail_reject", record.SpfFailDkimFailReject));
        }
예제 #2
0
 public static DomainDateProviderSubdomainRecord CloneWithDifferentProvider(this DomainDateProviderSubdomainRecord record,
                                                                            string provider)
 {
     return(new DomainDateProviderSubdomainRecord(record.Id, record.Domain, record.Date,
                                                  provider, record.Subdomain, record.SpfPassDkimPassNone,
                                                  record.SpfPassDkimFailNone, record.SpfFailDkimPassNone, record.SpfFailDkimFailNone,
                                                  record.SpfPassDkimPassQuarantine, record.SpfPassDkimFailQuarantine, record.SpfFailDkimPassQuarantine,
                                                  record.SpfFailDkimFailQuarantine, record.SpfPassDkimPassReject, record.SpfPassDkimFailReject,
                                                  record.SpfFailDkimPassReject, record.SpfFailDkimFailReject));
 }
 private long TallyAllCounts(DomainDateProviderSubdomainRecord record)
 {
     return(record.SpfPassDkimPassNone + record.SpfPassDkimFailNone + record.SpfFailDkimPassNone + record.SpfFailDkimFailNone +
            record.SpfPassDkimPassQuarantine + record.SpfPassDkimFailQuarantine + record.SpfFailDkimPassQuarantine + record.SpfFailDkimFailQuarantine +
            record.SpfPassDkimPassReject + record.SpfPassDkimFailReject + record.SpfFailDkimPassReject + record.SpfFailDkimFailReject);
 }