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);
        }
Example #2
0
 public Complex2Object(BasicEnum gameId, Guid gameGlobalId, string name, string description)
 {
     GameId       = gameId;
     GameGlobalId = gameGlobalId;
     Name         = name;
     Description  = description;
 }
Example #3
0
 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));
 }
Example #4
0
 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);
 }
Example #5
0
 public static BasicType GetType(BasicEnum type)
 {
     foreach (var info in BasicTypes)
     {
         if (info.BasicIndex == type)
         {
             return(info);
         }
     }
     return(null);
 }
Example #6
0
 public static bool HasType(BasicEnum type)
 {
     foreach (var info in BasicTypes)
     {
         if (info.BasicIndex == type)
         {
             return(true);
         }
     }
     return(false);
 }
Example #7
0
 public void SetBasicEnum(BasicEnum basicEnum)
 {
     this.basicEnum = basicEnum;
 }
Example #8
0
 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");
 }
Example #9
0
    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);
Example #11
0
 public static BasicType GetType(BasicEnum index)
 {
     return(BasicTypes.Find(_ => _.Index == index));
 }