public static IEnumerable <ReliabilityThreatPutRp> Build(SheetRowAdapter adapter) { var items = new List <ReliabilityThreatPutRp>(); for (int row = 2; row <= adapter.getRows(); row++) { var result = new ReliabilityThreatPutRp(); result.Name = adapter.get <string>(row, 1); result.Avatar = adapter.get <string>(row, 2); result.Reference = adapter.get <string>(row, 3); result.Description = adapter.get <string>(row, 4); result.Tags = adapter.get <string>(row, 5); result.ETTD = adapter.get <int>(row, 6); result.ETTE = adapter.get <int>(row, 7); result.ETTF = adapter.get <int>(row, 8); result.UserImpact = adapter.get <decimal>(row, 9); result.ETTFail = adapter.get <int>(row, 10); items.Add(result); } return(items); }
public static List <SecurityThreatPutRp> Build(SheetRowAdapter adapter) { var items = new List <SecurityThreatPutRp>(); for (int row = 2; row <= adapter.getRows(); row++) { var result = new SecurityThreatPutRp(); result.Name = adapter.get <string>(row, 1); result.Avatar = adapter.get <string>(row, 2); result.Description = adapter.get <string>(row, 3); result.Reference = adapter.get <string>(row, 4); result.Tags = adapter.get <string>(row, 5); result.AgentSkillLevel = adapter.get <int>(row, 6); result.Motive = adapter.get <int>(row, 7); result.Opportunity = adapter.get <int>(row, 8); result.Size = adapter.get <int>(row, 9); result.EasyDiscovery = adapter.get <int>(row, 10); result.EasyExploit = adapter.get <int>(row, 11); result.Awareness = adapter.get <int>(row, 12); result.IntrusionDetection = adapter.get <int>(row, 13); result.LossConfidentiality = adapter.get <int>(row, 14); result.LossIntegrity = adapter.get <int>(row, 15); result.LossAvailability = adapter.get <int>(row, 16); result.LossAccountability = adapter.get <int>(row, 17); result.FinancialDamage = adapter.get <int>(row, 18); result.ReputationDamage = adapter.get <int>(row, 19); result.NonCompliance = adapter.get <int>(row, 20); result.PrivacyViolation = adapter.get <int>(row, 21); items.Add(result); } return(items); }
public static IEnumerable <(ReliabilityRiskPostRp, ReliabilityRiskPutRp)> Build(SheetRowAdapter adapter, IEnumerable <SourceEntity> sources) { var items = new List <(ReliabilityRiskPostRp, ReliabilityRiskPutRp)>(); for (int row = 2; row <= adapter.getRows(); row++) { var result = new ReliabilityRiskPutRp(); result.Name = adapter.get <string>(row, 1); result.Avatar = adapter.get <string>(row, 2); result.Reference = adapter.get <string>(row, 3); result.Description = adapter.get <string>(row, 4); result.Tags = adapter.get <string>(row, 5); result.ETTD = adapter.get <int>(row, 6); result.ETTE = adapter.get <int>(row, 7); result.ETTF = adapter.get <int>(row, 8); result.UserImpact = adapter.get <decimal>(row, 9); result.ETTFail = adapter.get <int>(row, 10); var organization = adapter.get <string>(row, 11); var product = adapter.get <string>(row, 12); var source = adapter.get <string>(row, 13); var created = new ReliabilityRiskPostRp() { Name = result.Name }; created.SourceId = sources.Where(c => c.Name == source && c.Product.Name == product && c.Product.Customer.Name == organization).Single().Id.Value; items.Add((created, result)); } return(items); }
public static List <(SecurityRiskPost, SecurityRiskPut)> Build(SheetRowAdapter adapter, IEnumerable <SourceEntity> sources) { var items = new List <(SecurityRiskPost, SecurityRiskPut)>(); for (int row = 2; row <= adapter.getRows(); row++) { var result = new SecurityRiskPut() { Name = adapter.get <string>(row, 1), Avatar = adapter.get <string>(row, 2), Description = adapter.get <string>(row, 3), Reference = adapter.get <string>(row, 4), Tags = adapter.get <string>(row, 5), AgentSkillLevel = adapter.get <int>(row, 6), Motive = adapter.get <int>(row, 7), Opportunity = adapter.get <int>(row, 8), Size = adapter.get <int>(row, 9), EasyDiscovery = adapter.get <int>(row, 10), EasyExploit = adapter.get <int>(row, 11), Awareness = adapter.get <int>(row, 12), IntrusionDetection = adapter.get <int>(row, 13), LossConfidentiality = adapter.get <int>(row, 14), LossIntegrity = adapter.get <int>(row, 15), LossAvailability = adapter.get <int>(row, 16), LossAccountability = adapter.get <int>(row, 17), FinancialDamage = adapter.get <int>(row, 18), ReputationDamage = adapter.get <int>(row, 19), NonCompliance = adapter.get <int>(row, 20), PrivacyViolation = adapter.get <int>(row, 21) }; var created = new SecurityRiskPost(); created.Name = result.Name; var organization = adapter.get <string>(row, 22); var product = adapter.get <string>(row, 23); var source = adapter.get <string>(row, 24); created.SourceId = sources.Where(c => c.Name == source && c.Product.Name == product && c.Product.Customer.Name == organization).Single().Id.Value; items.Add((created, result)); } return(items); }