예제 #1
0
        public static IHtmlMarker CreateMarker <T>(T descriptor) where T : IFigureDescriptor
        {
            Contract.RequiresNotNull(descriptor, "descriptor");

            IHtmlMarker marker = null;

            if ((marker = TryCreateMarker(descriptor as PathSeriesDescriptor)) != null)
            {
                return(marker);
            }
            if ((marker = TryCreateMarker(descriptor as PathCellDescriptor)) != null)
            {
                return(marker);
            }
            if ((marker = TryCreateMarker(descriptor as PathSingleValueDescriptor)) != null)
            {
                return(marker);
            }
            if ((marker = TryCreateMarker(descriptor as PathTableDescriptor)) != null)
            {
                return(marker);
            }

            throw new NotSupportedException("Descriptor not supported: " + descriptor.GetType().Name);
        }
예제 #2
0
 public BasicMarkerNode(string sourceCode, ReadOnlyCollection <IDokuWikiTreeNode> childNodes, IHtmlMarker marker)
     : base(sourceCode, childNodes)
 {
     Marker = marker;
 }