Example #1
0
        /// <summary>
        /// Creates a qualifier space given mappings from keys to list of eligible values.
        /// </summary>
        public QualifierSpaceId CreateQualifierSpace(params QualifierSpaceEntry[] keyValuesPairs)
        {
            Contract.RequiresNotNull(keyValuesPairs);
#if DEBUG
            Contract.RequiresForAll(keyValuesPairs, e => e.IsValid);
#endif


            QualifierSpace qualifierSpace = QualifierSpace.CreateQualifierSpace(StringTable, keyValuesPairs);
            return(GetOrAddQualifierSpace(qualifierSpace));
        }
Example #2
0
        /// <summary>
        /// Creates a qualifier space given mappings from keys to list of eligible values.
        /// </summary>
        public QualifierSpaceId CreateQualifierSpace(params QualifierSpaceEntry[] keyValuesPairs)
        {
            Contract.Requires(keyValuesPairs != null);
#if DEBUG
            Contract.RequiresForAll(keyValuesPairs, e => e.IsValid);
#endif

            Contract.Ensures(IsValidQualifierSpaceId(Contract.Result <QualifierSpaceId>()));

            QualifierSpace qualifierSpace = QualifierSpace.CreateQualifierSpace(StringTable, keyValuesPairs);
            return(GetOrAddQualifierSpace(qualifierSpace));
        }