public void Add(DeviceInfo deviceInfo, string lastScreen)
 {
     this.Model = deviceInfo.Model;
     this.OsVersion = deviceInfo.OperatingSystem;
     this.LastScreen = lastScreen;
     this.PlatformId = deviceInfo.PlatformType;
 }
 public Summary(DeviceInfo deviceInfo, ApplicationInfo applicationInfo)
 {
     this.Date = DateTime.SpecifyKind(deviceInfo.Date, DateTimeKind.Utc);
     this.ApplicationId = applicationInfo.ApplicationId;
     this.PlatformId = deviceInfo.PlatformType;
     this.Version = applicationInfo.Version;
     this.Count++;
 }
        public DeviceSummary(DeviceInfo deviceInfo, ApplicationInfo applicationInfo)
            : base(deviceInfo, applicationInfo)
        {
            this.Locales = new List<Aggregate<string>>();
            this.Carriers = new List<Aggregate<string>>();
            this.ManufacturerModels = new List<ManufacturerModelAggregate>();
            this.OperatingSystems = new List<Aggregate<string>>();
            this.Resolutions = new List<Resolution>();

            this.Locales.Add(new Aggregate<string>(deviceInfo.Locale));
            this.Carriers.Add(new Aggregate<string>(deviceInfo.Carrier));
            this.ManufacturerModels.Add(new ManufacturerModelAggregate(deviceInfo.Manufactorer, deviceInfo.Model));
            this.OperatingSystems.Add(new Aggregate<string>(deviceInfo.OperatingSystem));
            this.Resolutions.Add(new Resolution(deviceInfo.ResolutionWidth, deviceInfo.ResolutionHeight));
        }
 public void Save(DeviceInfo device)
 {
     base.Save(device);
 }
        public void Register(string deviceModel, PlatformType platformType, string carrier, string platformOS, int timeZoneOffset, string locale, string manufac, Tuple<int, int> resolution)
        {
            DeviceInfo deviceInfo = new DeviceInfo()
            {
                Model = deviceModel,
                PlatformType = platformType,
                Carrier = carrier,
                OperatingSystem = platformOS,
                TimeZoneOffset = timeZoneOffset,
                Locale = locale,
                ResolutionHeight = resolution.Item1,
                ResolutionWidth = resolution.Item2,
                Manufactorer = manufac,
                DateCreated = this.DateCreated,
                Date = this.DateCreated.Date
            };

            ApplicationInfo applicationInfo = new ApplicationInfo()
            {
                ApplicationId = applicationId,
                Version = this.Version
            };

            deviceService.Log(deviceInfo, applicationInfo);

            DeviceId = deviceInfo.Guid;
        }
 public void Add(DeviceInfo device)
 {
     this.Model = device.Model;
     this.OsVersion = device.OperatingSystem;
     this.PlatformId = device.PlatformType;
 }
 public void Save(DeviceInfo device)
 {
     this.deviceMapper.Save(device);
 }
        public void Log(DeviceInfo device, ApplicationInfo applicationInfo)
        {
            Application application = this.applicationRepository.Find(applicationInfo.ApplicationId);

            if (application != null)
            {
                device.Guid = Guid.NewGuid();
                this.deviceRepository.Save(device);

                DeviceSummary deviceSum = new DeviceSummary(device, applicationInfo);
                this.deviceRepository.Save(deviceSum);
            }
            else
            {
                throw new InactiveApplicationException(applicationInfo.ApplicationId);
            }
        }