Mono.CSharp.TypeContainer.ApplyAttributeBuilder C# (CSharp) Method

ApplyAttributeBuilder() public method

public ApplyAttributeBuilder ( Attribute a, MethodSpec ctor, byte cdata, Mono.CSharp.PredefinedAttributes pa ) : void
a Attribute
ctor MethodSpec
cdata byte
pa Mono.CSharp.PredefinedAttributes
return void
		public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
		{
			if (a.Type == pa.DefaultMember) {
				if (Indexers != null) {
					Report.Error (646, a.Location, "Cannot specify the `DefaultMember' attribute on type containing an indexer");
					return;
				}
			}

			if (a.Type == pa.Required) {
				Report.Error (1608, a.Location, "The RequiredAttribute attribute is not permitted on C# types");
				return;
			}

			TypeBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), cdata);
		}