From: <br...@us...> - 2008-06-15 11:03:29
|
Revision: 252 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=252&view=rev Author: brus07 Date: 2008-06-15 04:03:25 -0700 (Sun, 15 Jun 2008) Log Message: ----------- Added "SocketServerGatePlugin" to solution Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2008-06-15 10:30:51 UTC (rev 251) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2008-06-15 11:03:25 UTC (rev 252) @@ -21,6 +21,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebGatePlugin", "Plugins\MediatorPlugins\WebGatePlugin\WebGatePlugin.csproj", "{20B192BC-FD4D-4ED5-90F5-B5994F995238}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocketServerGatePlugin", "Plugins\MediatorPlugins\SocketServerGatePlugin\SocketServerGatePlugin.csproj", "{9462E3BD-67AD-4887-BF4C-8B6A25048941}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,10 @@ {20B192BC-FD4D-4ED5-90F5-B5994F995238}.Debug|Any CPU.Build.0 = Debug|Any CPU {20B192BC-FD4D-4ED5-90F5-B5994F995238}.Release|Any CPU.ActiveCfg = Release|Any CPU {20B192BC-FD4D-4ED5-90F5-B5994F995238}.Release|Any CPU.Build.0 = Release|Any CPU + {9462E3BD-67AD-4887-BF4C-8B6A25048941}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9462E3BD-67AD-4887-BF4C-8B6A25048941}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9462E3BD-67AD-4887-BF4C-8B6A25048941}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9462E3BD-67AD-4887-BF4C-8B6A25048941}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,5 +73,6 @@ {A855D392-4817-4408-80CE-61D8C8E77322} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {B75187D7-2032-44F3-AC12-20804C7229AC} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {20B192BC-FD4D-4ED5-90F5-B5994F995238} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} + {9462E3BD-67AD-4887-BF4C-8B6A25048941} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin ___________________________________________________________________ Name: svn:ignore + bin obj Added: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/Properties/AssemblyInfo.cs 2008-06-15 11:03:25 UTC (rev 252) @@ -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("SocketServerGatePlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Home")] +[assembly: AssemblyProduct("SocketServerGatePlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2008")] +[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("6e26be94-4dfb-4de5-8e3e-d36267c1748b")] + +// 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.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] Copied: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs (from rev 250, ACMServer/trunk/ACMServer/Mediator/Library/Plugins/SocketGate/SocketServerPlugin.cs) =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2008-06-15 11:03:25 UTC (rev 252) @@ -0,0 +1,41 @@ +using System; +using AcmContester.Library.Connector; + +namespace AcmContester.Plugins.MediatorPlugins.SocketServerGatePlugin +{ + /// <summary> + /// Pattern: Singleton + /// </summary> + class SocketServerGate : SocketServer + { + private static SocketServerGate instance = new SocketServerGate(); + + public delegate void DataArrivedDelegate(string s); + public event DataArrivedDelegate onDataArrived; + + + private SocketServerGate() + { + base.Start(); + base.onDataArrived += DataArrived; + } + + public static SocketServerGate GetInstance() + { + return instance; + } + + public void Send(string message) + { + //dataContainer.Add(new Submit(message)); + base.Send(message); + } + + protected void DataArrived(string message) + { + //dataContainer.Return(new Result(message)); + if (onDataArrived != null) + onDataArrived(message); + } + } +} Copied: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.cs (from rev 250, ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGatePlugin.cs) =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.cs 2008-06-15 11:03:25 UTC (rev 252) @@ -0,0 +1,22 @@ +using System; +using AcmContester.Plugins.PluginsFramework; + +namespace AcmContester.Plugins.MediatorPlugins.SocketServerGatePlugin +{ + public class SocketServerGatePlugin: BaseMediatorPlugin + { + SocketServerGate socketServerGate; + + public SocketServerGatePlugin() + { + socketServerGate = SocketServerGate.GetInstance(); + socketServerGate.onDataArrived += DataArrived; + } + + public override void Send(string message) + { + WorkingData("WebGatePlugin::Send(" + message + ")"); + socketServerGate.Send(message); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj 2008-06-15 11:03:25 UTC (rev 252) @@ -0,0 +1,56 @@ +<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>{9462E3BD-67AD-4887-BF4C-8B6A25048941}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>SocketServerGatePlugin</RootNamespace> + <AssemblyName>SocketServerGatePlugin</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" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SocketServerGate.cs" /> + <Compile Include="SocketServerGatePlugin.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Connector\Connector.csproj"> + <Project>{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}</Project> + <Name>Connector</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</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> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |