搜索
搜索
天涯的知库
显示页面
过去修订
您的足迹:
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== .NET Skills ====== ===== wsdl ===== Convert <color #ff7f27>''%%WSDL%%''</color> Datei nach C# Class <code > cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools" SvcUtil.exe D:\Aufgaben\ZentraleDrucker\rzf_oaseSOAP.wsdl /out:D:\Aufgaben\ZentraleDrucker\oase_soap.cs </code> <note>* Terminal 要用Administrator权限运行,否则会遇到错误。</note> 默认情况下 WCF 不生成完整的WSDL文件,只有 operation,访问的时候采用 <color #ff7f27>''%%..../?singlewsdl%%''</color> 才会生成包括类型在内的完整文件。 <wrap lo>Yes, that's normal for WCF. By default, WCF will show just the operations in the WSDL itself - the data structures are documented in XSD files that are linked to the WSDL file.</wrap> 可以创建一个BAT文件,命名空间为“DruckStrasse.Core.Contract”,双击即可产生CS文件。 <code | shell> Set _SdkToolsPath=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools "%_SdkToolsPath%\SvcUtil.exe" /serviceContract /syncOnly /namespace:*,DruckStrasse.Core.Contract rzf_druckystem.wsdl Pause </code> 写入压缩文件 <code > using (var outputStream = new MemoryStream()) { using (var zipArchive = new ZipArchive(outputStream, ZipArchiveMode.Create)) { ZipArchiveEntry entry = zipArchive.CreateEntry("binary" + extension); using (var sourceStream = File.OpenRead(tempFileName)) // Ein Word Datei using (var destinationStream = entry.Open()) { sourceStream.CopyTo(destinationStream); } string metaInfoFileName = Path.Combine(Directory.GetCurrentDirectory(), "KOV_Paket/meta-info.xml"); zipArchive.CreateEntryFromFile(metaInfoFileName, Path.GetFileName(metaInfoFileName)); ZipArchiveEntry entrySkript = zipArchive.CreateEntry("skript.xml"); using (var skriptStream = new MemoryStream(skript)) // skript ist ein byte[] using (var destinationStream = entrySkript.Open()) { skriptStream.CopyTo(destinationStream); } } return outputStream.ToArray(); } </code> ===== DependencyProperty ===== 如果不能更新UI,在绑定的时候要用到 RelativeSource <GroupBox Header="Medizinische Begründung :"> <TextBlock TextWrapping="Wrap" Margin="5,5,5,5" Text="{Binding MdComment, RelativeSource={RelativeSource AncestorType={x:Type local:ANFM_MBEG_Preview}}}"></TextBlock> </GroupBox>
it/dotnet/net.txt
· 最后更改: 2023-08-24 13:13 由
goldentianya
回到顶部