Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/10 14:53:49 (14 years ago)
Author:
mkommend
Message:

removed warnings from HeuristicLab.Netron (ticket #915)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinarySerializer.cs

    r2768 r3038  
    2727      FileStream fs = new FileStream(fileName, FileMode.Create);
    2828
    29       GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();     
    30      
    31       try
    32       {
    33         Document document = control.Document;
    34        
     29      GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
    3530
    36         //Warning!: cleaning up, you need to unhook all events since
    37                 // unserializable classes hooked to events will give problems.       
    38         f.Serialize<Document>(fs, document );
    39         return true;
    40       }     
    41       catch(Exception exc)     
    42       {
    43         //site.OutputInfo("The graph was not saved, because some graph events were attached to non-serializable classes.\r\n This is a known issue and will be resolved in a later stadium.",OutputInfoLevels.Exception);
    44         Trace.WriteLine(exc.Message, "BinarySerializer.SaveAs");
    45        
    46         //DumpInfo();
    47       }
    48       catch
    49       {
    50         Trace.WriteLine("Non-CLS exception caught.","BinarySerializer.SaveAs");
    51       }
     31      try {
     32        Document document = control.Document;
     33
     34
     35        //Warning!: cleaning up, you need to unhook all events since
     36        // unserializable classes hooked to events will give problems.       
     37        f.Serialize<Document>(fs, document);
     38        return true;
     39      }
     40      catch (Exception exc) {
     41        //site.OutputInfo("The graph was not saved, because some graph events were attached to non-serializable classes.\r\n This is a known issue and will be resolved in a later stadium.",OutputInfoLevels.Exception);
     42        Trace.WriteLine(exc.Message, "BinarySerializer.SaveAs");
     43
     44        //DumpInfo();
     45      }
    5246      finally
    5347      {
     
    117111                MessageBox.Show(exc.Message, "BinarySerializer.Open");
    118112      }
    119       catch
    120       {
    121                 MessageBox.Show("Non-CLS exception caught.", "BinarySerializer.Open");
    122        
    123       }
    124113      finally
    125114      {
Note: See TracChangeset for help on using the changeset viewer.