override public void Subscribe(Subscription Sub) { base.Subscribe(Sub); TopicMap NewMap; //Search through all mappings foreach (TopicMap tm in TopicMapping) { if (Sub.MatchesTopic(tm.Topic)) { tm.Subscribers.Add(Sub); //Send last data recived if (tm.LastDataPoint != null) { Sub.TimeDataUpdate(tm.LastDataPoint); } return; } } NewMap = new TopicMap(); NewMap.Topic = Sub.Topic; NewMap.Subscribers.Add(Sub); NewMap.Subscribed = SubscribeTopic(Sub.Topic); TopicMapping.Add(NewMap); }
public TopicMap BuildFromRow(DataRow row) { var returnRecord = TopicMap.BuildTopicMapFromRow(row); returnRecord = this.BuildExtraFromRow <TopicMap>(returnRecord, row); return(returnRecord); }
public TopicMap Insert(TopicMap record) { DataRow row = this.dataSet.ttbltopicMap.NewttbltopicMapRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttbltopicMap.AddttbltopicMapRow((pdstopicMapDataSet.ttbltopicMapRow)row); this.SaveChanges(); return(this.dataSet.ttbltopicMap.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbltopicMap.Rows[0]) : null); }
public TopicMap GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); TopicMap topicMap = null; if (row != null) { topicMap = this.BuildFromRow(row); } return(topicMap); }
protected TopicMap Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttbltopicMap.AsEnumerable().SingleOrDefault(); TopicMap topicMap = null; if (row != null) { topicMap = this.BuildFromRow(row); } return(topicMap); }
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) { var category = new CategoryMap(); var author = new AuthorMap(); var topic = new TopicMap(); _cryptographyConfiguration = new CryptographyConfiguration( new AesEncryptionProvider(new PassphraseKeyGenerator("SuperSecretPass", new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 })), new DefaultHmacProvider(new PassphraseKeyGenerator("UberSuperSecure", new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }))); base.ApplicationStartup(container, pipelines); }
public void Delete(TopicMap record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttbltopicMap.NewttbltopicMapRow(); TopicMap.BuildMinimalRow(ref row, record); this.dataSet.ttbltopicMap.AddttbltopicMapRow((pdstopicMapDataSet.ttbltopicMapRow)row); } row.Delete(); this.SaveChanges(); }
protected override void OnModelCreating(ModelBuilder builder) { UserMap.Configure(builder); PersonMap.Configure(builder); PersonCheckListItemMap.Configure(builder); PersonCheckListMap.Configure(builder); QuizMap.Configure(builder); QuestionMap.Configure(builder); AnswerMap.Configure(builder); TopicCategoryMap.Configure(builder); TopicMap.Configure(builder); SupportingScriptureMap.Configure(builder); PersonAnswerMap.Configure(builder); }
public TopicMap Update(TopicMap record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row != null) { this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.SaveChanges(); return(this.dataSet.ttbltopicMap.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbltopicMap.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void Delete(TopicMap record) { this.repository.Delete(record); }
public TopicMap Update(TopicMap record) { return(this.repository.Update(record)); }
public TopicMap Insert(TopicMap record) { return(this.repository.Insert(record)); }
public void Delete(TopicMap record) { this.adapter.Delete(record); }
public TopicMap Update(TopicMap record) { return(this.adapter.Update(record)); }
public TopicMap Insert(TopicMap record) { return(this.adapter.Insert(record)); }
public void UpdateToRow(ref DataRow row, TopicMap record) { TopicMap.UpdateRowFromTopicMap(ref row, record); this.ExtraUpdateToRow(ref row, record); }