Exemple #1
0
        /// <summary>
        /// Operates to allow calling assembly to insert a name into the list of
        /// tables which should not be referenced.
        /// </summary>
        /// <param name="tblName"></param>
        /// <returns></returns>
        public static int AddToBlockedNameList(string tblName)
        {
            if (String.IsNullOrWhiteSpace(tblName) || DoNotReference.Contains(tblName))
            {
                return(DoNotReference.Count);
            }

            DoNotReference.Add(tblName);
            return(DoNotReference.Count);
        }
Exemple #2
0
 /// <summary>
 /// Operates to allow calling assembly to insert many names into the list of
 /// tables which should not be referenced.
 /// </summary>
 /// <param name="tblNames"></param>
 /// <returns></returns>
 public static int AddToBlockedNameList(List <string> tblNames)
 {
     if (tblNames == null || tblNames.Count <= 0)
     {
         return(DoNotReference.Count);
     }
     foreach (var tbl in tblNames.Where(tblName => !DoNotReference.Contains(tblName)))
     {
         DoNotReference.Add(tbl);
     }
     return(DoNotReference.Count);
 }
Exemple #3
0
        /// <summary>
        /// Helper function which adds all <see cref="DoNotReference"/> which are blobs
        /// to the <see cref="Sorting.NoPkTablesNames"/>
        /// </summary>
        /// <returns></returns>
        public static int AddNoPkAllNonNullableToBlockedNameList()
        {
            var noPkTables = Sorting.NoPkTablesNames;

            if (noPkTables.Count <= 0)
            {
                return(DoNotReference.Count);
            }
            foreach (
                var tblName in
                noPkTables.Where(Sorting.IsNoPkAndAllNonNullable)
                .Where(tblName => !DoNotReference.Contains(tblName)))
            {
                DoNotReference.Add(tblName);
            }
            return(DoNotReference.Count);
        }