Exemplo n.º 1
0
		public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
		{
			base.ApplyAttributeBuilder (a, ctor, cdata, pa);

			//
			// When struct constains fixed fixed and struct layout has explicitly
			// set CharSet, its value has to be propagated to compiler generated
			// fixed field types
			//
			if (a.Type == pa.StructLayout && Fields != null && a.HasField ("CharSet")) {
				for (int i = 0; i < Fields.Count; ++i) {
					FixedField ff = Fields [i] as FixedField;
					if (ff != null)
						ff.SetCharSet (TypeBuilder.Attributes);
				}
			}
		}