public override bool EachLogMethod([Case][EventEnum] BasicEnum eachBasicEnumParam, [Case][Data] EachParam eachParam) { if ((ControlFlags & EachLogMethod_Flag) != 0) { unsafe { EachLogMethod_Event Event; Transform.For("eachParam"); Event.eachParam = eachParam; Transform.EndFor(); Transform.For("eachBasicEnumParam"); Event.eachBasicEnumParam = (int)eachBasicEnumParam; Transform.EndFor(); return(LogEntry(ControlFlags, EachLogMethod_Handle, (byte *)&Event, sizeof(EachLogMethod_Event)) != 0); } } return(false); }
public Complex2Object(BasicEnum gameId, Guid gameGlobalId, string name, string description) { GameId = gameId; GameGlobalId = gameGlobalId; Name = name; Description = description; }
private MethodInfo ReadMethod; //Read函数 public BasicType(string name, BasicEnum index, Dictionary <Language, string> languages) { this.Key = name; this.Name = name; this.Index = index; this.Languages = languages ?? new Dictionary <Language, string>(); this.WriteMethod = typeof(TableWriter).GetMethod("Write" + Util.ToOneUpper(name), new Type[] { typeof(string) }); this.ReadMethod = typeof(TableReader).GetMethod("Read" + Util.ToOneUpper(name)); }
private MethodInfo ReadMethod; //Read函数 public BasicType(string con, BasicEnum ben, string write, string read, string[] codes) { this.ScorpioName = con; this.BasicIndex = ben; this.WriteFunction = write; this.ReadFunction = read; this.Codes = new List <string>(codes); this.WriteMethod = typeof(TableWriter).GetMethod(WriteFunction, new Type[] { typeof(string) }); this.ReadMethod = typeof(TableReader).GetMethod(ReadFunction); }
public static BasicType GetType(BasicEnum type) { foreach (var info in BasicTypes) { if (info.BasicIndex == type) { return(info); } } return(null); }
public static bool HasType(BasicEnum type) { foreach (var info in BasicTypes) { if (info.BasicIndex == type) { return(true); } } return(false); }
public void SetBasicEnum(BasicEnum basicEnum) { this.basicEnum = basicEnum; }
public void test_enum_returns_color_code() { BasicEnum.TestColor((Color)0xFF0000).ShouldBe("red color"); BasicEnum.TestColor(Color.Black).ShouldBe(null); BasicEnum.TestColor(Color.Blue).ShouldNotBe("green"); }
public string GetCodeType(BasicEnum type) { var b = BasicUtil.GetType(type); return(b != null?b.GetCode(m_Code) : type.ToString()); }
public abstract bool EachLogMethod([Case][EventEnum] BasicEnum eachBasicEnumParam, [Case][Data] EachParam eachParam);
public static BasicType GetType(BasicEnum index) { return(BasicTypes.Find(_ => _.Index == index)); }