Configuration for an action defines a Name. This name must be unique among its sequence.
コード例 #1
0
 /// <summary>
 /// Internal factory for ActionConfigurationResolved avoids externally visible virtual protected method on ActionConfiguration.
 /// This prevents any other composite implementations than our.
 /// </summary>
 internal static ActionConfigurationResolved Create( IActivityMonitor monitor, ActionConfiguration a, bool flattenUselessComposite, int index = 0, IReadOnlyList<string> path = null )
 {
     if( path == null ) path = Util.Array.Empty<string>();
     Impl.ActionCompositeConfiguration c = a as Impl.ActionCompositeConfiguration;
     if( c != null ) return new Impl.ActionCompositeConfigurationResolved( monitor, index, path, c, flattenUselessComposite );
     return new ActionConfigurationResolved( index, path, a );
 }
コード例 #2
0
 internal ActionConfigurationResolved( int index, IReadOnlyList<string> path, ActionConfiguration a )
 {
     _index = index;
     _path = path;
     _action = a;
     _fullName = String.Join( "/", path.Append( a.Name ) );
 }
コード例 #3
0
 /// <summary>
 /// Overrides one or more existing actions.
 /// <see cref="ActionConfiguration.Name"/> is the key.
 /// </summary>
 /// <param name="a">Action to to override.</param>
 /// <param name="otherActions">Optional other actions to override.</param>
 /// <returns>This <see cref="SubRouteConfiguration"/> to enable fluent syntax.</returns>
 public new SubRouteConfiguration OverrideAction( ActionConfiguration a, params ActionConfiguration[] otherActions )
 {
     base.OverrideAction( a, otherActions );
     return this;
 }
コード例 #4
0
 /// <summary>
 /// Declares one or more actions.
 /// </summary>
 /// <param name="a">Action to declare.</param>
 /// <param name="otherActions">Optional other actions to declare.</param>
 /// <returns>This <see cref="SubRouteConfiguration"/> to enable fluent syntax.</returns>
 public new SubRouteConfiguration DeclareAction( ActionConfiguration a, params ActionConfiguration[] otherActions )
 {
     base.DeclareAction( a, otherActions );
     return this;
 }
コード例 #5
0
 /// <summary>
 /// Overridden to return a this as a <see cref="ActionSequenceConfiguration"/> for fluent syntax.
 /// </summary>
 /// <param name="a">The action to add.</param>
 /// <returns>This sequence.</returns>
 public ActionSequenceConfiguration AddAction( ActionConfiguration a )
 {
     base.Add( a );
     return this;
 }
コード例 #6
0
 /// <summary>
 /// Declares one or more <see cref="ActionConfiguration"/>. It can be inserted later thanks to <see cref="InsertAction"/>.
 /// </summary>
 /// <param name="a">The first configuration to declare.</param>
 /// <param name="otherActions">Optional other configurations to declare.</param>
 /// <returns>This object.</returns>
 public RouteConfiguration DeclareAction( ActionConfiguration a, params ActionConfiguration[] otherActions )
 {
     _configurations.Add( new MetaDeclareActionConfiguration( a, otherActions ) );
     return this;
 }
コード例 #7
0
 /// <summary>
 /// Overridden to return a this as a <see cref="ActionParallelConfiguration"/> for fluent syntax.
 /// </summary>
 /// <param name="a">The action to add.</param>
 /// <returns>This parallel.</returns>
 public ActionParallelConfiguration AddAction( ActionConfiguration a )
 {
     base.Add( a );
     return this;
 }