コード例 #1
0
        /// <summary>
        /// The get to model.
        /// </summary>
        /// <param name="modelId">
        /// The model id.
        /// </param>
        /// <returns>
        /// The <see cref="IModel"/>.
        /// </returns>
        public IModel GetToModel(string modelId)
        {
            var baseUrl    = WtConfiguration.Url;
            var modelIdUrl = $"{baseUrl}Catalog/model/{modelId}";

            WebAdapter.OpenUrl(modelIdUrl);

            var retVal = StfContainer.Get <IModel>();

            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// The get to wrap.
        /// </summary>
        /// <param name="wrapId">
        /// The wrap id.
        /// </param>
        /// <returns>
        /// The <see cref="IWrap"/>.
        /// </returns>
        public IWrap GetToWrap(string wrapId)
        {
            var baseUrl   = WtConfiguration.Url;
            var wrapIdUrl = $"{baseUrl}Collection/wrap/{wrapId}";
            var openUrl   = WebAdapter.OpenUrl(wrapIdUrl);

            if (!openUrl)
            {
                StfLogger.LogError($"Couldn't open the url [{wrapIdUrl}]");
                return(null);
            }

            var retVal = StfContainer.Get <IWrap>();

            return(retVal);
        }
コード例 #3
0
        /// <summary>
        /// The init.
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool Init()
        {
            var registerMyNeededTypes = new RegisterMyNeededTypes(this);

            registerMyNeededTypes.Register();
            WtConfiguration = SetConfig <WtConfiguration>();

            // get what I need - a WebAdapter:-)
            WebAdapter = StfContainer.Get <IWebAdapter>();

            WebAdapter.OpenUrl(WtConfiguration.Url);

            var currentDomainBaseDirectory = AppDomain.CurrentDomain.BaseDirectory;

            StfLogger.LogKeyValue("Current Directory", currentDomainBaseDirectory, "Current Directory");
            return(true);
        }