示例#1
0
        public int CompareTo(object obj)
        {
            HistoryPattern other = obj as HistoryPattern;

            if (this.YearFrom != other.YearFrom)
            {
                return(this.YearFrom.CompareTo(other.YearFrom));
            }
            return(this.YearUpto.CompareTo(other.YearUpto));
        }
示例#2
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            if (obj == null || this.GetType() != obj.GetType())
            {
                return(false);
            }

            HistoryPattern other = obj as HistoryPattern;

            return(this.EqualsToHistoryPattern(other));
        }
示例#3
0
 public bool EqualsToHistoryPattern(HistoryPattern other)
 {
     return(this.YearFrom == other.YearFrom && this.YearUpto == other.YearUpto);
 }
 public static T InstanceForPattern(Assembly assembly, string namespacePrefix, string classnamePrefix, HistoryPattern pattern)
 {
     return(GeneralFactory <T> .InstanceFor(assembly, namespacePrefix, ClassNameFor(classnamePrefix, pattern)));
 }
        public static string ClassNameFor(string classnamePrefix, HistoryPattern pattern)
        {
            string className = classnamePrefix + pattern.ClassName();

            return(className);
        }