static AppActs.API.Service.Interface.IDeviceService setup() { MongoClient client = new MongoClient(ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString); string database = ConfigurationManager.AppSettings["database"]; AppActs.Repository.Interface.IApplicationRepository applicationRepository = new AppActs.Repository.ApplicationRepository(client, database); IDeviceRepository deviceRepository = new DeviceRepository(new DeviceMapper(client, database)); IFeedbackRepository feedbackRepository = new FeedbackRepository(new FeedbackMapper(client, database)); IEventRepository eventRep = new EventRepository(new EventMapper(client, database)); ICrashRepository crashRep = new CrashRepository(new CrashMapper(client, database)); IAppUserRepository appUserRep = new AppUserRepository(new AppUserMapper(client, database)); IErrorRepository errorRep = new ErrorRepository(new ErrorMapper(client, database)); ISystemErrorRepository systemErrorRep = new SystemErrorRepository(new SystemErrorMapper(client, database)); return(new DeviceService ( deviceRepository, errorRep, eventRep, crashRep, feedbackRepository, systemErrorRep, appUserRep, applicationRepository, new Model.Settings() { DataLoggingRecordRaw = true, DataLoggingRecordSystemErrors = true } )); }
public void Save() { ISystemErrorRepository iSystemErrorRepository = new SystemErrorRepository(this.connectionString); SystemError systemError = new SystemError ( new AppActs.DomainModel.Exception.DeviceException("message", "stackTrace", "source", "data"), new AppActs.DomainModel.System(AppActs.DomainModel.Enum.PlatformType.iOS, "1.1"), DateTime.Now, "6.5" ); iSystemErrorRepository.Save(this.Application.Id, this.Device.Id, systemError); }
public void Save() { ISystemErrorRepository iSystemErrorRepository = new SystemErrorRepository(this.connectionString); SystemError systemError = new SystemError ( new AppActs.DomainModel.Exception.DeviceException("message", "stackTrace", "source", "data"), new AppActs.DomainModel.System(AppActs.DomainModel.Enum.PlatformType.iOS, "1.1"), DateTime.Now, "6.5" ); iSystemErrorRepository.Save(this.Application.Id, this.Device.Id, systemError); }