Rev 2104 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
using System;using System.Collections;namespace EA_DocGen{/// <summary>/// Class to sort EA elements alphabetically, in a case insensitive way./// This is used by the processRelationshipMatrixElement method./// </summary>public class elementSortByName : IComparer{int IComparer.Compare( object x, object y){if (x!=null & y!= null)return (new CaseInsensitiveComparer()).Compare( ((EA.Element)x).Name, ((EA.Element)y).Name );elsereturn 0;}}public class attributeSortByPos : IComparer{int IComparer.Compare( object x, object y){if (x!=null & y!= null)return ((EA.Attribute)x).Pos - ((EA.Attribute)y).Pos;elsereturn 0;}}public class methodSortByPos : IComparer{int IComparer.Compare( object x, object y){if (x!=null & y!= null)return ((EA.Method)x).Pos - ((EA.Method)y).Pos;elsereturn 0;}}public class parameterSortByPos : IComparer{int IComparer.Compare( object x, object y){if (x!=null & y!= null)return ((EA.Parameter)x).Position - ((EA.Parameter)y).Position;elsereturn 0;}}public class glossarySort : IComparer{int IComparer.Compare( object x, object y){if (x!=null & y!= null)return (new CaseInsensitiveComparer()).Compare( ((EA.Term)x).Term, ((EA.Term)y).Term );elsereturn 0;}}}