public static string SplitName(this string name, char splitter, NameEnum nameSplit) { if (nameSplit == NameEnum.FirstName) { return(name.Split(splitter)[1]); } return(name.Split(splitter)[0]); }
public Session(int benChang, int qianBang, SessionEnum session, NameEnum oyaNameEnum, int flag) { BenChang = benChang; QianBang = qianBang; NowSession = session; OyaName = oyaNameEnum; Flag = flag; }
public bool Equals(NameEnum obj) { if ((object)obj == null) { return(false); } return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value)); }
public Player(int btn, int ckb, int point, NameEnum name, WindEnum wind, bool isreach) { Btn = btn; Ckb = ckb; Point = point; Name = name; Wind = wind; IsReach = isreach; }
/// <summary> /// Initializes a new instance of the <see cref="TelegrafPluginInputCpu" /> class. /// </summary> /// <param name="name">name (required) (default to NameEnum.Cpu).</param> /// <param name="comment">comment.</param> public TelegrafPluginInputCpu(NameEnum name = NameEnum.Cpu, TypeEnum type = TypeEnum.Input, string comment = default(string)) : base(type) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for TelegrafPluginInputCpu and cannot be null"); } else { this.Name = name; } this.Comment = comment; }
public Card(int numericValue, SuitEnum suit, NameEnum cardName) { if (numericValue == 1) { NumericValue = 11; } else { NumericValue = numericValue; } SuitNumeric = suit; NameAlphabetic = cardName; }
/// <summary> /// Initializes a new instance of the <see cref="TelegrafPluginInputRedis" /> class. /// </summary> /// <param name="name">name (required) (default to NameEnum.Redis).</param> /// <param name="comment">comment.</param> /// <param name="config">config (required).</param> public TelegrafPluginInputRedis(NameEnum name = NameEnum.Redis, TypeEnum type = TypeEnum.Input, string comment = default(string), TelegrafPluginInputRedisConfig config = default(TelegrafPluginInputRedisConfig)) : base(type) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for TelegrafPluginInputRedis and cannot be null"); } else { this.Name = name; } // to ensure "config" is required (not null) if (config == null) { throw new InvalidDataException("config is a required property for TelegrafPluginInputRedis and cannot be null"); } else { this.Config = config; } this.Comment = comment; }
static NameEnum() { FirstName = new NameEnum("FirstName"); LastName = new NameEnum("LastName"); }
static void Main(string[] args) { Adapter.StudentInfoAdapter adapter = new Adapter.StudentInfoAdapter(); adapter.subtractStudentInfoList(); Input input = new Input(); bool flag = false; Label1: if (flag) { Console.WriteLine("If you wanna crear the console area print yes," + " otherwise -- another phrase:"); if (Console.ReadLine().ToUpper().Equals("YES")) { Console.Clear(); } else { Console.WriteLine("----------------------------------------"); } } Console.WriteLine("Choose the task(1..2) or exit option('EXIT'):"); TaskEnum task = input.setTask(); TaskManager manager = new TaskManagerImpl(); switch (task) { case TaskEnum.TASK_1: flag = true; Console.WriteLine("Choose the developer's name for TASK_1\n" + "VIKTOR\n" + "MYKYTA\n" + "MAKSYM\n" + " return option('RETURN')\n or exit option('EXIT'):"); NameEnum name = input.setName(); switch (name) { case NameEnum.VIKTOR: manager.doTask1_1(); break; case NameEnum.MYKYTA: manager.doTask2_1(); break; case NameEnum.MAKSYM: manager.doTask3_1(); break; case NameEnum.EXIT: goto Label2; default: goto Label1; } goto Label1; case TaskEnum.TASK_2: flag = true; Console.WriteLine("Choose the developer's name for TASK_2\n" + "VIKTOR\n" + "MYKYTA\n" + "MAKSYM\n" + " return option('RETURN')\n or exit option('EXIT'):"); name = input.setName(); switch (name) { case NameEnum.VIKTOR: manager.doTask1_2(); break; case NameEnum.MYKYTA: manager.doTask2_2(); break; case NameEnum.MAKSYM: manager.doTask3_2(); break; case NameEnum.EXIT: goto Label2; default: goto Label1; } goto Label1; default: goto Label2; } Label2: MessageBox.Show("Process has finished!"); Console.ReadKey(); }
/// <summary> /// Initializes a new instance of the <see cref="EmbedSettingsTitle" /> class. /// </summary> /// <param name="name">How the embeddable player handles the video title. Option descriptions: * `hide` - The title is hidden. * `show` - The title is shown. (required).</param> /// <param name="owner">How the embeddable player handles the video owner's information. Option descriptions: * `hide` - The owner's information is hidden. * `show` - The owner's information is shown. (required).</param> /// <param name="portrait">How the embeddable player handles the video owner's portrait. Option descriptions: * `hide` - The owner's portrait is hidden * `show` - The owner's portrait is shown. (required).</param> public EmbedSettingsTitle(NameEnum name = default(NameEnum), OwnerEnum owner = default(OwnerEnum), PortraitEnum portrait = default(PortraitEnum)) { this.Name = name; this.Owner = owner; this.Portrait = portrait; }