PropertyGenerationContext
This commit is contained in:
parent
ed01d4996b
commit
77f800d1a4
@ -191,11 +191,11 @@ public class D_Face
|
||||
{
|
||||
using (graphics = Graphics.FromImage(bitmap))
|
||||
graphics.DrawImage(source, new Rectangle(0, 0, width, height), rectangle, GraphicsUnit.Pixel);
|
||||
propertyItem = Property.Models.Stateless.IProperty.GetPropertyItem(_ConstructorInfo, fileSource, type, locationJson);
|
||||
propertyItem = IProperty.GetPropertyItem(_ConstructorInfo, fileSource, type, locationJson);
|
||||
bitmap.SetPropertyItem(propertyItem);
|
||||
propertyItem = Property.Models.Stateless.IProperty.GetPropertyItem(_ConstructorInfo, artist, type, outputResolutionJson);
|
||||
propertyItem = IProperty.GetPropertyItem(_ConstructorInfo, artist, type, outputResolutionJson);
|
||||
bitmap.SetPropertyItem(propertyItem);
|
||||
propertyItem = Property.Models.Stateless.IProperty.GetPropertyItem(_ConstructorInfo, userComment, type, faceEncodingJson);
|
||||
propertyItem = IProperty.GetPropertyItem(_ConstructorInfo, userComment, type, faceEncodingJson);
|
||||
bitmap.SetPropertyItem(propertyItem);
|
||||
bitmap.Save(fileInfo.FullName, _ImageCodecInfo, _EncoderParameters);
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ public class C_Resize
|
||||
|
||||
private void SaveResizedSubfile(Shared.Models.Property property, MappingFromItem mappingFromItem, int[] resize)
|
||||
{
|
||||
string dateTimeFormat = Property.Models.Stateless.IProperty.DateTimeFormat();
|
||||
string dateTimeFormat = IProperty.DateTimeFormat();
|
||||
DateTime dateTime = property.DateTimeOriginal is not null ? property.DateTimeOriginal.Value : Shared.Models.Stateless.Methods.IProperty.GetMinimumDateTime(property);
|
||||
string dateTimeValue = dateTime.ToString(dateTimeFormat);
|
||||
byte[] bytes = _ASCIIEncoding.GetBytes(dateTimeValue);
|
||||
|
@ -22,16 +22,16 @@ public record Property(DateTime CreationTime,
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, AppSettingsSourceGenerationContext.Default.Property);
|
||||
string result = JsonSerializer.Serialize(this, PropertyGenerationContext.Default.Property);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public List<DateTime> GetDateTimes() => Stateless.Methods.Property.GetDateTimes(CreationTime, LastWriteTime, DateTime, DateTimeDigitized, DateTimeFromName, DateTimeOriginal, GPSDateStamp);
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Property))]
|
||||
internal partial class AppSettingsSourceGenerationContext : JsonSerializerContext
|
||||
internal partial class PropertyGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user