差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
it:dotnet:net [2022-08-06 20:08] – 移除 - 外部编辑 (Unknown date) 127.0.0.1 | it:dotnet:net [2023-08-24 13:13] (当前版本) – [DependencyProperty] goldentianya | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== .NET Skills ====== | ||
+ | |||
+ | ===== wsdl ===== | ||
+ | |||
+ | Convert <color # | ||
+ | <code > | ||
+ | cd " | ||
+ | SvcUtil.exe D: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | 默认情况下 WCF 不生成完整的WSDL文件,只有 operation,访问的时候采用 <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.</ | ||
+ | |||
+ | 可以创建一个BAT文件,命名空间为“DruckStrasse.Core.Contract”,双击即可产生CS文件。 | ||
+ | <code | shell> | ||
+ | Set _SdkToolsPath=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools | ||
+ | " | ||
+ | Pause | ||
+ | </ | ||
+ | |||
+ | 写入压缩文件 | ||
+ | <code > | ||
+ | using (var outputStream = new MemoryStream()) | ||
+ | { | ||
+ | using (var zipArchive = new ZipArchive(outputStream, | ||
+ | { | ||
+ | ZipArchiveEntry entry = zipArchive.CreateEntry(" | ||
+ | using (var sourceStream = File.OpenRead(tempFileName)) // Ein Word Datei | ||
+ | using (var destinationStream = entry.Open()) | ||
+ | { | ||
+ | sourceStream.CopyTo(destinationStream); | ||
+ | } | ||
+ | string metaInfoFileName = Path.Combine(Directory.GetCurrentDirectory(), | ||
+ | zipArchive.CreateEntryFromFile(metaInfoFileName, | ||
+ | |||
+ | ZipArchiveEntry entrySkript = zipArchive.CreateEntry(" | ||
+ | using (var skriptStream = new MemoryStream(skript)) // skript ist ein byte[] | ||
+ | using (var destinationStream = entrySkript.Open()) | ||
+ | { | ||
+ | skriptStream.CopyTo(destinationStream); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | return outputStream.ToArray(); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== DependencyProperty ===== | ||
+ | |||
+ | | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||