public Location(string name, int population, PatriotPresence patriotPresence, BritishPresence britishPresence, FrenchPresence frenchPresence, IndianPresence indianPresence, Opposition opposition, LocationType locationType, IEnumerable <string> adjacentLocations) { Name = name; Population = population; PatriotPresence = patriotPresence; BritishPresence = britishPresence; FrenchPresence = frenchPresence; IndianPresence = indianPresence; Opposition = opposition; LocationType = locationType; AdjacentLocations = adjacentLocations; }
public static bool IsValid(Opposition opposition, out Dictionary <string, string> validationResult) { validationResult = new Dictionary <string, string>(); if (string.IsNullOrWhiteSpace(opposition.TrademarkRoleA)) { validationResult.Add("Record.TrademarkRoleA", ValidationMessages.REQUIRED); } if (string.IsNullOrWhiteSpace(opposition.TrademarkRoleD)) { validationResult.Add("Record.TrademarkRoleD", ValidationMessages.REQUIRED); } return(!validationResult.Any()); }
public ICollection <object> ParseDataMin(MySqlDataReader dataReader) { var entities = new List <object>(); while (dataReader.Read()) { var entity = new Opposition { ID = (int)dataReader["ID"], OppositionName = dataReader["OppositionName"] as string, TrademarkRoleA = dataReader["TrademarkRoleA"] as string, TrademarkRoleD = dataReader["TrademarkRoleD"] as string }; if (int.TryParse((dataReader["TrademarkNameA"] as int?)?.ToString(), out int trademarkNameA)) { if (trademarkNameA > 0) { entity.TrademarkNameA = new Trademark { ID = trademarkNameA, Name = dataReader["TrademarkNameAName"] as string, TrademarkNumber = dataReader["TrademarkNameATrademarkNumber"] as string, Office = new Office { OfficeName = dataReader["TrademarkNameAOfficeName"] as string }, BigfootGroupOwned = dataReader["TrademarkNameABigFootGroupOwned"] as string }; } } if (int.TryParse((dataReader["TrademarkNameD"] as int?)?.ToString(), out int trademarkNameD)) { if (trademarkNameD > 0) { entity.TrademarkNameD = new Trademark { ID = trademarkNameD, Name = dataReader["TrademarkNameDName"] as string, TrademarkNumber = dataReader["TrademarkNameDTrademarkNumber"] as string, Office = new Office { OfficeName = dataReader["TrademarkNameDOfficeName"] as string }, BigfootGroupOwned = dataReader["TrademarkNameDBigFootGroupOwned"] as string }; } } if (int.TryParse((dataReader["OwnerApplicantsRepresentative"] as int?)?.ToString(), out int ownerApplicantsRepresentative)) { if (ownerApplicantsRepresentative > 0) { entity.OwnerApplicantsRepresentative = new Company { ID = ownerApplicantsRepresentative, CompanyName = dataReader["OwnerApplicantsRepresentativeName"] as string }; } } if (int.TryParse((dataReader["OpponentsRepresentative"] as int?)?.ToString(), out int opponentsRepresentative)) { if (opponentsRepresentative > 0) { entity.OpponentsRepresentative = new Company { ID = opponentsRepresentative, CompanyName = dataReader["OpponentsRepresentativeName"] as string }; } } entities.Add(entity); } return(entities); }
public ICollection <object> ParseData(MySqlDataReader dataReader) { var entities = new List <object>(); while (dataReader.Read()) { var entity = new Opposition { ID = (int)dataReader["ID"], OppositionName = dataReader["OppositionName"] as string, TrademarkRoleA = dataReader["TrademarkRoleA"] as string, TrademarkRoleD = dataReader["TrademarkRoleD"] as string, ClassDescriptionsAttacking = dataReader["ClassDescriptionsAttacking"] as string, ClassDescriptionsDefending = dataReader["ClassDescriptionsDefending"] as string, OppositionStatus = dataReader["OppositionStatus"] as string, InternalCaseNumber = dataReader["InternalCaseNumber"] as string, DeletionRequest = (dataReader["DeletionRequest"] as sbyte? ?? 0) == 1, DeletionRequestReason = dataReader["DeletionRequestReason"] as string, OppositionDeadline = dataReader["OppositionDeadline"] as string, OppositionCost = dataReader["OppositionCost"] as string, CeaseAndDesistLetterPreApproval = dataReader["CeaseAndDesistLetterPreApproval"] as string, CeaseAndDesistLetterPreApprovedBy = dataReader["CeaseAndDesistLetterPreApprovedBy"] as string, CeaseAndDesistLetterPreApprovedOn = dataReader["CeaseAndDesistLetterPreApprovedOn"] as string, CeaseAndDesistLetterApproval = dataReader["CeaseAndDesistLetterApproval"] as string, CeaseAndDesistLetterApprovedBy = dataReader["CeaseAndDesistLetterApprovedBy"] as string, CeaseAndDesistLetterApprovedOn = dataReader["CeaseAndDesistLetterApprovedOn"] as string, CeaseAndDesistLetterReference = dataReader["CeaseAndDesistLetterReference"] as string, CeaseAndDesistLetterOrigin = dataReader["CeaseAndDesistLetterOrigin"] as string, CeaseAndDesistLetterSendingMethod = dataReader["CeaseAndDesistLetterSendingMethod"] as string, CeaseAndDesistLetterSentOn = dataReader["CeaseAndDesistLetterSentOn"] as string, CeaseAndDesistLetterOutcome = dataReader["CeaseAndDesistLetterOutcome"] as string, IPOOppositionApproval = dataReader["IPOOppositionApproval"] as string, IPOOppositionApprovedBy = dataReader["IPOOppositionApprovedBy"] as string, IPOOppositionApprovedOn = dataReader["IPOOppositionApprovedOn"] as string, IPOOppositionNumber = dataReader["IPOOppositionNumber"] as string, IPOOppositionLanguage = dataReader["IPOOppositionLanguage"] as string, IPOOppositionLink = dataReader["IPOOppositionLink"] as string, IPOOppositionStatus = dataReader["IPOOppositionStatus"] as string, OppositionComments = dataReader["OppositionComments"] as string }; if (int.TryParse((dataReader["TrademarkNameA"] as int?)?.ToString(), out int trademarkNameA)) { if (trademarkNameA > 0) { entity.TrademarkNameA = new Trademark { ID = trademarkNameA, Name = dataReader["TrademarkNameAName"] as string, TrademarkNumber = dataReader["TrademarkNameATrademarkNumber"] as string, Brand = new Brand { ID = (dataReader["TrademarkNameABrandID"] as int?) ?? 0, Name = dataReader["TrademarkNameABrand"] as string, Purpose = dataReader["TrademarkNameAPurpose"] as string, Value = dataReader["TrademarkNameAValue"] as string, Category = dataReader["TrademarkNameACategory"] as string, HVT = dataReader["TrademarkNameAHVT"] as string }, FilingDateValue = dataReader["TrademarkNameAFilingDate"] as string, PublicationDate = dataReader["TrademarkNameAPublicationDate"] as string, PriorityDate = dataReader["TrademarkNameAPriorityDate"] as string, //SixMonthsAnniversary = dataReader["TrademarkNameASixMonthsAnniversary"] as string, Office = new Office { ID = (dataReader["TrademarkNameAOfficeID"] as int?) ?? 0, OfficeName = dataReader["TrademarkNameAOfficeName"] as string }, BigfootGroupOwned = dataReader["TrademarkNameABigFootGroupOwned"] as string, PriorityCountryAndPriorityTMNumber = dataReader["TrademarkNameAPriorityCountry"] as string, OwnerName = dataReader["TrademarkNameAOwnerName"] as string }; } } if (int.TryParse((dataReader["TrademarkNameD"] as int?)?.ToString(), out int trademarkNameD)) { if (trademarkNameD > 0) { entity.TrademarkNameD = new Trademark { ID = trademarkNameD, Name = dataReader["TrademarkNameDName"] as string, TrademarkNumber = dataReader["TrademarkNameDTrademarkNumber"] as string, Brand = new Brand { ID = (dataReader["TrademarkNameDBrandID"] as int?) ?? 0, Name = dataReader["TrademarkNameDBrand"] as string, Purpose = dataReader["TrademarkNameDPurpose"] as string, Value = dataReader["TrademarkNameDValue"] as string, Category = dataReader["TrademarkNameDCategory"] as string, HVT = dataReader["TrademarkNameDHVT"] as string }, FilingDateValue = dataReader["TrademarkNameDFilingDate"] as string, PublicationDate = dataReader["TrademarkNameDPublicationDate"] as string, PriorityDate = dataReader["TrademarkNameDPriorityDate"] as string, //SixMonthsAnniversary = dataReader["TrademarkNameDSixMonthsAnniversary"] as string, Office = new Office { ID = (dataReader["TrademarkNameDOfficeID"] as int?) ?? 0, OfficeName = dataReader["TrademarkNameDOfficeName"] as string }, BigfootGroupOwned = dataReader["TrademarkNameDBigFootGroupOwned"] as string, PriorityCountryAndPriorityTMNumber = dataReader["TrademarkNameDPriorityCountry"] as string, OwnerName = dataReader["TrademarkNameDOwnerName"] as string }; } } if (int.TryParse((dataReader["OwnerApplicantsRepresentative"] as int?)?.ToString(), out int ownerApplicantsRepresentative)) { if (ownerApplicantsRepresentative > 0) { entity.OwnerApplicantsRepresentative = new Company { ID = ownerApplicantsRepresentative, CompanyName = dataReader["OwnerApplicantsRepresentativeName"] as string }; } } if (int.TryParse((dataReader["OpponentsRepresentative"] as int?)?.ToString(), out int opponentsRepresentative)) { if (opponentsRepresentative > 0) { entity.OpponentsRepresentative = new Company { ID = opponentsRepresentative, CompanyName = dataReader["OpponentsRepresentativeName"] as string }; } } entities.Add(entity); } return(entities); }
public bool OppositionSuperSlays(Mobile m) { return(Opposition.Any(t => t.Super.Slays(m))); }