/// <summary> /// Gets the object details for the specified URI. /// </summary> /// <param name="args">The <see cref="ProtocolEventArgs{GetObject, DataObject}" /> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> public void GetObject(ProtocolEventArgs <GetObject, DataObject> args) { var uri = new EtpUri(args.Message.Uri); var dataAdapter = Container.Resolve <IEtpDataProvider>(new ObjectName(uri.ObjectType, uri.Version)); var entity = dataAdapter.Get(uri) as IDataObject; var list = GetList(entity, uri); StoreStoreProvider.SetDataObject(args.Context, list, uri, GetName(entity), lastChanged: GetLastChanged(entity)); }
/// <summary> /// Gets the object details for the specified URI. /// </summary> /// <param name="args">The <see cref="ProtocolEventArgs{GetObject, DataObject}" /> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> public void GetObject(ProtocolEventArgs <GetObject, DataObject> args) { var uri = new EtpUri(args.Message.Uri); var dataAdapter = Container.Resolve <IEtpDataProvider>(new ObjectName(uri.ObjectType, uri.GetDataSchemaVersion())); var entity = dataAdapter.Get(uri) as Witsml200.AbstractObject; var lastChanged = (entity?.Citation.LastUpdate).ToUnixTimeMicroseconds().GetValueOrDefault(); StoreStoreProvider.SetDataObject(args.Context, entity, uri, GetName(entity), lastChanged: lastChanged); }