Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
 public bool EqualsToHistoryPattern(HistoryPattern other)
 {
     return(this.YearFrom == other.YearFrom && this.YearUpto == other.YearUpto);
 }
Exemplo n.º 4
0
 public static T InstanceForPattern(Assembly assembly, string namespacePrefix, string classnamePrefix, HistoryPattern pattern)
 {
     return(GeneralFactory <T> .InstanceFor(assembly, namespacePrefix, ClassNameFor(classnamePrefix, pattern)));
 }
Exemplo n.º 5
0
        public static string ClassNameFor(string classnamePrefix, HistoryPattern pattern)
        {
            string className = classnamePrefix + pattern.ClassName();

            return(className);
        }