Open.Core.PropertyWriter.Write C# (CSharp) Method

Write() private method

private Write ( object instance, string title, bool isDictionary ) : void
instance object
title string
isDictionary bool
return void
        private void Write(object instance, string title, bool isDictionary)
        {
            // Setup initial conditions.
            if (Script.IsNullOrUndefined(instance)) { writer.Write(instance, null); return; }
            if (writer.View == null) return;

            // Format the title (generate default title if the caller did not specify it.  If 'null' was explicitly passed no title is shown).
            string titleIcon = null;
            if (Script.IsUndefined(title))
            {
                title = string.Format("{0}:", isDictionary ? "Dictionary" :  instance.GetType().Name);
                titleIcon = LogWriter.ClassIcon;
            }

            // Create the property list.
            IHtmlList htmlList = writer.View.InsertList(title, null, null, titleIcon);
            new PropertyListBuilder(instance, isDictionary).Write(htmlList);
        }
        #endregion