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


C# ExecutionContext.PutString方法代码示例

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


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

示例1: TestSaveExecutionContextJob2

        public void TestSaveExecutionContextJob2()
        {
            var execution = new JobExecution(1);
            var originalContext = new ExecutionContext();
            execution.ExecutionContext = originalContext;
            originalContext.PutString("test1", "test1");
            originalContext.PutLong("test2", 2L);

            _executionContextDao.SaveExecutionContext(execution);
            var context = _executionContextDao.GetExecutionContext(execution);

            Assert.AreEqual(originalContext, context);
        }
开发者ID:pkubryk,项目名称:SummerBatch,代码行数:13,代码来源:MapExecutionContextDaoTest.cs

示例2: TestSaveExecutionContextStep2

        public void TestSaveExecutionContextStep2()
        {
            Insert(@"TestData\DbDao\ExecutionContextTestData.xml");
            var jobExecution = new JobExecution(1);
            var execution = new StepExecution("TestStep", jobExecution, 1);
            var originalContext = new ExecutionContext();
            execution.ExecutionContext = originalContext;
            originalContext.PutString("test1", "test1");
            originalContext.PutLong("test2", 2L);

            _executionContextDao.SaveExecutionContext(execution);
            var context = _executionContextDao.GetExecutionContext(execution);

            Assert.AreEqual(originalContext, context);
        }
开发者ID:pkubryk,项目名称:SummerBatch,代码行数:15,代码来源:DbExecutionContextDaoTest.cs

示例3: Partition

 /// <summary>
 /// Creates one partition per resource and adds the URI in the context.
 /// </summary>
 /// <param name="gridSize">ignored</param>
 /// <returns>a dictionary containing an execution context per resource</returns>
 public IDictionary<string, ExecutionContext> Partition(int gridSize)
 {
     var contexts = new Dictionary<string, ExecutionContext>();
     for (var i = 0; i < Resources.Count; i++)
     {
         var resource = Resources[i];
         var context = new ExecutionContext();
         Assert.State(resource.Exists(), string.Format("Resource does not exist: {0}",resource));
         context.PutString(KeyName, resource.GetUri().AbsoluteUri);
         context.PutInt(PartitionIdName, i);
         contexts[PartitionKey + i] = context;
     }
     return contexts;
 }
开发者ID:pkubryk,项目名称:SummerBatch,代码行数:19,代码来源:MultiResourcePartitioner.cs


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