public void Write(int channelID, SeriesID seriesID, DateTime timestamp, double value) { HistorianKey historianKey = new HistorianKey(); HistorianValue historianValue = new HistorianValue(); historianKey.PointID = ToPointID(channelID, (int)seriesID); historianKey.TimestampAsDate = timestamp; historianValue.AsSingle = (float)value; m_queue.Value.Enqueue(historianKey, historianValue); }
public override int GetHashCode() { int ret = (Title != null) ? Title.GetHashCode() : 0; ret = (ret * 397) ^ ((EpisodeNumber != null) ? EpisodeNumber.GetHashCode() : 0); ret = (ret * 397) ^ ((EpisodeTitle != null) ? EpisodeTitle.GetHashCode() : 0); ret = (ret * 397) ^ ((Synopsis != null) ? Synopsis.GetHashCode() : 0); ret = (ret * 397) ^ ((Team1 != null) ? Team1.GetHashCode() : 0); ret = (ret * 397) ^ ((Team2 != null) ? Team2.GetHashCode() : 0); ret = (ret * 397) ^ SeriesID.GetHashCode(); ret &= 0x7fffffff; return(ret); }
public void UpdateTokenID(TokenSeriesMode mode) { byte[] bytes; switch (mode) { case TokenSeriesMode.Unique: bytes = ROM; break; case TokenSeriesMode.Duplicated: bytes = ROM.Concat(SeriesID.ToUnsignedByteArray()).Concat(MintID.ToUnsignedByteArray()).ToArray(); break; default: throw new ChainException($"Generation of tokenID for Series with {mode} is not implemented"); } this.TokenID = Hash.FromBytes(bytes); }
public string SetSearchResultMessage() { string mssg = ""; var keywordSearch = ""; if (txtTSKeyword.Text.Length > 0) { keywordSearch = ". Searched on keyword: " + txtTSKeyword.Text; } if (chkAllGrades.Checked) { mssg = string.Format("Search Task in Series:{0}" + keywordSearch, SeriesID.ToString()); } else { mssg = string.Format("Search Task in Series:{0} - Grade:{1}" + keywordSearch, SeriesID.ToString(), CurrentGrade.ToString()); } return(mssg); }
void removeSeasonFromSeries() { string seasonFormat = SeriesID.ToString() + 'S'; removeFromFanart(seasonFormat); }
private long ToPointID(int channelID, SeriesID seriesID) { ulong pointID = Historian.ToPointID(channelID, (int)seriesID); return(unchecked ((long)pointID)); }
/// <summary> /// Serves as a hash function for a particular type. GetHashCode() is suitable /// for use in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { return(SeriesID.GetHashCode() ^ FactorLevelID.GetHashCode()); }
///<summary> /// Returns a String that represents the current object. ///</summary> public override string ToString() { return("SeriesID:" + SeriesID.ToString() + "GSSGFactorLevelID:" + FactorLevelID.ToString()); }
/// <summary> /// Serves as a hash function for a particular type. GetHashCode() is suitable /// for use in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { return(SeriesID.GetHashCode() ^ Grade.GetHashCode() ^ KSAID.GetHashCode() ^ TaskStatementID.GetHashCode()); }
///<summary> /// Returns a String that represents the current object. ///</summary> public override string ToString() { return("SeriesID:" + SeriesID.ToString() + "Grade:" + Grade.ToString() + "KSAID:" + KSAID.ToString() + "TaskStatementID:" + TaskStatementID.ToString()); }
/// <summary> /// Serves as a hash function for a particular type. GetHashCode() is suitable /// for use in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { return(SeriesID.GetHashCode()); }
///<summary> /// Returns a String that represents the current object. ///</summary> public override string ToString() { return("SeriesID:" + SeriesID.ToString()); }