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/ConnectorBase.Serialization.cs

    r2768 r4068  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Text;
     2using System.Diagnostics;
    43using System.Drawing;
    5 using System.ComponentModel;
    64using System.Runtime.Serialization;
     5using System.Xml.Schema;
    76using System.Xml.Serialization;
    8 using System.Diagnostics;
    9 using System.Xml.Schema;
    10 namespace Netron.Diagramming.Core
    11 {
     7namespace Netron.Diagramming.Core {
     8  /// <summary>
     9  /// Complementary partial class related to (de)serialization.
     10  /// </summary>
     11  [Serializable]
     12  public abstract partial class ConnectorBase : ISerializable, IXmlSerializable, IDeserializationCallback {
     13    #region Deserialization constructor
    1214    /// <summary>
    13     /// Complementary partial class related to (de)serialization.
     15    /// Deserialization constructor
    1416    /// </summary>
    15    [Serializable]
    16     public abstract partial class ConnectorBase : ISerializable, IXmlSerializable, IDeserializationCallback 
    17     {
    18         #region Deserialization constructor
    19         /// <summary>
    20         /// Deserialization constructor
    21         /// </summary>
    22         /// <param name="info">The info.</param>
    23         /// <param name="context">The context.</param>
    24         protected ConnectorBase(SerializationInfo info, StreamingContext context) : base(info, context)
    25         {
    26             if(Tracing.BinaryDeserializationSwitch.Enabled)
    27                 Trace.WriteLine("Deserializing the fields of 'ConnectorBase'.");
     17    /// <param name="info">The info.</param>
     18    /// <param name="context">The context.</param>
     19    protected ConnectorBase(SerializationInfo info, StreamingContext context)
     20      : base(info, context) {
     21      if (Tracing.BinaryDeserializationSwitch.Enabled)
     22        Trace.WriteLine("Deserializing the fields of 'ConnectorBase'.");
    2823
    29             double version = info.GetDouble("ConnectorBaseVersion");
     24      double version = info.GetDouble("ConnectorBaseVersion");
    3025
    31             this.mShowName = info.GetBoolean("ShowName");
    32             this.mNameLocation = (ConnectorNameLocation) info.GetValue(
    33                 "NameLocation",
    34                 typeof(ConnectorNameLocation));
     26      this.mShowName = info.GetBoolean("ShowName");
     27      this.mNameLocation = (ConnectorNameLocation)info.GetValue(
     28          "NameLocation",
     29          typeof(ConnectorNameLocation));
    3530
    36             this.mPoint = (Point) info.GetValue("Point", typeof(Point));
    37             mAttachedConnectors = new CollectionBase<IConnector>();
     31      this.mPoint = (Point)info.GetValue("Point", typeof(Point));
     32      mAttachedConnectors = new CollectionBase<IConnector>();
    3833
    39             #region Preparation of the anchoring process
    40             Guid tuid = new Guid(info.GetString("AttachedTo"));           
    41             Anchors.Add(this.Uid, new Anchor(tuid, this));
    42             #endregion
    43         }
    44         #endregion
     34      #region Preparation of the anchoring process
     35      Guid tuid = new Guid(info.GetString("AttachedTo"));
     36      Anchors.Add(this.Uid, new Anchor(tuid, this));
     37      #endregion
     38    }
     39    #endregion
    4540
    46         #region Serialization events
    47        /*
     41    #region Serialization events
     42    /*
    4843        [OnSerializing]
    4944        void OnSerializing(StreamingContext context)
     
    5752        }
    5853        */
    59         #endregion
     54    #endregion
    6055
    61         #region Deserialization events
    62        /*
     56    #region Deserialization events
     57    /*
    6358        [OnDeserializing]
    6459        void OnDeserializing(StreamingContext context)
     
    6863        }
    6964        */
    70         [OnDeserialized]
    71         void OnDeserialized(StreamingContext context)
    72          {
    73             if(Tracing.BinaryDeserializationSwitch.Enabled)
    74                 Trace.WriteLine("...deserialization of 'ConnectorBase' finished");
     65    [OnDeserialized]
     66    void OnDeserialized(StreamingContext context) {
     67      if (Tracing.BinaryDeserializationSwitch.Enabled)
     68        Trace.WriteLine("...deserialization of 'ConnectorBase' finished");
    7569
    7670
    77        
    78          }
    79        
    80         #endregion
    8171
    82         #region Serialization
    83          /// <summary>
    84          /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
    85          /// </summary>
    86          /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
    87          /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
    88          /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
    89         public override void GetObjectData(SerializationInfo info, StreamingContext context)
    90         {
    91             if(Tracing.BinarySerializationSwitch.Enabled)
    92                 Trace.WriteLine("Serializing the fields of 'ConnectorBase'.");
    93             base.GetObjectData(info, context);
     72    }
    9473
    95             info.AddValue("ConnectorBaseVersion", connectorBaseVersion);
     74    #endregion
    9675
    97             info.AddValue(
    98                 "NameLocation",
    99                 mNameLocation,
    100                 typeof(ConnectorNameLocation));
     76    #region Serialization
     77    /// <summary>
     78    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
     79    /// </summary>
     80    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
     81    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
     82    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
     83    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
     84      if (Tracing.BinarySerializationSwitch.Enabled)
     85        Trace.WriteLine("Serializing the fields of 'ConnectorBase'.");
     86      base.GetObjectData(info, context);
    10187
    102             info.AddValue("ShowName", mShowName);
    103             info.AddValue("Point", this.Point, typeof(Point));
    104             if(this.AttachedTo!=null)
    105                 info.AddValue("AttachedTo", this.AttachedTo.Uid.ToString());
    106             else
    107                 info.AddValue("AttachedTo", Guid.Empty);
    108            
    109         }
    110         #endregion
     88      info.AddValue("ConnectorBaseVersion", connectorBaseVersion);
    11189
    112         #region Xml serialization
    113         /// <summary>
    114         /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
    115         /// </summary>
    116         /// <returns>
    117         /// 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.
    118         /// </returns>
    119         public override XmlSchema GetSchema()
    120         {
    121             throw new NotImplementedException("The method or operation is not implemented.");
    122         }
     90      info.AddValue(
     91          "NameLocation",
     92          mNameLocation,
     93          typeof(ConnectorNameLocation));
    12394
    124         /// <summary>
    125         /// Generates an object from its XML representation.
    126         /// </summary>
    127         /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
    128         public override void ReadXml(System.Xml.XmlReader reader)
    129         {
    130             throw new NotImplementedException("The method or operation is not implemented.");
    131         }
     95      info.AddValue("ShowName", mShowName);
     96      info.AddValue("Point", this.Point, typeof(Point));
     97      if (this.AttachedTo != null)
     98        info.AddValue("AttachedTo", this.AttachedTo.Uid.ToString());
     99      else
     100        info.AddValue("AttachedTo", Guid.Empty);
    132101
    133         /// <summary>
    134         /// Converts an object into its XML representation.
    135         /// </summary>
    136         /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
    137         public override void WriteXml(System.Xml.XmlWriter writer)
    138         {
    139             throw new NotImplementedException("The method or operation is not implemented.");
    140         }
    141         #endregion
     102    }
     103    #endregion
    142104
    143         #region IDeserializationCallback Members
     105    #region Xml serialization
     106    /// <summary>
     107    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
     108    /// </summary>
     109    /// <returns>
     110    /// 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.
     111    /// </returns>
     112    public override XmlSchema GetSchema() {
     113      throw new NotImplementedException("The method or operation is not implemented.");
     114    }
    144115
    145         /// <summary>
    146         /// Runs when the entire object graph has been deserialized.
    147         /// </summary>
    148         /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
    149         public override void OnDeserialization(object sender)
    150         {
    151             base.OnDeserialization(sender);
    152        
    153             if(Tracing.BinaryDeserializationSwitch.Enabled)
    154                 Trace.WriteLine("IDeserializationCallback of 'ConnectorBase' called.");
    155         }
     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      throw new NotImplementedException("The method or operation is not implemented.");
     122    }
    156123
    157         #endregion
     124    /// <summary>
     125    /// Converts an object into its XML representation.
     126    /// </summary>
     127    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
     128    public override void WriteXml(System.Xml.XmlWriter writer) {
     129      throw new NotImplementedException("The method or operation is not implemented.");
    158130    }
     131    #endregion
     132
     133    #region IDeserializationCallback Members
     134
     135    /// <summary>
     136    /// Runs when the entire object graph has been deserialized.
     137    /// </summary>
     138    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
     139    public override void OnDeserialization(object sender) {
     140      base.OnDeserialization(sender);
     141
     142      if (Tracing.BinaryDeserializationSwitch.Enabled)
     143        Trace.WriteLine("IDeserializationCallback of 'ConnectorBase' called.");
     144    }
     145
     146    #endregion
     147  }
    159148}
Note: See TracChangeset for help on using the changeset viewer.