コード例 #1
0
        public override DesignerDataSourceView GetView(string viewName)
        {
            if (!(viewName.Equals(ControllerDataSourceView.DefaultViewName)))
            {
                return(null);
            }
            IWebApplication webApp = ((IWebApplication)(this.Component.Site.GetService(typeof(IWebApplication))));

            if (webApp == null)
            {
                return(null);
            }
            IProjectItem item = webApp.GetProjectItemFromUrl("~/Controllers");

            if (_view == null)
            {
                _view = new ControllerDataSourceDesignView(this, ControllerDataSourceView.DefaultViewName);
            }
            _view.DataController = _control.DataController;
            _view.DataView       = _control.DataView;
            if (item != null)
            {
                _view.BasePath = item.PhysicalPath;
            }
            return(_view);
        }
コード例 #2
0
 public override DesignerDataSourceView GetView(string viewName)
 {
     if (!(viewName.Equals(ControllerDataSourceView.DefaultViewName)))
         return null;
     IWebApplication webApp = ((IWebApplication)(this.Component.Site.GetService(typeof(IWebApplication))));
     if (webApp == null)
         return null;
     IProjectItem item = webApp.GetProjectItemFromUrl("~/Controllers");
     if (_view == null)
         _view = new ControllerDataSourceDesignView(this, ControllerDataSourceView.DefaultViewName);
     _view.DataController = _control.DataController;
     _view.DataView = _control.DataView;
     if (item != null)
         _view.BasePath = item.PhysicalPath;
     return _view;
 }