bool TryGetConstructor(out FlowConstructor constructor) { constructor = null; var constructors = _info.DeclaredType.GetConstructors(BindingFlags.Public | BindingFlags.Instance); if (constructors.Length == 0) { Log.Warning("[timeline] Flow {Type} has no public parameterless constructor; ignoring", _info); } else { if (constructors.Length == 1) { if (constructors[0].GetParameters().Length == 0) { constructor = new FlowConstructor(constructors[0]); } else { Log.Warning("[timeline] Flow {Type} constructor has parameters; ignoring", _info); } } } return(constructor != null); }
internal TopicType( AreaTypeInfo info, FlowConstructor constructor, FlowObservationSet observations, ResumeAlgorithm resumeAlgorithm) : base(info, constructor, observations, resumeAlgorithm) { }
internal QueryType( AreaTypeInfo info, FlowConstructor constructor, FlowObservationSet observations, ResumeAlgorithm resumeAlgorithm, int batchSize) : base(info, constructor, observations, resumeAlgorithm) { BatchSize = batchSize; }
internal FlowType( AreaTypeInfo info, FlowConstructor constructor, FlowObservationSet observations, ResumeAlgorithm resumeAlgorithm) : base(info) { Constructor = constructor; Observations = observations; ResumeAlgorithm = resumeAlgorithm; }