Beispiel #1
0
        public void DeleteStudyIndicator(global::MarketSynthDomainServiceData.Implementation.StudyIndicator entity)
        {
            if (entity.EntityState == global::System.Data.EntityState.Detached)
            {
                this.ObjectContext.StudyIndicators.Attach(entity);
            }

            this.DeleteEntity(entity);
        }
Beispiel #2
0
 public void InsertStudyIndicator(global::MarketSynthDomainServiceData.Implementation.StudyIndicator entity)
 {
     if (entity.EntityState != global::System.Data.EntityState.Detached)
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added);
     }
     else
     {
         this.ObjectContext.StudyIndicators.AddObject(entity);
     }
 }
Beispiel #3
0
 protected override object ConvertEntity(object outerEntity)
 {
     global::MarketSynthDomainServiceData.Implementation.MarketData marketData = outerEntity as global::MarketSynthDomainServiceData.Implementation.MarketData;
     if (marketData != null)
     {
         global::MarketSynth.Services.MarketData result = new global::MarketSynth.Services.MarketData();
         result.Id         = marketData.Id;
         result.MarketDate = marketData.MarketDate;
         result.Open       = marketData.Open;
         result.Close      = marketData.Close;
         result.High       = marketData.High;
         result.Low        = marketData.Low;
         result.Volume     = marketData.Volume;
         return(result);
     }
     global::MarketSynthDomainServiceData.Implementation.Indicator indicator = outerEntity as global::MarketSynthDomainServiceData.Implementation.Indicator;
     if (indicator != null)
     {
         global::MarketSynth.Services.Indicator result = new global::MarketSynth.Services.Indicator();
         result.Id   = indicator.Id;
         result.Name = indicator.Name;
         return(result);
     }
     global::MarketSynthDomainServiceData.Implementation.Study study = outerEntity as global::MarketSynthDomainServiceData.Implementation.Study;
     if (study != null)
     {
         global::MarketSynth.Services.Study result = new global::MarketSynth.Services.Study();
         result.Id             = study.Id;
         result.InstrumentName = study.InstrumentName;
         result.IndicatorId    = study.IndicatorId;
         return(result);
     }
     global::MarketSynthDomainServiceData.Implementation.StudyIndicator studyIndicator = outerEntity as global::MarketSynthDomainServiceData.Implementation.StudyIndicator;
     if (studyIndicator != null)
     {
         global::MarketSynth.Services.StudyIndicator result = new global::MarketSynth.Services.StudyIndicator();
         result.Id        = studyIndicator.Id;
         result.Label     = studyIndicator.Label;
         result.PointData = studyIndicator.PointData;
         return(result);
     }
     return(null);
 }
Beispiel #4
0
 protected override void UpdateResult(object outerEntity, object innerResult)
 {
     global::MarketSynthDomainServiceData.Implementation.MarketData outerMarketData = outerEntity as global::MarketSynthDomainServiceData.Implementation.MarketData;
     global::MarketSynth.Services.MarketData innerMarketData = innerResult as global::MarketSynth.Services.MarketData;
     if ((outerMarketData != null) && (innerMarketData != null))
     {
         outerMarketData.Id         = innerMarketData.Id;
         outerMarketData.MarketDate = innerMarketData.MarketDate;
         outerMarketData.Open       = innerMarketData.Open;
         outerMarketData.Close      = innerMarketData.Close;
         outerMarketData.High       = innerMarketData.High;
         outerMarketData.Low        = innerMarketData.Low;
         outerMarketData.Volume     = innerMarketData.Volume;
         return;
     }
     global::MarketSynthDomainServiceData.Implementation.Indicator outerIndicator = outerEntity as global::MarketSynthDomainServiceData.Implementation.Indicator;
     global::MarketSynth.Services.Indicator innerIndicator = innerResult as global::MarketSynth.Services.Indicator;
     if ((outerIndicator != null) && (innerIndicator != null))
     {
         outerIndicator.Id   = innerIndicator.Id;
         outerIndicator.Name = innerIndicator.Name;
         return;
     }
     global::MarketSynthDomainServiceData.Implementation.Study outerStudy = outerEntity as global::MarketSynthDomainServiceData.Implementation.Study;
     global::MarketSynth.Services.Study innerStudy = innerResult as global::MarketSynth.Services.Study;
     if ((outerStudy != null) && (innerStudy != null))
     {
         outerStudy.Id             = innerStudy.Id;
         outerStudy.InstrumentName = innerStudy.InstrumentName;
         outerStudy.IndicatorId    = innerStudy.IndicatorId;
         return;
     }
     global::MarketSynthDomainServiceData.Implementation.StudyIndicator outerStudyIndicator = outerEntity as global::MarketSynthDomainServiceData.Implementation.StudyIndicator;
     global::MarketSynth.Services.StudyIndicator innerStudyIndicator = innerResult as global::MarketSynth.Services.StudyIndicator;
     if ((outerStudyIndicator != null) && (innerStudyIndicator != null))
     {
         outerStudyIndicator.Id        = innerStudyIndicator.Id;
         outerStudyIndicator.Label     = innerStudyIndicator.Label;
         outerStudyIndicator.PointData = innerStudyIndicator.PointData;
         return;
     }
 }
Beispiel #5
0
 public void UpdateStudyIndicator(global::MarketSynthDomainServiceData.Implementation.StudyIndicator currentEntity)
 {
     global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.StudyIndicators, currentEntity, this.ChangeSet.GetOriginal(currentEntity));
 }