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

    r2768 r4068  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Text;
    4 using System.Drawing;
    5 using System.ComponentModel;
     2using System.Diagnostics;
    63using System.Runtime.Serialization;
     4using System.Xml.Schema;
    75using System.Xml.Serialization;
    8 using System.Diagnostics;
    9 using System.Xml.Schema;
    10 namespace Netron.Diagramming.Core
    11 {
     6namespace Netron.Diagramming.Core {
     7  /// <summary>
     8  /// Complementary partial class related to (de)serialization.
     9  /// </summary>
     10  [Serializable]
     11  public partial class GroupShape : ISerializable, IXmlSerializable, IDeserializationCallback {
     12    #region Deserialization constructor
    1213    /// <summary>
    13     /// Complementary partial class related to (de)serialization.
     14    /// Deserialization constructor
    1415    /// </summary>
    15    [Serializable]
    16     public partial class GroupShape : 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 GroupShape(SerializationInfo info, StreamingContext context) : base(info, context)
    25         {
    26             if(Tracing.BinaryDeserializationSwitch.Enabled)
    27                 Trace.WriteLine("Deserializing the fields of 'GroupShape'.");
     16    /// <param name="info">The info.</param>
     17    /// <param name="context">The context.</param>
     18    protected GroupShape(SerializationInfo info, StreamingContext context)
     19      : base(info, context) {
     20      if (Tracing.BinaryDeserializationSwitch.Enabled)
     21        Trace.WriteLine("Deserializing the fields of 'GroupShape'.");
    2822
    29             double version = info.GetDouble("GroupShapeVersion");
    30             mAllowUnGroup = info.GetBoolean("CanUngroup");
    31             mEntities = info.GetValue("Entities",
    32                 typeof(CollectionBase<IDiagramEntity>)) as
    33                 CollectionBase<IDiagramEntity>;
    34         }
    35         #endregion
     23      double version = info.GetDouble("GroupShapeVersion");
     24      mAllowUnGroup = info.GetBoolean("CanUngroup");
     25      mEntities = info.GetValue("Entities",
     26          typeof(CollectionBase<IDiagramEntity>)) as
     27          CollectionBase<IDiagramEntity>;
     28    }
     29    #endregion
    3630
    37         #region Serialization events
    38        /*
     31    #region Serialization events
     32    /*
    3933        [OnSerializing]
    4034        void OnSerializing(StreamingContext context)
     
    4741            Trace.WriteLine("...serialization of 'GroupShape' finished");
    4842        }
    49         */ 
    50         #endregion
     43        */
     44    #endregion
    5145
    52         #region Deserialization events
    53        /*
     46    #region Deserialization events
     47    /*
    5448        [OnDeserializing]
    5549        void OnDeserializing(StreamingContext context)
     
    5953        }
    6054        */
    61         [OnDeserialized]
    62         void OnDeserialized(StreamingContext context)
    63          {
    64              if (Tracing.BinaryDeserializationSwitch.Enabled)
    65                 Trace.WriteLine("...deserialization of 'GroupShape' finished");
     55    [OnDeserialized]
     56    void OnDeserialized(StreamingContext context) {
     57      if (Tracing.BinaryDeserializationSwitch.Enabled)
     58        Trace.WriteLine("...deserialization of 'GroupShape' finished");
    6659
    67             foreach (IDiagramEntity entity in mEntities)
    68                 entity.Group = this;
     60      foreach (IDiagramEntity entity in mEntities)
     61        entity.Group = this;
    6962
    70              //this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
    71              //this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
    72              //this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
    73             AttachEventsToEnityCollection(mEntities);
    74             CalculateRectangle();
    75          }
    76        
    77         #endregion
     63      //this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
     64      //this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
     65      //this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
     66      AttachEventsToEnityCollection(mEntities);
     67      CalculateRectangle();
     68    }
    7869
    79         #region Serialization
    80          /// <summary>
    81          /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
    82          /// </summary>
    83          /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
    84          /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
    85          /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
    86         public override void GetObjectData(SerializationInfo info, StreamingContext context)
    87         {
    88             if(Tracing.BinarySerializationSwitch.Enabled)
    89                 Trace.WriteLine("Serializing the fields of 'GroupShape'.");
    90             base.GetObjectData(info, context);
     70    #endregion
    9171
    92             info.AddValue("GroupShapeVersion", groupShapeVersion);
    93             info.AddValue("CanUngroup", mAllowUnGroup);
    94             info.AddValue("Entities", this.mEntities, typeof(CollectionBase<IShapeMaterial>));
    95            
    96         }
    97         #endregion
     72    #region Serialization
     73    /// <summary>
     74    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
     75    /// </summary>
     76    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
     77    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
     78    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
     79    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
     80      if (Tracing.BinarySerializationSwitch.Enabled)
     81        Trace.WriteLine("Serializing the fields of 'GroupShape'.");
     82      base.GetObjectData(info, context);
    9883
    99         #region Xml serialization
    100         /// <summary>
    101         /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
    102         /// </summary>
    103         /// <returns>
    104         /// 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.
    105         /// </returns>
    106         public override XmlSchema GetSchema()
    107         {
    108             throw new NotImplementedException("The method or operation is not implemented.");
    109         }
     84      info.AddValue("GroupShapeVersion", groupShapeVersion);
     85      info.AddValue("CanUngroup", mAllowUnGroup);
     86      info.AddValue("Entities", this.mEntities, typeof(CollectionBase<IShapeMaterial>));
    11087
    111         /// <summary>
    112         /// Generates an object from its XML representation.
    113         /// </summary>
    114         /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
    115         public override void ReadXml(System.Xml.XmlReader reader)
    116         {
    117             throw new NotImplementedException("The method or operation is not implemented.");
    118         }
     88    }
     89    #endregion
    11990
    120         /// <summary>
    121         /// Converts an object into its XML representation.
    122         /// </summary>
    123         /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
    124         public override void WriteXml(System.Xml.XmlWriter writer)
    125         {
    126             throw new NotImplementedException("The method or operation is not implemented.");
    127         }
    128         #endregion
     91    #region Xml serialization
     92    /// <summary>
     93    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
     94    /// </summary>
     95    /// <returns>
     96    /// 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.
     97    /// </returns>
     98    public override XmlSchema GetSchema() {
     99      throw new NotImplementedException("The method or operation is not implemented.");
     100    }
    129101
    130         #region IDeserializationCallback Members
     102    /// <summary>
     103    /// Generates an object from its XML representation.
     104    /// </summary>
     105    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
     106    public override void ReadXml(System.Xml.XmlReader reader) {
     107      throw new NotImplementedException("The method or operation is not implemented.");
     108    }
    131109
    132         /// <summary>
    133         /// Runs when the entire object graph has been deserialized.
    134         /// </summary>
    135         /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
    136         public override void OnDeserialization(object sender)
    137         {
    138             base.OnDeserialization(sender);
    139      
     110    /// <summary>
     111    /// Converts an object into its XML representation.
     112    /// </summary>
     113    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
     114    public override void WriteXml(System.Xml.XmlWriter writer) {
     115      throw new NotImplementedException("The method or operation is not implemented.");
     116    }
     117    #endregion
    140118
    141             if(Tracing.BinaryDeserializationSwitch.Enabled)
    142                 Trace.WriteLine("IDeserializationCallback of 'GroupShape' called.");
    143         }
     119    #region IDeserializationCallback Members
    144120
    145         #endregion
     121    /// <summary>
     122    /// Runs when the entire object graph has been deserialized.
     123    /// </summary>
     124    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
     125    public override void OnDeserialization(object sender) {
     126      base.OnDeserialization(sender);
     127
     128
     129      if (Tracing.BinaryDeserializationSwitch.Enabled)
     130        Trace.WriteLine("IDeserializationCallback of 'GroupShape' called.");
    146131    }
     132
     133    #endregion
     134  }
    147135}
Note: See TracChangeset for help on using the changeset viewer.