Esempio n. 1
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertIsLessThanOrEqual(nameof(PollTimeoutSeconds), PollTimeoutSeconds, 30);

            await eventListener.AssertNotNull(nameof(TaskUuidList), TaskUuidList);

            if (TaskUuidList != null)
            {
                for (int __i = 0; __i < TaskUuidList.Length; __i++)
                {
                    await eventListener.AssertRegEx($"TaskUuidList[{__i}]", TaskUuidList[__i], @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");
                }
            }
        }