Base class for condition sets/combinations.
상속: 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
파일: Criterion.cs 프로젝트: fragmer/fCraft
 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
파일: Criterion.cs 프로젝트: fragmer/fCraft
        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
파일: Criterion.cs 프로젝트: fragmer/fCraft
        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
파일: Criterion.cs 프로젝트: fragmer/fCraft
 public Criterion( [NotNull] Criterion other ) {
     if( other == null ) throw new ArgumentNullException( "other" );
     FromRank = other.FromRank;
     ToRank = other.ToRank;
     Condition = other.Condition;
 }