差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
it:dotnet:net [2022-08-06 20:08] – 移除 - 外部编辑 (Unknown date) 127.0.0.1it:dotnet:net [2023-08-24 13:13] (当前版本) – [DependencyProperty] goldentianya
行 1: 行 1:
 +====== .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>
  
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0