private IntrusionSiteInfo(Outpost outpost, long?owner, int stability, double?dockingStandingLimit, DateTime?dockingControlLimit, DateTime?setEffectControlTime, EffectType?activeEffect, int productionPoints, DateTime?intrusionStartTime, double?defenseStandingLimit) { _outpost = outpost; _owner = owner; _stability = stability; _dockingStandingLimit = dockingStandingLimit; _dockingControlLimit = dockingControlLimit; _setEffectControlTime = setEffectControlTime; _activeEffect = activeEffect; _productionPoints = productionPoints; _intrusionStartTime = intrusionStartTime; _defenseStandingLimit = defenseStandingLimit; }
public static IntrusionSiteInfo Get(Outpost outpost) { var record = Db.Query().CommandText("select * from intrusionsites where siteeid = @siteEid") .SetParameter("@siteEid", outpost.Eid) .ExecuteSingleRow().ThrowIfNull(ErrorCodes.ItemNotFound); var owner = record.GetValue <long?>("owner"); var stability = record.GetValue <int>("stability"); var dockingStandingLimit = record.GetValue <double?>("dockingstandinglimit"); var dockingControlLimit = record.GetValue <DateTime?>("dockingcontroltime"); var seteffectControlTime = record.GetValue <DateTime?>("seteffectcontroltime"); var activeEffect = (EffectType?)record.GetValue <int?>("activeeffectid"); var productionPoints = record.GetValue <int>("productionpoints"); var intrusionStartTime = record.GetValue <DateTime?>("intrusionstarttime"); var defenseStandingLimit = record.GetValue <double?>("defensestandinglimit"); return(new IntrusionSiteInfo(outpost, owner, stability, dockingStandingLimit, dockingControlLimit, seteffectControlTime, activeEffect, productionPoints, intrusionStartTime, defenseStandingLimit)); }