Skip to content

Commit

Permalink
more c# impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeralsing committed Dec 16, 2016
1 parent dc8df7b commit 866dbfc
Show file tree
Hide file tree
Showing 17 changed files with 534 additions and 140 deletions.
201 changes: 201 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.a
*.so


# Folders
_obj
_test
Expand All @@ -23,3 +24,203 @@ _testmain.go
*.test
*.prof
.idea/*

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
.fake/
TestResults/
PerfResults/

# Visual Studo 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt
120 changes: 119 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,124 @@
"*.exe": "explorerExcludedFiles",
"*.test": "explorerExcludedFiles",
"*.prof": "explorerExcludedFiles",
".idea/*": "explorerExcludedFiles"
".idea/*": "explorerExcludedFiles",
"*.suo": "explorerExcludedFiles",
"*.user": "explorerExcludedFiles",
"*.userosscache": "explorerExcludedFiles",
"*.sln.docstates": "explorerExcludedFiles",
"*.userprefs": "explorerExcludedFiles",
"[Dd]ebug/": "explorerExcludedFiles",
"[Dd]ebugPublic/": "explorerExcludedFiles",
"[Rr]elease/": "explorerExcludedFiles",
"[Rr]eleases/": "explorerExcludedFiles",
"x64/": "explorerExcludedFiles",
"x86/": "explorerExcludedFiles",
"build/": "explorerExcludedFiles",
"bld/": "explorerExcludedFiles",
"[Bb]in/": "explorerExcludedFiles",
"[Oo]bj/": "explorerExcludedFiles",
".fake/": "explorerExcludedFiles",
"TestResults/": "explorerExcludedFiles",
"PerfResults/": "explorerExcludedFiles",
".vs/": "explorerExcludedFiles",
"[Tt]est[Rr]esult*/": "explorerExcludedFiles",
"[Bb]uild[Ll]og.*": "explorerExcludedFiles",
"*.VisualState.xml": "explorerExcludedFiles",
"TestResult.xml": "explorerExcludedFiles",
"[Dd]ebugPS/": "explorerExcludedFiles",
"[Rr]eleasePS/": "explorerExcludedFiles",
"dlldata.c": "explorerExcludedFiles",
"*_i.c": "explorerExcludedFiles",
"*_p.c": "explorerExcludedFiles",
"*_i.h": "explorerExcludedFiles",
"*.ilk": "explorerExcludedFiles",
"*.meta": "explorerExcludedFiles",
"*.obj": "explorerExcludedFiles",
"*.pch": "explorerExcludedFiles",
"*.pdb": "explorerExcludedFiles",
"*.pgc": "explorerExcludedFiles",
"*.pgd": "explorerExcludedFiles",
"*.rsp": "explorerExcludedFiles",
"*.sbr": "explorerExcludedFiles",
"*.tlb": "explorerExcludedFiles",
"*.tli": "explorerExcludedFiles",
"*.tlh": "explorerExcludedFiles",
"*.tmp": "explorerExcludedFiles",
"*.tmp_proj": "explorerExcludedFiles",
"*.log": "explorerExcludedFiles",
"*.vspscc": "explorerExcludedFiles",
"*.vssscc": "explorerExcludedFiles",
".builds": "explorerExcludedFiles",
"*.pidb": "explorerExcludedFiles",
"*.svclog": "explorerExcludedFiles",
"*.scc": "explorerExcludedFiles",
"_Chutzpah*": "explorerExcludedFiles",
"ipch/": "explorerExcludedFiles",
"*.aps": "explorerExcludedFiles",
"*.ncb": "explorerExcludedFiles",
"*.opensdf": "explorerExcludedFiles",
"*.sdf": "explorerExcludedFiles",
"*.cachefile": "explorerExcludedFiles",
"*.psess": "explorerExcludedFiles",
"*.vsp": "explorerExcludedFiles",
"*.vspx": "explorerExcludedFiles",
"$tf/": "explorerExcludedFiles",
"*.gpState": "explorerExcludedFiles",
"_ReSharper*/": "explorerExcludedFiles",
"*.[Rr]e[Ss]harper": "explorerExcludedFiles",
"*.DotSettings.user": "explorerExcludedFiles",
".JustCode": "explorerExcludedFiles",
"_TeamCity*": "explorerExcludedFiles",
"*.dotCover": "explorerExcludedFiles",
"_NCrunch_*": "explorerExcludedFiles",
".*crunch*.local.xml": "explorerExcludedFiles",
"*.mm.*": "explorerExcludedFiles",
"AutoTest.Net/": "explorerExcludedFiles",
".sass-cache/": "explorerExcludedFiles",
"[Ee]xpress/": "explorerExcludedFiles",
"DocProject/buildhelp/": "explorerExcludedFiles",
"DocProject/Help/*.HxT": "explorerExcludedFiles",
"DocProject/Help/*.HxC": "explorerExcludedFiles",
"DocProject/Help/*.hhc": "explorerExcludedFiles",
"DocProject/Help/*.hhk": "explorerExcludedFiles",
"DocProject/Help/*.hhp": "explorerExcludedFiles",
"DocProject/Help/Html2": "explorerExcludedFiles",
"DocProject/Help/html": "explorerExcludedFiles",
"publish/": "explorerExcludedFiles",
"*.[Pp]ublish.xml": "explorerExcludedFiles",
"*.azurePubxml": "explorerExcludedFiles",
"*.pubxml": "explorerExcludedFiles",
"*.publishproj": "explorerExcludedFiles",
"*.nupkg": "explorerExcludedFiles",
"**/packages/*": "explorerExcludedFiles",
"!**/packages/build/": "explorerExcludedFiles",
"csx/": "explorerExcludedFiles",
"*.build.csdef": "explorerExcludedFiles",
"AppPackages/": "explorerExcludedFiles",
"*.[Cc]ache": "explorerExcludedFiles",
"ClientBin/": "explorerExcludedFiles",
"[Ss]tyle[Cc]op.*": "explorerExcludedFiles",
"~$*": "explorerExcludedFiles",
"*~": "explorerExcludedFiles",
"*.dbmdl": "explorerExcludedFiles",
"*.dbproj.schemaview": "explorerExcludedFiles",
"*.pfx": "explorerExcludedFiles",
"*.publishsettings": "explorerExcludedFiles",
"node_modules/": "explorerExcludedFiles",
"bower_components/": "explorerExcludedFiles",
"Generated_Code/": "explorerExcludedFiles",
"_UpgradeReport_Files/": "explorerExcludedFiles",
"Backup*/": "explorerExcludedFiles",
"UpgradeLog*.XML": "explorerExcludedFiles",
"UpgradeLog*.htm": "explorerExcludedFiles",
"*.mdf": "explorerExcludedFiles",
"*.ldf": "explorerExcludedFiles",
"*.rdl.data": "explorerExcludedFiles",
"*.bim.layout": "explorerExcludedFiles",
"*.bim_*.settings": "explorerExcludedFiles",
"FakesAssemblies/": "explorerExcludedFiles",
".ntvs_analysis.dat": "explorerExcludedFiles",
"*.plg": "explorerExcludedFiles",
"*.opt": "explorerExcludedFiles"
}
}
2 changes: 1 addition & 1 deletion examples/becomeunbecome/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (state *BecomeActor) Receive(context actor.Context) {
switch msg := context.Message().(type) {
case Hello:
fmt.Printf("Hello %v\n", msg.Who)
context.Become(state.Other)
context.Become(state.Other) //switch to the second behavior
}
}

Expand Down
1 change: 1 addition & 0 deletions experimental/streams/streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func NewUntypedStream() *UntypedStream {
props := actor.FromFunc(func(ctx actor.Context) {
switch msg := ctx.Message().(type) {
case actor.AutoReceiveMessage:
case actor.SystemMessage: //ignore terminate
default:
c <- msg
}
Expand Down
33 changes: 33 additions & 0 deletions languages/csharp/GAM.Actor/Actor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// //-----------------------------------------------------------------------
// // <copyright file="Actor.cs" company="Asynkron HB">
// // Copyright (C) 2015-2016 Asynkron HB All rights reserved
// // </copyright>
// //-----------------------------------------------------------------------

using System.Threading.Tasks;

namespace GAM
{
public static class Actor
{
public static Props FromProducer(ActorProducer producer)
{
return new Props().Copy(producer = producer);
}

public static PID Spawn(Props props)
{
return null;
}

public static PID SpawnNamed(Props props, string name)
{
return null;
}
}

public interface IActor
{
Task ReceiveAsync(IContext context);
}
}
2 changes: 1 addition & 1 deletion languages/csharp/GAM.Actor/ActorRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

using System.Threading.Tasks;

namespace GAM.Actor
namespace GAM
{
public class PID
{
Expand Down
Loading

0 comments on commit 866dbfc

Please sign in to comment.