public override bool CheckType(CheckTypeInfo info) { if (info.Type.IsArray) { return(true); } if (info.Type == typeof(Array)) { _info.Type = ArrayType.Unknown; return(true); } return(false); }
public override bool CheckType(CheckTypeInfo info) { if (info.Type == typeof(string)) { _type = StringType.String; } else if (info.Type == typeof(StringBuilder)) { _type = StringType.StringBuilder; } else if (info.Type == typeof(char[])) { _type = StringType.CharArray; } else { return(false); } return(true); }
public override bool CheckType(CheckTypeInfo info) => typeof(IEnumerable).IsAssignableFrom(info.Type);
/// <summary> /// Check whether the converter supports a given type, used for non-exact types. /// This method is allowed to modify variables, however it is nt. /// </summary> public virtual bool CheckType(CheckTypeInfo info) => throw new Exception("Converter says it also converts non-exact but does not override 'CheckType' to check for one.");
public override bool CheckType(CheckTypeInfo info) => info.Type.IsPrimitive;
public override bool CheckType(CheckTypeInfo info) => ObjectEligibilityChecker.CheckIfEligibleAndGetSaveMode(info.Type, out _saveMode);