Skip to content

Commit

Permalink
Make all converters partial
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Nov 12, 2023
1 parent aeab4b7 commit b9d3a25
Show file tree
Hide file tree
Showing 39 changed files with 106 additions and 106 deletions.
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/guid-dapper.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/guid-efcore.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/guid-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/// <inheritdoc cref="global::System.IComparable{TSelf}"/>
public int CompareTo(PLACEHOLDERID other) => Value.CompareTo(other.Value);

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -79,7 +79,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(global::System.Guid) || typeToConvert == typeof(string) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -200,7 +200,7 @@
=> Value.TryFormat(destination, out charsWritten, format);
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -218,7 +218,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -229,7 +229,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/guid-newtonsoftjson.typedid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[global::Newtonsoft.Json.JsonConverter(typeof(PLACEHOLDERIDNewtonsoftJsonConverter))]
partial struct PLACEHOLDERID
{
public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/int-dapper.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/int-efcore.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, int>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, int>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/int-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/// <inheritdoc cref="global::System.IComparable{TSelf}"/>
public int CompareTo(PLACEHOLDERID other) => Value.CompareTo(other.Value);

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -78,7 +78,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(int) || typeToConvert == typeof(string) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -195,7 +195,7 @@
=> Value.TryFormat(destination, out charsWritten, format);
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -214,7 +214,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, int>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, int>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -225,7 +225,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/int-newtonsoftjson.typedid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[global::Newtonsoft.Json.JsonConverter(typeof(PLACEHOLDERIDNewtonsoftJsonConverter))]
partial struct PLACEHOLDERID
{
public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/long-dapper.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/long-efcore.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, long>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, long>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/long-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/// <inheritdoc cref="global::System.IComparable{TSelf}"/>
public int CompareTo(PLACEHOLDERID other) => Value.CompareTo(other.Value);

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -78,7 +78,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(long) || typeToConvert == typeof(string) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -195,7 +195,7 @@
=> Value.TryFormat(destination, out charsWritten, format);
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -215,7 +215,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, long>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, long>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -226,7 +226,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/long-newtonsoftjson.typedid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[global::Newtonsoft.Json.JsonConverter(typeof(PLACEHOLDERIDNewtonsoftJsonConverter))]
partial struct PLACEHOLDERID
{
public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/newid-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/// <inheritdoc cref="global::System.IComparable{TSelf}"/>
public int CompareTo(PLACEHOLDERID other) => Value.CompareTo(other.Value);

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -87,7 +87,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(string) || typeToConvert == typeof(global::System.Guid) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -203,7 +203,7 @@
=> Value.ToGuid().TryFormat(destination, out charsWritten, format);
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -221,7 +221,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, global::System.Guid>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -232,7 +232,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/nullablestring-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
(_, _) => string.CompareOrdinal(Value, other.Value),
};

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -86,7 +86,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(string) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -185,7 +185,7 @@
}
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -204,7 +204,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string?>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string?>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -215,7 +215,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/string-dapper.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/StronglyTypedIds.Templates/string-efcore.typedid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
partial struct PLACEHOLDERID
{
public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand Down
10 changes: 5 additions & 5 deletions src/StronglyTypedIds.Templates/string-full.typedid
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
(_, _) => string.CompareOrdinal(Value, other.Value),
};

public class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
public partial class PLACEHOLDERIDTypeConverter : global::System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext? context, global::System.Type sourceType)
{
Expand Down Expand Up @@ -88,7 +88,7 @@
}
}

public class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
public partial class PLACEHOLDERIDSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<PLACEHOLDERID>
{
public override bool CanConvert(global::System.Type typeToConvert)
=> typeToConvert == typeof(string) || base.CanConvert(typeToConvert);
Expand Down Expand Up @@ -184,7 +184,7 @@
}
#endif

public class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
public partial class DapperTypeHandler : global::Dapper.SqlMapper.TypeHandler<PLACEHOLDERID>
{
public override void SetValue(global::System.Data.IDbDataParameter parameter, PLACEHOLDERID value)
{
Expand All @@ -201,7 +201,7 @@
}
}

public class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string>
public partial class EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<PLACEHOLDERID, string>
{
public EfCoreValueConverter() : this(null) { }
public EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
Expand All @@ -212,7 +212,7 @@
) { }
}

public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[global::Newtonsoft.Json.JsonConverter(typeof(PLACEHOLDERIDNewtonsoftJsonConverter))]
partial struct PLACEHOLDERID
{
public class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
public partial class PLACEHOLDERIDNewtonsoftJsonConverter : global::Newtonsoft.Json.JsonConverter
{
public override bool CanConvert(global::System.Type objectType)
{
Expand Down
Loading

0 comments on commit b9d3a25

Please sign in to comment.