public void Prepare(System.IServiceProvider locator) { this.cms.Reset(); this.locator = locator; this.list.Clear(); this.one = null; }
public static IPostgresTuple CreateExtendedRecordTupleFrom(global::FormXYZ.Output 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_Rgflkj_Index]) { items[ExtendedProperty_Rgflkj_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.Rgflkj); } if (useColumn[ExtendedProperty_XYZ_Index]) { items[ExtendedProperty_XYZ_Index] = _DatabaseCommon.Utility.DecimalToTuple(item.XYZ); } return(RecordTuple.From(items)); }
internal void UpdateWithAnother(global::FormXYZ.Output result) { this.URI = result.URI; this.Submission = result.Submission; this._SubmissionURI = result._SubmissionURI; this.SubmissionID = result.SubmissionID; this.Rgflkj = result.Rgflkj; this.XYZ = result.XYZ; this.ID = result.ID; }
internal void CollectOne(System.Data.IDataReader dr) { var _pg = dr.GetValue(0); var _str = _pg as string; if (_str != null) { one = _DatabaseCommon.FactoryFormXYZ_Output.OutputConverter.CreateFromRecord(cms.UseBufferedReader(_str), 0, locator); } else { var _tr = _pg as System.IO.TextReader ?? new System.IO.StringReader(_pg.ToString()); try { one = _DatabaseCommon.FactoryFormXYZ_Output.OutputConverter.CreateFromRecord(cms.UseBufferedReader(_tr), 0, locator); } finally { _tr.Dispose(); } } }
public static global::FormXYZ.Output CreateFromExtendedRecord(Revenj.Utility.BufferedTextReader reader, int outerContext, int context, IServiceProvider locator) { reader.Read(outerContext); var item = new global::FormXYZ.Output(locator); foreach (var config in ReaderExtendedConfiguration) { config(item, reader, context, locator); } reader.Read(outerContext); item.URI = _DatabaseCommon.FactoryFormXYZ_Output.OutputConverter.BuildURI(reader.CharBuffer, item.ID); item.__DataCacheSubmission = new Lazy <IDataCache <global::UseCase1.Submission> >(() => locator.Resolve <IDataCache <global::UseCase1.Submission> >()); item.__ResetChangeTracking(); return(item); }