protected override bool CanMap(PreCompileArgument arg) { if (!arg.DestinationType.IsRecordType()) { return(false); } return(true); }
protected override bool CanMap(PreCompileArgument arg) { if (!arg.SourceType.IsCollection() || !arg.DestinationType.IsCollection()) { return(false); } if (arg.DestinationType.IsListCompatible()) { return(true); } return(arg.DestinationType.GetDictionaryType() != null); }
protected override bool CanMap(PreCompileArgument arg) { var bindingFlags = arg.ExplicitMapping ? BindingFlags.Public | BindingFlags.NonPublic : BindingFlags.Public; if (!arg.DestinationType.IsPoco(bindingFlags)) { return(false); } return(true); }
protected override bool CanMap(PreCompileArgument arg) { if (!arg.DestinationType.GetTypeInfo().IsGenericType || !_immutableTypes.ContainsKey(arg.DestinationType.GetGenericTypeDefinition())) { return(false); } var args = arg.DestinationType.GetGenericArguments(); if (args.Length == 2 && args[0] == typeof(string)) { return(true); } return(IsCollection(arg.SourceType)); }
protected override bool CanMap(PreCompileArgument arg) { return(true); }
protected override bool CanMap(PreCompileArgument arg) { return(arg.SourceType.IsCollection() && arg.DestinationType.IsCollection() && arg.DestinationType.IsListCompatible()); }
protected override int Score => - 110; //must do before all class adapters protected override bool CanMap(PreCompileArgument arg) { return(arg.SourceType == typeof(string) || arg.DestinationType == typeof(string)); }
protected override bool CanMap(PreCompileArgument arg) { return(arg.ExplicitMapping || arg.DestinationType.IsPoco()); }
protected override int Score => DefaultScore; //must do before CollectionAdapter protected override bool CanMap(PreCompileArgument arg) { var dictType = arg.DestinationType.GetDictionaryType(); return(dictType?.GetGenericArguments()[0] == typeof(string)); }
protected override bool CanMap(PreCompileArgument arg) { throw new NotImplementedException(); }
public virtual int?Priority(PreCompileArgument arg) { return(CanMap(arg) ? this.Score : (int?)null); }
protected abstract bool CanMap(PreCompileArgument arg);
protected override bool CanMap(PreCompileArgument arg) { return(typeof(JToken).IsAssignableFrom(arg.SourceType) || typeof(JToken).IsAssignableFrom(arg.DestinationType)); }
protected override bool CanMap(PreCompileArgument arg) { return(arg.SourceType.GetTypeInfo().IsEnum || arg.DestinationType.GetTypeInfo().IsEnum); }
protected override bool CanMap(PreCompileArgument arg) { return(arg.SourceType.IsCollection() && arg.DestinationType.IsArray && arg.DestinationType.GetArrayRank() > 1); }
protected override bool CanMap(PreCompileArgument arg) { return(arg.DestinationType.IsRecordType()); }
protected override int Score => - 109; //must do before StringAdapter protected override bool CanMap(PreCompileArgument arg) { return(CanMap(arg.SourceType, arg.DestinationType) || CanMap(arg.DestinationType, arg.SourceType)); }