Permalink
Browse files

Merged with remote

  • Loading branch information...
2 parents 5ce5786 + f1327ec commit e891704018e96d87123076e9868c94dbdf4fce1c @saleyn committed Feb 13, 2011
View
@@ -8,4 +8,5 @@ OtpTest1/obj
UnitTest/bin
UnitTest/obj
UpgradeLog.XML
-*.testrunconfig
+*.testrunconfig
+*.suo
View
10 LICENSE
@@ -15,5 +15,11 @@ AB. All Rights Reserved.
Converted from Java to C# by Vlad Dumitrescu (vlad_Dumitrescu@hotmail.com)
Contributors:
- - Paul Shaffer,
- - Serge Aleynikov (saleyn@gmail.com)
+ - Paul Shaffer,
+ - Serge Aleynikov (saleyn@gmail.com)
+ * Many bug fixes
+ * Added sedning/receving RPC cast/call
+ * Added pattern matching
+ * Added variable binding
+ * Added term parsing
+ * Added unit tests
View
@@ -1,6 +1,19 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <appSettings>
- <add key="ErlangCookie" value="this_is_very_secret"/>
- </appSettings>
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <appSettings>
+ <add key="ErlangCookie" value="this_is_very_secret" />
+ <add key="ClientSettingsProvider.ServiceUri" value="" />
+ </appSettings>
+ <system.web>
+ <membership defaultProvider="ClientAuthenticationMembershipProvider">
+ <providers>
+ <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
+ </providers>
+ </membership>
+ <roleManager defaultProvider="ClientRoleProvider" enabled="true">
+ <providers>
+ <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
+ </providers>
+ </roleManager>
+ </system.web>
</configuration>
View
Binary file not shown.
View
@@ -1,58 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{51C10949-3327-4CE9-A4D0-58F1336284F4}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ConsoleApplication1</RootNamespace>
- <AssemblyName>ConsoleApplication1</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </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.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Test.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Otp\Otp.csproj">
- <Project>{8155F56B-4925-406C-8619-7D0E57DD7FE1}</Project>
- <Name>Otp</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>
View
Binary file not shown.
@@ -1,33 +0,0 @@
-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("ConsoleApplication1")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConsoleApplication1")]
-[assembly: AssemblyCopyright("")]
-[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("d6545a61-f896-4887-bb2b-a23cdc333e7a")]
-
-// 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")]
View
@@ -1,84 +0,0 @@
-using System;
-
-namespace Otp
-{
- public class Test
- {
- static public void Main(String[] args)
- {
- System.Console.Out.WriteLine("Otp test...");
-
- if (args.Length < 1)
- {
- System.Console.Out.WriteLine("Usage: Otp sname\n where sname is" +
- "the short name of the Erlang node");
- return;
- }
-
- OtpNode.useShortNames = true;
-
- String host = System.Net.Dns.GetHostName();
- String user = Environment.UserName;
- OtpNode node = new OtpNode(user + "@" + host);
- String remote = (args[0].Contains("@")) ? args[0] : remote = args[0] + "@" + host;
- OtpMbox mbox = null;
-
- System.Console.Out.WriteLine("This node is: {0} (cookie='{1}'). Remote: {2}",
- node.node(), node.cookie(), remote);
-
- //bool ok = node.ping(remote, 1000*300);
-
- OtpCookedConnection conn = node.getConnection(remote);
-
- try
- {
- if (conn != null)
- System.Console.Out.WriteLine(" successfully pinged node " + remote + "\n");
- else
- throw new System.Exception("Could not ping node: " + remote);
-
- conn.traceLevel = 1;
-
- mbox = node.createMbox();
- mbox.registerName("server");
-
- mbox.sendRPC(conn.peer.node(), "lists", "reverse", new Erlang.List(new Erlang.String("Hello world!")));
- Erlang.Object reply = mbox.receiveRPC(5000);
- System.Console.Out.WriteLine("<= " + reply.ToString());
-
- {
- Erlang.List rpcArgs = new Erlang.List(
- new Erlang.Object[] {
- mbox.self(),
- new Erlang.Tuple(
- new Erlang.Object[] {
- new Erlang.Atom("table"), new Erlang.Atom("test"), new Erlang.Atom("simple")
- }
- )
- }
- );
-
- mbox.sendRPC(conn.peer.node(), "mnesia_subscr", "subscribe", rpcArgs);
- reply = mbox.receiveRPC(5000);
- System.Console.Out.WriteLine("<= " + reply.ToString());
- }
-
- while (true)
- {
- Erlang.Object msg = mbox.receive();
- System.Console.Out.WriteLine("IN msg: " + msg.ToString() + "\n");
- }
- }
- catch (System.Exception e)
- {
- System.Console.Out.WriteLine("Error: " + e.ToString());
- }
- finally
- {
- node.closeMbox(mbox);
- }
-
- node.close();
- }
- }
-}
@@ -5,18 +5,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OtpTest1.2008", "OtpTest1.2
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Otp.2008", "..\Otp\Otp.2008.csproj", "{8155F56B-4925-406C-8619-7D0E57DD7FE1}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B511BD13-227C-4BA6-96AE-AFA83C5C244B}"
- ProjectSection(SolutionItems) = preProject
- LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
- OtpTest1.2008.vsmdi = OtpTest1.2008.vsmdi
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OtpTest", "..\UnitTest\OtpTest.csproj", "{E031FCAE-9E50-4AD9-8838-9DD015B9319C}"
EndProject
Global
- GlobalSection(TestCaseManagementSettings) = postSolution
- CategoryFile = OtpTest1.2008.vsmdi
- EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
View
Binary file not shown.
View
@@ -173,9 +173,9 @@ public void TestPatternMatch()
Erlang.VarBind binding = new Otp.Erlang.VarBind();
Assert.IsTrue(pattern.match(obj, binding));
Assert.AreEqual(3, binding.Count);
- Assert.AreEqual(10, binding["A"].Cast<Erlang.Long>().longValue());
- Assert.AreEqual("a", binding["B"].Cast<Erlang.Atom>().atomValue());
- Assert.AreEqual("[1,2,3]", binding["C"].Cast<Erlang.List>().ToString());
+ Assert.AreEqual(10, binding["A"].longValue());
+ Assert.AreEqual("a", binding["B"].atomValue());
+ Assert.AreEqual("[1,2,3]", binding["C"].ToString());
}
}
}
@@ -1,6 +1,18 @@
Release notes
-------------
+V 0.7, February 2011 / Serge Aleynikov
+--------------------------------------
+- Added pattern matching feature:
+ Erlang.Object.match(Erlang.Object, Erlang.VarBind)
+- Added compilation of an Erlang term from a string:
+ Erlang.Object term = Erlang.Object.Format("{test, 1, ~w, [2,3,4]}", 'a')
+
+V 0.6, January 2011 / Serge Aleynikov
+-------------------------------------
+- Added support for RPC cast
+- Implemented some bug fixes
+
V 0.5, January 2009 / Serge Aleynikov
-------------------------------------
- More robust error handling

0 comments on commit e891704

Please sign in to comment.