/** * ChannelType */ public static ChannelTypeAttribute GetChannelTypeAttribute(this ChannelType value) { FieldInfo info = value.GetType().GetField(value.ToString()); Assert.IsNotNull(info, "找不到info"); object[] attributes = info.GetCustomAttributes(typeof(ChannelTypeAttribute), true); Assert.IsTrue(attributes.Length > 0, "没有attributes"); ChannelTypeAttribute channelTypeAttribute = (ChannelTypeAttribute)attributes[0]; return(channelTypeAttribute); }
public static string GetChannelFolder(this SidConfig value, ChannelType type) { SidConfigAttribute sidConfigAttribute = GetSidConfigAttribute(value); if (!string.IsNullOrEmpty(sidConfigAttribute.BundleId)) { return(sidConfigAttribute.ChannelFolder); } ChannelTypeAttribute channelTypeAttribute = GetChannelTypeAttribute(type); return(channelTypeAttribute.ChannelFolder); }
static int set_channelTypeAttr(IntPtr L) { try { LuaFramework.ChannelTypeAttribute arg0 = (LuaFramework.ChannelTypeAttribute)ToLua.CheckObject <LuaFramework.ChannelTypeAttribute>(L, 2); LuaFramework.AppConst.channelTypeAttr = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }