}
}
+ if (instance_constructors != null) {
+ foreach (Constructor c in instance_constructors) {
+ if (!c.ResolveMembers ())
+ return false;
+ }
+ }
+
+ if (default_static_constructor != null) {
+ if (!default_static_constructor.ResolveMembers ())
+ return false;
+ }
+
if (operators != null) {
foreach (Operator o in operators) {
if (!o.ResolveMembers ())
}
}
- public class Constructor : MethodCore, IMethodData {
+ public class Constructor : MethodCore, IMethodData, IAnonymousHost {
public ConstructorBuilder ConstructorBuilder;
public ConstructorInitializer Initializer;
ListDictionary declarative_security;
+ ArrayList anonymous_methods;
// <summary>
// Modifiers allowed for a constructor.
ConstructorBuilder.SetCustomAttribute (cb);
}
+ public void AddAnonymousMethod (AnonymousMethodExpression anonymous)
+ {
+ if (anonymous_methods == null)
+ anonymous_methods = new ArrayList ();
+ anonymous_methods.Add (anonymous);
+ }
+
+ public bool ResolveMembers ()
+ {
+ if (!CheckBase ())
+ return false;
+
+ if (anonymous_methods != null) {
+ foreach (AnonymousMethodExpression ame in anonymous_methods) {
+ if (!ame.CreateAnonymousHelpers ())
+ return false;
+ }
+ }
+
+ return true;
+ }
+
protected override bool CheckForDuplications ()
{
ArrayList ar = ParentContainer.InstanceConstructors;
LocatedToken lt = (LocatedToken) $1;
$$ = new Constructor (current_class, lt.Value, 0, (Parameters) $4,
(ConstructorInitializer) $7, lt.Location);
+
+ anonymous_host = (IAnonymousHost) $$;
}
;