public override void LoadReference()
 {
     if(LoopEndBrick == null)
         LoopEndBrick = ReferenceHelper.GetReferenceObject(this, _reference) as XmlLoopEndBrick;
     if (string.IsNullOrEmpty(_reference))
         _reference = ReferenceHelper.GetReferenceString(this);
 }
 public override void LoadReference()
 {
     if (LoopEndBrick == null)
     {
         LoopEndBrick = ReferenceHelper.GetReferenceObject(this, _reference) as XmlLoopEndBrick;
     }
     if (string.IsNullOrEmpty(_reference))
     {
         _reference = ReferenceHelper.GetReferenceString(this);
     }
 }
        private static string GetRepeatLoopEndBrickReferenceString(XmlLoopEndBrick loopEndBrick)
        {
            var sprite = XmlParserTempProjectHelper.Sprite;

            var script = XmlParserTempProjectHelper.Script;
                //TODO could this be dead code as since v93 there are no references like this?
                var count = 0;
                foreach (var brick in script.Bricks.Bricks)
                    if (brick is XmlRepeatLoopEndBrick)
                    {
                        count++;
                        if ((brick == loopEndBrick) && (count == 1))
                            return "../../loopEndBrick";
                        else if (brick == loopEndBrick)
                            return "../../loopEndBrick[" + count + "]";
                    }
            
            return "";
        }