当前位置: 首页>>代码示例>>C#>>正文


C# GenderType类代码示例

本文整理汇总了C#中GenderType的典型用法代码示例。如果您正苦于以下问题:C# GenderType类的具体用法?C# GenderType怎么用?C# GenderType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GenderType类属于命名空间,在下文中一共展示了GenderType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Product

 protected Product(string name, string brand, decimal price, GenderType genderType)
 {
     this.Name = name;
     this.Brand = brand;
     this.Gender = genderType;
     this.Price = price;
 }
开发者ID:eslavov11,项目名称:SoftUni-Homework,代码行数:7,代码来源:Product.cs

示例2: Driver

 public Driver(string name, GenderType gender)
 {
     this.id = DataGenerator.GenerateId();
     this.Name = name;
     this.Gender = gender;
     this.vehicles = new List<IMotorVehicle>();
 }
开发者ID:Petko-Petkov,项目名称:Telerik,代码行数:7,代码来源:Driver.cs

示例3: CreateRawCompetitor

        private static List<RawCompetitor> CreateRawCompetitor(string[] names, List<RawCompetitor> competitorsRaw, BrokerType brokerType, LanguageType languageType, SportType sportType, GenderType genderType)
        {
            var existNames = competitorsRaw.Select(cr => cr.Name).ToList();
            names = names
                .Where(name => !existNames.Contains(name))
                .ToArray();
            if (names.Any()) {
                var lastCompetitorUniqueID = competitorsRaw.Any()
                    ? competitorsRaw.First().CompetitoruniqueID
                    : default(int);
                var raw = competitorsRaw;
                names
                    .Where(name => !raw.Any(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)))
                    .Each(name => {
                        RawCompetitor competitorRaw = null;
                        try {
                            competitorRaw = BrokerEntityIfaceCreator.CreateEntity<RawCompetitor>(brokerType, languageType, sportType, genderType, LinkEntityStatus.Unlinked, new[] { name },
                                competitor => {
                                    if (lastCompetitorUniqueID != default(int)) {
                                        competitor.CompetitoruniqueID = lastCompetitorUniqueID;
                                        competitor.Linkstatus = LinkEntityStatus.LinkByStatistics | LinkEntityStatus.Linked;
                                    }
                                });
                            competitorRaw.Save();
                            raw.Add(competitorRaw);
                        } catch (Exception ex) {
                            _logger.Error("{0}\r\n{1}", competitorRaw?.ToString(), ex);
                            throw;
                        }
                    });
            }

            return competitorsRaw;
        }
开发者ID:dnmsk,项目名称:rProject,代码行数:34,代码来源:RawCompetitorHelper.cs

示例4: Toothpaste

        public Toothpaste(string name, string brand, decimal price, GenderType gender, IList<string> ingredients)
            : base(name, brand, price, gender)
        {
            this.IngredientsList = ingredients;

            this.Ingredients = string.Join(", ", this.IngredientsList);
        }
开发者ID:AndrewMitev,项目名称:Telerik-Academy,代码行数:7,代码来源:Toothpaste.cs

示例5: Shampoo

 public Shampoo(string name, string brand, decimal price, GenderType gender, uint milliliters, UsageType usage)
     : base(name, brand, price, gender)
 {
     this.Milliliters = milliliters;
     this.Usage = usage;
     this.Price *= this.Milliliters;
 }
开发者ID:damy90,项目名称:Telerik-all,代码行数:7,代码来源:Shampoo.cs

示例6: User

 public User(string name, string password)
 {
     this.name = name;
     this.password = password;
     this.sex = GenderType.MALE;
     this.chars = new Dictionary<byte, List<uint>>();
 }
开发者ID:Willyham,项目名称:SagaRO2,代码行数:7,代码来源:User.cs

示例7: Product

 protected Product(string name, string brand, decimal price, GenderType gender)
 {
     Name = name;
     Brand = brand;
     Price = price;
     Gender = gender;
 }
开发者ID:zlatkovtv,项目名称:SoftUni_OOP,代码行数:7,代码来源:Product.cs

示例8: GetRawCompetitorInt

 private static List<RawCompetitor> GetRawCompetitorInt(BrokerType brokerType, LanguageType languageType, SportType sportType, GenderType genderType, string[] names)
 {
     if (genderType == GenderType.Unknown) {
         _logger.Error("{0}: {1}", names.StrJoin(", "), genderType);
     }
     var competitorsRaw = RawCompetitor.DataSource.FilterByLanguage(languageType).FilterBySportType(sportType).FilterByBroker(brokerType)
                                         .FilterByNameCompetitor(names)
                                         .FilterByGender(genderType,
                 RawCompetitor.Fields.CompetitoruniqueID,
                 RawCompetitor.Fields.Name,
                 RawCompetitor.Fields.Linkstatus);
     if (competitorsRaw.Count > 1) {
         var groupBy = competitorsRaw.Where(c => c.CompetitoruniqueID != default(int)).GroupBy(c => c.CompetitoruniqueID).ToArray();
         if (groupBy.Length > 1) {
             _logger.Error("{0} {1} {2} {3} {4} <=> {5}", brokerType, sportType, genderType,
                 competitorsRaw.Select(cr => cr.ID).StrJoin(", "), names.StrJoin(", "), groupBy.Select(g => g.Select(ge => ge.Name).StrJoin(", ")).StrJoin(" | "));
             return groupBy.First().ToList();
         }
         if (groupBy.Length == 1) {
             foreach (var rawCompetitor in competitorsRaw.Where(cr => cr.CompetitoruniqueID == default(int))) {
                 rawCompetitor.CompetitoruniqueID = groupBy[0].Key;
                 rawCompetitor.Save();
             }
         }
     }
     return CreateRawCompetitor(names, competitorsRaw, brokerType, languageType, sportType, genderType);
 }
开发者ID:dnmsk,项目名称:rProject,代码行数:27,代码来源:RawCompetitorHelper.cs

示例9: Honorific

 public Honorific(string name, string abbreviation, GenderType genderType, HonorificType type)
 {
     Name = name;
       Abbreviation = abbreviation;
       GenderType = genderType;
       Type = type;
 }
开发者ID:NotYours180,项目名称:Fluky,代码行数:7,代码来源:Honorific.cs

示例10: Employee

 public Employee(string employeeID,
     string firstName,
     string middleName,
     string lastName,
     string jobTitle,
     GenderType gender,
     MaritalStatusType maritalStatus,
     DateTime birthDate,
     DateTime hireDate,
     string homePone,
     string workPhone,
     decimal salary,
     Department department)
     : base()
 {
     this.EmployeeID = employeeID;
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Gender = gender;
     this.MaritalStatus = maritalStatus;
     this.JobTitle = jobTitle;
     this.BirthDate = birthDate;
     this.HireDate = hireDate;
     this.HomePhone = homePone;
     this.WorkPhone = workPhone;
     this.Salary = salary;
     this.Department = department;
 }
开发者ID:reshadn,项目名称:AcademicProgrammingProjects,代码行数:28,代码来源:Employee.cs

示例11: Driver

 public Driver(string name, GenderType gender)
     : base()
 {
     this.name = name;
     this.gender = gender;
     this.vehicles = new List<IMotorVehicle>();
 }
开发者ID:thrusanova,项目名称:OOPBasics,代码行数:7,代码来源:Driver.cs

示例12: Product

 public Product(string name, string brand, decimal price, GenderType gender)
 {
     this.Name = name;
     this.Brand = brand;
     this.Price = price;
     this.Gender = gender;
 }
开发者ID:b-slavov,项目名称:Telerik-Software-Academy,代码行数:7,代码来源:Product.cs

示例13: Toothpaste

        public Toothpaste(string name, string brand, decimal price, GenderType gender, IList<string> ingredientsList)
            :base(name, brand, price, gender)
        {
            this.ingredientList = ingredientsList;

            ValidationListOfIngredients(ingredientsList);
        }
开发者ID:EmilMitev,项目名称:Telerik-Academy,代码行数:7,代码来源:Toothpaste.cs

示例14: ParseGenderType_ReturnsCorrectString

        public void ParseGenderType_ReturnsCorrectString(GenderType genderType, string expected)
        {
            //act
            var result = EnumFactory.ParseGenderType(genderType);

            //assert
            result.Should().Be(expected);
        }
开发者ID:letmeproperty,项目名称:Applications,代码行数:8,代码来源:EnumFactory_TestFixture.cs

示例15: FirstName

        /// <summary>
        /// 
        /// </summary>
        /// <param name="genderType"></param>
        /// <returns></returns>
        public string FirstName(GenderType genderType = GenderType.Any)
        {
            var firstNames = _data.FirstNames.ToList();
              if (genderType != GenderType.Any)
            return Pick(firstNames.Where(x => x.GenderType == genderType).ToList()).Name;

              return Pick(firstNames).Name;
        }
开发者ID:NotYours180,项目名称:Fluky,代码行数:13,代码来源:Randomizer.Person.cs


注:本文中的GenderType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。