Class TypeUtil
  
  
  
    - Namespace
 - KSP
 
  - Assembly
 - Assembly-CSharp.dll
 
   
  
  
  
    public static class TypeUtil
   
  
    - Inheritance
 
    - 
      
      
TypeUtil
     
  
  
    - Inherited Members
 
    - 
    
    
    
    
    
    
    
  
 
  Methods
  
  
  GetCycledEnum(Type, object, int)
  
  
  
  
  
    public static object GetCycledEnum(Type enumType, object enumValue, int offset)
   
  Parameters
  
    enumType Type 
    
    enumValue object 
    
    offset int 
    
  
  Returns
  
    - object
 
    
  
  
  
  GetCycledEnum<T>(T, int)
  
  
  
  
  
    public static T GetCycledEnum<T>(T enumValue, int offset) where T : struct, IConvertible
   
  Parameters
  
    enumValue T 
    
    offset int 
    
  
  Returns
  
    - T
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetEnumCount<T>()
  
  
  
  
  
    public static int GetEnumCount<T>() where T : struct, IConvertible
   
  Returns
  
    - int
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetEnumSize(Type)
  
  
  
  
  
    public static int GetEnumSize(Type enumType)
   
  Parameters
  
    enumType Type 
    
  
  Returns
  
    - int
 
    
  
  
  
  GetNextEnum(Type, object)
  
  
  
  
  
    public static object GetNextEnum(Type enumType, object enumValue)
   
  Parameters
  
    enumType Type 
    
    enumValue object 
    
  
  Returns
  
    - object
 
    
  
  
  
  GetNextEnum<T>(T)
  
  
  
  
  
    public static T GetNextEnum<T>(T enumValue) where T : struct, IConvertible
   
  Parameters
  
    enumValue T 
    
  
  Returns
  
    - T
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetNextValidEnum(Type, object, Func<object, bool>, out object)
  
  
  
  
  
    public static bool GetNextValidEnum(Type enumType, object enumValue, Func<object, bool> validator, out object validEnum)
   
  Parameters
  
    enumType Type 
    
    enumValue object 
    
    validator Func<object, bool> 
    
    validEnum object 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetNextValidEnum<T>(T, Func<T, bool>, out T)
  
  
  
  
  
    public static bool GetNextValidEnum<T>(T enumValue, Func<T, bool> validator, out T validEnum) where T : struct, IConvertible, IComparable
   
  Parameters
  
    enumValue T 
    
    validator Func<T, bool> 
    
    validEnum T 
    
  
  Returns
  
    - bool
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetPrevEnum(Type, object)
  
  
  
  
  
    public static object GetPrevEnum(Type enumType, object enumValue)
   
  Parameters
  
    enumType Type 
    
    enumValue object 
    
  
  Returns
  
    - object
 
    
  
  
  
  GetPrevEnum<T>(T)
  
  
  
  
  
    public static T GetPrevEnum<T>(T enumValue) where T : struct, IConvertible
   
  Parameters
  
    enumValue T 
    
  
  Returns
  
    - T
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetPrevValidEnum(Type, object, Func<object, bool>, out object)
  
  
  
  
  
    public static bool GetPrevValidEnum(Type enumType, object enumValue, Func<object, bool> validator, out object validEnum)
   
  Parameters
  
    enumType Type 
    
    enumValue object 
    
    validator Func<object, bool> 
    
    validEnum object 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetPrevValidEnum<T>(T, Func<T, bool>, out T)
  
  
  
  
  
    public static bool GetPrevValidEnum<T>(T enumValue, Func<T, bool> validator, out T validEnum) where T : struct, IConvertible, IComparable
   
  Parameters
  
    enumValue T 
    
    validator Func<T, bool> 
    
    validEnum T 
    
  
  Returns
  
    - bool
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetPrimativeSize<T>()
  
  
  
  
  
    public static int GetPrimativeSize<T>() where T : struct
   
  Returns
  
    - int
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  IsCollectionType(Type)
  
  
  
  
  
    public static bool IsCollectionType(this Type type)
   
  Parameters
  
    type Type 
    
  
  Returns
  
    - bool
 
    
  
  
  
  IsNumericType(Type)
  
  
  
  
  
    public static bool IsNumericType(this Type type)
   
  Parameters
  
    type Type 
    
  
  Returns
  
    - bool
 
    
  
  
  
  IsNumericType(Type, out bool)
  
  
  
  
  
    public static bool IsNumericType(this Type type, out bool isSigned)
   
  Parameters
  
    type Type 
    
    isSigned bool 
    
  
  Returns
  
    - bool