checking in all the old panacean stuff
This commit is contained in:
105
sFTPlugins/SMFTP_CallTestCS/Program.cs
Normal file
105
sFTPlugins/SMFTP_CallTestCS/Program.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SMFTP_CallTestCS
|
||||
{
|
||||
class Program
|
||||
{
|
||||
|
||||
private static Assembly _sftpasm = null;
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
#if DEBUG
|
||||
_sftpasm = Assembly.LoadFile(@"C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Debug\SMFTP.dll");
|
||||
if (_sftpasm != null)
|
||||
DebugModeTest();
|
||||
#else
|
||||
_sftpasm = Assembly.LoadFile(@"C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\SMFTP.dll");
|
||||
if (_sftpasm != null)
|
||||
ReleaseModeTest();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test SMFTP using Dynamic Invokes on a release dll
|
||||
/// </summary>
|
||||
public static void ReleaseModeTest()
|
||||
{
|
||||
Type t = _sftpasm.GetType("SMFTP.SFTPClient");
|
||||
object o = Activator.CreateInstance(t);
|
||||
BindingFlags bindings = BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance;
|
||||
object[] prms = null;
|
||||
|
||||
prms = new object[] { "secureftp.navicure.com", "5S3F054P", "LPM2055", "22" };
|
||||
bool bSuccess = (bool)t.InvokeMember("Connect", bindings, null, o, prms);
|
||||
if (bSuccess)
|
||||
{
|
||||
prms = new object[] { "in" };
|
||||
bSuccess = (bool)t.InvokeMember("CmdExec_RemoteDirSet", bindings, null, o, prms);
|
||||
}
|
||||
//if (bSuccess)
|
||||
//{
|
||||
// prms = new object[] { "c:\\out", true };
|
||||
// bSuccess = (bool)t.InvokeMember("CmdExec_LocalDirSet", bindings, null, o, prms);
|
||||
//}
|
||||
//if (bSuccess)
|
||||
//{
|
||||
// prms = new object[] { true, "out/997" };
|
||||
// bSuccess = (bool)t.InvokeMember("CmdExe_MGetDir", bindings, null, o, prms);
|
||||
//}
|
||||
//if (bSuccess)
|
||||
//{
|
||||
// prms = new object[] { "in" };
|
||||
// bSuccess = (bool)t.InvokeMember("CmdExec_RemoteDirSet", bindings, null, o, prms);
|
||||
//}
|
||||
//if (bSuccess)
|
||||
//{
|
||||
// prms = new object[] { "c:\\out\\997", true };
|
||||
// bSuccess = (bool)t.InvokeMember("CmdExec_LocalDirSet", bindings, null, o, prms);
|
||||
//}
|
||||
if (bSuccess)
|
||||
{
|
||||
prms = new object[] { "C:\\out\\Doris day\\EmptyDummy File.txt" };
|
||||
bSuccess = (bool)t.InvokeMember("CmdExe_MPutFiles", bindings, null, o, prms);
|
||||
}
|
||||
//if (bSuccess)
|
||||
//{
|
||||
// prms = new object[] { "*.997" };
|
||||
// bSuccess = (bool)t.InvokeMember("CmdExe_MDelFiles", bindings, null, o, prms);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test SMTP using direct invokes on debug dll
|
||||
/// </summary>
|
||||
public static void DebugModeTest()
|
||||
{
|
||||
using (SMFTP.SFTPClient client = new SMFTP.SFTPClient())
|
||||
{
|
||||
bool bConnected = client.Connect("secureftp.navicure.com", "5S3F054P", "LPM2055");
|
||||
if (bConnected)
|
||||
{
|
||||
bool bSuccess = true;
|
||||
//if (bSuccess)
|
||||
// bSuccess = client.CmdExec_RemoteDirExists("out/997");
|
||||
//if (bSuccess)
|
||||
// bSuccess = client.CmdExec_LocalDirSet("c:\\out", true);
|
||||
//if (bSuccess)
|
||||
// bSuccess = client.CmdExe_MGetDir(true, "out/997");
|
||||
if (bSuccess)
|
||||
bSuccess = client.CmdExec_RemoteDirSet("in");
|
||||
//if (bSuccess)
|
||||
// bSuccess = client.CmdExec_LocalDirSet("c:\\out\\997", true);
|
||||
if (bSuccess)
|
||||
bSuccess = client.CmdExe_MPutFiles("\"C:\\out\\Doris day\\EmptyDummy File.txt\"");
|
||||
//if (bSuccess)
|
||||
// bSuccess = client.CmdExe_MDelFiles("*.997");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
sFTPlugins/SMFTP_CallTestCS/Properties/AssemblyInfo.cs
Normal file
36
sFTPlugins/SMFTP_CallTestCS/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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("SMFTP_CallTestCS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("SMFTP_CallTestCS")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[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("18baf6fa-bd5c-4dc3-8492-a11394b109ff")]
|
||||
|
||||
// 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 Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
68
sFTPlugins/SMFTP_CallTestCS/SMFTP_CallTestCS.csproj
Normal file
68
sFTPlugins/SMFTP_CallTestCS/SMFTP_CallTestCS.csproj
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F0A4D6FB-0864-478C-A91D-E916B71FDF5C}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SMFTP_CallTestCS</RootNamespace>
|
||||
<AssemblyName>SMFTP_CallTestCS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Target\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Target\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMFTP\SMFTP.csproj">
|
||||
<Project>{6C463FB5-D25B-4CD4-A493-7B91615E8467}</Project>
|
||||
<Name>SMFTP</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
10
sFTPlugins/SMFTP_CallTestCS/SMFTP_CallTestCS.csproj.vspscc
Normal file
10
sFTPlugins/SMFTP_CallTestCS/SMFTP_CallTestCS.csproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\SMFTP_CallTestCS.exe
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\SMFTP_CallTestCS.pdb
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\SMFTP_CallTestCS\obj\x86\Release\ResolveAssemblyReference.cache
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\SMFTP_CallTestCS\obj\x86\Release\SMFTP_CallTestCS.exe
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\SMFTP_CallTestCS\obj\x86\Release\SMFTP_CallTestCS.pdb
|
||||
BIN
sFTPlugins/SMFTP_CallTestCS/obj/x86/Release/SMFTP_CallTestCS.exe
Normal file
BIN
sFTPlugins/SMFTP_CallTestCS/obj/x86/Release/SMFTP_CallTestCS.exe
Normal file
Binary file not shown.
BIN
sFTPlugins/SMFTP_CallTestCS/obj/x86/Release/SMFTP_CallTestCS.pdb
Normal file
BIN
sFTPlugins/SMFTP_CallTestCS/obj/x86/Release/SMFTP_CallTestCS.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user