public IOriginationBuilder Configure(IOrigination origination) { if (originations.Contains(origination)) { return(this); } return(new Listed(originations.Append(origination))); }
/// <inheritdoc/> public IService Configure(IOrigination origination) { if (origination is null) { throw new ArgumentNullException(nameof(origination)); } return(new Service(originationBuilder.Configure(origination), terminationBuilder, executionBuilder, spanBuilder)); }
public IOriginationBuilder Configure(IOrigination origination) { if (first == origination) { return(this); } return(new Listed(new[] { first, origination })); }
/// <summary> /// Creates <see cref="ISpan"/> from <see cref="IOrigination"/> and <see cref="Action"/>. /// </summary> /// <param name="origination"> /// <see cref="IOrigination"/> to originate in <see cref="ISpan"/>. /// </param> /// <param name="termination"> /// <see cref="Action"/> to terminate in <see cref="ISpan"/>. /// </param> /// <returns> /// <see cref="ISpan"/> created. /// </returns> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="origination"/> is null. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="termination"/> is null. /// </exception> public static ISpan To(this IOrigination origination, Action termination) { if (origination is null) { throw new ArgumentNullException(nameof(origination)); } if (termination is null) { throw new ArgumentNullException(nameof(termination)); } return(origination.To(new Termination(termination))); }
/// <summary> /// Creates <see cref="ISpan"/> from <see cref="ITermination"/> and <see cref="IOrigination"/>. /// </summary> /// <param name="termination"> /// <see cref="ITermination"/> to terminate in <see cref="ISpan"/>. /// </param> /// <param name="origination"> /// <see cref="IOrigination"/> to originate in <see cref="ISpan"/>. /// </param> /// <returns> /// <see cref="ISpan"/> created. /// </returns> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="termination"/> is null. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="origination"/> is null. /// </exception> public static ISpan From(this ITermination termination, IOrigination origination) { if (termination is null) { throw new ArgumentNullException(nameof(termination)); } if (origination is null) { throw new ArgumentNullException(nameof(origination)); } return new Span(origination, termination); }
/// <summary> /// Binds <see cref="ICycle"/> to <see cref="IOrigination"/> and <see cref="ITermination"/>. /// </summary> /// <param name="cycle"> /// <see cref="ICycle"/> to be bound to <paramref name="origination"/> and <paramref name="termination"/>. /// </param> /// <param name="origination"> /// <see cref="IOrigination"/> to bind to <see cref="ICycle"/>. /// </param> /// <param name="termination"> /// <see cref="ITermination"/> to bind to <see cref="ICycle"/>. /// </param> /// <returns> /// <see cref="ICycle"/> bound. /// </returns> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="cycle"/> is null. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="origination"/> is null. /// </exception> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="termination"/> is null. /// </exception> public static ICycle Between(this ICycle cycle, IOrigination origination, ITermination termination) { if (cycle is null) { throw new ArgumentNullException(nameof(cycle)); } if (origination is null) { throw new ArgumentNullException(nameof(origination)); } if (termination is null) { throw new ArgumentNullException(nameof(termination)); } return(cycle.In(origination.To(termination))); }
internal One(IOrigination first) { this.first = first; }
public IOriginationBuilder Configure(IOrigination origination) { return(new One(origination)); }
internal Span(IOrigination origination, ITermination termination) { Origination = origination; Termination = termination; }