无法找到WCF服务引用命名空间(WCF Service reference namespace cannot be found)
我在我的解决方案中有一个本地WCF服务,这是我引用的。 但是,我的控制器类无法拿起服务名称空间? 传统上我会使用svcUtil来编写一个包装类,但是因为这是内部的,我可以简单地添加'服务引用',点击命名空间,然后简单地调用我的服务(即var service = new QServiceReference.MyClass();)
我无法显示图片,因此这里是我的解决方案的结构,
Solution -> Services Folder -> QService Folder QService Project -> Web Folder -> Zipporah.Queuing.Web (project) -> Services References -> QServiceReference -> Controllers Folder -> KioskProcessController
我的类(KioskProcessController)如下所示:
using System.Web.Mvc; using Zipporah.Queuing.Web.QServiceReference; (ITS THIS NAMESPACE REFERENCE THAT DOES NOT WORK) namespace Zipporah.Queuing.Web.Controllers { public class KioskProcessController : ZipController { public ActionResult Index() { return View(); } public ViewResult Queue() { return View(); } public ViewResult PreAppointment() { return View(); } } }
对不起,如果结构不明确(如前所述我不能张贴图片)
任何线索或想法将不胜感激?
I've got a local WCF service in my solution which I have referenced. However my controller class is not able to pick up the Service namespace? Traditionally I would use svcUtil to write a wrapper class but as this is internal I though I could simply add 'Service Reference', tap into the namespace then simple invoke my service (ie var service = new QServiceReference.MyClass();)
I'm unable to show pictures so here's the structure for my solution,
Solution -> Services Folder -> QService Folder QService Project -> Web Folder -> Zipporah.Queuing.Web (project) -> Services References -> QServiceReference -> Controllers Folder -> KioskProcessController
My class (KioskProcessController) is as follows:
using System.Web.Mvc; using Zipporah.Queuing.Web.QServiceReference; (ITS THIS NAMESPACE REFERENCE THAT DOES NOT WORK) namespace Zipporah.Queuing.Web.Controllers { public class KioskProcessController : ZipController { public ActionResult Index() { return View(); } public ViewResult Queue() { return View(); } public ViewResult PreAppointment() { return View(); } } }
Sorry if that structure is not clear (as aforementioned i cannot post pictures)
Any clues or thoughts would be most appreciated?
原文:https://stackoverflow.com/questions/11393934
最满意答案
因为QTreeWidget继承了QTreeView,所以你可以对列索引0做这个:
ui->treeWidget->resizeColumnToContents(0);
Because QTreeWidget inherits QTreeView you can do this for say column index 0:
ui->treeWidget->resizeColumnToContents(0);
相关问答
更多-
防止contenteditable(在弯曲div)扩大[重复](Prevent contenteditable (in flexed div) from expanding [duplicate])[2022-07-16]
你给了.column属性flex: 1 。 从规格 W3 flex:相当于flex: 1 0.使flex项目具有灵活性并将flex基础设置为零,从而生成在Flex容器中接收指定比例的可用空间的项目。 如果Flex容器中的所有项目都使用此模式,则它们的大小将与指定的flex因子成比例。 要防止column和它的内容扩展,您需要给它一个max-width值。 我还建议从.column删除margin-right 。 相反,请设置列宽并在容器上 ... -
在C / C ++中包含头文件不止一次[duplicate](Including header files in C/C++ more than once [duplicate])[2022-07-14]
是的,在使用预处理器生成代码或者像Boost.PP这样的技巧时很有用。 例如,请参阅X宏。 基本思想是文件包含宏的主体,并且#define参数,然后#include它。 这是一个有创意的例子: macro.xpp std::cout << MESSAGE; #undef MESSAGE file.cpp: int main() { # define MESSAGE "hello world" # include "macro.xpp" } 这也允许你使用#if和朋友的参数,正常的宏不能做。 Yes, i ... -
你的问题是lexicon是通过值传递给newStr()的。 分配lexicon = updated因此对于调用者不可见。 由于该函数释放由lexicon[i]引用的所有动态分配的内存,因此main()中lexicon所有后续使用都具有未定义的行为。 顺便说一句,在newStr()内部分配的所有内存都被泄漏 - 函数返回后没有变量引用它,所以它不能在代码中释放。 不是直接尝试使用指针和运算符new ,而是查找标准容器( std::vector )和std::string (用于管理字符串数据)。 Your p ...
-
使用浏览器扩展标头(Expanding header with browser)[2021-08-13]
好吧,如果你只是删除float:left和width:95% ,那么它将自动占用浏览器的整个宽度,因为这是默认值。 但是,如果您实际上在谈论使文本大小本身变得越来越小,具体取决于浏览器大小,您可以尝试使用视口单元: h1 { font-size:4em; font-size:5vw; } 让第一个在pt , px , em或其他常见单元中非常重要,这样不支持Viewport单元的浏览器就可以依赖它了。 对于视口单元,根据需要进行调整。 您还可以使用vh而不是vw根据视口的高度而不是宽度调整 ... -
以编程方式将WPF DataGrid列宽定义为100%[重复](Programmatically define WPF DataGrid column width to 100% [duplicate])[2023-10-25]
也许你在找 new DataGridLength(1, DataGridLengthUnitType.Star); Maybe you are looking for new DataGridLength(1, DataGridLengthUnitType.Star); -
根据R [duplicate]中另一列的值动态选择列(Select column dynamically based on value from another column in R [duplicate])[2022-03-26]
通过遍历行序列,使用get提取值并将其赋值为create'y' dt[, y := .SD[, get(x), seq_len(.N)]$V1] dt # a b c x y #1: 2 5 1 a 2 #2: 3 7 2 b 7 #3: 5 7 3 c 3 By looping through the sequence of rows, extract the value with get and assign it to create 'y' dt[, y := .SD[, get(x), seq ... -
因为QTreeWidget继承了QTreeView,所以你可以对列索引0做这个: ui->treeWidget->resizeColumnToContents(0); Because QTreeWidget inherits QTreeView you can do this for say column index 0: ui->treeWidget->resizeColumnToContents(0);
-
从background规则中删除no-repeat允许宽度调整为不同的文本长度。 修改小提琴 Removing no-repeat from the background rule allows the width to adjust to different lengths of text. Revised Fiddle
-
FlexBox - 使用百分比边距时不扩展容器宽度[重复](FlexBox - container width not expanding when using percent margin [duplicate])[2022-08-18]
正如Michael Coker评论的那样, 作者应该完全避免在弹性项目中使用填充或边距的百分比,因为它们会在不同的浏览器中获得不同的行为。 ( CSS Flexbox边距 ) 当使用百分比时,我们经常将其与视口宽度相关联,因此,考虑到这一点,视口单元vw / vh可能是一个不错的选择,因为它的工作方式类似(响应)。 由您的Codepen示例组成的堆栈代码段 .page { display: flex; /*border: 5px solid orange;*/ } .container ... -
QHeaderView :: resizeSection()可以做到这一点,在C ++中它看起来像这样: myTreeWidget->headerView()->resizeSection(0 /*column index*/, 100 /*width*/); QHeaderView::resizeSection() should do the trick, in C++ it would look like this: myTreeWidget->headerView()->resizeSection( ...