예제 #1
0
        /// <summary>
        /// Creates a constrained type reference to this type. The type
        /// reference is normally an identical type, but with the
        /// primitive flag set to false. Only certain types support being
        /// referenced, and the default implementation of this method
        /// throws an exception.
        /// NOTE: This is an internal method that should
        /// only be called by the MIB loader.
        /// </summary>
        /// <param name="constraint">The type constraint</param>
        /// <returns>The MIB type reference</returns>
        public override MibType CreateReference(IConstraint constraint)
        {
            BitSetType type = new BitSetType(false, constraint, null);

            type.SetTag(true, this.Tag);
            return(type);
        }
예제 #2
0
        /// <summary>
        /// Creates a type reference to this type. The type reference is
        /// normally an identical type, but with the primitive flag set to
        /// false. Only certain types support being referenced, and the
        /// default implementation of this method throws an exception.
        /// NOTE: This is an internal method that should
        /// only be called by the MIB loader.
        /// </summary>
        /// <returns>The MIB type reference</returns>
        public override MibType CreateReference()
        {
            BitSetType type = new BitSetType(false, this.constraint, this.symbols);

            type.SetTag(true, this.Tag);
            return(type);
        }
예제 #3
0
        /// <summary>
        /// Creates a constrained type reference to this type. The type
        /// reference is normally an identical type, but with the
        /// primitive flag set to false. Only certain types support being
        /// referenced, and the default implementation of this method
        /// throws an exception.
        /// NOTE: This is an internal method that should
        /// only be called by the MIB loader.
        /// </summary>
        /// <param name="values">The type value symbols</param>
        /// <returns>The MIB type reference</returns>
        public override MibType CreateReference(IList <MibValueSymbol> values)
        {
            BitSetType type;

            type = new BitSetType(false, null, null);
            type.CreateValueConstraints(values);
            type.SetTag(false, this.Tag);
            return(type);
        }