src/Azos.Wave/Handlers/TypeLookupHandler.cs
/// <summary>
/// Override to get type name from WorkContext. Default implementation looks for MatchedVars[VAR_TARGET_TYPE]
/// </summary>
Override to get type name from WorkContext.
Override to get type name from WorkContext .
protected virtual string GetTargetTypeNameFromWorkContext(WorkContext work)
           {
             var result = work.MatchedVars[VAR_TARGET_TYPE].AsString();
             if (result.IsNullOrWhiteSpace())
              result = DefaultTypeName;
             var match = work.Match;
             if (match!=null && match.TypeNsPrefix.IsNotNullOrWhiteSpace())
             {
                var pfx = match.TypeNsPrefix;
                if (pfx[pfx.Length-1]!='/' && pfx[pfx.Length-1]!='\\') pfx = pfx + '/';
                result = pfx + result;
             }
             return result;
           }
protected virtual string GetTargetTypeNameFromWorkContext ( WorkContext work ) { var result = work . MatchedVars [ VAR_TARGET_TYPE ] . AsString ( ) ; if ( result . IsNullOrWhiteSpace ( ) ) result = DefaultTypeName ; var match = work . Match ; if ( match != null && match . TypeNsPrefix . IsNotNullOrWhiteSpace ( ) ) { var pfx = match . TypeNsPrefix ; if ( pfx [ pfx . Length - 1 ] != ' ' && pfx [ pfx . Length - 1 ] != ' \\ ' ) pfx = pfx + ' ' ; result = pfx + result ; } return result ; }
Override to get type name from WorkContext.
Override to get type name from WorkContext .
//20160217 DKh
work
WorkContext