/// <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:CCE195E09193EDC4383029CD5CB1C628:2B6C79416FE1C7672196779693AE2D14
 internal SqlSyncMemberImpl(string name, SqlSyncGroupImpl parent, SyncMemberInner innerObject, ISqlManager sqlServerManager)
     : base(innerObject, parent)
 {
     this.sqlServerManager  = sqlServerManager;
     this.resourceGroupName = parent.ResourceGroupName();
     this.sqlServerName     = parent.SqlServerName();
     this.sqlDatabaseName   = parent.SqlDatabaseName();
     this.sqlSyncGroupName  = parent.Name();
 }
 /// <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:DE04C9A4A480ADDBCD794C715F4CCE5C:657722CF28579ADFAAA5E7E0CF6B5310
 internal SqlSyncMemberImpl(string name, SyncMemberInner 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?.Parent?.Name;
         this.sqlDatabaseName   = resourceId?.Parent?.Parent?.Name;
         this.sqlSyncGroupName  = resourceId?.Parent?.Name;
         this.name = resourceId?.Name;
     }
 }
 /// <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="sqlSyncGroupName">The parent SQL Sync Group 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:8F51618C600342C2ED2950C13B0FBCBA:94FDB59ED889413CE8D45C337B683C50
 internal SqlSyncMemberImpl(string resourceGroupName, string sqlServerName, string sqlDatabaseName, string sqlSyncGroupName, string name, SyncMemberInner innerObject, ISqlManager sqlServerManager)
     : base(innerObject, null)
 {
     this.sqlServerManager  = sqlServerManager;
     this.resourceGroupName = resourceGroupName;
     this.sqlServerName     = sqlServerName;
     this.sqlDatabaseName   = sqlDatabaseName;
     this.sqlSyncGroupName  = sqlSyncGroupName;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates or updates a sync member.
 /// </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 on which the sync member is hosted.
 /// </param>
 /// <param name='syncMemberName'>
 /// The name of the sync member.
 /// </param>
 /// <param name='parameters'>
 /// The requested sync member resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncMemberInner> CreateOrUpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMemberInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates an existing sync member.
 /// </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 on which the sync member is hosted.
 /// </param>
 /// <param name='syncMemberName'>
 /// The name of the sync member.
 /// </param>
 /// <param name='parameters'>
 /// The requested sync member resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncMemberInner> BeginUpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMemberInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }