protected override async Task <ConstructorList> AssignUpsertedReferences(ConstructorList record) { record.ListIdentifier = await _strings.UpsertAsync(record.ListIdentifier); record.ListIdentifierId = record.ListIdentifier?.AsciiStringReferenceId ?? record.ListIdentifierId; return(record); }
static FieldFactory() { constructorList = new ConstructorList(); // register standard constructors constructorList.Capacity = 6; RegisterConstructor(new StringFieldConstructor()); RegisterConstructor(new BooleanFieldConstructor()); RegisterConstructor(new IntegerFieldConstructor()); RegisterConstructor(new FloatFieldConstructor()); RegisterConstructor(new DecimalFieldConstructor()); RegisterConstructor(new DateTimeFieldConstructor()); }
/// <summary> /// Creates the constructors. /// </summary> /// <param name="type">The type.</param> /// <param name="HashCode">The hash code.</param> /// <returns>The constructors</returns> private static ConstructorList CreateConstructors(Type type, int HashCode) { ConstructorList TempConstructor = null; lock (LockObject) { if (Constructors.TryGetValue(HashCode, out TempConstructor)) { return(TempConstructor); } TempConstructor = new ConstructorList(type, HashCode); Constructors.Add(HashCode, TempConstructor); } return(TempConstructor); }
static SequenceRedirectFactory() { constructorList = new ConstructorList(); // register standard constructors constructorList.Capacity = 9; RegisterConstructor(new NullSequenceRedirectConstructor()); RegisterConstructor(new BooleanSequenceRedirectConstructor()); RegisterConstructor(new CaseInsensitiveStringSequenceRedirectConstructor()); RegisterConstructor(new DateSequenceRedirectConstructor()); RegisterConstructor(new ExactDateTimeSequenceRedirectConstructor()); RegisterConstructor(new ExactDecimalSequenceRedirectConstructor()); RegisterConstructor(new ExactFloatSequenceRedirectConstructor()); RegisterConstructor(new ExactIntegerSequenceRedirectConstructor()); RegisterConstructor(new ExactStringSequenceRedirectConstructor()); }
protected override Expression <Func <ConstructorList, bool> > FindExisting(ConstructorList record) => existing => existing.ListIdentifierId == record.ListIdentifierId;
protected override IEnumerable <object> EnumerateReferences(ConstructorList record) { yield return(record.ConstructorListAssociations); yield return(record.ListIdentifier); }