Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ResultFactoryRegistry.CreateResult Method

Creates a result from the specified resultText by extracting the result mode from the text and delegating to a corresponding IResultFactory, if any.

[Visual Basic]
Public Shared Sub CreateResult( _
   ByVal resultText As String _
)
[C#]
public static IResult CreateResult(
   string resultText
);

Parameters

resultText
the 'resultmode'-prefixed textual representation of the result instance to create.

Return Value

the IResult instance corresponding to the textual resultText represenation, created by the IResultFactory

Remarks

This method guarantees that the return value will always be non-null.
resultText must always be of the form "<resultmode>:<textual result representation>". The resultmode will be extracted and the corresponding IResultFactory (previously registered using RegisterResultMode) is called to actually create the IResult instance. If no factory matches resultmode, the call is handled to the DefaultResultFactory.

Exceptions

Exception Type Condition
ArgumentNullException if either resultText is null or CreateResult returned null.

See Also

ResultFactoryRegistry Class | Spring.Web.Support Namespace