Ejemplo n.º 1
0
        public override void SetParameters(ParameterCollection parameters)
        {
            // Assign to properties
            base.SetParameters(parameters);

            // Inject helper code into ChildContent
            if (ChildContent is RenderFragment originalChildContent)
            {
                ChildContent = builder =>
                {
                    var temp = Helpers.PARENT;
                    Helpers.PARENT = this;
                    originalChildContent(builder);
                    Helpers.PARENT = temp;
                };
            }

            if (!parameters.TryGetValue(nameof(Parent), out object _))
            {
                UILog.Write("WARNING", $"No parent assigned to '{this}'");
            }

            UpdateLayoutCss();
            UILog.Write("LIFECYCLE", $"SetParameters '{this}' (parent is '{Parent}')");
        }
Ejemplo n.º 2
0
 protected override void BuildRenderTree(RenderTreeBuilder builder)
 {
     base.BuildRenderTree(builder);
     UILog.Write("LIFECYCLE", $"BuildRenderTree '{this}'");
     _debugRenderCount = !_debugRenderCount;
 }
Ejemplo n.º 3
0
 public virtual void Dispose()
 {
     UILog.Write("LIFECYCLE", $"Dispose '{this}'");
 }
Ejemplo n.º 4
0
 protected override void OnInit()
 {
     UILog.Write("LIFECYCLE", $"Initialize '{this}'");
 }