Пример #1
0
        public virtual void InitializeHandler(SolutionEntityItem item)
        {
            MSBuildHandler h = CreateHandler <MSBuildHandler> (null, null);

            h.Item = item;
            item.SetItemHandler(h);
        }
Пример #2
0
        protected T CreateHandler <T> (string fileName, string itemGuid) where T : MSBuildHandler
        {
            MSBuildHandler h = OnCreateHandler(fileName, itemGuid);

            if (!(h is T))
            {
                throw new InvalidOperationException("Error while creating a MSBuildHandler. Expected an object of type '" + typeof(T).FullName + ", found type '" + h.GetType());
            }
            return((T)h);
        }