Example #1
0
        public void AddSlotForward(TemplateScope parentScope, string slotName, UIElement context, int slotId)
        {
            slotInputs = slotInputs ?? StructList <SlotUsage> .Get();

            if (parentScope.slotInputs == null)
            {
                slotInputs.Add(new SlotUsage(slotName, slotId, context));
                return;
            }

            for (int i = 0; i < parentScope.slotInputs.size; i++)
            {
                if (parentScope.slotInputs.array[i].slotName == slotName)
                {
                    slotInputs.Add(parentScope.slotInputs.array[i]);
                }
            }

            slotInputs.Add(new SlotUsage(slotName, slotId, context));
        }
Example #2
0
 public void SetParentScope(TemplateScope parentScope)
 {
     this.parentInputs = parentScope.slotInputs;
 }