Ejemplo n.º 1
0
        public virtual void Visit(IParameterDefinition parameterDefinition)
        {
            var marshalling = parameterDefinition.MarshallingInformation;

            Debug.Assert((marshalling != null || !parameterDefinition.MarshallingDescriptor.IsDefaultOrEmpty) == parameterDefinition.IsMarshalledExplicitly);

            this.Visit(parameterDefinition.GetAttributes(Context));
            this.Visit(parameterDefinition.CustomModifiers);

            IMetadataConstant defaultValue = parameterDefinition.GetDefaultValue(Context);

            if (defaultValue != null)
            {
                this.Visit((IMetadataExpression)defaultValue);
            }

            if (marshalling != null)
            {
                // Note, we are not visiting MarshallingDescriptor. It is used only for
                // NoPia embedded/local types and VB Dev11 simply copies the bits without
                // cracking them.
                this.Visit(marshalling);
            }

            this.Visit(parameterDefinition.GetType(Context));
        }
Ejemplo n.º 2
0
        public virtual void Visit(IParameterDefinition parameterDefinition)
        {
            var marshalling = parameterDefinition.MarshallingInformation;

            Debug.Assert((marshalling != null || !parameterDefinition.MarshallingDescriptor.IsDefaultOrEmpty) == parameterDefinition.IsMarshalledExplicitly);

            this.Visit(parameterDefinition.GetAttributes(Context));
            this.Visit(parameterDefinition.CustomModifiers);

            IMetadataConstant defaultValue = parameterDefinition.GetDefaultValue(Context);
            if (defaultValue != null)
            {
                this.Visit((IMetadataExpression)defaultValue);
            }

            if (marshalling != null)
            {
                // Note, we are not visiting MarshallingDescriptor. It is used only for 
                // NoPia embedded/local types and VB Dev11 simply copies the bits without
                // cracking them.
                this.Visit(marshalling);
            }

            this.Visit(parameterDefinition.GetType(Context));
        }
Ejemplo n.º 3
0
 public IEnumerable <ICustomAttribute> GetAttributes(EmitContext context)
 {
     return(_oldParameter.GetAttributes(context).Select(a => new DeletedCustomAttribute(a, _typesUsedByDeletedMembers)));
 }