Permalink
Please
sign in to comment.
Showing
with
3,098 additions
and 0 deletions.
- +47 −0 .gitignore
- BIN .vs/WOPIForms/v14/.suo
- +1,038 −0 .vs/config/applicationhost.config
- +95 −0 WOPIForms.WOPIClient/Constants.cs
- +35 −0 WOPIForms.WOPIClient/Properties/AssemblyInfo.cs
- +17 −0 WOPIForms.WOPIClient/Properties/PublishProfiles/FileSystem.pubxml
- +73 −0 WOPIForms.WOPIClient/Properties/PublishProfiles/FileSystem.pubxml.user
- +91 −0 WOPIForms.WOPIClient/WOPIClasses/WOPIUtilities.cs
- +70 −0 WOPIForms.WOPIClient/WOPIClasses/WOPIWebClient.cs
- +139 −0 WOPIForms.WOPIClient/WOPIForms.WOPIClient.csproj
- +32 −0 WOPIForms.WOPIClient/WOPIForms.WOPIClient.csproj.user
- +30 −0 WOPIForms.WOPIClient/Web.Debug.config
- +31 −0 WOPIForms.WOPIClient/Web.Release.config
- +28 −0 WOPIForms.WOPIClient/Web.config
- BIN WOPIForms.WOPIClient/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
- +40 −0 WOPIForms.WOPIClient/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml
- BIN WOPIForms.WOPIClient/bin/WOPIForms.WOPIClient.dll
- +28 −0 WOPIForms.WOPIClient/bin/WOPIForms.WOPIClient.dll.config
- BIN WOPIForms.WOPIClient/bin/WOPIForms.WOPIClient.pdb
- BIN WOPIForms.WOPIClient/bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll
- +135 −0 WOPIForms.WOPIClient/bin/roslyn/Microsoft.CSharp.Core.targets
- BIN WOPIForms.WOPIClient/bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll
- BIN WOPIForms.WOPIClient/bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll
- BIN WOPIForms.WOPIClient/bin/roslyn/Microsoft.CodeAnalysis.dll
- +133 −0 WOPIForms.WOPIClient/bin/roslyn/Microsoft.VisualBasic.Core.targets
- BIN WOPIForms.WOPIClient/bin/roslyn/System.Collections.Immutable.dll
- BIN WOPIForms.WOPIClient/bin/roslyn/System.Reflection.Metadata.dll
- BIN WOPIForms.WOPIClient/bin/roslyn/VBCSCompiler.exe
- +14 −0 WOPIForms.WOPIClient/bin/roslyn/VBCSCompiler.exe.config
- BIN WOPIForms.WOPIClient/bin/roslyn/csc.exe
- BIN WOPIForms.WOPIClient/bin/roslyn/vbc.exe
- +14 −0 WOPIForms.WOPIClient/hosting/discovery/discovery.xml
- BIN WOPIForms.WOPIClient/images/xml.ico
- BIN WOPIForms.WOPIClient/obj/Debug/DesignTimeResolveAssemblyReferences.cache
- BIN WOPIForms.WOPIClient/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
- +28 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/Web.config
- BIN ...OPIClient/obj/Debug/Package/PackageTmp/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/WOPIForms.WOPIClient.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/WOPIForms.WOPIClient.pdb
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll
- +135 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.CSharp.Core.targets
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.dll
- +133 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/Microsoft.VisualBasic.Core.targets
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/System.Collections.Immutable.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/System.Reflection.Metadata.dll
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/VBCSCompiler.exe
- +14 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/VBCSCompiler.exe.config
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/csc.exe
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/bin/roslyn/vbc.exe
- +14 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/hosting/discovery/discovery.xml
- BIN WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/images/xml.ico
- +5 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/packages.config
- +16 −0 WOPIForms.WOPIClient/obj/Debug/Package/PackageTmp/xml/viewer.aspx
- 0 WOPIForms.WOPIClient/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
- 0 WOPIForms.WOPIClient/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
- 0 WOPIForms.WOPIClient/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
- +30 −0 WOPIForms.WOPIClient/obj/Debug/TransformWebConfig/assist/Web.config
- +28 −0 WOPIForms.WOPIClient/obj/Debug/TransformWebConfig/original/Web.config
- +28 −0 WOPIForms.WOPIClient/obj/Debug/TransformWebConfig/transformed/Web.config
- +19 −0 WOPIForms.WOPIClient/obj/Debug/WOPIForms.WOPIClient.csproj.FileListAbsolute.txt
- BIN WOPIForms.WOPIClient/obj/Debug/WOPIForms.WOPIClient.dll
- BIN WOPIForms.WOPIClient/obj/Debug/WOPIForms.WOPIClient.pdb
- BIN WOPIForms.WOPIClient/obj/Debug/_WPPLastBuildInfo.txt
- BIN WOPIForms.WOPIClient/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
- +28 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/Web.config
- BIN ...IClient/obj/Release/Package/PackageTmp/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/WOPIForms.WOPIClient.dll
- BIN ...Forms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll
- +135 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.CSharp.Core.targets
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll
- BIN ...Forms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.CodeAnalysis.dll
- +133 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/Microsoft.VisualBasic.Core.targets
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/System.Collections.Immutable.dll
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/System.Reflection.Metadata.dll
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/VBCSCompiler.exe
- +14 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/VBCSCompiler.exe.config
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/csc.exe
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/bin/roslyn/vbc.exe
- +14 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/hosting/discovery/discovery.xml
- BIN WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/images/xml.ico
- +5 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/packages.config
- +3 −0 WOPIForms.WOPIClient/obj/Release/Package/PackageTmp/xml/viewer.aspx
- 0 WOPIForms.WOPIClient/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
- 0 WOPIForms.WOPIClient/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
- 0 WOPIForms.WOPIClient/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
- +31 −0 WOPIForms.WOPIClient/obj/Release/TransformWebConfig/assist/Web.config
- +28 −0 WOPIForms.WOPIClient/obj/Release/TransformWebConfig/original/Web.config
- +28 −0 WOPIForms.WOPIClient/obj/Release/TransformWebConfig/transformed/Web.config
- +40 −0 WOPIForms.WOPIClient/obj/Release/WOPIForms.WOPIClient.csproj.FileListAbsolute.txt
- BIN WOPIForms.WOPIClient/obj/Release/WOPIForms.WOPIClient.csprojResolveAssemblyReference.cache
- BIN WOPIForms.WOPIClient/obj/Release/WOPIForms.WOPIClient.dll
- BIN WOPIForms.WOPIClient/obj/Release/WOPIForms.WOPIClient.pdb
- BIN WOPIForms.WOPIClient/obj/Release/_WPPLastBuildInfo.txt
- +5 −0 WOPIForms.WOPIClient/packages.config
- +3 −0 WOPIForms.WOPIClient/xml/viewer.aspx
- +45 −0 WOPIForms.WOPIClient/xml/viewer.aspx.cs
- +24 −0 WOPIForms.WOPIClient/xml/viewer.aspx.designer.cs
- +22 −0 WOPIForms.sln
@@ -0,0 +1,47 @@ | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
Binary file not shown.
@@ -0,0 +1,95 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace WOPIForms.WOPIClient | ||
{ | ||
public static class Constants | ||
{ | ||
public const string ProofKey = "BwIAAACkAABSU0EyAAgAAAEAAQARYztrGVlRgjGvgPHGAArsQCbRRgGNPgUtn9U1te729UQ669hl/caOJqAnpZcRGlrNGytQQjgFHCmdSgI84buWKqicLyaLGEh7LaEabC+fIjVA8Jzepwc7Ns2Gjw+nqPcA9GvtKVHkPbt0sqFeyOUWoEBd5tUZ2EIaJGzTG8j5DKj8W42KQjfcORxILqbBVbDZ3ezX+JqjM0utEs+ERweDHBQrJbBhlmVZNpmByPgyWKbxRoLEI2UnBw1ykana/hRTqSB+mxBeHZEZQEeNqfFRz8Kd+SuKhSbza/rvRk5Mu3NI7kRI9cM5Zh7nXCmQK7qbuipcyDbws1ixPwRLwOGYfR3mz7tt/04bQfRHBKYEtOtngsKERS7uqz3Qm/tFjh3sa3JVtVkwy1CIapXOFz8fy4/ONpTINIPjHTgiT1x50zigrZZFKlMKttQ/n1dkgst3mI0C8AJqpEWPEJAtOodK0kX/wancioA+HMqo+1xOi12eGsEO/uiMJ3sPl99xS84loKeQZV03lF17kL81sjY3T9DO9dnsQXhsl4KgRaqDYnajZrzqu6aU2gZoFiWwVNKxtj1EnDeyFPmYXxBSiB2ENfoAWRQU1mrzb+lZYLPtAQacJL8ctsVeUhNEEb61GYPiOV7HSXrj0IKhXUG3Z2c+mHz6WUlJR8K2aL8JQ7m3vbmgREGQFbDMVnBKHIPXbDRxCcibrXNZH2oXqJcYBNITnZGuIRrdGl9LW+57PmzOIFAuLmae/geBrBU0FxYMiJaoqO3RffJ8oWW5JwwYMQ+Vre9WjkxfCN5+hHuPRSUfge++YK0Hkaz3IbKEkR0sLoqGjKt7Eso6vig8O4Mhz7M9vQIDgxBMB6HJGAnLxN5HPQ2mh15+Zrje98n1ZkiWCex/l/YDEqNKoS9OClGLRS9ArT+0TpnhTV2bXcBheWcPwhZYIaegQ2+Tx91xEMIMAoYHxMs71RGxFaHad1ATzHLofEGp4XFUUqYBiYU8dr1FZWvZ1UYvmsHB3B7oNf7qbRi5yHjsOBV84nzLdCQjOIV24L5jPeqi3vstq0LXzjnTnMvbf8zysvhef1NSgSsvWZ6qoRv+T4DiO+3dLD/7RlvAR1b9MA4/yx36u/iApLkDhKJ2IsmJwcsgpkgQyh9EKHzD2SowpIhwyBUagBQIMS0o775GIR12mJoOuZ+a9+f6dn0OUq7xklyXWxELr3c7HVx5uUVK8J+qViAVmOgS7VxxeAgGxEETucYTlk8VwCwgnlBN420fi6ZkfMns8UcfrF5nL+uA7G49sxsQnOlEhnQvr5iEF6mi3BCAe3usK5SbXpqI7Jg6pwngn2Z7T30qBX9thdzkVZD6ZaIDFBNTQyHaYtaybX4OyYkWiXAyFlhXb6np/4th/xGa78Fw0ZC2lo4zn/kFBgXYnlCTlxPL1bM5iUMuNRdFsmjQJb5f5MlioqiDvJpmr91tGKNPZGJTXpHWjYjBpJcSSC9sJItOSHVovyE6j5EWoGZtg9wdvEWOLrL75Tr+e+PBkvxk78UDexg="; | ||
|
||
public const string ProductTransformationXslt = @"<?xml version=""1.0"" encoding=""UTF-8""?> | ||
<!--Designed and generated by Altova StyleVision Enterprise Edition 2016 sp1 (x64) - see http://www.altova.com/stylevision for more information.--> | ||
<xsl:stylesheet version=""1.0"" xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" xmlns:altova=""http://www.altova.com"" xmlns:altova-xfi=""http://www.altova.com/xslt-extensions/xbrl"" xmlns:altovaext=""http://www.altova.com/xslt-extensions"" xmlns:array=""http://www.w3.org/2005/xpath-functions/array"" xmlns:clitype=""clitype"" xmlns:fn=""http://www.w3.org/2005/xpath-functions"" xmlns:iso4217=""http://www.xbrl.org/2003/iso4217"" xmlns:ix=""http://www.xbrl.org/2008/inlineXBRL"" xmlns:java=""java"" xmlns:link=""http://www.xbrl.org/2003/linkbase"" xmlns:map=""http://www.w3.org/2005/xpath-functions/map"" xmlns:math=""http://www.w3.org/2005/xpath-functions/math"" xmlns:sps=""http://www.altova.com/StyleVision/user-xpath-functions"" xmlns:xbrldi=""http://xbrl.org/2006/xbrldi"" xmlns:xbrli=""http://www.xbrl.org/2003/instance"" xmlns:xff=""http://www.xbrl.org/2010/function/formula"" xmlns:xfi=""http://www.xbrl.org/2008/function/instance"" xmlns:xlink=""http://www.w3.org/1999/xlink"" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" exclude-result-prefixes=""altova altova-xfi altovaext array clitype fn iso4217 ix java link map math sps xbrldi xbrli xff xfi xlink xs xsi""> | ||
<xsl:output version=""4.0"" method=""html"" indent=""no"" encoding=""UTF-8"" doctype-public=""-//W3C//DTD HTML 4.01 Transitional//EN"" doctype-system=""http://www.w3.org/TR/html4/loose.dtd""/> | ||
<xsl:param name=""SV_OutputFormat"" select=""'HTML'""/> | ||
<xsl:variable name=""XML"" select=""/""/> | ||
<xsl:variable name=""altova:nPxPerIn"" select=""96""/> | ||
<xsl:template match=""/""> | ||
<html> | ||
<head> | ||
<title/> | ||
<meta name=""generator"" content=""Altova StyleVision Enterprise Edition 2016 sp1 (x64) (http://www.altova.com)""/> | ||
<meta http-equiv=""X-UA-Compatible"" content=""IE=9""/> | ||
<xsl:comment>[if IE]><STYLE type="text/css">.altova-rotate-left-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)} .altova-rotate-right-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1)} </STYLE><![endif]</xsl:comment> | ||
<xsl:comment>[if !IE]><!</xsl:comment> | ||
<style type=""text/css"">.altova-rotate-left-textbox{-webkit-transform: rotate(-90deg) translate(-100%, 0%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(-90deg) translate(-100%, 0%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(-90deg) translate(-100%, 0%); -ms-transform-origin: 0% 0%;}.altova-rotate-right-textbox{-webkit-transform: rotate(90deg) translate(0%, -100%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(90deg) translate(0%, -100%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(90deg) translate(0%, -100%); -ms-transform-origin: 0% 0%;}</style> | ||
<xsl:comment><![endif]</xsl:comment> | ||
<style type=""text/css"">@page { margin-left:0.60in; margin-right:0.60in; margin-top:0.79in; margin-bottom:0.79in } @media print { br.altova-page-break { page-break-before: always; } }</style> | ||
</head> | ||
<body> | ||
<div style=""position: relative""> | ||
<div style=""height:9.42in; overflow:hidden; position:relative; width:7.30in; ""> | ||
<xsl:comment>[if IE]><v:line style="height:0; left:0; position:absolute; top:0; width:0;" from="0,0" to="0,0"></v:line><![endif]</xsl:comment> | ||
<div style=""height:0.24in; left:0.40in; overflow:hidden; padding:2px; position:absolute; top:0.40in; width:4.01in; ""> | ||
<span> | ||
<xsl:text>Product Name: </xsl:text> | ||
</span> | ||
<xsl:for-each select=""$XML""> | ||
<xsl:for-each select=""Product""> | ||
<xsl:for-each select=""ProductName""> | ||
<input style=""width:1.46in; ""> | ||
<xsl:attribute name=""value""> | ||
<xsl:value-of select=""string(.)""/> | ||
</xsl:attribute> | ||
</input> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</div> | ||
<div style=""height:0.24in; left:0.40in; overflow:hidden; padding:2px; position:absolute; top:1.20in; width:3.95in; ""> | ||
<span> | ||
<xsl:text>Product Code: </xsl:text> | ||
</span> | ||
<xsl:for-each select=""$XML""> | ||
<xsl:for-each select=""Product""> | ||
<xsl:for-each select=""ProductCode""> | ||
<input style=""width:1.46in; ""> | ||
<xsl:attribute name=""value""> | ||
<xsl:value-of select=""string(.)""/> | ||
</xsl:attribute> | ||
</input> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</div> | ||
<div style=""height:0.24in; left:0.40in; overflow:hidden; padding:2px; position:absolute; top:0.80in; width:3.86in; ""> | ||
<span> | ||
<xsl:text>Product Type: </xsl:text> | ||
</span> | ||
<xsl:for-each select=""$XML""> | ||
<xsl:for-each select=""Product""> | ||
<xsl:for-each select=""ProductType""> | ||
<select style=""width:1.46in; ""> | ||
<option value=""com""> | ||
<xsl:if test=""string(.)='com'""> | ||
<xsl:attribute name=""selected"">selected</xsl:attribute> | ||
</xsl:if>Commercial</option> | ||
<option value=""npro""> | ||
<xsl:if test=""string(.)='npro'""> | ||
<xsl:attribute name=""selected"">selected</xsl:attribute> | ||
</xsl:if>Non-Profit</option> | ||
</select> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
</xsl:stylesheet>"; | ||
} | ||
} |
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("WOPIForms.WOPIClient")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("WOPIForms.WOPIClient")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("b3cacc4d-11d6-495d-8666-9b02ea64ffea")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Revision and Build Numbers | ||
// by using the '*' as shown below: | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | ||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<WebPublishMethod>FileSystem</WebPublishMethod> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<SiteUrlToLaunchAfterPublish /> | ||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> | ||
<ExcludeApp_Data>False</ExcludeApp_Data> | ||
<publishUrl>C:\inetpub\wwwroot\WOPI</publishUrl> | ||
<DeleteExistingFiles>True</DeleteExistingFiles> | ||
</PropertyGroup> | ||
</Project> |
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | ||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<TimeStampOfAssociatedLegacyPublishXmlFile /> | ||
<_PublishTargetUrl>C:\inetpub\wwwroot\WOPI</_PublishTargetUrl> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<File Include="bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll"> | ||
<publishTime>06/15/2015 02:06:24</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/csc.exe"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.dll"> | ||
<publishTime>06/18/2015 20:19:44</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.CSharp.Core.targets"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/Microsoft.VisualBasic.Core.targets"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/System.Collections.Immutable.dll"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/System.Reflection.Metadata.dll"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/vbc.exe"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/VBCSCompiler.exe"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/roslyn/VBCSCompiler.exe.config"> | ||
<publishTime>06/18/2015 20:19:46</publishTime> | ||
</File> | ||
<File Include="bin/WOPIForms.WOPIClient.dll"> | ||
<publishTime>04/22/2016 02:36:36</publishTime> | ||
</File> | ||
<File Include="bin/WOPIForms.WOPIClient.pdb"> | ||
<publishTime>04/21/2016 23:15:45</publishTime> | ||
</File> | ||
<File Include="hosting/discovery/discovery.xml"> | ||
<publishTime>04/21/2016 23:37:32</publishTime> | ||
</File> | ||
<File Include="images/xml.ico"> | ||
<publishTime>04/21/2016 20:01:30</publishTime> | ||
</File> | ||
<File Include="packages.config"> | ||
<publishTime>04/21/2016 19:25:33</publishTime> | ||
</File> | ||
<File Include="Web.config"> | ||
<publishTime>04/21/2016 23:12:18</publishTime> | ||
</File> | ||
<File Include="xml/viewer.aspx"> | ||
<publishTime>04/22/2016 01:33:25</publishTime> | ||
</File> | ||
</ItemGroup> | ||
</Project> |
@@ -0,0 +1,91 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Security.Cryptography; | ||
using System.Text; | ||
using System.Web; | ||
using System.Xml; | ||
using System.Xml.Xsl; | ||
|
||
namespace WOPIForms.WOPIClient.WOPIClasses | ||
{ | ||
public static class WOPIUtilities | ||
{ | ||
public static byte[] CreateProofData(string url, DateTime time, string accesstoken) | ||
{ | ||
UTF8Encoding encoding = new UTF8Encoding(); | ||
byte[] accessbytes = encoding.GetBytes( | ||
HttpUtility.UrlDecode(accesstoken)); | ||
byte[] urlbytes = encoding.GetBytes( | ||
new Uri(url).AbsoluteUri.ToUpperInvariant()); | ||
byte[] ticksbytes = getNetworkOrderBytes(time.Ticks); | ||
|
||
List<byte> list = new List<byte>(); | ||
list.AddRange(getNetworkOrderBytes(accessbytes.Length)); | ||
list.AddRange(accessbytes); | ||
list.AddRange(getNetworkOrderBytes(urlbytes.Length)); | ||
list.AddRange(urlbytes); | ||
list.AddRange(getNetworkOrderBytes(ticksbytes.Length)); | ||
list.AddRange(ticksbytes); | ||
return list.ToArray(); | ||
} | ||
|
||
public static string Sign(byte[] data) | ||
{ | ||
using (RSACryptoServiceProvider provider = new RSACryptoServiceProvider(2048)) | ||
{ | ||
provider.ImportCspBlob( | ||
Convert.FromBase64String(Constants.ProofKey)); | ||
var signed = provider.SignData(data, "SHA256"); | ||
return Convert.ToBase64String(signed); | ||
} | ||
} | ||
|
||
public static string Transform(string toBeTransFormed, string transformationFile) | ||
{ | ||
string output = string.Empty; | ||
|
||
if (string.IsNullOrEmpty(toBeTransFormed)) | ||
{ | ||
return output; | ||
} | ||
|
||
using (StringReader srt = new StringReader(transformationFile)) | ||
{ | ||
using (StringReader sri = new StringReader(toBeTransFormed)) | ||
{ | ||
using (XmlReader xrt = XmlReader.Create(srt)) | ||
{ | ||
using (XmlReader xri = XmlReader.Create(sri)) | ||
{ | ||
XslCompiledTransform xslt = new XslCompiledTransform(); | ||
xslt.Load(xrt); | ||
using (StringWriter sw = new StringWriter()) | ||
{ | ||
using (XmlWriter xwo = XmlWriter.Create(sw, xslt.OutputSettings)) | ||
{ | ||
xslt.Transform(xri, xwo); | ||
output = sw.ToString(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
return output; | ||
} | ||
|
||
private static byte[] getNetworkOrderBytes(int i) | ||
{ | ||
return BitConverter.GetBytes(IPAddress.HostToNetworkOrder(i)); | ||
} | ||
|
||
private static byte[] getNetworkOrderBytes(long i) | ||
{ | ||
return BitConverter.GetBytes(IPAddress.HostToNetworkOrder(i)); | ||
} | ||
} | ||
} |

Oops, something went wrong.
0 comments on commit
03ee9f8