コード例 #1
0
 /// <summary>
 /// Creates an instance of external child resource in-memory.
 /// </summary>
 /// <param name="name">The name of this external child resource.</param>
 /// <param name="parent">Reference to the parent of this external child resource.</param>
 /// <param name="innerObject">Reference to the inner object representing this external child resource.</param>
 /// <param name="sqlServerManager">Reference to the SQL server manager that accesses DNS alias operations.</param>
 ///GENMHASH:1B84E5430DBD759F48B80D4C7F8781CC:63DD15F38F429D8D42EAECC53ABE710A
 internal SqlSyncGroupImpl(string name, SqlDatabaseImpl parent, SyncGroupInner innerObject, ISqlManager sqlServerManager)
     : base(innerObject, parent)
 {
     this.name              = name;
     this.sqlServerManager  = sqlServerManager;
     this.resourceGroupName = parent.ResourceGroupName();
     this.sqlServerName     = parent.SqlServerName();
     this.sqlDatabaseName   = parent.Name();
 }
コード例 #2
0
 /// <summary>
 /// Creates an instance of external child resource in-memory.
 /// </summary>
 /// <param name="name">The name of this external child resource.</param>
 /// <param name="innerObject">Reference to the inner object representing this external child resource.</param>
 /// <param name="sqlServerManager">Reference to the SQL server manager that accesses DNS alias operations.</param>
 ///GENMHASH:2593A87C1076A6D668BDFE33052F341C:E7C65DE6BF45CF0BA29C2A32A669F3CF
 internal SqlSyncGroupImpl(string name, SyncGroupInner innerObject, ISqlManager sqlServerManager)
     : base(innerObject, null)
 {
     this.name             = name;
     this.sqlServerManager = sqlServerManager;
     if (innerObject?.Id != null)
     {
         ResourceId resourceId = ResourceId.FromString(innerObject.Id);
         this.resourceGroupName = resourceId?.ResourceGroupName;
         this.sqlServerName     = resourceId?.Parent?.Parent?.Name;
         this.sqlDatabaseName   = resourceId?.Parent?.Name;
         this.name = resourceId.Name;
     }
 }
 /// <summary>
 /// Updates a sync group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='parameters'>
 /// The requested sync group resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncGroupInner> BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroupInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Creates an instance of external child resource in-memory.
 /// </summary>
 /// <param name="resourceGroupName">The resource group name.</param>
 /// <param name="sqlServerName">The parent SQL server name.</param>
 /// <param name="sqlDatabaseName">The parent SQL Database name.</param>
 /// <param name="name">The name of this external child resource.</param>
 /// <param name="innerObject">Reference to the inner object representing this external child resource.</param>
 /// <param name="sqlServerManager">Reference to the SQL server manager that accesses DNS alias operations.</param>
 ///GENMHASH:93B2CDB9BD4EC90C1E3E6788282EF80D:46ED0A0EFDCFB4A8C02A54C6267EEAB9
 internal SqlSyncGroupImpl(string resourceGroupName, string sqlServerName, string sqlDatabaseName, string name, SyncGroupInner innerObject, ISqlManager sqlServerManager)
     : base(innerObject, null)
 {
     this.name              = name;
     this.sqlServerManager  = sqlServerManager;
     this.resourceGroupName = resourceGroupName;
     this.sqlServerName     = sqlServerName;
     this.sqlDatabaseName   = sqlDatabaseName;
 }
 /// <summary>
 /// Updates a sync group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='parameters'>
 /// The requested sync group resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncGroupInner> UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroupInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }