本文整理汇总了C#中System.Data.SqlClient.SqlDataReader.GetSqlXml方法的典型用法代码示例。如果您正苦于以下问题:C# SqlDataReader.GetSqlXml方法的具体用法?C# SqlDataReader.GetSqlXml怎么用?C# SqlDataReader.GetSqlXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.SqlClient.SqlDataReader
的用法示例。
在下文中一共展示了SqlDataReader.GetSqlXml方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeserializeQueuedEvent
private object DeserializeQueuedEvent(SqlDataReader result)
{
var eventTypeIdColumnId = result.GetOrdinal("EventTypeId");
var eventDataColumnId = result.GetOrdinal("EventData");
result.Read();
var eventTypeId = result.GetSqlGuid(eventTypeIdColumnId).Value;
return this.serializationMethod.Deserialize(new XmlSerializedData(eventTypeId, result.GetSqlXml(eventDataColumnId).CreateReader()));
}
示例2: SqlLogEntry
/// <summary>
/// Constructs an instance of IStoreLogEntry using parts of a row from SqlDataReader.
/// Used for creating the store operation for Undo.
/// </summary>
/// <param name="reader">SqlDataReader whose row has operation information.</param>
/// <param name="offset">Reader offset for column that begins operation information.</param>
internal SqlLogEntry(SqlDataReader reader, int offset)
{
this.Id = reader.GetGuid(offset);
this.OpCode = (StoreOperationCode)reader.GetInt32(offset + 1);
this.Data = reader.GetSqlXml(offset + 2);
this.UndoStartState = (StoreOperationState)reader.GetInt32(offset + 3);
SqlGuid shardIdRemoves;
shardIdRemoves = reader.GetSqlGuid(offset + 4);
this.OriginalShardVersionRemoves = shardIdRemoves.IsNull ? default(Guid) : shardIdRemoves.Value;
SqlGuid shardIdAdds;
shardIdAdds = reader.GetSqlGuid(offset + 5);
this.OriginalShardVersionAdds = shardIdAdds.IsNull ? default(Guid) : shardIdAdds.Value;
}
示例3: DeserializeEvents
private EventStream DeserializeEvents(Guid id, SqlDataReader result)
{
var lastVersion = 0;
var snapshotVersion = 0;
var eventTypeIdColumnId = result.GetOrdinal("EventTypeId");
var eventDataColumnId = result.GetOrdinal("EventData");
var versionColumnId = result.GetOrdinal("Version");
var snapshotVersionColumnId = result.GetOrdinal("SnapshotVersion");
var events = new List<object>();
while (result.Read())
{
var eventTypeId = result.GetSqlGuid(eventTypeIdColumnId).Value;
lastVersion = result.GetSqlInt32(versionColumnId).Value;
snapshotVersion = result.GetSqlInt32(snapshotVersionColumnId).Value;
events.Add(this.serializationMethod.Deserialize(new XmlSerializedData(eventTypeId, result.GetSqlXml(eventDataColumnId).CreateReader())));
}
return new EventStream(id, lastVersion, snapshotVersion, events);
}
示例4: PopulateEntity
protected static void PopulateEntity(SqlDataReader reader, ServerEntity entity, Dictionary<string, PropertyInfo> propMap)
{
for (int i = 0; i < reader.FieldCount; i++)
{
String columnName = reader.GetName(i);
// Special case for when we select a range of values with an EntityBroker, just ignore
if (columnName.Equals("RowNum"))
continue;
if (columnName.Equals("GUID"))
{
Guid uid = reader.GetGuid(i);
entity.SetKey(new ServerEntityKey(entity.Name, uid));
continue;
}
if (columnName.Equals(entity.Name) && columnName.Contains("Enum"))
columnName = "Enum";
PropertyInfo prop;
if (!propMap.TryGetValue(columnName, out prop))
throw new EntityNotFoundException("Unable to match column to property: " + columnName, null);
if (columnName.Contains("GUID"))
columnName = columnName.Replace("GUID", "Key");
if (reader.IsDBNull(i))
{
prop.SetValue(entity, null, null);
continue;
}
Type propType = prop.PropertyType;
if (propType == typeof(String))
prop.SetValue(entity, reader.GetString(i), null);
else if (propType == typeof(ServerEntityKey))
{
Guid uid = reader.GetGuid(i);
prop.SetValue(entity, new ServerEntityKey(columnName.Replace("Key", String.Empty), uid), null);
}
else if (propType == typeof(DateTime))
prop.SetValue(entity, reader.GetDateTime(i), null);
else if (propType == typeof(DateTime?))
{
if (reader.IsDBNull(i))
{
prop.SetValue(entity, null, null);
}
else
{
prop.SetValue(entity, reader.GetDateTime(i), null);
}
}
else if (propType == typeof(bool))
prop.SetValue(entity, reader.GetBoolean(i), null);
else if (propType == typeof(Int32))
prop.SetValue(entity, reader.GetInt32(i), null);
else if (propType == typeof(Int16))
prop.SetValue(entity, reader.GetInt16(i), null);
else if (propType == typeof(double))
prop.SetValue(entity, reader.GetDouble(i), null);
else if (propType == typeof(Decimal))
prop.SetValue(entity, reader.GetDecimal(i), null);
else if (propType == typeof(float))
prop.SetValue(entity, reader.GetFloat(i), null);
else if (propType == typeof(XmlDocument))
{
SqlXml xml = reader.GetSqlXml(i);
if (xml!=null && !xml.IsNull)
{
XmlReader xmlReader = xml.CreateReader();
if (xmlReader != null)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlReader);
prop.SetValue(entity, xmlDoc, null);
}
else
prop.SetValue(entity, null, null);
}
else
{
prop.SetValue(entity, null, null);
}
}
else if (typeof(ServerEnum).IsAssignableFrom(propType))
{
short enumVal = reader.GetInt16(i);
ConstructorInfo construct = prop.PropertyType.GetConstructor(new Type[0]);
ServerEnum val = (ServerEnum)construct.Invoke(null);
val.SetEnum(enumVal);
prop.SetValue(entity, val, null);
}
else
throw new EntityNotFoundException("Unsupported property type: " + propType, null);
}
}
示例5: FillCompatibleITypedSettersFromReader
// Copy multiple fields from reader to ITypedSettersV3
// Assumes caller enforces that reader and setter metadata are compatible
internal static void FillCompatibleITypedSettersFromReader( SmiEventSink_Default sink, ITypedSettersV3 setters, SmiMetaData[] metaData, SqlDataReader reader ) {
for ( int i = 0; i < metaData.Length; i++ ) {
if ( reader.IsDBNull(i) ) {
ValueUtilsSmi.SetDBNull_Unchecked( sink, setters, i );
}
else {
switch ( metaData[i].SqlDbType ) {
case SqlDbType.BigInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int64 ) );
ValueUtilsSmi.SetInt64_Unchecked( sink, setters, i, reader.GetInt64(i) );
break;
case SqlDbType.Binary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
ValueUtilsSmi.SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.Bit:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Boolean ) );
SetBoolean_Unchecked( sink, setters, i, reader.GetBoolean(i) );
break;
case SqlDbType.Char:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.DateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], reader.GetDateTime(i) );
break;
case SqlDbType.Decimal:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlDecimal ) );
SetSqlDecimal_Unchecked( sink, setters, i, reader.GetSqlDecimal(i) );
break;
case SqlDbType.Float:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Double ) );
SetDouble_Unchecked( sink, setters, i, reader.GetDouble(i) );
break;
case SqlDbType.Image:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.Int:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int32 ) );
SetInt32_Unchecked( sink, setters, i, reader.GetInt32(i) );
break;
case SqlDbType.Money:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Unchecked( sink, setters, i, metaData[i], reader.GetSqlMoney(i) );
break;
case SqlDbType.NChar:
case SqlDbType.NText:
case SqlDbType.NVarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Real:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Single ) );
SetSingle_Unchecked( sink, setters, i, reader.GetFloat(i) );
break;
case SqlDbType.UniqueIdentifier:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Guid ) );
SetGuid_Unchecked( sink, setters, i, reader.GetGuid(i) );
break;
case SqlDbType.SmallDateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], reader.GetDateTime(i) );
break;
case SqlDbType.SmallInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int16 ) );
SetInt16_Unchecked( sink, setters, i, reader.GetInt16(i) );
break;
case SqlDbType.SmallMoney:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Checked( sink, setters, i, metaData[i], reader.GetSqlMoney(i) );
break;
case SqlDbType.Text:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Timestamp:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.TinyInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Byte ) );
SetByte_Unchecked( sink, setters, i, reader.GetByte(i) );
break;
case SqlDbType.VarBinary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.VarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.String ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Xml:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlXml ) );
SetSqlXml_Unchecked( sink, setters, i, reader.GetSqlXml(i) );
break;
case SqlDbType.Variant:
//.........这里部分代码省略.........
示例6: ProcessNotificationResults
private void ProcessNotificationResults(SqlDataReader reader)
{
IntPtr hscp;
Bid.NotificationsScopeEnter(out hscp, "<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> %d#", ObjectID);
try {
Guid handle = Guid.Empty; // Conversation_handle. Always close this!
try {
if (!_stop) {
while (reader.Read()) {
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Row read.\n");
#if DEBUG
for (int i=0; i<reader.FieldCount; i++) {
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> column: %ls, value: %ls\n", reader.GetName(i), reader.GetValue(i).ToString());
}
#endif
string msgType = reader.GetString(0);
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> msgType: '%ls'\n", msgType);
handle = reader.GetGuid(1);
// Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults(SqlDataReader)|DEP> conversationHandle: '%p(GUID)'\n", conversationHandle);
// Only process QueryNotification messages.
if (0 == String.Compare(msgType, "http://schemas.microsoft.com/SQL/Notifications/QueryNotification", StringComparison.OrdinalIgnoreCase)) {
SqlXml payload = reader.GetSqlXml(2);
if (null != payload) {
SqlNotification notification = SqlNotificationParser.ProcessMessage(payload);
if (null != notification) {
string key = notification.Key;
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Key: '%ls'\n", key);
int index = key.IndexOf(';'); // Our format is simple: "AppDomainKey;commandHash"
if (index >= 0) { // Ensure ';' present.
string appDomainKey = key.Substring(0, index);
SqlDependencyPerAppDomainDispatcher dispatcher;
lock (_staticInstance._sqlDependencyPerAppDomainDispatchers) {
dispatcher = _staticInstance._sqlDependencyPerAppDomainDispatchers[appDomainKey];
}
if (null != dispatcher) {
try {
dispatcher.InvalidateCommandID(notification); // CROSS APP-DOMAIN CALL!
}
catch (Exception e) {
if (!ADP.IsCatchableExceptionType(e)) {
throw;
}
ADP.TraceExceptionWithoutRethrow(e); // Discard failure. User event could throw exception.
}
}
else {
Debug.Assert(false, "Received notification but do not have an associated PerAppDomainDispatcher!");
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Received notification but do not have an associated PerAppDomainDispatcher!\n");
}
}
else {
Debug.Assert(false, "Unexpected ID format received!");
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Unexpected ID format received!\n");
}
}
else {
Debug.Assert(false, "Null notification returned from ProcessMessage!");
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Null notification returned from ProcessMessage!\n");
}
}
else {
Debug.Assert(false, "Null payload for QN notification type!");
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Null payload for QN notification type!\n");
}
}
else {
handle = Guid.Empty;
// VSDD 546707: this assert was hit by SQL Notification fuzzing tests, disable it to let these tests run on Debug bits
// Debug.Assert(false, "Unexpected message format received!");
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Unexpected message format received!\n");
}
}
}
}
finally {
// Since we do not want to make a separate round trip just for the end conversation call, we need to
// batch it with the next command.
if (handle == Guid.Empty) { // This should only happen if failure occurred, or if non-QN format received.
_com.CommandText = (null != _beginConversationQuery) ? _beginConversationQuery : _receiveQuery; // If we're doing the initial query, we won't have a conversation Guid to begin yet.
if (_com.Parameters.Count > 1) { // Remove conversation param since next execute is only query.
_com.Parameters.Remove(_conversationGuidParam);
}
Debug.Assert(_com.Parameters.Count == 1, "Unexpected number of parameters!");
}
else {
_com.CommandText = _concatQuery; // END query + WAITFOR RECEIVE query.
_conversationGuidParam.Value = handle; // Set value for conversation handle.
if (_com.Parameters.Count == 1) { // Add parameter if previous execute was only query.
_com.Parameters.Add(_conversationGuidParam);
}
Debug.Assert(_com.Parameters.Count == 2, "Unexpected number of parameters!");
}
}
}
finally {
Bid.ScopeLeave(ref hscp);
}
}
示例7: FillCompatibleITypedSettersFromReader
//.........这里部分代码省略.........
continue;
}
case SqlDbType.Float:
{
SetDouble_Unchecked(sink, setters, i, reader.GetDouble(i));
continue;
}
case SqlDbType.Image:
{
SetSqlBytes_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0);
continue;
}
case SqlDbType.Int:
{
SetInt32_Unchecked(sink, setters, i, reader.GetInt32(i));
continue;
}
case SqlDbType.Money:
{
SetSqlMoney_Unchecked(sink, setters, i, metaData[i], reader.GetSqlMoney(i));
continue;
}
case SqlDbType.NChar:
case SqlDbType.NText:
case SqlDbType.NVarChar:
{
SetSqlChars_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlChars(i), 0);
continue;
}
case SqlDbType.Real:
{
SetSingle_Unchecked(sink, setters, i, reader.GetFloat(i));
continue;
}
case SqlDbType.UniqueIdentifier:
{
SetGuid_Unchecked(sink, setters, i, reader.GetGuid(i));
continue;
}
case SqlDbType.SmallDateTime:
{
SetDateTime_Checked(sink, setters, i, metaData[i], reader.GetDateTime(i));
continue;
}
case SqlDbType.SmallInt:
{
SetInt16_Unchecked(sink, setters, i, reader.GetInt16(i));
continue;
}
case SqlDbType.SmallMoney:
{
SetSqlMoney_Checked(sink, setters, i, metaData[i], reader.GetSqlMoney(i));
continue;
}
case SqlDbType.Text:
{
SetSqlChars_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlChars(i), 0);
continue;
}
case SqlDbType.Timestamp:
{
SetSqlBytes_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0);
continue;
}
case SqlDbType.TinyInt:
{
SetByte_Unchecked(sink, setters, i, reader.GetByte(i));
continue;
}
case SqlDbType.VarBinary:
{
SetSqlBytes_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0);
continue;
}
case SqlDbType.VarChar:
{
SetSqlChars_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlChars(i), 0);
continue;
}
case SqlDbType.Variant:
{
object sqlValue = reader.GetSqlValue(i);
ExtendedClrTypeCode typeCode = MetaDataUtilsSmi.DetermineExtendedTypeCode(sqlValue);
SetCompatibleValue(sink, setters, i, metaData[i], sqlValue, typeCode, 0);
continue;
}
case SqlDbType.Xml:
{
SetSqlXml_Unchecked(sink, setters, i, reader.GetSqlXml(i));
continue;
}
case SqlDbType.Udt:
{
SetSqlBytes_LengthChecked(sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0);
continue;
}
}
throw ADP.NotSupported();
}
}
示例8: ProcessNotificationResults
private void ProcessNotificationResults(SqlDataReader reader)
{
IntPtr ptr;
Bid.NotificationsScopeEnter(out ptr, "<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> %d#", this.ObjectID);
try
{
Guid empty = Guid.Empty;
try
{
if (!this._stop)
{
while (reader.Read())
{
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Row read.\n");
string str2 = reader.GetString(0);
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> msgType: '%ls'\n", str2);
empty = reader.GetGuid(1);
if (string.Compare(str2, "http://schemas.microsoft.com/SQL/Notifications/QueryNotification", StringComparison.OrdinalIgnoreCase) == 0)
{
SqlXml sqlXml = reader.GetSqlXml(2);
if (sqlXml != null)
{
SqlNotification sqlNotification = SqlDependencyProcessDispatcher.SqlNotificationParser.ProcessMessage(sqlXml);
if (sqlNotification != null)
{
string key = sqlNotification.Key;
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Key: '%ls'\n", key);
int index = key.IndexOf(';');
if (index >= 0)
{
SqlDependencyPerAppDomainDispatcher dispatcher;
string str3 = key.Substring(0, index);
lock (SqlDependencyProcessDispatcher._staticInstance._sqlDependencyPerAppDomainDispatchers)
{
dispatcher = SqlDependencyProcessDispatcher._staticInstance._sqlDependencyPerAppDomainDispatchers[str3];
}
if (dispatcher != null)
{
try
{
dispatcher.InvalidateCommandID(sqlNotification);
continue;
}
catch (Exception exception)
{
if (!ADP.IsCatchableExceptionType(exception))
{
throw;
}
ADP.TraceExceptionWithoutRethrow(exception);
continue;
}
}
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Received notification but do not have an associated PerAppDomainDispatcher!\n");
}
else
{
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Unexpected ID format received!\n");
}
}
else
{
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Null notification returned from ProcessMessage!\n");
}
}
else
{
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP|ERR> Null payload for QN notification type!\n");
}
}
else
{
empty = Guid.Empty;
Bid.NotificationsTrace("<sc.SqlConnectionContainer.ProcessNotificationResults|DEP> Unexpected message format received!\n");
}
}
}
}
finally
{
if (empty == Guid.Empty)
{
this._com.CommandText = (this._beginConversationQuery != null) ? this._beginConversationQuery : this._receiveQuery;
if (this._com.Parameters.Count > 1)
{
this._com.Parameters.Remove(this._conversationGuidParam);
}
}
else
{
this._com.CommandText = this._concatQuery;
this._conversationGuidParam.Value = empty;
if (this._com.Parameters.Count == 1)
{
this._com.Parameters.Add(this._conversationGuidParam);
}
}
}
}
finally
//.........这里部分代码省略.........
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:101,代码来源:SqlDependencyProcessDispatcher.cs
示例9: SqlSchemaInfo
/// <summary>
/// Constructs an instance of IStoreSchemaInfo using parts of a row from SqlDataReader.
/// </summary>
/// <param name="reader">SqlDataReader whose row has shard information.</param>
/// <param name="offset">Reader offset for column that begins shard information.</param>
internal SqlSchemaInfo(SqlDataReader reader, int offset)
{
this.Name = reader.GetString(offset);
this.ShardingSchemaInfo = reader.GetSqlXml(offset + 1);
}