public Criterion([NotNull] XElement el) { if (el == null) { throw new ArgumentNullException("el"); } XAttribute attribute = el.Attribute("fromRank"); if (attribute != null) { FromRank = Rank.Parse(attribute.Value); } if (FromRank == null) { throw new FormatException("Could not parse \"fromRank\""); } attribute = el.Attribute("toRank"); if (attribute != null) { ToRank = Rank.Parse(attribute.Value); } if (ToRank == null) { throw new FormatException("Could not parse \"toRank\""); } Condition = (ConditionSet)AutoRank.Condition.Parse(el.Elements().First()); }
public fCraftCriterion([NotNull] XElement el) { if (el == null) { throw new ArgumentNullException("el"); } // ReSharper disable PossibleNullReferenceException FromRank = Rank.Parse(el.Attribute("fromRank").Value); // ReSharper restore PossibleNullReferenceException if (FromRank == null) { throw new FormatException("Could not parse \"fromRank\""); } // ReSharper disable PossibleNullReferenceException ToRank = Rank.Parse(el.Attribute("toRank").Value); // ReSharper restore PossibleNullReferenceException if (ToRank == null) { throw new FormatException("Could not parse \"toRank\""); } Condition = (ConditionSet)AutoRank.fCraftConditions.Parse(el.Elements().First()); }
public Criterion( [NotNull] Rank fromRank, [NotNull] Rank toRank, [NotNull] ConditionSet condition ) { if( fromRank == null ) throw new ArgumentNullException( "fromRank" ); if( toRank == null ) throw new ArgumentNullException( "toRank" ); if( condition == null ) throw new ArgumentNullException( "condition" ); FromRank = fromRank; ToRank = toRank; Condition = condition; }
public Criterion([NotNull] Criterion other) { if (other == null) { throw new ArgumentNullException("other"); } FromRank = other.FromRank; ToRank = other.ToRank; Condition = other.Condition; }
public Criterion( [NotNull] XElement el ) { if( el == null ) throw new ArgumentNullException( "el" ); FromRank = Rank.Parse( el.Attribute( "fromRank" ).Value ); if( FromRank == null ) throw new FormatException( "Could not parse \"fromRank\"" ); ToRank = Rank.Parse( el.Attribute( "toRank" ).Value ); if( ToRank == null ) throw new FormatException( "Could not parse \"toRank\"" ); Condition = (ConditionSet)AutoRank.Condition.Parse( el.Elements().First() ); }
public Criterion( [NotNull] XElement el ) { if( el == null ) throw new ArgumentNullException( "el" ); // ReSharper disable PossibleNullReferenceException FromRank = Rank.Parse( el.Attribute( "fromRank" ).Value ); // ReSharper restore PossibleNullReferenceException if( FromRank == null ) throw new FormatException( "Could not parse \"fromRank\"" ); // ReSharper disable PossibleNullReferenceException ToRank = Rank.Parse( el.Attribute( "toRank" ).Value ); // ReSharper restore PossibleNullReferenceException if( ToRank == null ) throw new FormatException( "Could not parse \"toRank\"" ); Condition = (ConditionSet)AutoRank.Condition.Parse( el.Elements().First() ); }
public Criterion([NotNull] Rank fromRank, [NotNull] Rank toRank, [NotNull] ConditionSet condition) { if (fromRank == null) { throw new ArgumentNullException("fromRank"); } if (toRank == null) { throw new ArgumentNullException("toRank"); } if (condition == null) { throw new ArgumentNullException("condition"); } FromRank = fromRank; ToRank = toRank; Condition = condition; }
public Criterion( [NotNull] Criterion other ) { if( other == null ) throw new ArgumentNullException( "other" ); FromRank = other.FromRank; ToRank = other.ToRank; Condition = other.Condition; }