Example #1
0
        public override void VisitPropertyControlCollection(ResolvedPropertyControlCollection propertyControlCollection)
        {
            var parentName     = controlName;
            var collectionName = emitter.EmitEnsureCollectionInitialized(parentName, propertyControlCollection.Property);

            foreach (var control in propertyControlCollection.Controls)
            {
                controlName = CreateControl(control);

                // compile control content
                base.VisitControl(control);

                // add to collection in property
                emitter.EmitSetProperty(controlName, nameof(DotvvmControl.Parent), SyntaxFactory.IdentifierName(parentName));
                emitter.EmitAddCollectionItem(collectionName, controlName, null);
            }
            controlName = parentName;
        }
 public virtual void VisitPropertyControlCollection(ResolvedPropertyControlCollection propertyControlCollection)
 {
     DefaultVisit(propertyControlCollection);
 }
Example #3
0
 public override void VisitPropertyControlCollection(ResolvedPropertyControlCollection propertyControlCollection)
 {
     var parentName = controlName;
     foreach (var control in propertyControlCollection.Controls)
     {
         controlName = CreateControl(control);
         // compile control content
         base.VisitControl(control);
         // add to collection in property
         emitter.EmitAddCollectionItem(parentName, controlName, propertyControlCollection.Property.Name);
     }
     controlName = parentName;
 }