Ext.Net.XControl.GetClientConstructor C# (CSharp) Method

GetClientConstructor() private method

private GetClientConstructor ( bool instanceOnly, string body ) : string
instanceOnly bool
body string
return string
        internal virtual string GetClientConstructor(bool instanceOnly, string body)
        {
            if (this is ICustomConfigSerialization)
            {
                Observable parent = this.ParentComponent;

                if (parent == null)
                {
                    parent = (Observable)ReflectionUtils.GetTypeOfParent(this, typeof(Observable));
                }

                return (this as ICustomConfigSerialization).ToScript(parent);
            }

            if (this.InstanceOf.IsNotEmpty())
            {
                string template = (instanceOnly) ? "new {1}({2})" : ((this is Component) ? "" : "this.{0}=").ConcatWith("new {1}({2});");

                return string.Format(template, this.ClientID, this.InstanceOf, body ?? this.InitialConfig);
            }

            return "";
        }

Same methods

XControl::GetClientConstructor ( ) : string
XControl::GetClientConstructor ( bool instanceOnly ) : string