Model Expansion snippet for a Model model Expansion
namespace Model namespace MbUnitTests type Modelled type Put the modelled type here basetype Modelled Base Type Object ''' A IModel implementation for the $type$ type. ''' ' ' _ Public Class $type$Model Inherits $basetype$Model #Region "Constructors" ''' ''' Initializes a new $type$Model instance. ''' Public Sub New() End Sub ''' ''' Initializes a new "$name$Model" instance to model the modelledType type. ''' ''' ''' Target Type of the model ''' Public Sub New(ByVal modelledType As Type) MyBase.New(modelledType) If Not GetType($type$).IsAssignableFrom(modelledType) Throw New ArgumentException("$type$ is not assignable from "+modelledType.FullName,"modelledType") End If End Sub #End Region #Region "Transitions" _ Public Sub SampleTransition(ByVal target As $type$) Throw New NotImplementedException() End Sub ''' ''' Gets the active ITransition instance for current target. ''' ''' ''' Collection of active ITransition names ''' ''' ''' Current tested instance ''' Protected Overrides Sub GetActiveTransitions( _ ByVal transitions as ITransitionNameCollection , _ ByVal target as Object) MyBase.GetActiveTransitions(transitions,target) Dim current As $type$ = DirectCast(target, $type$) End Sub #End Region End Class End Namespace ]]>