/// <summary> /// Convert an enum of type JobServiceBusAuthenticationType to a string. /// </summary> /// <param name='value'> /// The value to convert to a string. /// </param> /// <returns> /// The enum value as a string. /// </returns> internal static string JobServiceBusAuthenticationTypeToString(JobServiceBusAuthenticationType value) { if (value == JobServiceBusAuthenticationType.NotSpecified) { return("NotSpecified"); } if (value == JobServiceBusAuthenticationType.SharedAccessKey) { return("SharedAccessKey"); } throw new ArgumentOutOfRangeException("value"); }
/// <summary> /// Initializes a new instance of the JobServiceBusAuthentication class /// with required arguments. /// </summary> public JobServiceBusAuthentication(string sasKeyName, string sasKey, JobServiceBusAuthenticationType type) : this() { if (sasKeyName == null) { throw new ArgumentNullException("sasKeyName"); } if (sasKey == null) { throw new ArgumentNullException("sasKey"); } this.SasKeyName = sasKeyName; this.SasKey = sasKey; this.Type = type; }