public static T Create(DTO.ModuleFeatureStepType stepType)
        {
            Func <T> constructor = null;

            if (_dict.TryGetValue(stepType, out constructor))
            {
                return(constructor());
            }

            throw new ArgumentException("No type registered for this step");
        }
Exemplo n.º 2
0
 public ModuleFeatureStep(
     string name,
     string title,
     short sort,
     ENT.ModuleFeatureStepType type
     )
 {
     Name  = name;
     Title = title;
     Sort  = sort;
     Type  = type;
 }
Exemplo n.º 3
0
 public ModuleFeatureStep(
     string name,
     string title,
     short sort,
     ENT.ModuleFeatureStepType type,
     List <ModuleFeatureStepError> errors
     )
 {
     Name   = name;
     Title  = title;
     Sort   = sort;
     Type   = type;
     Errors = errors;
 }
Exemplo n.º 4
0
 public ModuleFeature(
     string name,
     string title,
     short sort,
     ENT.ModuleFeatureType type,
     ENT.ModuleFeatureStepType landingStepType,
     ENT.ModuleFeatureStepType actionStepType
     )
 {
     Name            = name;
     Title           = title;
     Sort            = sort;
     Type            = type;
     LandingStepType = landingStepType;
     ActionStepType  = actionStepType;
 }
Exemplo n.º 5
0
 public ModuleFeatureStep(
     string name,
     string title,
     short sort,
     ENT.ModuleFeatureStepType type,
     List <ModuleFeatureStepAction> actions,
     List <ModuleFeatureStepAdvisor> advisors
     )
 {
     Name     = name;
     Title    = title;
     Sort     = sort;
     Type     = type;
     Actions  = actions;
     Advisors = advisors;
 }
Exemplo n.º 6
0
 public ModuleFeature(
     string name,
     string title,
     short sort,
     ENT.ModuleFeatureType type,
     ENT.ModuleFeatureStepType landingStepType,
     ENT.ModuleFeatureStepType actionStepType,
     List <ModuleFeatureStep> steps,
     List <FeatureSearchGroup> searchGroups
     )
 {
     Name            = name;
     Title           = title;
     Sort            = sort;
     Type            = type;
     LandingStepType = landingStepType;
     ActionStepType  = actionStepType;
     Steps           = steps;
     SearchGroups    = searchGroups;
 }
 public static void Register(DTO.ModuleFeatureStepType stepType, Func <T> constructor)
 {
     _dict.Add(stepType, constructor);
 }