-
Notifications
You must be signed in to change notification settings - Fork 0
Example.ComparableStructPack‐5
IzayoiJiichan edited this page Feb 1, 2025
·
1 revision
using Izayoi.Data.Comparable;
using Izayoi.Data.Packs;
using System;
public class Example()
{
public void Method1()
{
ComparableStructPack<int, int, int, int, int> pack1 = new(1, 2, 3, 4, 5);
ComparableStructPack<bool, byte, short, int, long> pack2 = new(true, 2, 3, 4, 5);
}
public void Method2()
{
// NG
//ComparableStructPack<int, int, int, int, int?> pack = new(1, 2, 3, 4, null);
// NG
//ComparableStructPack<int, int, int, int, System.Nullable<int>> pack = new(1, 2, 3, 4, null);
// OK
ComparableStructPack<int, int, int, int, ComparableNullable<int>> pack = new(1, 2, 3, 4, null);
}
public void Method3()
{
ComparableStructPack<int, int, int, int, ComparableNullable<int>> pack1 = new(1, 2, 3, 4, null);
ComparableStructPack<int, int, int, int, ComparableNullable<int>> pack2 = new(1, 2, 3, 4, 0);
ComparableStructPack<int, int, int, int, ComparableNullable<int>> pack3 = new(1, 2, 3, 4, 1);
// pack1.Value5.HasValue: false
// pack2.Value5.HasValue: true
// pack2.Value5.Value: 0
// pack3.Value5.HasValue: true
// pack3.Value5.Value: 1
if (pack1 < pack2)
{
// true
}
if (pack2 < pack3)
{
// true
}
}
}
- Izayoi.Data
- Izayoi.Data.Query
- Izayoi.Data.Repository
- Izayoi.Data.Comparable
- Izayoi.Data.Packs
- Izayoi.Data.TimestampedObjects
- Izayoi.Data.Validation
Examples
- Database
- Map Class
- DbCommandAdapter
- DbDataMapper
- QueryOption
- QueryBuilder
- DbRepository
- Comparable
- Packs
- Timestamped Objects
- DataValidator
FAQ