コード例 #1
0
 public override void InitializeService()
 {
     if (File.Exists (serializedFile)) {
         try {
             using (FileStream fs = File.OpenRead (serializedFile)) {
                 XmlSerializer serializer
                     = new XmlSerializer (typeof (DbProviderCollection));
                 providers
                     = (DbProviderCollection) serializer.Deserialize (fs);
             }
         } catch (Exception e) {
             Runtime.LoggingService.Error ("Invalid monoquery file.");
             File.Delete (serializedFile);
         }
     }
 }
コード例 #2
0
 public static void BuildChildNodes(ITreeBuilder builder, DbProviderCollection collection)
 {
     foreach (DbProviderBase provider in collection)
         builder.AddChild (provider);
 }