Пример #1
0
        ///GENMHASH:6A122C62EB559D6E6E53725061B422FB:7EDDB3D4663F077E51B9DEED8CBEA81F
        protected override IList <Microsoft.Azure.Management.Redis.Fluent.RedisPatchScheduleImpl> ListChildResources()
        {
            IPage <RedisPatchScheduleInner> retValue = null;

            try
            {
                retValue = Extensions.Synchronize(() => this.Parent.Manager.Inner.PatchSchedules.ListByRedisResourceAsync(this.Parent.ResourceGroupName, this.Parent.Name));
            }
            catch (CloudException ex) when(HttpStatusCode.NotFound == ex.Response.StatusCode)
            {
                // no exception should be thrown if the error code is "404 Not Found"
            }

            if (retValue == null)
            {
                return(new List <RedisPatchScheduleImpl>());
            }

            return(retValue
                   .AsContinuousCollection(link => Extensions.Synchronize(() => this.Parent.Manager.Inner.PatchSchedules.ListByRedisResourceNextAsync(link)))
                   .Select(inner => new RedisPatchScheduleImpl(inner.Name, this.Parent, inner))
                   .ToList());
        }