// Token: 0x06001370 RID: 4976 RVA: 0x000226D0 File Offset: 0x000208D0 public static string Flag <T>(T flag) where T : IConvertible { if (typeof(T).IsEnum) { return(CmunePrint.Flag(Convert.ToUInt32(flag), typeof(T))); } return(CmunePrint.Flag(Convert.ToUInt32(flag), 31)); }
// Token: 0x0600137D RID: 4989 RVA: 0x00022C68 File Offset: 0x00020E68 public static string BitString(byte[] bytes) { StringBuilder stringBuilder = new StringBuilder(); for (int i = bytes.Length - 1; i >= 0; i--) { stringBuilder.Append(CmunePrint.BitString(bytes[i])).Append(' '); } return(stringBuilder.ToString()); }
// Token: 0x06001362 RID: 4962 RVA: 0x0002240C File Offset: 0x0002060C public static string Properties(object instance, bool publicOnly = true) { StringBuilder stringBuilder = new StringBuilder(); if (instance == null) { stringBuilder.Append("[Class=null]"); } else { stringBuilder.AppendFormat("[Class={0}] ", instance.GetType().Name); foreach (PropertyInfo propertyInfo in instance.GetType().GetProperties((!publicOnly) ? (BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) : (BindingFlags.Instance | BindingFlags.Public))) { stringBuilder.AppendFormat("[{0}={1}],", propertyInfo.Name, CmunePrint.Object(propertyInfo.GetValue(instance, null))); } } return(stringBuilder.ToString()); }
// Token: 0x06001363 RID: 4963 RVA: 0x000224A8 File Offset: 0x000206A8 public static string Object(object value) { if (value == null) { return("null"); } if (value is string) { return(value as string); } if (value.GetType().IsValueType) { return(value.ToString()); } if (value is ICollection) { return(CmunePrint.Values(new object[] { value })); } return(value.ToString()); }
// Token: 0x0600137C RID: 4988 RVA: 0x0000BF62 File Offset: 0x0000A162 public static string BitString(string x) { return(CmunePrint.BitString(Encoding.Unicode.GetBytes(x))); }
// Token: 0x0600137B RID: 4987 RVA: 0x0000BF55 File Offset: 0x0000A155 public static string BitString(int x) { return(CmunePrint.BitString(BitConverter.GetBytes(x))); }
// Token: 0x06001379 RID: 4985 RVA: 0x0000BF48 File Offset: 0x0000A148 public static void DebugBitString(byte x) { Debug.Log(CmunePrint.BitString(x)); }
// Token: 0x0600136F RID: 4975 RVA: 0x0000BF17 File Offset: 0x0000A117 public static string Flag(uint flag) { return(CmunePrint.Flag(flag, 31)); }
// Token: 0x0600136D RID: 4973 RVA: 0x0000BF0C File Offset: 0x0000A10C public static string Flag(short flag) { return(CmunePrint.Flag((uint)flag, 15)); }
// Token: 0x0600136B RID: 4971 RVA: 0x0000BEF9 File Offset: 0x0000A0F9 public static string Flag(byte flag) { return(CmunePrint.Flag((uint)flag, 7)); }
// Token: 0x06001369 RID: 4969 RVA: 0x0000BEDB File Offset: 0x0000A0DB public static string Time(int seconds) { return(CmunePrint.Time(TimeSpan.FromSeconds((double)Math.Max(seconds, 0)))); }