Example #1
0
 internal static void ThrowIfNotTrueDefinition(this CILCustomAttributeContainer element)
 {
     if (element != null && !((CILElementInstantiable)element).IsTrueDefinition)
     {
         throw new ArgumentException("Given argument is not true definition.");
     }
 }
Example #2
0
        internal static CILCustomAttribute NewAttribute(CILCustomAttributeContainer container, CILConstructor ctor, IEnumerable <CILCustomAttributeTypedArgument> ctorArgs, IEnumerable <CILCustomAttributeNamedArgument> namedArgs)
        {
            var result = new CILCustomAttributeImpl(container);

            result.SetCustomAttributeData(ctor, ctorArgs, namedArgs);
            return(result);
        }
Example #3
0
        internal CILCustomAttributeImpl(CILCustomAttributeContainer container)
        {
            ArgumentValidator.ValidateNotNull("Custom attribute container", container);

            this.container = container;
        }