Ejemplo n.º 1
0
 /// <summary> Sets nested level following a successful read. </summary>
 private async void SkipToDeletedResourceEnd()
 {
     if (this.underlyingReader.State != ODataReaderState.DeletedResourceEnd)
     {
         await underlyingReader.ReadAsync().FollowOnSuccessWith(t =>
         {
             SkipToDeletedResourceEnd();
         }).ConfigureAwait(false);
     }
 }
Ejemplo n.º 2
0
        private async Task DoReadAsync(
            ODataJsonLightReader jsonLightReader,
            Action <ODataResourceSet> verifyResourceSetAction = null,
            Action <ODataResource> verifyResourceAction       = null)
        {
            while (await jsonLightReader.ReadAsync())
            {
                switch (jsonLightReader.State)
                {
                case ODataReaderState.ResourceSetStart:
                    break;

                case ODataReaderState.ResourceSetEnd:
                    if (verifyResourceSetAction != null)
                    {
                        verifyResourceSetAction(jsonLightReader.Item as ODataResourceSet);
                    }

                    break;

                case ODataReaderState.ResourceStart:
                    break;

                case ODataReaderState.ResourceEnd:
                    if (verifyResourceAction != null)
                    {
                        verifyResourceAction(jsonLightReader.Item as ODataResource);
                    }

                    break;

                default:
                    break;
                }
            }
        }