예제 #1
0
 /// <summary>
 /// Deserialize object.
 /// </summary>
 /// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> to retrieve data.</param>
 /// <param name="ctxt">The source (see <see cref="System.Runtime.Serialization.StreamingContext"/>) for this deserialization.</param>
 private ActorType(SerializationInfo info, StreamingContext ctxt)
 {
     _actorTypes = (ActorTypesManager)info.GetValue("ActorTypes", typeof(ActorTypesManager));
     _name       = info.GetString("Name");
     _parent     = (ActorType)info.GetValue("Parent", typeof(ActorType));
     _children   = (ChildrenList)info.GetValue("Children", typeof(ChildrenList));
 }
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         ActorTypes = null;
     }
     if (disposing && (components != null))
     {
         components.Dispose();
     }
     base.Dispose(disposing);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActorType"/> class.
 /// </summary>
 /// <param name="actorTypes">The manager of actor types.</param>
 public ActorType(ActorTypesManager actorTypes)
 {
     _actorTypes = actorTypes;
     _children   = new ChildrenList(this);
 }