Exemplo n.º 1
0
        public void AddSearchOption(StackHashSearchOption searchOption)
        {
            if (searchOption == null)
            {
                throw new ArgumentNullException("searchOption");
            }

            m_SqlSearch.Append(searchOption.ToSqlString(getTableName(searchOption)));
        }
Exemplo n.º 2
0
        private static String getTableName(StackHashSearchOption searchOption)
        {
            switch (searchOption.ObjectType)
            {
            case StackHashObjectType.Product:
                return(s_ProductTable);

            case StackHashObjectType.File:
                return(s_FileTable);

            case StackHashObjectType.Event:
            case StackHashObjectType.EventSignature:
                return(s_EventTable);

            case StackHashObjectType.EventInfo:
                return(s_EventInfoTable);

            case StackHashObjectType.CabInfo:
                return(s_CabTable);

            default:
                throw new InvalidOperationException("Unknown object type");
            }
        }