当前位置: 首页>>代码示例>>C#>>正文


C# JsonUnmarshallerContext.Read方法代码示例

本文整理汇总了C#中Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext.Read方法的典型用法代码示例。如果您正苦于以下问题:C# JsonUnmarshallerContext.Read方法的具体用法?C# JsonUnmarshallerContext.Read怎么用?C# JsonUnmarshallerContext.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext的用法示例。


在下文中一共展示了JsonUnmarshallerContext.Read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,GetHostnameSuggestionResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("LayerId", targetDepth))
             {
               context.Read();
               response.LayerId = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("Hostname", targetDepth))
             {
               context.Read();
               response.Hostname = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:GetHostnameSuggestionResponseUnmarshaller.cs

示例2: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,UpdateChapCredentialsResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("TargetARN", targetDepth))
             {
               context.Read();
               response.TargetARN = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("InitiatorName", targetDepth))
             {
               context.Read();
               response.InitiatorName = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:UpdateChapCredentialsResponseUnmarshaller.cs

示例3: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,ResolveCaseResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("initialCaseStatus", targetDepth))
             {
               context.Read();
               response.InitialCaseStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("finalCaseStatus", targetDepth))
             {
               context.Read();
               response.FinalCaseStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:ResolveCaseResponseUnmarshaller.cs

示例4: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,CreateSnapshotResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("VolumeARN", targetDepth))
             {
               context.Read();
               response.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("SnapshotId", targetDepth))
             {
               context.Read();
               response.SnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:CreateSnapshotResponseUnmarshaller.cs

示例5: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,PutRecordResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("ShardId", targetDepth))
             {
               context.Read();
               response.ShardId = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("SequenceNumber", targetDepth))
             {
               context.Read();
               response.SequenceNumber = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:PutRecordResponseUnmarshaller.cs

示例6: UnmarshallResult

        private static void UnmarshallResult(JsonUnmarshallerContext context, SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("Property1", targetDepth))
                {
                    context.Read();
                    response.Property1 = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("Property2", targetDepth))
                {
                    context.Read();
                    response.Property2 = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return;
                }
            }

            return;
        }
开发者ID:Webinfinity,项目名称:UnmarshallerBug,代码行数:29,代码来源:SimpleUnmarshaller.cs

示例7: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,CreatePresetResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("Preset", targetDepth))
             {
               context.Read();
               response.Preset = PresetUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("Warning", targetDepth))
             {
               context.Read();
               response.Warning = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:CreatePresetResponseUnmarshaller.cs

示例8: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,UpdateItemResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("Attributes", targetDepth))
             {
               context.Read();
               response.Attributes = new Dictionary<String,AttributeValue>();
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   continue;
               }
               KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance());
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;
                 if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart)
                 {
                     continue;
                 }
                 if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd)
                 {
                     break;
                 }
                 KeyValuePair<string, AttributeValue> kvp = unmarshaller.Unmarshall(context);
                   response.Attributes.Add(kvp.Key, kvp.Value);
               }
               continue;
             }
 
             if (context.TestExpression("ConsumedCapacity", targetDepth))
             {
               context.Read();
               response.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("ItemCollectionMetrics", targetDepth))
             {
               context.Read();
               response.ItemCollectionMetrics = ItemCollectionMetricsUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:virajs,项目名称:aws-sdk-net,代码行数:56,代码来源:UpdateItemResponseUnmarshaller.cs

示例9: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeVTLDevicesResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("GatewayARN", targetDepth))
             {
               context.Read();
               response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("VTLDevices", targetDepth))
             {
               context.Read();
               response.VTLDevices = new List<VTLDevice>();
                       VTLDeviceUnmarshaller unmarshaller = VTLDeviceUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.VTLDevices.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("Marker", targetDepth))
             {
               context.Read();
               response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:51,代码来源:DescribeVTLDevicesResponseUnmarshaller.cs

示例10: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeObjectsResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("pipelineObjects", targetDepth))
             {
               context.Read();
               response.PipelineObjects = new List<PipelineObject>();
                       PipelineObjectUnmarshaller unmarshaller = PipelineObjectUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.PipelineObjects.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("marker", targetDepth))
             {
               context.Read();
               response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("hasMoreResults", targetDepth))
             {
               context.Read();
               response.HasMoreResults = BoolUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:51,代码来源:DescribeObjectsResponseUnmarshaller.cs

示例11: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,ListClustersResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("Clusters", targetDepth))
             {
               context.Read();
               
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   response.Clusters = null;
                   continue;
               }
                 response.Clusters = new List<ClusterSummary>();
                 ClusterSummaryUnmarshaller unmarshaller = ClusterSummaryUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.Clusters.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("Marker", targetDepth))
             {
               context.Read();
               response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:50,代码来源:ListClustersResponseUnmarshaller.cs

示例12: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeCasesResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("cases", targetDepth))
             {
               context.Read();
               
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   response.Cases = null;
                   continue;
               }
                 response.Cases = new List<CaseDetails>();
                 CaseDetailsUnmarshaller unmarshaller = CaseDetailsUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.Cases.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("nextToken", targetDepth))
             {
               context.Read();
               response.NextToken = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:50,代码来源:DescribeCasesResponseUnmarshaller.cs

示例13: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,AddInstanceGroupsResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("JobFlowId", targetDepth))
             {
               context.Read();
               response.JobFlowId = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("InstanceGroupIds", targetDepth))
             {
               context.Read();
               
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   response.InstanceGroupIds = null;
                   continue;
               }
                 response.InstanceGroupIds = new List<String>();
                 StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.InstanceGroupIds.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:50,代码来源:AddInstanceGroupsResponseUnmarshaller.cs

示例14: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,ListPresetsResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("Presets", targetDepth))
             {
               context.Read();
               
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   response.Presets = null;
                   continue;
               }
                 response.Presets = new List<Preset>();
                 PresetUnmarshaller unmarshaller = PresetUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.Presets.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("NextPageToken", targetDepth))
             {
               context.Read();
               response.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:50,代码来源:ListPresetsResponseUnmarshaller.cs

示例15: UnmarshallResult

       private static void UnmarshallResult(JsonUnmarshallerContext context,ListVaultsResponse response)
       {
         
           int originalDepth = context.CurrentDepth;
           int targetDepth = originalDepth + 1;
           while (context.Read())
           {
             
             if (context.TestExpression("VaultList", targetDepth))
             {
               context.Read();
               
               if (context.CurrentTokenType == JsonToken.Null)
               {
                   response.VaultList = null;
                   continue;
               }
                 response.VaultList = new List<DescribeVaultOutput>();
                 DescribeVaultOutputUnmarshaller unmarshaller = DescribeVaultOutputUnmarshaller.GetInstance();
               while (context.Read())
               {
                 JsonToken token = context.CurrentTokenType;                
                 if (token == JsonToken.ArrayStart)
                 {
                   continue;
                 }
                 if (token == JsonToken.ArrayEnd)
                 {
                   break;
                 }
                  response.VaultList.Add(unmarshaller.Unmarshall(context));
               }
               continue;
             }
 
             if (context.TestExpression("Marker", targetDepth))
             {
               context.Read();
               response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
               if (context.CurrentDepth <= originalDepth)
               {                   
                   return;
               }
           }
                       
           return;
       }                        
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:50,代码来源:ListVaultsResponseUnmarshaller.cs


注:本文中的Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext.Read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。