public EFKimaiTimeEntries(EFDbContext context, IConfig configuration, IActivities activities = null) : base(context, configuration) { Entries = DbSet = Context.KimaiTimeEntries; ConnectionString = Configuration.GetKey("APISources:Kimai:Mysql_CS"); TimeZone = Configuration.GetKey("APISources:Kimai:TimeZone"); _activities = activities ?? new Activities(ConnectionString, TimeZone); }
private async Task Run() { // Read config. var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var configPath = Path.Combine(execDir, "config.toml"); config = Toml.ReadFile <Configuration>(configPath); obs = new OBSWebsocket(); obs.Connect(config.Connection.URL, config.Connection.Password); _activityManager = Connection.Session.CreateProxy <IActivities>("org.kde.ActivityManager", "/ActivityManager/Activities"); try { await Everything(); } finally { obs.Disconnect(); } }
public void Delete(IActivities activity) { _activities.Remove(activity); }
public void Add(IActivities activity) { _activities.Add(activity); }
public void AddActivityToList(IActivities activity) { _activites.Add(activity); }
public void RegisterActivity(IActivities activity) { _activities.Add(activity); }
public void ActivateActivity(IActivities activities) { _activities.Add(activities); }
public void AddActivity(IActivities activity) { ActivityList.Add(activity); }
public ActivitiesController(IActivities act, IWebHostEnvironment host, DataContext con) { _activity = act; hostingEnvironment = host; context = con; }
public void Remove(IActivities activity) { _activitives.Remove(activity); }
public ActivityController(IActivities Activities) { _Activities = Activities; }