예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExtensionContext"/> class.
        /// </summary>
        /// <param name="describable">The describable.</param>
        public ExtensionContext(IDescribable describable)
        {
            Ensure.ArgumentNotNull(describable, "describable");

            this.Name = describable.Name;
            this.Description = describable.Describe();
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExtensionContext"/> class.
        /// </summary>
        /// <param name="describable">The describable.</param>
        public ExtensionContext(IDescribable describable)
        {
            Ensure.ArgumentNotNull(describable, "describable");

            this.Name        = describable.Name;
            this.Description = describable.Describe();
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExecutionContext"/> class.
        /// </summary>
        /// <param name="describable">The describable.</param>
        public ExecutionContext(IDescribable describable)
        {
            Ensure.ArgumentNotNull(describable, "describable");

            this.executables = new Collection <IExecutableContext>();

            this.Name        = describable.Name;
            this.Description = describable.Describe();
        }
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExecutableContext"/> class.
        /// </summary>
        /// <param name="describable">The describable.</param>
        public ExecutableContext(IDescribable describable)
        {
            Ensure.ArgumentNotNull(describable, "describable");

            this.behaviors = new Collection<IBehaviorContext>();

            this.Name = describable.Name;
            this.Description = describable.Describe();
        }
예제 #5
0
 public IDescription AppendDescribable(IDescribable describable)
 {
     describable.Describe(this);
     return(this);
 }
예제 #6
0
 public static string GetLongDescription(this IDescribable describable) => describable.Describe(PreferredDescriptionType.Long);
예제 #7
0
 public static string GetShortDescription(this IDescribable describable) => describable.Describe(PreferredDescriptionType.Short);