Beispiel #1
0
 /// <summary>
 /// Creates an atomic component using the original From URI.
 /// </summary>
 /// <returns>Returns an instance of the <see cref="Builder"/> class</returns>
 public Builder Atomic()
 {
     this.atomicComponent = this.CreateAtomic(
         this.fromUri.ComponentName,
         this.fromUri.Headers);
     return(this);
 }
Beispiel #2
0
        /// <summary>
        /// Creates an atomic component using the original From URI.
        /// </summary>
        /// <param name="componentUri">Valid Kyameru URI.</param>
        /// <returns>Returns an instance of the <see cref="Builder"/> class</returns>
        public Builder Atomic(string componentUri)
        {
            RouteAttributes route = new RouteAttributes(componentUri);

            this.atomicComponent = this.CreateAtomic(
                route.ComponentName,
                route.Headers);
            return(this);
        }
        /// <summary>
        /// Creates the atomic component.
        /// </summary>
        /// <param name="from">Valid component name.</param>
        /// <param name="headers">Dictionary of headers</param>
        /// <returns>Returns an instance of the <see cref="IAtomicComponent"/> interface.</returns>
        protected IAtomicComponent CreateAtomic(string from, Dictionary <string, string> headers)
        {
            IAtomicComponent response = null;

            try
            {
                response = this.GetOasis(from).CreateAtomicComponent(headers);
            }
            catch (Exception ex)
            {
                throw new Exceptions.ActivationException(Resources.ERROR_ACTIVATING_ATOMIC, ex, "Atomic");
            }

            return(response);
        }
Beispiel #4
0
 public Atomic(ILogger logger, IAtomicComponent atomicComponent, string identity) : base(logger, identity)
 {
     this.atomicComponent        = atomicComponent;
     this.atomicComponent.OnLog += OnLog;
 }