コード例 #1
0
        ///GENMHASH:6A2AC1CD7146DF56E6C4B83D602BB44B:F4F2535FF206722000C1335B90902873
        internal LoadBalancerInboundNatRuleImpl DefineInboundNatRule(string name)
        {
            ILoadBalancerInboundNatRule natRule;

            if (!inboundNatRules.TryGetValue(name, out natRule))
            {
                InboundNatRuleInner inner = new InboundNatRuleInner()
                {
                    Name = name
                };

                return(new LoadBalancerInboundNatRuleImpl(inner, this));
            }
            else
            {
                return((LoadBalancerInboundNatRuleImpl)natRule);
            }
        }
 /// <summary>
 /// Creates or updates a load balancer inbound nat rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='loadBalancerName'>
 /// The name of the load balancer.
 /// </param>
 /// <param name='inboundNatRuleName'>
 /// The name of the inbound nat rule.
 /// </param>
 /// <param name='inboundNatRuleParameters'>
 /// Parameters supplied to the create or update inbound nat rule operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InboundNatRuleInner> BeginCreateOrUpdateAsync(this IInboundNatRulesOperations operations, string resourceGroupName, string loadBalancerName, string inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }