public async Task <App> Add(AppKey appKey, string title, DateTimeOffset timeAdded) { var record = new AppRecord { Name = appKey.Name.Value, Type = appKey.Type.Value, Title = title?.Trim() ?? "", TimeAdded = timeAdded }; await factory.DB.Apps.Create(record); return(factory.App(record)); }
public override void DoEnd() { AppRecord appRecord = (AppRecord)GPerfMonitor.GetInstance().GetSamplerRecord(SamplerMetricType.App); if (appRecord != null) { m_Session.App = new GPerfApp(); m_Session.App.Identifier = appRecord.Identifier; m_Session.App.InstallName = appRecord.InstallName; m_Session.App.ProductName = appRecord.ProductName; m_Session.App.Version = appRecord.Version; m_Session.App.UnityVersion = appRecord.EngineVersion; } DeviceRecord deviceRecord = (DeviceRecord)GPerfMonitor.GetInstance().GetSamplerRecord(SamplerMetricType.Device); if (deviceRecord != null) { m_Session.Device = new GPerfDevice(); m_Session.Device.Name = deviceRecord.Name; m_Session.Device.Model = deviceRecord.Model; m_Session.Device.UniqueIdentifier = deviceRecord.UniqueIdentifier; m_Session.Device.GraphicsName = deviceRecord.GraphicsName; m_Session.Device.GraphicsType = deviceRecord.GraphicsType; m_Session.Device.GraphicsVendor = deviceRecord.GraphicsVendor; m_Session.Device.GraphicsVersion = deviceRecord.GraphicsVersion; m_Session.Device.GraphicsMemoryInMb = deviceRecord.GraphicsMemoryInMB; m_Session.Device.SystemMemoryInMb = deviceRecord.SystemMemorySize; } Dictionary <string, string> customGameInfo = GPerfMonitor.GetInstance().CustomSamplingInfoDic; if (customGameInfo.Count > 0) { m_Session.GameInfo = new GPerfGameInfo(); m_Session.GameInfo.Extensions.Add(customGameInfo); } LogRecord logRecord = (LogRecord)GPerfMonitor.GetInstance().GetSamplerRecord(SamplerMetricType.Log); SendToServer(m_Session, logRecord?.FilePath); }
internal App App(AppRecord record) => new App(this, record);
internal App(AppFactory factory, AppRecord record) { this.factory = factory; this.record = record ?? new AppRecord(); ID = new EntityID(this.record.ID); }