Exemplo n.º 1
0
 public void Prepare(System.IServiceProvider locator)
 {
     this.cms.Reset();
     this.locator = locator;
     this.list.Clear();
     this.one = null;
 }
Exemplo n.º 2
0
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::FormABC.Input item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_ID_Index])
            {
                items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (item.SubmissionURI != null)
            {
                if (useColumn[ExtendedProperty_SubmissionURI_Index])
                {
                    items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
                }
            }
            ;
            if (useColumn[ExtendedProperty_SubmissionID_Index])
            {
                items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            }
            if (useColumn[ExtendedProperty_BirthYear_Index])
            {
                items[ExtendedProperty_BirthYear_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.BirthYear);
            }
            if (useColumn[ExtendedProperty_NumberOfCars_Index])
            {
                items[ExtendedProperty_NumberOfCars_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.NumberOfCars);
            }
            return(RecordTuple.From(items));
        }
Exemplo n.º 3
0
        internal void UpdateWithAnother(global::FormABC.Input result)
        {
            this.URI = result.URI;

            this.Submission     = result.Submission;
            this._SubmissionURI = result._SubmissionURI;
            this.SubmissionID   = result.SubmissionID;
            this.BirthYear      = result.BirthYear;
            this.NumberOfCars   = result.NumberOfCars;
            this.ID             = result.ID;
        }
Exemplo n.º 4
0
            internal void CollectOne(System.Data.IDataReader dr)
            {
                var _pg  = dr.GetValue(0);
                var _str = _pg as string;

                if (_str != null)
                {
                    one = _DatabaseCommon.FactoryFormABC_Input.InputConverter.CreateFromRecord(cms.UseBufferedReader(_str), 0, locator);
                }
                else
                {
                    var _tr = _pg as System.IO.TextReader ?? new System.IO.StringReader(_pg.ToString());
                    try { one = _DatabaseCommon.FactoryFormABC_Input.InputConverter.CreateFromRecord(cms.UseBufferedReader(_tr), 0, locator); }
                    finally { _tr.Dispose(); }
                }
            }
Exemplo n.º 5
0
        public static global::FormABC.Input CreateFromExtendedRecord(Revenj.Utility.BufferedTextReader reader, int outerContext, int context, IServiceProvider locator)
        {
            reader.Read(outerContext);
            var item = new global::FormABC.Input(locator);

            foreach (var config in ReaderExtendedConfiguration)
            {
                config(item, reader, context, locator);
            }
            reader.Read(outerContext);

            item.URI = _DatabaseCommon.FactoryFormABC_Input.InputConverter.BuildURI(reader.CharBuffer, item.ID);
            item.__DataCacheSubmission = new Lazy <IDataCache <global::UseCase1.Submission> >(() => locator.Resolve <IDataCache <global::UseCase1.Submission> >());
            item.__ResetChangeTracking();
            return(item);
        }
        public static bool Where(this global::FormABC.Input domainObject, string submissionURI)
        {
            var specification = new global::FormABC.Input.Where(submissionURI: submissionURI);

            return(specification._HelperFunctionIsSatisfiedBy(domainObject));
        }