Exemple #1
0
        /// <summary>
        /// Maps the statements.
        /// </summary>
        /// <param name="platform">The platform.</param>
        public void MapStatements(string platform)
        {
            MappedStatements.SetPlatform(platform);
            Settings.Platform           = platform;
            canSetExternalMapStatements = true;

            foreach (var statement in unprocessedStatements)
            {
                MappedStatements.Add(statement);
            }

            unprocessedStatements.Clear();
        }
Exemple #2
0
        /// <summary>
        /// Loads the mapped statements.
        /// </summary>
        /// <param name="statements">The statements.</param>
        /// <exception cref="System.ArgumentNullException">statements</exception>
        /// <exception cref="System.InvalidOperationException">MapConfig not initialized properly. No Platform has been defined. Cannot load statements.</exception>
        public void LoadMappedStatements(IEnumerable <StatementMap> statements)
        {
            if (statements == null)
            {
                throw new ArgumentNullException("statements");
            }

            if (!canSetExternalMapStatements)
            {
                throw new InvalidOperationException(
                          "MapConfig not initialized properly. No Platform has been defined. Cannot load statements.");
            }

            foreach (var statementMap in statements)
            {
                MappedStatements.Add(statementMap);
            }
        }