本文整理汇总了C#中MySql.Data.MySqlClient.MySqlDataReader.GetGuid方法的典型用法代码示例。如果您正苦于以下问题:C# MySqlDataReader.GetGuid方法的具体用法?C# MySqlDataReader.GetGuid怎么用?C# MySqlDataReader.GetGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySql.Data.MySqlClient.MySqlDataReader
的用法示例。
在下文中一共展示了MySqlDataReader.GetGuid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _mediaReadFields
private static void _mediaReadFields(MySqlDataReader dataReader, PersistentMedia media)
{
uint flags = dataReader.IsDBNull(dataReader.GetOrdinal("flags")) ? (uint)0 : dataReader.GetUInt32("flags");
byte typVideo = dataReader.IsDBNull(dataReader.GetOrdinal("typVideo")) ? (byte)0 : dataReader.GetByte("typVideo");
media._mediaName = dataReader.IsDBNull(dataReader.GetOrdinal("MediaName")) ? string.Empty : dataReader.GetString("MediaName");
media._duration = dataReader.IsDBNull(dataReader.GetOrdinal("Duration")) ? default(TimeSpan) : dataReader.GetTimeSpan("Duration");
media._durationPlay = dataReader.IsDBNull(dataReader.GetOrdinal("DurationPlay")) ? default(TimeSpan) : dataReader.GetTimeSpan("DurationPlay");
media._folder = dataReader.IsDBNull(dataReader.GetOrdinal("Folder")) ? string.Empty : dataReader.GetString("Folder");
media._fileName = dataReader.IsDBNull(dataReader.GetOrdinal("FileName")) ? string.Empty : dataReader.GetString("FileName");
media._fileSize = dataReader.IsDBNull(dataReader.GetOrdinal("FileSize")) ? 0 : dataReader.GetUInt64("FileSize");
media.idFormat = dataReader.IsDBNull(dataReader.GetOrdinal("idFormat")) ? 0 : dataReader.GetUInt64("idFormat");
media._lastUpdated = _readDateTimeField(dataReader, "LastUpdated");
media._mediaStatus = (TMediaStatus)(dataReader.IsDBNull(dataReader.GetOrdinal("statusMedia")) ? 0 : dataReader.GetInt32("statusMedia"));
media._mediaType = (TMediaType)(dataReader.IsDBNull(dataReader.GetOrdinal("typMedia")) ? 0 : dataReader.GetInt32("typMedia"));
media._tCStart = dataReader.IsDBNull(dataReader.GetOrdinal("TCStart")) ? default(TimeSpan) : dataReader.GetTimeSpan("TCStart");
media._tCPlay = dataReader.IsDBNull(dataReader.GetOrdinal("TCPlay")) ? default(TimeSpan) : dataReader.GetTimeSpan("TCPlay");
media.idProgramme = dataReader.IsDBNull(dataReader.GetOrdinal("idProgramme")) ? 0 : dataReader.GetUInt64("idProgramme");
media._audioVolume = dataReader.IsDBNull(dataReader.GetOrdinal("AudioVolume")) ? 0 : dataReader.GetDecimal("AudioVolume");
media._audioLevelIntegrated = dataReader.IsDBNull(dataReader.GetOrdinal("AudioLevelIntegrated")) ? 0 : dataReader.GetDecimal("AudioLevelIntegrated");
media._audioLevelPeak = dataReader.IsDBNull(dataReader.GetOrdinal("AudioLevelPeak")) ? 0 : dataReader.GetDecimal("AudioLevelPeak");
media._audioChannelMapping = dataReader.IsDBNull(dataReader.GetOrdinal("typAudio")) ? TAudioChannelMapping.Stereo : (TAudioChannelMapping)dataReader.GetByte("typAudio");
media.HasExtraLines = (typVideo & (byte)0x80) > 0;
media._videoFormat = (TVideoFormat)(typVideo & 0x7F);
media._idAux = dataReader.IsDBNull(dataReader.GetOrdinal("idAux")) ? string.Empty : dataReader.GetString("idAux");
media._killDate = _readDateTimeField(dataReader, "KillDate");
media._mediaGuid = dataReader.IsDBNull(dataReader.GetOrdinal("MediaGuid")) ? Guid.Empty : dataReader.GetGuid("MediaGuid");
media._mediaEmphasis = (TMediaEmphasis)((flags >> 8) & 0xF);
media._parental = (TParental)((flags >> 12) & 0xF);
if (media is ServerMedia)
((ServerMedia)media)._doNotArchive = (flags & 0x1) != 0;
media._mediaCategory = (TMediaCategory)((flags >> 4) & 0xF); // bits 4-7 of 1st byte
}
示例2: _EventRead
private static Event _EventRead(Engine engine, MySqlDataReader dataReader)
{
Event aEvent = new Event(engine);
uint flags = dataReader.IsDBNull(dataReader.GetOrdinal("flagsEvent")) ? 0 : dataReader.GetUInt32("flagsEvent");
aEvent._idRundownEvent = dataReader.GetUInt64("idRundownEvent");
aEvent._layer = (VideoLayer)dataReader.GetSByte("Layer");
aEvent._eventType = (TEventType)dataReader.GetByte("typEvent");
aEvent._startType = (TStartType)dataReader.GetByte("typStart");
aEvent._scheduledTime = _readDateTimeField(dataReader, "ScheduledTime");
aEvent._duration = dataReader.IsDBNull(dataReader.GetOrdinal("Duration")) ? default(TimeSpan) : aEvent.Engine.AlignTimeSpan(dataReader.GetTimeSpan("Duration"));
aEvent._scheduledDelay = dataReader.IsDBNull(dataReader.GetOrdinal("ScheduledDelay")) ? default(TimeSpan) : aEvent.Engine.AlignTimeSpan(dataReader.GetTimeSpan("ScheduledDelay"));
aEvent._scheduledTC = dataReader.IsDBNull(dataReader.GetOrdinal("ScheduledTC")) ? TimeSpan.Zero : dataReader.GetTimeSpan("ScheduledTC");
aEvent._mediaGuid = (dataReader.IsDBNull(dataReader.GetOrdinal("MediaGuid"))) ? Guid.Empty : dataReader.GetGuid("MediaGuid");
aEvent._eventName = dataReader.IsDBNull(dataReader.GetOrdinal("EventName")) ? default(string) : dataReader.GetString("EventName");
var psb = dataReader.GetByte("PlayState");
aEvent._playState = (TPlayState)psb;
if (aEvent._playState == TPlayState.Playing || aEvent._playState == TPlayState.Paused)
aEvent._playState = TPlayState.Aborted;
if (aEvent._playState == TPlayState.Fading)
aEvent._playState = TPlayState.Played;
aEvent._startTime = _readDateTimeField(dataReader, "StartTime");
aEvent._startTC = dataReader.IsDBNull(dataReader.GetOrdinal("StartTC")) ? TimeSpan.Zero : dataReader.GetTimeSpan("StartTC");
aEvent._requestedStartTime = dataReader.IsDBNull(dataReader.GetOrdinal("RequestedStartTime")) ? null : (TimeSpan?)dataReader.GetTimeSpan("RequestedStartTime");
aEvent._transitionTime = dataReader.IsDBNull(dataReader.GetOrdinal("TransitionTime")) ? default(TimeSpan) : dataReader.GetTimeSpan("TransitionTime");
aEvent._transitionType = (TTransitionType)dataReader.GetByte("typTransition");
aEvent._audioVolume = dataReader.IsDBNull(dataReader.GetOrdinal("AudioVolume")) ? 0 : dataReader.GetDecimal("AudioVolume");
aEvent._idProgramme = dataReader.IsDBNull(dataReader.GetOrdinal("idProgramme")) ? 0 : dataReader.GetUInt64("idProgramme");
aEvent._idAux = dataReader.IsDBNull(dataReader.GetOrdinal("IdAux")) ? default(string) : dataReader.GetString("IdAux");
aEvent._enabled = (flags & (1 << 0)) != 0;
aEvent._hold = (flags & (1 << 1)) != 0;
EventGPI.FromUInt64(ref aEvent._gPI, (flags >> 4) & EventGPI.Mask);
aEvent._nextLoaded = false;
return aEvent;
}
示例3: ParseUser
private static User ParseUser(MySqlDataReader reader)
{
return new User
{
Id = reader.GetInt32("id"),
Name = reader.GetString("name"),
Email = reader.GetString("email"),
Password = reader.GetString("password"),
Roles = reader.GetString("roles").Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList(),
Token = reader.GetGuid("token")
};
}
示例4: LoadFromReader
public void LoadFromReader(MySqlDataReader _reader)
{
m_id = _reader["id"].GetType() != typeof(System.DBNull) ? _reader.GetInt64("id") : 0;
mc_id = false;
m_email = _reader["email"].GetType() != typeof(System.DBNull) ? _reader.GetString("email") : "";
mc_email = false;
m_firstname = _reader["firstname"].GetType() != typeof(System.DBNull) ? _reader.GetString("firstname") : "";
mc_firstname = false;
m_lastname = _reader["lastname"].GetType() != typeof(System.DBNull) ? _reader.GetString("lastname") : "";
mc_lastname = false;
m_secondname = _reader["secondname"].GetType() != typeof(System.DBNull) ? _reader.GetString("secondname") : "";
mc_secondname = false;
m_role_id = _reader["role_id"].GetType() != typeof(System.DBNull) ? _reader.GetInt64("role_id") : 0;
mc_role_id = false;
m_post = _reader["post"].GetType() != typeof(System.DBNull) ? _reader.GetString("post") : "";
mc_post = false;
m_created = _reader["created"].GetType() != typeof(System.DBNull) ? _reader.GetDateTime("created") : DateTime.MinValue;
mc_created = false;
m_password = _reader["password"].GetType() != typeof(System.DBNull) ? _reader.GetString("password") : "";
mc_password = false;
m_salt = _reader["salt"].GetType() != typeof(System.DBNull) ? !String.IsNullOrEmpty(_reader["salt"].ToString()) ? _reader.GetGuid("salt") : new System.Guid() : new System.Guid();
mc_salt = false;
m_activation_guid = _reader["activation_guid"].GetType() != typeof(System.DBNull) ? !String.IsNullOrEmpty(_reader["activation_guid"].ToString()) ? _reader.GetGuid("activation_guid") : new System.Guid() : new System.Guid();
mc_activation_guid = false;
m_lastlogin = _reader["lastlogin"].GetType() != typeof(System.DBNull) ? _reader.GetDateTime("lastlogin") : DateTime.MinValue;
mc_lastlogin = false;
m_rememberpass_guid = _reader["rememberpass_guid"].GetType() != typeof(System.DBNull) ? !String.IsNullOrEmpty(_reader["rememberpass_guid"].ToString()) ? _reader.GetGuid("rememberpass_guid") : new System.Guid() : new System.Guid();
mc_rememberpass_guid = false;
}
示例5: ParseHate
private static Hate ParseHate(MySqlDataReader reader)
{
return new Hate
{
Id = reader.GetInt32("id"),
Created = reader.GetDateTime("created"),
Network = reader.GetString("network"),
NetworkId = reader.GetInt64("networkId"),
Author = reader.GetString("author"),
Text = reader.GetString("text"),
Token = reader.GetGuid("token")
};
}