Clone() публичный абстрактный Метод

Creates a Deep clone of the condition, and returns it
public abstract Clone ( ) : object
Результат object
Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Id">The rank ID</param>
 /// <param name="Conditions">The conditions to earn the rank</param>
 public Rank(int Id, Condition Conditions)
 {
     this.Id = Id;
     this.Name = GetName(Id);
     this.Conditions = Conditions;
     this.OrigConditions = (Condition)Conditions.Clone();
 }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Id">The rank ID</param>
 /// <param name="Conditions">The conditions to earn the rank</param>
 public Rank(int Id, Condition Conditions)
 {
     this.Id             = Id;
     this.Name           = GetName(Id);
     this.Conditions     = Conditions;
     this.OrigConditions = (Condition)Conditions.Clone();
 }
Пример #3
0
        /// <summary>
        /// Class Constructor. Constructs a new award
        /// </summary>
        /// <param name="AwardId">The award id as a string</param>
        /// <param name="StrId">The short name of the award</param>
        /// <param name="Type">The award earn type. 0 = Purple heart, 1 = Earned only once per player, 2 = Earnable multiple times</param>
        /// <param name="Condition">The condition to earn this award</param>
        public Award(string AwardId, string StrId, string Type, Condition Condition)
        {
            // Throw an exception if the award is non-existant
            if (!Exists(AwardId))
                throw new Exception("Award Doesnt Exist: " + AwardId);

            // Set award vars
            this.Id = AwardId;
            this.StrId = StrId;
            this.Name = GetName(AwardId);
            this.Type = Int32.Parse(Type);
            this.Conditions = Condition;
            this.OrigConditions = (Condition)Condition.Clone();
        }
Пример #4
0
        /// <summary>
        /// Class Constructor. Constructs a new award
        /// </summary>
        /// <param name="AwardId">The award id as a string</param>
        /// <param name="StrId">The short name of the award</param>
        /// <param name="Type">The award earn type. 0 = Purple heart, 1 = Earned only once per player, 2 = Earnable multiple times</param>
        /// <param name="Condition">The condition to earn this award</param>
        public Award(string AwardId, string StrId, string Type, Condition Condition)
        {
            // Throw an exception if the award is non-existant
            if (!Exists(AwardId))
            {
                throw new Exception("Award Doesnt Exist: " + AwardId);
            }

            // Set award vars
            this.Id             = AwardId;
            this.StrId          = StrId;
            this.Name           = GetName(AwardId);
            this.Type           = Int32.Parse(Type);
            this.Conditions     = Condition;
            this.OrigConditions = (Condition)Condition.Clone();
        }
Пример #5
0
 /// <summary>
 /// Restores any changes made to the conditions of this award
 /// </summary>
 /// <returns></returns>
 public void UndoConditionChanges()
 {
     Conditions = (Condition)OrigConditions.Clone();
 }