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/Layer.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 Layer : 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 Layer : 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 Layer(SerializationInfo info, StreamingContext context)
    25         {
    26             if(Tracing.BinaryDeserializationSwitch.Enabled)
    27                 Trace.WriteLine("Deserializing the fields of 'Layer'.");
     16    /// <param name="info">The info.</param>
     17    /// <param name="context">The context.</param>
     18    protected Layer(SerializationInfo info, StreamingContext context) {
     19      if (Tracing.BinaryDeserializationSwitch.Enabled)
     20        Trace.WriteLine("Deserializing the fields of 'Layer'.");
    2821
    29             double version = info.GetDouble("LayerVersion");
     22      double version = info.GetDouble("LayerVersion");
    3023
    31             mEntities = info.GetValue(
    32                 "Entities",
    33                 typeof(CollectionBase<IDiagramEntity>)) as
    34                 CollectionBase<IDiagramEntity>;
     24      mEntities = info.GetValue(
     25          "Entities",
     26          typeof(CollectionBase<IDiagramEntity>)) as
     27          CollectionBase<IDiagramEntity>;
    3528
    36             mIsVisible = info.GetBoolean("IsVisible");
     29      mIsVisible = info.GetBoolean("IsVisible");
    3730
    38             mName = info.GetString("Name");
    39            
    40         }
    41         #endregion
     31      mName = info.GetString("Name");
    4232
    43         #region Serialization events
    44        /*
     33    }
     34    #endregion
     35
     36    #region Serialization events
     37    /*
    4538        [OnSerializing]
    4639        void OnSerializing(StreamingContext context)
     
    5548        }
    5649        */
    57         #endregion
     50    #endregion
    5851
    59         #region Deserialization events
    60        /*
     52    #region Deserialization events
     53    /*
    6154        [OnDeserializing]
    6255        void OnDeserializing(StreamingContext context)
     
    6659        }
    6760        */
    68         [OnDeserialized]
    69         void OnDeserialized(StreamingContext context)
    70          {
    71              Init();
    72              if(Tracing.BinaryDeserializationSwitch.Enabled)
    73              Trace.WriteLine("...deserialization of 'Layer' finished");
    74          }
    75        
    76         #endregion
     61    [OnDeserialized]
     62    void OnDeserialized(StreamingContext context) {
     63      Init();
     64      if (Tracing.BinaryDeserializationSwitch.Enabled)
     65        Trace.WriteLine("...deserialization of 'Layer' finished");
     66    }
    7767
    78         #region Serialization
    79         public void GetObjectData(SerializationInfo info, StreamingContext context)
    80         {
    81             if(Tracing.BinarySerializationSwitch.Enabled)
    82                 Trace.WriteLine("Serializing the fields of 'Layer'.");
     68    #endregion
    8369
    84             info.AddValue("LayerVersion", layerVersion);
     70    #region Serialization
     71    public void GetObjectData(SerializationInfo info, StreamingContext context) {
     72      if (Tracing.BinarySerializationSwitch.Enabled)
     73        Trace.WriteLine("Serializing the fields of 'Layer'.");
    8574
    86             info.AddValue("Name", this.Name);
     75      info.AddValue("LayerVersion", layerVersion);
    8776
    88             info.AddValue("IsVisible", IsVisible);
     77      info.AddValue("Name", this.Name);
    8978
    90             info.AddValue(
    91                 "Entities",
    92                 this.Entities,
    93                 typeof(CollectionBase<IDiagramEntity>));
    94         }
    95         #endregion
     79      info.AddValue("IsVisible", IsVisible);
    9680
    97         #region Xml serialization
    98         /// <summary>
    99         /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
    100         /// </summary>
    101         /// <returns>
    102         /// 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.
    103         /// </returns>
    104         public XmlSchema GetSchema()
    105         {
    106             throw new NotImplementedException("The method or operation is not implemented.");
    107         }
     81      info.AddValue(
     82          "Entities",
     83          this.Entities,
     84          typeof(CollectionBase<IDiagramEntity>));
     85    }
     86    #endregion
    10887
    109         /// <summary>
    110         /// Generates an object from its XML representation.
    111         /// </summary>
    112         /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
    113         public void ReadXml(System.Xml.XmlReader reader)
    114         {
    115             throw new NotImplementedException("The method or operation is not implemented.");
    116         }
     88    #region Xml serialization
     89    /// <summary>
     90    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
     91    /// </summary>
     92    /// <returns>
     93    /// 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.
     94    /// </returns>
     95    public XmlSchema GetSchema() {
     96      throw new NotImplementedException("The method or operation is not implemented.");
     97    }
    11798
    118         /// <summary>
    119         /// Converts an object into its XML representation.
    120         /// </summary>
    121         /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
    122         public void WriteXml(System.Xml.XmlWriter writer)
    123         {
    124             throw new NotImplementedException("The method or operation is not implemented.");
    125         }
    126         #endregion
     99    /// <summary>
     100    /// Generates an object from its XML representation.
     101    /// </summary>
     102    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
     103    public void ReadXml(System.Xml.XmlReader reader) {
     104      throw new NotImplementedException("The method or operation is not implemented.");
     105    }
    127106
    128         #region IDeserializationCallback Members
     107    /// <summary>
     108    /// Converts an object into its XML representation.
     109    /// </summary>
     110    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
     111    public void WriteXml(System.Xml.XmlWriter writer) {
     112      throw new NotImplementedException("The method or operation is not implemented.");
     113    }
     114    #endregion
    129115
    130         /// <summary>
    131         /// Runs when the entire object graph has been deserialized.
    132         /// </summary>
    133         /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
    134         public void OnDeserialization(object sender)
    135         {
    136             if(Tracing.BinaryDeserializationSwitch.Enabled)
    137                 Trace.WriteLine("IDeserializationCallback of 'Layer' called.");
    138         }
     116    #region IDeserializationCallback Members
    139117
    140         #endregion
     118    /// <summary>
     119    /// Runs when the entire object graph has been deserialized.
     120    /// </summary>
     121    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
     122    public void OnDeserialization(object sender) {
     123      if (Tracing.BinaryDeserializationSwitch.Enabled)
     124        Trace.WriteLine("IDeserializationCallback of 'Layer' called.");
    141125    }
     126
     127    #endregion
     128  }
    142129}
Note: See TracChangeset for help on using the changeset viewer.