Пример #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);
 }
Пример #4
0
 public static T InstanceForPattern(Assembly assembly, string namespacePrefix, string classnamePrefix, HistoryPattern pattern)
 {
     return(GeneralFactory <T> .InstanceFor(assembly, namespacePrefix, ClassNameFor(classnamePrefix, pattern)));
 }
Пример #5
0
        public static string ClassNameFor(string classnamePrefix, HistoryPattern pattern)
        {
            string className = classnamePrefix + pattern.ClassName();

            return(className);
        }