Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ImageShape.Serialization.cs

    r2768 r4068  
    11using System;
    2 using System.IO;
    3 using System.Collections.Generic;
    4 using System.Text;
     2using System.Diagnostics;
    53using System.Drawing;
    6 using System.ComponentModel;
    74using System.Runtime.Serialization;
     5using System.Xml.Schema;
    86using System.Xml.Serialization;
    9 using System.Diagnostics;
    10 using System.Xml.Schema;
    11 namespace Netron.Diagramming.Core
    12 {
     7namespace Netron.Diagramming.Core {
     8  /// <summary>
     9  /// Complementary partial class related to (de)serialization.
     10  /// </summary>
     11  [Serializable]
     12  public partial class ImageShape : ISerializable, IXmlSerializable, IDeserializationCallback {
     13    #region Deserialization constructor
    1314    /// <summary>
    14     /// Complementary partial class related to (de)serialization.
     15    /// Deserialization constructor
    1516    /// </summary>
    16    [Serializable]
    17     public partial class ImageShape : ISerializable, IXmlSerializable, IDeserializationCallback
    18     {
    19         #region Deserialization constructor
    20         /// <summary>
    21         /// Deserialization constructor
    22         /// </summary>
    23         /// <param name="info">The info.</param>
    24         /// <param name="context">The context.</param>
    25         protected ImageShape(SerializationInfo info, StreamingContext context)
    26             : base(info, context)
    27         {
    28             if(Tracing.BinaryDeserializationSwitch.Enabled)
    29                 Trace.WriteLine("Deserializing the fields of 'ImageShape'.");
     17    /// <param name="info">The info.</param>
     18    /// <param name="context">The context.</param>
     19    protected ImageShape(SerializationInfo info, StreamingContext context)
     20      : base(info, context) {
     21      if (Tracing.BinaryDeserializationSwitch.Enabled)
     22        Trace.WriteLine("Deserializing the fields of 'ImageShape'.");
    3023
    31             double version = info.GetDouble("ImageShapeVersion");
    32            
    33             try
    34             {
    35                 mImage = info.GetValue("Image", typeof(Image)) as Bitmap;
    36                 if (mImage != null)
    37                 {
    38                     mImagePath = info.GetString("ImagePath");
    39                 }
     24      double version = info.GetDouble("ImageShapeVersion");
    4025
    41             }
    42             catch(Exception exc)
    43             {
    44                 Trace.WriteLine(exc.Message);
    45             }
     26      try {
     27        mImage = info.GetValue("Image", typeof(Image)) as Bitmap;
     28        if (mImage != null) {
     29          mImagePath = info.GetString("ImagePath");
     30        }
    4631
    47         }
    48         #endregion
     32      }
     33      catch (Exception exc) {
     34        Trace.WriteLine(exc.Message);
     35      }
    4936
    50         #region Serialization events
    51        /*
     37    }
     38    #endregion
     39
     40    #region Serialization events
     41    /*
    5242        [OnSerializing]
    5343        void OnSerializing(StreamingContext context)
     
    6353        }
    6454        */
    65         #endregion
     55    #endregion
    6656
    67         #region Deserialization events
    68        /*
     57    #region Deserialization events
     58    /*
    6959        [OnDeserializing]     
    7060        void OnDeserializing(StreamingContext context)
     
    8070         }
    8171       */
    82         #endregion
     72    #endregion
    8373
    84         #region Serialization
    85         /// <summary>
    86         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
    87         /// </summary>
    88         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
    89         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
    90         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
    91         public override void GetObjectData(SerializationInfo info, StreamingContext context)
    92         {
    93             if(Tracing.BinarySerializationSwitch.Enabled)
    94                 Trace.WriteLine("Serializing the fields of 'ImageShape'.");
    95             base.GetObjectData(info, context);
     74    #region Serialization
     75    /// <summary>
     76    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
     77    /// </summary>
     78    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
     79    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
     80    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
     81    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
     82      if (Tracing.BinarySerializationSwitch.Enabled)
     83        Trace.WriteLine("Serializing the fields of 'ImageShape'.");
     84      base.GetObjectData(info, context);
    9685
    97             info.AddValue("ImageShapeVersion", imageShapeVersion);
    98             info.AddValue("ImagePath", this.mImagePath);
    99             info.AddValue("Image", mImage, typeof(Image));
     86      info.AddValue("ImageShapeVersion", imageShapeVersion);
     87      info.AddValue("ImagePath", this.mImagePath);
     88      info.AddValue("Image", mImage, typeof(Image));
    10089
    101         }
    102         #endregion
     90    }
     91    #endregion
    10392
    104         #region Xml serialization
    105         /// <summary>
    106         /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
    107         /// </summary>
    108         /// <returns>
    109         /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
    110         /// </returns>
    111         public override XmlSchema GetSchema()
    112         {
    113             throw new NotImplementedException("The method or operation is not implemented.");
    114         }
     93    #region Xml serialization
     94    /// <summary>
     95    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
     96    /// </summary>
     97    /// <returns>
     98    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
     99    /// </returns>
     100    public override XmlSchema GetSchema() {
     101      throw new NotImplementedException("The method or operation is not implemented.");
     102    }
    115103
    116         /// <summary>
    117         /// Generates an object from its XML representation.
    118         /// </summary>
    119         /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
    120         public override void ReadXml(System.Xml.XmlReader reader)
    121         {
    122             throw new NotImplementedException("The method or operation is not implemented.");
    123         }
     104    /// <summary>
     105    /// Generates an object from its XML representation.
     106    /// </summary>
     107    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
     108    public override void ReadXml(System.Xml.XmlReader reader) {
     109      throw new NotImplementedException("The method or operation is not implemented.");
     110    }
    124111
    125         /// <summary>
    126         /// Converts an object into its XML representation.
    127         /// </summary>
    128         /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
    129         public override void WriteXml(System.Xml.XmlWriter writer)
    130         {
    131             throw new NotImplementedException("The method or operation is not implemented.");
    132         }
    133         #endregion
     112    /// <summary>
     113    /// Converts an object into its XML representation.
     114    /// </summary>
     115    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
     116    public override void WriteXml(System.Xml.XmlWriter writer) {
     117      throw new NotImplementedException("The method or operation is not implemented.");
     118    }
     119    #endregion
    134120
    135121
    136122
    137         /// <summary>
    138         /// Runs when the entire object graph has been deserialized.
    139         /// </summary>
    140         /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
    141         public override void  OnDeserialization(object sender)
    142         {
    143             base.OnDeserialization(sender);
    144             if(Tracing.BinaryDeserializationSwitch.Enabled)
    145                 Trace.WriteLine("IDeserializationCallback of 'ImageShape' called.");
    146            
     123    /// <summary>
     124    /// Runs when the entire object graph has been deserialized.
     125    /// </summary>
     126    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
     127    public override void OnDeserialization(object sender) {
     128      base.OnDeserialization(sender);
     129      if (Tracing.BinaryDeserializationSwitch.Enabled)
     130        Trace.WriteLine("IDeserializationCallback of 'ImageShape' called.");
    147131
    148         }
     132
    149133    }
     134  }
    150135}
Note: See TracChangeset for help on using the changeset viewer.