Smrf.NodeXL.ExcelTemplate.VertexWorksheetReader.ReadLabelPosition C# (CSharp) Method

ReadLabelPosition() protected method

protected ReadLabelPosition ( ExcelTableReader oRow, VertexLabelPositionConverter oVertexLabelPositionConverter, IVertex oVertex ) : void
oRow Smrf.AppLib.ExcelTableReader
oVertexLabelPositionConverter VertexLabelPositionConverter
oVertex IVertex
return void
    ReadLabelPosition
    (
        ExcelTableReader.ExcelTableRow oRow,
        VertexLabelPositionConverter oVertexLabelPositionConverter,
        IVertex oVertex
    )
    {
        Debug.Assert(oRow != null);
        Debug.Assert(oVertex != null);
        Debug.Assert(oVertexLabelPositionConverter != null);
        AssertValid();

        String sLabelPosition;

        if ( !oRow.TryGetNonEmptyStringFromCell(
            VertexTableColumnNames.LabelPosition, out sLabelPosition) )
        {
            return;
        }

        VertexLabelPosition eLabelPosition;

        if ( !oVertexLabelPositionConverter.TryWorkbookToGraph(sLabelPosition,
            out eLabelPosition) )
        {
            OnWorkbookFormatErrorWithDropDown(oRow,
                VertexTableColumnNames.LabelPosition, "label position");
        }

        oVertex.SetValue( ReservedMetadataKeys.PerVertexLabelPosition,
            eLabelPosition);
    }