示例#1
0
        private static IEnumerable <KeyValuePair <string, object> > MapParameters(DomDatProIpSpfRecord 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>("ip", record.Ip));

            yield return(KeyValuePair.Create <string, object>("spf_domain", record.SpfDomain));

            yield return(KeyValuePair.Create <string, object>("spf_pass", record.SpfPass));

            yield return(KeyValuePair.Create <string, object>("spf_fail", record.SpfFail));
        }
示例#2
0
 private long TallyAllCounts(DomDatProIpSpfRecord record)
 {
     return(record.SpfPass + record.SpfFail);
 }
示例#3
0
 public static DomDatProIpSpfRecord CloneWithDifferentProvider(this DomDatProIpSpfRecord record,
                                                               string provider)
 {
     return(new DomDatProIpSpfRecord(record.Id, record.Domain, record.Date,
                                     provider, record.Ip, record.SpfDomain, record.SpfPass, record.SpfFail));
 }