Beispiel #1
0
 private TripleMap1(Map1 <TPrimaryKey, Tuple <TSecondary, TTertiary, TValue> > primaryMap, Map1 <TSecondary, TPrimaryKey> secondaryMap, Map1 <TTertiary, TPrimaryKey> tertiaryMap1)
 {
     PrimaryMap   = primaryMap;
     SecondaryMap = secondaryMap;
     TertiaryMap  = tertiaryMap1;
 }
Beispiel #2
0
 public static TwinMap1 <TPrimaryKey, TSecondary, TValue> Build(Array1 <Tuple <TPrimaryKey, TSecondary, TValue> > entries) =>
 Map1.Build(entries.Select(x => Tuple.Create(x.Item1, Tuple.Create(x.Item2, x.Item3)))).Let(
     p =>
     new TwinMap1 <TPrimaryKey, TSecondary, TValue>(
         p,
         Map1.Insist(p.GetKeyValuePairs().Select(x => Tuple.Create(x.Item2.Item1, x.Item1)))));
Beispiel #3
0
 private TwinMap1(Map1 <TPrimaryKey, Tuple <TSecondary, TValue> > primaryMap, Map1 <TSecondary, TPrimaryKey> secondaryMap)
 {
     PrimaryMap   = primaryMap;
     SecondaryMap = secondaryMap;
 }
Beispiel #4
0
 public static Option <TwinMap1 <TPrimaryKey, TSecondary, TValue> > Contingent(IEnumerable <Tuple <TPrimaryKey, TSecondary, TValue> > entries) =>
 Map1.Contingent(entries.Select(x => Tuple.Create(x.Item1, Tuple.Create(x.Item2, x.Item3)))).Select(
     p =>
     new TwinMap1 <TPrimaryKey, TSecondary, TValue>(
         p,
         Map1.Insist(p.GetKeyValuePairs().Select(x => Tuple.Create(x.Item2.Item1, x.Item1)))));