コード例 #1
0
        protected override async Task <ConstructorList> AssignUpsertedReferences(ConstructorList record)
        {
            record.ListIdentifier = await _strings.UpsertAsync(record.ListIdentifier);

            record.ListIdentifierId = record.ListIdentifier?.AsciiStringReferenceId ?? record.ListIdentifierId;
            return(record);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        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());
        }
コード例 #5
0
 protected override Expression <Func <ConstructorList, bool> > FindExisting(ConstructorList record)
 => existing => existing.ListIdentifierId == record.ListIdentifierId;
コード例 #6
0
        protected override IEnumerable <object> EnumerateReferences(ConstructorList record)
        {
            yield return(record.ConstructorListAssociations);

            yield return(record.ListIdentifier);
        }