Exemplo n.º 1
0
 private void AddToLists(RevDataItems2 value)
 {
     AddToList(LIST_SEQUENCE, value.Sequence.ToString());
     AddToList(LIST_REVALTID, value.AltId);
     AddToList(LIST_DELTATITLE, value.DeltaTitle);
     AddToList(LIST_SHTNUM, value.ShtNum);
     AddToList(LIST_BLOCKTITLE, value.BlockTitle);
     AddToList(LIST_BASIS, value.Basis);
     AddToList(LIST_DESC, value.Description);
 }
Exemplo n.º 2
0
        // check fields against criteria to determine if it
        // matches / passes
        public bool Match(string key, RevDataItems2 items)
        {
            bool result = false;

            foreach (Filter value in Enum.GetValues(typeof(Filter)))
            {
                result = false;

                switch (value)
                {
                case VISIBILITY:                        // visibility
                {
                    result = Visible == VISIBILITY_ALL ||
                             items.Visibility == _visCrossRef[(int)Visible];
                    break;
                }

                case REVID:                     // revid
                {
                    result = CompareRevId(items.RevisionId);
                    break;
                }

                case REVALTID:                  // revaltid
                {
                    result = CompareRevAltId(items.AltId);
                    break;
                }

                case BLOCKTITLE:                        // blocktitle
                {
                    result = CompareBlockTitle(items.BlockTitle);
                    break;
                }

                case DELTATITLE:                        // deltatitle
                {
                    result = CompareDeltaTitle(items.DeltaTitle);
                    break;
                }

                case BASIS:                     // basis
                {
                    result = CompareBasis(items.Basis);
                    break;
                }

                case SHTNUM:                    // shtnum
                {
                    result = CompareBasis(items.ShtNum);
                    break;
                }
                }

                if (result == false)
                {
                    break;
                }
            }

            return(result);
        }