Пример #1
0
 private static ObjectToken GetHighestTokenVersion(ObjectToken token, ObjectToken tokenSeed, string[] criterias)
 {
     if (tokenSeed.MatchesAttributes(criterias))
     {
         bool pfDidCompare;
         int  num = CompareTokenVersions(tokenSeed, token, out pfDidCompare);
         if (pfDidCompare && num > 0)
         {
             token = tokenSeed;
         }
     }
     return(token);
 }
Пример #2
0
        private static ObjectToken GetHighestTokenVersion(ObjectToken token, ObjectToken tokenSeed, string[] criterias)
        {
            // if override and higher version - new preferred.
            bool fOverride = tokenSeed.MatchesAttributes(criterias);

            if (fOverride)
            {
                bool fDidCompare;
                int  lRes = CompareTokenVersions(tokenSeed, token, out fDidCompare);

                if (fDidCompare && lRes > 0)
                {
                    token = tokenSeed;
                }
            }
            return(token);
        }