/// <summary> /// Constructs a request to update schema info to GSM. /// </summary> /// <param name="shardMapManager">Shard map manager object.</param> /// <param name="operationName">Operation name, useful for diagnostics.</param> /// <param name="schemaInfo">Schema info to update.</param> /// <returns>The store operation.</returns> public virtual IStoreOperationGlobal CreateUpdateShardingSchemaInfoGlobalOperation( ShardMapManager shardMapManager, string operationName, IStoreSchemaInfo schemaInfo) { return(new UpdateShardingSchemaInfoGlobalOperation( shardMapManager, operationName, schemaInfo)); }
/// <summary> /// Serializes schema information to xml. /// </summary> /// <param name="name">Name of the schema information element.</param> /// <param name="schemaInfo">Actual schema info.</param> /// <returns>XElement representing the given schema info.</returns> internal static XElement WriteIStoreSchemaInfo(string name, IStoreSchemaInfo schemaInfo) { Debug.Assert(schemaInfo != null); using (XmlReader r = schemaInfo.ShardingSchemaInfo.CreateReader()) { return(new XElement(name, new XElement("Name", schemaInfo.Name), new XElement("Info", XElement.Load(r)))); } }
/// <summary> /// Constructs a request to update schema info to GSM. /// </summary> /// <param name="shardMapManager">Shard map manager object.</param> /// <param name="operationName">Operation name, useful for diagnostics.</param> /// <param name="schemaInfo">Schema info to update.</param> /// <returns>The store operation.</returns> public virtual IStoreOperationGlobal CreateUpdateShardingSchemaInfoGlobalOperation( ShardMapManager shardMapManager, string operationName, IStoreSchemaInfo schemaInfo) { return new UpdateShardingSchemaInfoGlobalOperation( shardMapManager, operationName, schemaInfo); }
/// <summary> /// Request to update schema info to GSM. /// </summary> /// <param name="schemaInfo">Schema info object to update</param> /// <returns>Xml formatted request.</returns> internal static XElement UpdateShardingSchemaInfoGlobal(IStoreSchemaInfo schemaInfo) { return new XElement( @"UpdateShardingSchemaInfoGlobal", StoreOperationRequestBuilder.s_gsmVersion, StoreObjectFormatterXml.WriteIStoreSchemaInfo("SchemaInfo", schemaInfo)); }
/// <summary> /// Constructs a request to update schema info to GSM. /// </summary> /// <param name="shardMapManager">Shard map manager object.</param> /// <param name="operationName">Operation name, useful for diagnostics.</param> /// <param name="schemaInfo">Schema info to update.</param> internal UpdateShardingSchemaInfoGlobalOperation(ShardMapManager shardMapManager, string operationName, IStoreSchemaInfo schemaInfo) : base(shardMapManager.Credentials, shardMapManager.RetryPolicy, operationName) { _schemaInfo = schemaInfo; }
/// <summary> /// Serializes schema information to xml. /// </summary> /// <param name="name">Name of the schema information element.</param> /// <param name="schemaInfo">Actual schema info.</param> /// <returns>XElement representing the given schema info.</returns> internal static XElement WriteIStoreSchemaInfo(string name, IStoreSchemaInfo schemaInfo) { Debug.Assert(schemaInfo != null); using (XmlReader r = schemaInfo.ShardingSchemaInfo.CreateReader()) { return new XElement(name, new XElement("Name", schemaInfo.Name), new XElement("Info", XElement.Load(r))); } }
/// <summary> /// Constructs a request to add schema info to GSM. /// </summary> /// <param name="shardMapManager">Shard map manager object.</param> /// <param name="operationName">Operation name, useful for diagnostics.</param> /// <param name="schemaInfo">Schema info to add.</param> internal AddShardingSchemaInfoGlobalOperation(ShardMapManager shardMapManager, string operationName, IStoreSchemaInfo schemaInfo) : base(shardMapManager.Credentials, shardMapManager.RetryPolicy, operationName) { _schemaInfo = schemaInfo; }
/// <summary> /// Sets the stub of StoreOperationFactory.CreateUpdateShardingSchemaInfoGlobalOperation(ShardMapManager shardMapManager, String operationName, IStoreSchemaInfo schemaInfo) /// </summary> public override IStoreOperationGlobal CreateUpdateShardingSchemaInfoGlobalOperation(ShardMapManager shardMapManager, string operationName, IStoreSchemaInfo schemaInfo) { Func<ShardMapManager, string, IStoreSchemaInfo, IStoreOperationGlobal> func1 = this.CreateUpdateShardingSchemaInfoGlobalOperationShardMapManagerStringIStoreSchemaInfo; if (func1 != null) return func1(shardMapManager, operationName, schemaInfo); if (this.___callBase) return base.CreateUpdateShardingSchemaInfoGlobalOperation(shardMapManager, operationName, schemaInfo); return this.InstanceBehavior.Result<StubStoreOperationFactory, IStoreOperationGlobal>(this, "CreateUpdateShardingSchemaInfoGlobalOperation"); }