Base class for condition sets/combinations.
Inheritance: Condition
示例#1
0
        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());
        }
示例#2
0
        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());
        }
示例#3
0
 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;
 }
示例#4
0
 public Criterion([NotNull] Criterion other)
 {
     if (other == null)
     {
         throw new ArgumentNullException("other");
     }
     FromRank  = other.FromRank;
     ToRank    = other.ToRank;
     Condition = other.Condition;
 }
示例#5
0
        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() );
        }
示例#6
0
        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() );
        }
示例#7
0
 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;
 }
示例#8
0
 public Criterion( [NotNull] Criterion other ) {
     if( other == null ) throw new ArgumentNullException( "other" );
     FromRank = other.FromRank;
     ToRank = other.ToRank;
     Condition = other.Condition;
 }