コード例 #1
0
 /// <summary>
 /// Runs a code sample.
 /// </summary>
 /// <param name="user">The user whose credentials should be used for
 /// running the sample.</param>
 /// <param name="sample">The code sample to run.</param>
 private static void RunASample(DfareportingService service, SampleBase sample)
 {
     try {
         Console.WriteLine(sample.Description);
         sample.Run(service);
     } catch (Exception ex) {
         Console.WriteLine("An exception occurred while running this code example.\n{0} at\n{1}",
                           ex.Message, ex.StackTrace);
     } finally {
         Console.WriteLine("Press [Enter] to continue");
         Console.ReadLine();
     }
 }
コード例 #2
0
 static void RegisterSample(string key, SampleBase value)
 {
     sampleMap.Add(new SamplePair(key, value));
 }
コード例 #3
0
 /// <summary>
 /// Runs a code sample.
 /// </summary>
 /// <param name="user">The user whose credentials should be used for
 /// running the sample.</param>
 /// <param name="sample">The code sample to run.</param>
 private static void RunASample(DfareportingService service, SampleBase sample) {
   try {
     Console.WriteLine(sample.Description);
     sample.Run(service);
   } catch (Exception ex) {
     Console.WriteLine("An exception occurred while running this code example.\n{0} at\n{1}",
         ex.Message, ex.StackTrace);
   } finally {
     Console.WriteLine("Press [Enter] to continue");
     Console.ReadLine();
   }
 }
コード例 #4
0
 static void RegisterSample(string key, SampleBase value) {
   sampleMap.Add(new SamplePair(key, value));
 }