internal static string ToSerializedValue(this WebTestKind value)
        {
            switch (value)
            {
            case WebTestKind.Ping:
                return("ping");

            case WebTestKind.Multistep:
                return("multistep");
            }
            return(null);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the WebTest class.
 /// </summary>
 /// <param name="location">Resource location</param>
 /// <param name="syntheticMonitorId">Unique ID of this WebTest. This is
 /// typically the same value as the Name field.</param>
 /// <param name="webTestName">User defined name if this
 /// WebTest.</param>
 /// <param name="webTestKind">The kind of web test this is, valid
 /// choices are ping and multistep. Possible values include: 'ping',
 /// 'multistep'</param>
 /// <param name="locations">A list of where to physically run the tests
 /// from to give global coverage for accessibility of your
 /// application.</param>
 /// <param name="id">Azure resource Id</param>
 /// <param name="name">Azure resource name</param>
 /// <param name="type">Azure resource type</param>
 /// <param name="tags">Resource tags</param>
 /// <param name="kind">The kind of web test that this web test watches.
 /// Choices are ping and multistep. Possible values include: 'ping',
 /// 'multistep'</param>
 /// <param name="description">Purpose/user defined descriptive test for
 /// this WebTest.</param>
 /// <param name="enabled">Is the test actively being monitored.</param>
 /// <param name="frequency">Interval in seconds between test runs for
 /// this WebTest. Default value is 300.</param>
 /// <param name="timeout">Seconds until this WebTest will timeout and
 /// fail. Default value is 30.</param>
 /// <param name="retryEnabled">Allow for retries should this WebTest
 /// fail.</param>
 /// <param name="configuration">An XML configuration specification for
 /// a WebTest.</param>
 /// <param name="provisioningState">Current state of this component,
 /// whether or not is has been provisioned within the resource group it
 /// is defined. Users cannot change this value but are able to read
 /// from it. Values will include Succeeded, Deploying, Canceled, and
 /// Failed.</param>
 public WebTest(string location, string syntheticMonitorId, string webTestName, WebTestKind webTestKind, IList <WebTestGeolocation> locations, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), WebTestKind?kind = default(WebTestKind?), string description = default(string), bool?enabled = default(bool?), int?frequency = default(int?), int?timeout = default(int?), bool?retryEnabled = default(bool?), WebTestPropertiesConfiguration configuration = default(WebTestPropertiesConfiguration), string provisioningState = default(string))
     : base(location, id, name, type, tags)
 {
     Kind = kind;
     SyntheticMonitorId = syntheticMonitorId;
     WebTestName        = webTestName;
     Description        = description;
     Enabled            = enabled;
     Frequency          = frequency;
     Timeout            = timeout;
     WebTestKind        = webTestKind;
     RetryEnabled       = retryEnabled;
     Locations          = locations;
     Configuration      = configuration;
     ProvisioningState  = provisioningState;
     CustomInit();
 }
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="WebTestKind" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WebTestKind.CreateFrom(sourceValue);