Recovered from cvs revision 2007-07-16 11:12:00
This commit is contained in:
parent
4373003780
commit
0f87fb5842
34
ase/ase.sln
34
ase/ase.sln
@ -50,6 +50,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asetestawk++", "test\awk\as
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F} = {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asenet", "net\asenet.vcproj", "{A63E9DF9-1D47-4D81-834C-1D40406C18C4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asetestnet", "test\net\asetestnet.csproj", "{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -140,26 +144,6 @@ Global
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.Build.0 = Release|Win32
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7F679165-41FB-4E1E-B3F5-23C5EE94166A}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
@ -190,6 +174,16 @@ Global
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.Build.0 = Release|Win32
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.cpp,v 1.45 2007/06/28 15:45:57 bacon Exp $
|
||||
* $Id: Awk.cpp,v 1.46 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <ase/awk/Awk.hpp>
|
||||
@ -734,7 +734,7 @@ namespace ASE
|
||||
}
|
||||
|
||||
Return ret (run);
|
||||
int n = (this->*handler) (&ret, args, nargs);
|
||||
int n = (this->*handler) (&ret, args, nargs, name, len);
|
||||
|
||||
delete[] args;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.hpp,v 1.44 2007/06/29 11:36:45 bacon Exp $
|
||||
* $Id: Awk.hpp,v 1.45 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ASE_AWK_AWK_HPP_
|
||||
@ -429,7 +429,8 @@ namespace ASE
|
||||
const char_t** args = ASE_NULL, size_t nargs = 0);
|
||||
|
||||
typedef int (Awk::*FunctionHandler) (
|
||||
Return* ret, const Argument* args, size_t nargs);
|
||||
Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
|
||||
virtual int addFunction (
|
||||
const char_t* name, size_t minArgs, size_t maxArgs,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: StdAwk.cpp,v 1.21 2007/05/23 14:15:16 bacon Exp $
|
||||
* $Id: StdAwk.cpp,v 1.22 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <ase/awk/StdAwk.hpp>
|
||||
@ -59,52 +59,62 @@ namespace ASE
|
||||
return 0;
|
||||
}
|
||||
|
||||
int StdAwk::sin (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::sin (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::sin(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::cos (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::cos (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::cos(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::tan (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::tan (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::tan(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::atan2 (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::atan2 (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::atan2(args[0].toReal(), args[1].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::log (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::log (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::log(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::exp (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::exp (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::exp(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::sqrt (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::sqrt (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((real_t)::sqrt(args[0].toReal()));
|
||||
}
|
||||
|
||||
int StdAwk::fnint (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::fnint (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set (args[0].toInt());
|
||||
}
|
||||
|
||||
int StdAwk::rand (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::rand (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((long_t)::rand());
|
||||
}
|
||||
|
||||
int StdAwk::srand (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::srand (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
unsigned int prevSeed = seed;
|
||||
seed = (unsigned int)args[0].toInt();
|
||||
@ -112,12 +122,14 @@ namespace ASE
|
||||
return ret->set ((long_t)prevSeed);
|
||||
}
|
||||
|
||||
int StdAwk::systime (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::systime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
return ret->set ((long_t)::time(NULL));
|
||||
}
|
||||
|
||||
int StdAwk::strftime (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::strftime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
const char_t* fmt;
|
||||
size_t fln;
|
||||
@ -135,15 +147,16 @@ namespace ASE
|
||||
#endif
|
||||
|
||||
#ifdef ASE_CHAR_IS_MCHAR
|
||||
size_t len = ::strftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
size_t l = ::strftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
#else
|
||||
size_t len = ::wcsftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
size_t l = ::wcsftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
#endif
|
||||
|
||||
return ret->set (buf, len);
|
||||
return ret->set (buf, l);
|
||||
}
|
||||
|
||||
int StdAwk::strfgmtime (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::strfgmtime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
const char_t* fmt;
|
||||
size_t fln;
|
||||
@ -161,28 +174,29 @@ namespace ASE
|
||||
#endif
|
||||
|
||||
#ifdef ASE_CHAR_IS_MCHAR
|
||||
size_t len = ::strftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
size_t l = ::strftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
#else
|
||||
size_t len = ::wcsftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
size_t l = ::wcsftime (buf, ASE_COUNTOF(buf), fmt, tm);
|
||||
#endif
|
||||
|
||||
return ret->set (buf, len);
|
||||
return ret->set (buf, l);
|
||||
}
|
||||
|
||||
int StdAwk::system (Return* ret, const Argument* args, size_t nargs)
|
||||
int StdAwk::system (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
size_t len;
|
||||
const char_t* ptr = args[0].toStr(&len);
|
||||
size_t l;
|
||||
const char_t* ptr = args[0].toStr(&l);
|
||||
|
||||
#ifdef _WIN32
|
||||
return ret->set ((long_t)::_tsystem(ptr));
|
||||
#elif defined(ASE_CHAR_IS_MCHAR)
|
||||
return ret->set ((long_t)::system(ptr));
|
||||
#else
|
||||
char* mbs = (char*)ase_awk_malloc (awk, len*5+1);
|
||||
char* mbs = (char*)ase_awk_malloc (awk, l*5+1);
|
||||
if (mbs == ASE_NULL) return -1;
|
||||
|
||||
::size_t mbl = ::wcstombs (mbs, ptr, len*5);
|
||||
::size_t mbl = ::wcstombs (mbs, ptr, l*5);
|
||||
if (mbl == (::size_t)-1) return -1;
|
||||
mbs[mbl] = '\0';
|
||||
int n = ret->set ((long_t)::system(mbs));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: StdAwk.hpp,v 1.11 2007/05/23 14:15:16 bacon Exp $
|
||||
* $Id: StdAwk.hpp,v 1.12 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ASE_AWK_STDAWK_HPP_
|
||||
@ -19,20 +19,34 @@ namespace ASE
|
||||
protected:
|
||||
|
||||
// builtin functions
|
||||
int sin (Return* ret, const Argument* args, size_t nargs);
|
||||
int cos (Return* ret, const Argument* args, size_t nargs);
|
||||
int tan (Return* ret, const Argument* args, size_t nargs);
|
||||
int atan2 (Return* ret, const Argument* args, size_t nargs);
|
||||
int log (Return* ret, const Argument* args, size_t nargs);
|
||||
int exp (Return* ret, const Argument* args, size_t nargs);
|
||||
int sqrt (Return* ret, const Argument* args, size_t nargs);
|
||||
int fnint (Return* ret, const Argument* args, size_t nargs);
|
||||
int rand (Return* ret, const Argument* args, size_t nargs);
|
||||
int srand (Return* ret, const Argument* args, size_t nargs);
|
||||
int systime (Return* ret, const Argument* args, size_t nargs);
|
||||
int strftime (Return* ret, const Argument* args, size_t nargs);
|
||||
int strfgmtime (Return* ret, const Argument* args, size_t nargs);
|
||||
int system (Return* ret, const Argument* args, size_t nargs);
|
||||
int sin (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int cos (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int tan (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int atan2 (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int log (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int exp (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int sqrt (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int fnint (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int rand (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int srand (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int systime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int strftime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int strfgmtime (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
int system (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len);
|
||||
|
||||
// pipe io handlers
|
||||
int openPipe (Pipe& io);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.cpp,v 1.2 2007/07/09 16:07:30 bacon Exp $
|
||||
* $Id: Awk.cpp,v 1.3 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
@ -12,37 +12,57 @@
|
||||
|
||||
#include <msclr/auto_gcroot.h>
|
||||
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
|
||||
class StubAwk: public Awk
|
||||
{
|
||||
public:
|
||||
StubAwk (NET::Awk^ wrapper): wrapper(wrapper)
|
||||
StubAwk (Net::Awk^ wrapper): wrapper(wrapper)
|
||||
{
|
||||
}
|
||||
|
||||
int stubFunctionHandler (
|
||||
Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
System::String^ nm = gcnew System::String (name, 0, len);
|
||||
return wrapper->DispatchFunction (nm);
|
||||
}
|
||||
|
||||
int openSource (Source& io)
|
||||
{
|
||||
NET::Awk::Source^ nio = gcnew NET::Awk::Source ();
|
||||
/*
|
||||
Net::Awk::Source^ nio = gcnew Net::Awk::Source ();
|
||||
int n = wrapper->OpenSource (nio);
|
||||
// TODO: put nio back to io.
|
||||
return n;
|
||||
*/
|
||||
if (io.getMode() == Source::READ)
|
||||
{
|
||||
//wrapper->SourceInputStream->BeginRead ();
|
||||
}
|
||||
else
|
||||
{
|
||||
//wrapper->SourceOutputStream->BeginWrite ();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int closeSource (Source& io)
|
||||
{
|
||||
//System::IO::Stream^ stream = io.getHandle();
|
||||
//stream->Close ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t readSource (Source& io, char_t* buf, size_t len)
|
||||
{
|
||||
//System::IO::Stream^ stream = io.getHandle();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t writeSource (Source& io, char_t* buf, size_t len)
|
||||
{
|
||||
//System::IO::Stream^ stream = io.getHandle();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -100,10 +120,10 @@ namespace ASE
|
||||
}
|
||||
|
||||
private:
|
||||
msclr::auto_gcroot<NET::Awk^> wrapper;
|
||||
msclr::auto_gcroot<Net::Awk^> wrapper;
|
||||
};
|
||||
|
||||
namespace NET
|
||||
namespace Net
|
||||
{
|
||||
|
||||
Awk::Awk ()
|
||||
@ -126,14 +146,25 @@ namespace ASE
|
||||
return awk->run () == 0;
|
||||
}
|
||||
|
||||
bool Awk::AddFunction (System::String^ name, int minArgs, int maxArgs, FunctionHandler^ handler)
|
||||
bool Awk::AddFunction (
|
||||
System::String^ name, int minArgs, int maxArgs,
|
||||
FunctionHandler^ handler)
|
||||
{
|
||||
return false;
|
||||
cli::pin_ptr<const wchar_t> nptr = PtrToStringChars(name);
|
||||
return awk->addFunction (nptr, minArgs, maxArgs,
|
||||
(ASE::Awk::FunctionHandler)&StubAwk::stubFunctionHandler) == 0;
|
||||
}
|
||||
|
||||
bool Awk::DeleteFunction (System::String^ name)
|
||||
{
|
||||
return false;
|
||||
pin_ptr<const wchar_t> nptr = PtrToStringChars(name);
|
||||
return awk->deleteFunction (nptr) == 0;
|
||||
}
|
||||
|
||||
int Awk::DispatchFunction (System::String^ name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.hpp,v 1.1 2007/05/15 08:29:30 bacon Exp $
|
||||
* $Id: Awk.hpp,v 1.2 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@ -10,13 +10,12 @@ using namespace System;
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
namespace NET
|
||||
namespace Net
|
||||
{
|
||||
|
||||
public ref class Awk abstract
|
||||
{
|
||||
public:
|
||||
|
||||
ref class Source
|
||||
{
|
||||
public:
|
||||
@ -115,8 +114,39 @@ namespace ASE
|
||||
virtual int ReadSource (Source^ io, ASE::Awk::char_t* buf, ASE::Awk::size_t len) = 0;
|
||||
virtual int WriteSource (Source^ io, ASE::Awk::char_t* buf, ASE::Awk::size_t len) = 0;
|
||||
|
||||
private:
|
||||
property System::IO::Stream^ SourceInputStream
|
||||
{
|
||||
System::IO::Stream^ get ()
|
||||
{
|
||||
return this->sourceInputStream;
|
||||
}
|
||||
|
||||
void set (System::IO::Stream^ stream)
|
||||
{
|
||||
this->sourceInputStream = stream;
|
||||
}
|
||||
}
|
||||
|
||||
property System::IO::Stream^ SourceOutputStream
|
||||
{
|
||||
System::IO::Stream^ get ()
|
||||
{
|
||||
return this->sourceOutputStream;
|
||||
}
|
||||
|
||||
void set (System::IO::Stream^ stream)
|
||||
{
|
||||
this->sourceOutputStream = stream;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
ASE::Awk* awk;
|
||||
System::IO::Stream^ sourceInputStream;
|
||||
System::IO::Stream^ sourceOutputStream;
|
||||
|
||||
public protected:
|
||||
int Awk::DispatchFunction (System::String^ name);
|
||||
};
|
||||
|
||||
}
|
||||
|
15
ase/net/StdAwk.cpp
Normal file
15
ase/net/StdAwk.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* $Id: StdAwk.cpp,v 1.1 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <ase/net/StdAwk.hpp>
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
|
||||
}
|
||||
}
|
16
ase/net/StdAwk.hpp
Normal file
16
ase/net/StdAwk.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* $Id: StdAwk.hpp,v 1.1 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <ase/net/Awk.hpp>
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
public ref class StdAwk: Awk
|
||||
{
|
||||
public:
|
||||
};
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: asenet.h,v 1.1 2007/05/15 08:29:30 bacon Exp $
|
||||
* $Id: asenet.h,v 1.2 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@ -8,7 +8,7 @@ using namespace System;
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
namespace NET
|
||||
namespace Net
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(NoInherit)"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
@ -195,6 +195,10 @@
|
||||
RelativePath=".\AssemblyInfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\assert.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Awk.cpp"
|
||||
>
|
||||
@ -219,6 +223,10 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAwk.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
@ -241,6 +249,10 @@
|
||||
RelativePath=".\Stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAwk.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
|
40
ase/net/assert.cpp
Normal file
40
ase/net/assert.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* $Id: assert.cpp,v 1.1 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
#include <ase/cmn/types.h>
|
||||
#include <ase/cmn/macros.h>
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <tchar.h>
|
||||
|
||||
void ase_assert_abort (void)
|
||||
{
|
||||
::abort ();
|
||||
}
|
||||
|
||||
void ase_assert_printf (const ase_char_t* fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
#ifdef _WIN32
|
||||
int n;
|
||||
ase_char_t buf[1024];
|
||||
#endif
|
||||
|
||||
va_start (ap, fmt);
|
||||
|
||||
n = _vsntprintf (buf, ASE_COUNTOF(buf), fmt, ap);
|
||||
if (n < 0) buf[ASE_COUNTOF(buf)-1] = ASE_T('\0');
|
||||
|
||||
//ase_vprintf (fmt, ap);
|
||||
::MessageBox (NULL, buf,
|
||||
ASE_T("ASSERTION FAILURE"), MB_OK|MB_ICONERROR);
|
||||
|
||||
va_end (ap);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.cpp,v 1.29 2007/06/25 14:01:28 bacon Exp $
|
||||
* $Id: Awk.cpp,v 1.30 2007/07/15 16:31:59 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <ase/awk/StdAwk.hpp>
|
||||
@ -82,7 +82,8 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
int sleep (Return* ret, const Argument* args, size_t nargs)
|
||||
int sleep (Return* ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
::Sleep (args[0].toInt() * 1000);
|
||||
|
61
ase/test/net/Form1.Designer.cs
generated
Normal file
61
ase/test/net/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
||||
namespace asetestnet
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(56, 54);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(71, 25);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(292, 273);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
|
23
ase/test/net/Form1.cs
Normal file
23
ase/test/net/Form1.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace asetestnet
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ASE.Net.Awk awk = new ASE.Net.Awk();
|
||||
}
|
||||
}
|
||||
}
|
120
ase/test/net/Form1.resx
Normal file
120
ase/test/net/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
20
ase/test/net/Program.cs
Normal file
20
ase/test/net/Program.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace asetestnet
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
33
ase/test/net/Properties/AssemblyInfo.cs
Normal file
33
ase/test/net/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,33 @@
|
||||
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("asetestnet")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("asetestnet")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||
[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("ceaa9e15-13fb-4248-a906-14965d5019c3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
ase/test/net/Properties/Resources.Designer.cs
generated
Normal file
71
ase/test/net/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.832
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace asetestnet.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("asetestnet.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
ase/test/net/Properties/Resources.resx
Normal file
117
ase/test/net/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
ase/test/net/Properties/Settings.Designer.cs
generated
Normal file
30
ase/test/net/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.832
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace asetestnet.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
ase/test/net/Properties/Settings.settings
Normal file
7
ase/test/net/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
84
ase/test/net/asetestnet.csproj
Normal file
84
ase/test/net/asetestnet.csproj
Normal file
@ -0,0 +1,84 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>asetestnet</RootNamespace>
|
||||
<AssemblyName>asetestnet</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\net\asenet.vcproj">
|
||||
<Project>{A63E9DF9-1D47-4D81-834C-1D40406C18C4}</Project>
|
||||
<Name>asenet</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
Loading…
Reference in New Issue
Block a user