/// <summary> /// Reviews the default declaration of the event and adds additional type declarations, if necessary. /// </summary> /// <param name="engine">The <see cref="CodeGenEngine"/> assembling the type in creation.</param> /// <param name="evnt">The event to review.</param> public void Declare(CodeGenEngine engine, GeneratedEvent evnt) { // declare the backing field storing event handlers mBackingField = engine.AddField(evnt.Type, null, evnt.Kind == EventKind.Static, evnt.Visibility, null); }
/// <summary> /// Reviews the declaration of the property and adds additional type declarations, if necessary. /// </summary> /// <param name="engine">The <see cref="CodeGenEngine"/> assembling the type in creation.</param> /// <param name="property">The property to review.</param> public void Declare(CodeGenEngine engine, GeneratedProperty property) { // add an anonymous field mBackingField = engine.AddField(property.Type, null, property.Kind == PropertyKind.Static, Visibility.Private); }