Example #1
0
        protected ExecutableWrapper(ContainerWrapper containerWrapper, string moniker)
        {
            if (containerWrapper == null)
            {
                throw new ArgumentNullException(nameof(containerWrapper));
            }

            try
            {
                InnerObject = containerWrapper.InnerObject.Executables.Add(moniker);
            }
            catch (Exception)
            {
                throw new InvalidOperationException($"Failed to create executable with moniker {moniker}!");
            }

            containerWrapper.ExecutableWrappers.Add(this);
        }
 protected ContainerWrapper(ContainerWrapper containerWrapper, string moniker) : base(containerWrapper, moniker)
 {
 }