public static FragmentBase GetFragment(TypeMetadataProviderBase metadata)
        {
            if (metadata.IsEnumerable)
            {
                return(new EnumerableTypeFragment(metadata));
            }

            if (metadata.IsPrimitiveElement)
            {
                return(new PrimitiveTypeFragment(metadata));
            }

            return(new ComplexTypeFragment(metadata));
        }
Ejemplo n.º 2
0
        public static string DisplayValue(object obj, int depthLimit, int currentDepth)
        {
            var itemMetadata = TypeMetadataProviderBase.GetMetadataProvider(obj);

            if (itemMetadata.IsPrimitiveElement || depthLimit == currentDepth)
            {
                return(GetDisplayValue(obj));
            }

            currentDepth++;

            var renderer = FragmentBase.GetFragment(itemMetadata);

            return(renderer.Render(depthLimit, currentDepth));
        }
        public static object DumpSort <T>(this T obj, int depth)
        {
            var metaData = TypeMetadataProviderBase.GetMetadataProvider(obj);

            var renderer = FragmentBase.GetFragment(metaData);

            Renderers.Add(() => renderer.Render(depth));

            if (webBrowser == null)
            {
                webBrowser = new WebBrowser();

                PanelManager.DisplayWpfElement(webBrowser, PanelName);

                PanelManager.GetOutputPanel(PanelName).QueryEnded += OnQueryEnded;
            }

            return(obj);
        }
 public TableEndFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 public ComplexObjectTableRowsFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 public ComplexTypeTableStartFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 public PrimitiveTypeFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 public PrimitiveEnumerableTableRowsFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
Ejemplo n.º 9
0
 public EnumerableObjectTableRowsFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 public TableBuilder(TypeMetadataProviderBase metadata, StringJoiner stringJoiner)
 {
     this.stringJoiner = stringJoiner;
 }
 public TableBuilder(TypeMetadataProviderBase metadata)
     : this(metadata, new StringJoiner())
 {
 }
Ejemplo n.º 12
0
 public ComplexTypeTableHeadingFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
Ejemplo n.º 13
0
 public EnumerableTypeFragment(TypeMetadataProviderBase metadata)
     : base(metadata)
 {
 }
 protected FragmentBase(TypeMetadataProviderBase metadata)
     : this()
 {
     this.Metadata = metadata;
 }