为什么Google Viewer有时打开的是空白页面而不是打开 PDF 文件?
我可以使用这段代码来模拟它。并不是每次都会发生。需要点击几次Google Viewer按钮。
\n我可以在 Edge 和 Chrome 上模拟它。
\n\n\n请注意选项卡标题“Sem t\xc3\xadtlulo”后面的两个选项卡。他们完美地打开了 PDF 文件。但是,标题为“Sem t\xc3\xadtulo”的选项卡无法打开 PDF。
\n编辑
\n我正在使用 google 文档查看器https://docs.google.com/viewer。
\njavascript google-chrome window.open google-document-viewer microsoft-edge
我需要通过自定义构造函数将字符串作为参数传递给WCF服务.
public partial class ServiceXX : IServiceXX
{
private string test;
static ServiceXX()
{
}
public ServiceXX()
{
this.test= null;
}
public ServiceXX(string test)
{
this.test= test;
}
}
Run Code Online (Sandbox Code Playgroud)
希望能够通过客户端中的服务引用(代理)使用参数访问此构造函数.
Asp.net示例:
using (ServiceXXClient proxy = new ServiceXXClient("Teste"))
{
}
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?
从Jobject(Newtonsoft)继承来自未序列化的类的existents属性.
为什么Id和Name属性没有序列化?
public class Test : JObject
{
public int Id { get; set; }
public string Name { get; set; }
}
class Program
{
static void Main(string[] args)
{
var test = new Test();
test["new_pro"] = 123456;
test.Id = 1;
test.Name = "Dog";
var r = Newtonsoft.Json.JsonConvert.SerializeObject(test);
// Result = { "new_pro":123456}
}
}
Run Code Online (Sandbox Code Playgroud)
任何的想法?
c# ×3
.net ×1
bytearray ×1
constructor ×1
javascript ×1
json.net ×1
stream ×1
wcf ×1
window.open ×1