Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request #435

Open
wants to merge 286 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
f1165d2
Start using ss.js instead of mscorlib.js
nikhilk Sep 17, 2012
ebd2183
Remove debug compile option
nikhilk Sep 17, 2012
4a40306
Added ScriptOutputAttribute + some initial generation metadata
nikhilk Sep 17, 2012
372802c
Fix generation of strict mode
nikhilk Sep 17, 2012
32bb7c5
Initial crunching support
nikhilk Sep 17, 2012
71fb76c
Add support for non-amd scripts in script loader + loader tests
nikhilk Sep 17, 2012
3473c57
Update todo sample
nikhilk Sep 18, 2012
9ce6ab5
New tests + update script names used in test pages
nikhilk Sep 18, 2012
d9bfec4
AMD config and handle some loader edge cases
nikhilk Sep 18, 2012
6b1242f
Improve binding functionality to use delegate cache to mimic c# behavior
nikhilk Sep 18, 2012
0d6c4dc
Restore simpler ScriptTemplate for more script header/footer customiz…
nikhilk Sep 19, 2012
a814ea2
Used fixed exports variable name
nikhilk Sep 19, 2012
6dfc3f5
Added Require API to mscorlib.
nikhilk Sep 19, 2012
e64dc9f
Fix todo sample again.
nikhilk Sep 19, 2012
55d3bd0
Enable non-AMD usage of script# runtime script
nikhilk Sep 19, 2012
10c2b31
Update fishtank sample
nikhilk Sep 19, 2012
422f050
Template changes for new metadata
nikhilk Sep 19, 2012
388c421
Enable script loader itself to be loaded asynchronously
nikhilk Sep 19, 2012
0545ecc
Updated photos sample
nikhilk Sep 19, 2012
ba493b2
Added ss.enumerate to runtime to use for foreach and GetEnumerator
nikhilk Sep 20, 2012
96df7aa
Enable using ScriptAlias on instance methods + use remove various
nikhilk Sep 21, 2012
6650be6
Changed script gen for IsNull, IsUndefined, IsNullOrUndefined
nikhilk Sep 21, 2012
9b55cfc
Add stack and efficient queue implementation in runtime
nikhilk Sep 22, 2012
15a7a6e
Removed Array members (Clone, GroupBy, Index). Remap Add/AddRange to …
nikhilk Sep 22, 2012
010d57c
Remove Array.prototype extensions - change how array extensions map t…
nikhilk Sep 22, 2012
d31ffd1
Removed string extensions, incl. some string APIs (IndexOfAny,LastInd…
nikhilk Sep 22, 2012
d5678cf
Script cleanup + remove local ss variable + move string extensions to…
nikhilk Sep 22, 2012
b2e2748
MSBuild task cleanup + gen .min.js only if CrunchScript is set to true.
nikhilk Sep 22, 2012
5703396
Added ability to use various bits of assembly info metadata in script…
nikhilk Sep 22, 2012
836d146
Removed Record base class. Add ScriptObject attribute in its place.
nikhilk Sep 23, 2012
a87318f
IntrinsicProperty -> ScriptProperty
nikhilk Sep 23, 2012
0ea2db3
Rename Imported to ScriptImport and NonScriptable to ScriptIgnore
nikhilk Sep 23, 2012
71e2e39
Rename ResourcesAttribute to ScriptResourcesAttribute
nikhilk Sep 23, 2012
9cb4265
Removed AlternateSignatureAttribute - extern indicator suffices
nikhilk Sep 23, 2012
8ca0f0c
Metadata cleanup in mscorlib assembly
nikhilk Sep 23, 2012
9a14111
Replaced NamedValues and NumericValues with single ScriptConstants at…
nikhilk Sep 23, 2012
7abd05c
PreserveCase/PreserveName rolled into ScriptName attribute
nikhilk Sep 23, 2012
2abe2ac
Rename IgnoreNamespace to ScriptIgnoreNamespace
nikhilk Sep 23, 2012
013fc32
Remove ability to fix case of generated indexers
nikhilk Sep 24, 2012
81eb448
Fix metadata bugs
nikhilk Sep 24, 2012
8c0ec1a
Update todo sample for latest metadata changes
nikhilk Sep 24, 2012
ba7bb23
Update samples for latest metadata changes
nikhilk Sep 24, 2012
cbf1ab6
Metadata fixes to match runtime namespace for map modules.
nikhilk Sep 24, 2012
60ad4c6
Update AroundMe sample
nikhilk Sep 24, 2012
46995ad
Update test server to take a set of roots, include ssloader in test p…
nikhilk Sep 24, 2012
fbbf7fc
Update tests in samples
nikhilk Sep 24, 2012
5d82a36
Simplify runtime impl of deferred a bit by not making it a full class.
nikhilk Sep 24, 2012
52e1519
Created project for NodeJS import assembly
nikhilk Sep 24, 2012
251f7c7
Added ScriptMethod and ScriptEvent attributes
nikhilk Sep 25, 2012
95c2dab
Conditionally not generate module exports for internal code-only scen…
nikhilk Sep 26, 2012
9a8701d
Update history log for recent work
nikhilk Sep 26, 2012
a8d9bd2
Generate .min.js variant for each build. Only crunch or not based on …
nikhilk Sep 26, 2012
9854960
Cleanup scripts + use minimized script in tests as well
nikhilk Sep 26, 2012
05ac2a6
Remove old mscorlib scripts
nikhilk Sep 26, 2012
a29a240
Move metadata attributes used in script code into system namespace;
nikhilk Sep 28, 2012
97ea94c
Allow references to be copied to a relative path.
nikhilk Sep 28, 2012
cb29e46
Fix and test global registration of ss module functionality
nikhilk Sep 28, 2012
1dfdff2
Cleanup templates + fixes for recent changes
nikhilk Sep 28, 2012
e990571
Move require API to Window, since it is possibly specific to environm…
nikhilk Sep 28, 2012
ea74b50
Simplification and cleanup in preprocessor tool
nikhilk Sep 29, 2012
a14baa8
Consolidate tests
nikhilk Sep 29, 2012
747fb1d
Node.js support (import lib, templates, nuget package)
nikhilk Sep 29, 2012
9b6f4ae
Nuget package for nodejs
nikhilk Sep 30, 2012
3201e13
Some more sample updates...
nikhilk Sep 30, 2012
9f70aca
Merge branch 'master' into cc
nikhilk Sep 30, 2012
fb00eaf
DependentObservable -> ComputedObservable to match Knockout API changes
nikhilk Oct 7, 2012
ad3155e
Allow script assemblies to specify a script identifier
nikhilk Oct 7, 2012
0801393
HelloWorld knockout sample (also demonstrates use of RequireJS)
nikhilk Oct 7, 2012
ae5844e
Rename RegularExpression -> RegExp
nikhilk Oct 7, 2012
c5329ac
Enable delay loaded modules, override path for modules and requiring …
nikhilk Oct 7, 2012
be08581
Use ScriptReference in sample to simplify referencing knockout module
nikhilk Oct 7, 2012
a7141bb
Merge branch 'master' into cc
nikhilk Oct 8, 2012
ae02697
Parenthesize generated expressions
nikhilk Oct 8, 2012
10ab4d0
Fix generation of String.Replace.
nikhilk Oct 8, 2012
ed9ac5e
Fixes to retrieving type and type names
nikhilk Oct 8, 2012
af2d554
Consistency with regular mscorlib for number consts
nikhilk Oct 9, 2012
658373d
Added OriginalEvent to jQueryEvent object.
ProdigySim Oct 12, 2012
8535994
Merge pull request #261 from ProdigySim/cc
nikhilk Oct 12, 2012
2c9b101
Fix merged updates to reflect coding guidelines
nikhilk Oct 12, 2012
408e095
Special case equality checks for date objects to make them work as ex…
nikhilk Oct 19, 2012
029de82
Merge branch 'cc' of https://github.com/nikhilk/scriptsharp into cc
nikhilk Oct 19, 2012
409578d
Remove doc-comment stuff for now
nikhilk Oct 19, 2012
7b7e43a
ScriptProperty changed to ScriptField (to reflect actual semantics, a…
nikhilk Oct 19, 2012
f1a290e
Handling stopping of the test web server better
nikhilk Oct 23, 2012
a4243b1
Handle non-string keys in Dictionary
nikhilk Oct 23, 2012
aab2f2e
Single line delegate declaration + invocation
jamescourtney Oct 26, 2012
fada252
Merge branch 'master' into cc
nikhilk Nov 2, 2012
a174999
Merge branch 'master' into cc
nikhilk Nov 4, 2012
b83f734
Merge pull request #271 from jamescourtney/cc
nikhilk Nov 4, 2012
a058697
Update to the latest AjaxMin build (v4.73)
nikhilk Nov 4, 2012
b1b6818
Script generation tweaks to closely support node.js commonjs module p…
nikhilk Nov 5, 2012
9530c35
Optimize and update project/item templates
nikhilk Nov 5, 2012
4671d4a
Fix crash when referencing non-int enums
jamescourtney Nov 12, 2012
01290c0
Fix calls to base members not defined in immediate parent classes
nikhilk Nov 12, 2012
b78bc2a
Add support for LocaleSubFolders in build task
jamescourtney Nov 14, 2012
922683a
Enable access to registry of api modules created by scripts loaded in…
nikhilk Nov 15, 2012
2f37096
Merge pull request #285 from jamescourtney/cc
nikhilk Nov 16, 2012
876fed5
Fix for invoking base methods in intermediate types in class hierarch…
nikhilk Dec 7, 2012
0ac429b
As described here http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-…
jimmygilles Dec 8, 2012
9ebbd6c
Merge pull request #297 from jimmygilles/master
nikhilk Dec 9, 2012
26c8c71
Fix mapping of String.TrimEnd. #296
nikhilk Dec 9, 2012
e8eec5d
Fix jQuery metadata (add CORS property - #279) and other misc metadat…
nikhilk Dec 9, 2012
83d525b
Addressed suggestions in #288 to add converstion operators for Array,…
nikhilk Dec 9, 2012
7fa51f7
Misc node api updates
nikhilk Dec 16, 2012
5e3f715
ExpressJS APIs for node.js apps
nikhilk Dec 16, 2012
8fc5246
Nuget package for ExpressJS
nikhilk Dec 16, 2012
ff5a466
Fix express api to create app instance
nikhilk Dec 17, 2012
23142b9
MongoDB assembly for node.js applications + nuget package
nikhilk Dec 17, 2012
614cb65
MongoDB assembly for node.js applications + nuget package
nikhilk Dec 18, 2012
a736100
Merge branch 'cc' of https://github.com/nikhilk/scriptsharp into cc
nikhilk Dec 18, 2012
a9f9c6b
Fix vstemplate to refer to correct nuget package version
nikhilk Dec 18, 2012
265ad25
Update src/ZipX/ProjectTemplates/UnitTest/TestClass1.cs
theoutlander Dec 19, 2012
2435d8d
Allow for test code that is in a subnamespace within a Tests namespace.
nikhilk Dec 19, 2012
7767ce0
Merge pull request #303 from theoutlander/patch-1
nikhilk Dec 19, 2012
220b5c8
Some cleanup/simplification related to Tests namespace
nikhilk Dec 19, 2012
7f183fa
Added ability to reference scripts for inclusion within a script temp…
nikhilk Dec 20, 2012
374ae2a
Update ScriptCompilerExecTask as well for include support
nikhilk Dec 20, 2012
fd053a7
SPA stuff (folded in from sharpen project - WIP)
nikhilk Dec 21, 2012
db37f33
Fix namespaces
nikhilk Dec 21, 2012
b6e3541
Added Indexed Database API (http://www.w3.org/TR/IndexedDB).
aschoenebeck Jan 16, 2013
6e4c21a
Renamed IndexedDB API events
aschoenebeck Jan 17, 2013
443347f
Script Attributes on IndexedDB API delegates
aschoenebeck Jan 17, 2013
605fb58
More Script Attributes on IndexedDB API delegates
aschoenebeck Jan 17, 2013
c70faaf
Using event registration for IndexedDB API callbacks
aschoenebeck Jan 17, 2013
5364bf0
Revert "Using event registration for IndexedDB API callbacks"
aschoenebeck Jan 18, 2013
c9f43f6
Reimplemented event registration for IndexedDB API callbacks
aschoenebeck Jan 18, 2013
c02333e
Classes renamed and IndexedDB API namespace
aschoenebeck Jan 19, 2013
d798382
fixed parseDate and parseNumber
andekande Jan 23, 2013
37adfe8
fixed parseDate and parseNumber
andekande Jan 23, 2013
608288c
fixed parseDate and parseNumber
andekande Jan 23, 2013
b517c1b
Merge pull request #319 from aschoenebeck/cc
nikhilk Jan 25, 2013
c83ef67
Formatting changes + few API changes (internal ctors, props instead o…
nikhilk Jan 25, 2013
623625a
Move WebSQL APIs into Sql subnamespace
nikhilk Jan 25, 2013
ee2ae29
Move WebSQL related files within project
nikhilk Jan 25, 2013
7a8dcc3
Merge pull request #326 from andekande/patch-1
nikhilk Jan 25, 2013
2c0cacf
Fix unit test for date parsing change
nikhilk Jan 25, 2013
c7965ca
Added Script.IsNaN/IsFinite
nikhilk Jan 25, 2013
17ee86b
Make parseDate return NaN for invalid dates (consistent with parseInt…
nikhilk Jan 25, 2013
9cfcb1c
Added stub DataContract related attributes for shared code scenarios …
nikhilk Jan 26, 2013
03daf9d
Some node-related API fixes
nikhilk Jan 28, 2013
5b422bf
Wine cellar sample (script# with nodejs, express, mongo, and knockout)
nikhilk Jan 28, 2013
75a43ad
Added support for HTML5 File Access API by creating stubs for Blob, B…
theoutlander Jan 28, 2013
c42e0fa
Merge remote-tracking branch 'upstream/cc' into cc
theoutlander Jan 28, 2013
eb880f6
Re-ordered methods as per guidelines. Renamed namespace and moved fil…
theoutlander Jan 28, 2013
c8fa81f
FileList cannot be instantiated so the constructor is now hidden.
theoutlander Jan 28, 2013
600b267
Adding FileInputElement class for Input type="file" element so that w…
theoutlander Jan 28, 2013
59a08a3
Update samples/FishTank/Properties/AssemblyInfo.cs
nikhilk Jan 28, 2013
28a6ed5
Merge branch 'cc' of https://github.com/nikhilk/scriptsharp.git into cc
theoutlander Jan 29, 2013
515d432
Renamed DOMError to FileError.
theoutlander Jan 29, 2013
bada042
Merge pull request #327 from theoutlander/cc
nikhilk Jan 29, 2013
acd68b4
Minor code updates + addition of FileReaderSync type
nikhilk Jan 29, 2013
1af1702
Added support for Node-Neo4J Graph Database Client Library
theoutlander Jan 30, 2013
8146568
Solution file changes for adding Node.Neo4J project
theoutlander Jan 30, 2013
915bac3
Removed commented attributes
theoutlander Jan 30, 2013
277d9dd
Added support for StyleSheets API
Jan 31, 2013
7baa52d
Changed prefix from Neo4J to Graph
theoutlander Jan 31, 2013
c0c0863
Update files to use spaces instead of tabs
Jan 31, 2013
bfcc147
Update Files and Classes to fit Naming guidelines
Jan 31, 2013
94c2782
Update List objects to be Enumerable
Jan 31, 2013
7ea8451
Merge pull request #330 from viceroypenguin/cc
nikhilk Jan 31, 2013
71ea212
Minor tweaks to newly added StyleSheets API
Jan 31, 2013
d27eece
added xmlserializer
andekande Feb 1, 2013
1c9a0d6
Parsing invalid dates return undefined now (#324)
nikhilk Feb 1, 2013
686e9bd
Merge pull request #335 from andekande/patch-2
nikhilk Feb 1, 2013
566923f
Couple API naming related changes
nikhilk Feb 1, 2013
1458ff8
Release notes moved into wiki area
nikhilk Feb 3, 2013
e96031d
Update readme
nikhilk Feb 3, 2013
ae18154
More node.js APIs
nikhilk Feb 4, 2013
2617a86
Merge pull request #329 from theoutlander/cc
nikhilk Feb 4, 2013
9ba1599
Fix up project file, assembly name/namespaces
nikhilk Feb 4, 2013
db0c78d
Fix file paths
nikhilk Feb 4, 2013
bd65f56
Add Neo4j nuget package
nikhilk Feb 4, 2013
6853559
Write ";" after static functions
aschoenebeck Feb 11, 2013
6ff5842
Update tests for write ";" after static functions
aschoenebeck Feb 15, 2013
22e3d0d
Add LinkElement.
jimmygilles Feb 19, 2013
9fc1e49
Use a stable sort (using LINQ OrderBy rather than List.Sort) to prese…
nikhilk Feb 20, 2013
cbf2d32
Merge pull request #336 from aschoenebeck/staticfuncs
nikhilk Feb 20, 2013
0a2af20
Merge branch 'cc' of https://github.com/nikhilk/scriptsharp into cc
nikhilk Feb 20, 2013
80abeb8
Fix baselines after addition of ';' after static members,
nikhilk Feb 20, 2013
4754f21
Optimize generation of static classes by avoiding generation of an em…
nikhilk Feb 20, 2013
d6dfeee
Merge pull request #339 from jimmygilles/master
nikhilk Feb 21, 2013
9c6f2f0
Fixup member declarations and include into project
Feb 21, 2013
f081c80
Update links
nikhilk Feb 21, 2013
9eccc1b
Added/fixed some nodejs apis.
nikhilk Feb 22, 2013
a9df1c4
More node APIs added
nikhilk Feb 23, 2013
5216edc
Node.js sample app (a simple http repl console)
nikhilk Feb 23, 2013
16e2441
Node.js sample app (a simple http repl console)
nikhilk Feb 23, 2013
527ca6e
Merge branch 'cc' of https://github.com/nikhilk/scriptsharp into cc
nikhilk Feb 23, 2013
76b70d0
Add MetaKey property.
jimmygilles Mar 6, 2013
46b9cd6
Add missing properties on ElementEvent object.
jimmygilles Mar 6, 2013
5dad617
remove new line.
jimmygilles Mar 6, 2013
dd9f9a7
Merge pull request #344 from jimmygilles/master
nikhilk Mar 8, 2013
21af186
- Deployment via msbuild task in web app project
nikhilk Mar 10, 2013
30c7520
Update/fix samples
nikhilk Mar 10, 2013
f8a6931
Files needed for runtime package
nikhilk Mar 16, 2013
aef2daf
Make Debug.Fail work on non-IE browsers (#347)
nikhilk Mar 18, 2013
28fc9b9
Allow instantiating jQueryPosition
nikhilk Mar 25, 2013
e0738c0
Update lookup for chrome executable
nikhilk Mar 25, 2013
39fb572
Fix chrome browser path lookup
nikhilk Mar 31, 2013
3828b59
Fix sample to perform nuget package restore
nikhilk Mar 31, 2013
b94e2eb
Optimze generated code to not use namespace qualification. Also looks…
nikhilk Mar 31, 2013
4e98f22
Fix samples to use correct script template (that doesn't export a mod…
nikhilk Mar 31, 2013
d4c58fe
Script loader fix (invoke startup consistently regardless of whether …
nikhilk Mar 31, 2013
3063c5b
Fix sample (ve map url loading through script loader)
nikhilk Mar 31, 2013
4a8fe07
Added support for Node-Restify
theoutlander Apr 1, 2013
1e2da8d
Applied changes as suggested in the comments in https://github.com/ni…
theoutlander Apr 14, 2013
01c53b8
# This is a combination of 2 commits.
theoutlander Apr 14, 2013
1f510d1
Additional fixes to initial Node-restify library port
theoutlander Apr 17, 2013
48673d0
Removing files for initial node-restify commit
theoutlander Apr 17, 2013
13e42d6
Added support for Node-Restify
theoutlander Apr 1, 2013
2f35c04
Merge branch 'cc' of https://github.com/theoutlander/scriptsharp into cc
theoutlander Apr 18, 2013
8c47f73
Merge pull request #353 from theoutlander/cc
nikhilk Apr 18, 2013
4c8412e
Undo changes to HttpServerRequest/Response.
nikhilk Apr 18, 2013
fe165de
Import library for azure node module (storage and role environment re…
nikhilk Apr 18, 2013
d88742a
Fix import library description and build
nikhilk Apr 18, 2013
fc264cc
Nuget packages for restify ans azure node import libraries
nikhilk Apr 18, 2013
18f37b7
Script.IsTruthy, IsFalsey and Or (to replace Value) to fix issue #358
nikhilk Apr 18, 2013
40dc7ea
Validate Script.Literal strings are valid String.Format strings (fix …
nikhilk Apr 18, 2013
b1e3243
Add ss.value as runtime impl of Script.Value; ?? operator generates s…
nikhilk Apr 19, 2013
febce32
Add some missing xml dom APIs; remove some IE only ones.
nikhilk Apr 20, 2013
cb6e0f3
String.Trim with ability to specify trim characters + updated tests
nikhilk Apr 20, 2013
fe6900d
Creating stubs for base64 encoding/decoding as listed in #362
theoutlander Apr 20, 2013
f28bfbd
Merge pull request #364 from theoutlander/cc
nikhilk Apr 21, 2013
5a41f0f
Fix missing metadata attribute
nikhilk Apr 29, 2013
adcba6f
Fix azure import library metadata/APIs
nikhilk May 11, 2013
760cc48
Improve azure node module import library APIs
nikhilk May 24, 2013
91ce5c1
Script# node module/npm package
nikhilk May 24, 2013
09d8721
Test fixes
nikhilk Jun 4, 2013
8b97f3f
Add PATCH to http verbs enumeration
nikhilk Jun 4, 2013
283e79d
Fixed bug in Task implementation
nikhilk Jun 4, 2013
35444d0
Handle scenario for Task.All/Any called with array of tasks rather th…
nikhilk Jun 16, 2013
2be30f9
Fix for issue #379: use known compile time base to build runtime expr…
mattjphillips Jun 19, 2013
c4a03cf
Add ImportNode() to XmlDocument.
mattjphillips Jun 19, 2013
5e900e7
Add ImportNode() to XmlDocument.
mattjphillips Jun 19, 2013
87cc02e
Remove problematic optimization for local base class properties.
mattjphillips Jun 19, 2013
28cdf6f
Merge pull request #383 from mattjphillips/add_import_node
nikhilk Jun 19, 2013
4bf7585
Merge pull request #384 from mattjphillips/remove_app_optimization
nikhilk Jun 19, 2013
6dae908
Merge pull request #382 from mattjphillips/cc
nikhilk Jun 19, 2013
1d33e49
When a compilation error occurs, fail any of the tests that are based…
mattjphillips Jun 21, 2013
7602db3
Add tests for base methods, properties, and indexes.
mattjphillips Jun 21, 2013
66bf380
Fix some whitespace.
mattjphillips Jun 21, 2013
4fac58c
Add missing namespaced methods to Html.Document. And ImportNode.
mattjphillips Jun 21, 2013
a8b0a36
Merge pull request #385 from mattjphillips/fail_on_compiler_error
nikhilk Jun 23, 2013
0e3f288
Minor formatting changes
nikhilk Jun 23, 2013
d3d561b
Merge pull request #386 from mattjphillips/add_tests_for_bases
nikhilk Jun 23, 2013
7e9e8df
Merge pull request #387 from mattjphillips/add_ns_methods
nikhilk Jun 23, 2013
26dc564
NodeApi.IO.Buffer.Length should be a simple property accessor.
mattjphillips Aug 23, 2013
e75fbbb
Merge pull request #393 from mattjphillips/node_io_buffer_length_fix
nikhilk Aug 29, 2013
9b4780f
Added VS2013 target
MarkStega Nov 18, 2013
d79f893
Merge pull request #407 from MarkStega/cc
nikhilk Nov 18, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ obj/
*.user
*.cache
*.trx
Scripts/
packages/
Tests/*/Scripts
TestResults/
209 changes: 0 additions & 209 deletions History.txt

This file was deleted.

5 changes: 3 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script# Project #

Script# is a development tool that generates JavaScript by compiling C# source code. It is especially interesting for scripting-in-the-large scenarios that is commonplace in the current generation of HTML5 and script-based Web applications.
Script# is a development tool that generates JavaScript by compiling C# source code. It is especially interesting for scripting-in-the-large scenarios that is commonplace in the current generation of HTML5, node.js and script-based Web applications.

The driving principle behind Script# is that JavaScript is the "assembly language of the Web" ... the idea isn't to dislike JavaScript, but rather appreciate it for its flexibility and ubiquity, while bringing the productivity and familiarity of C# when building large scale (large codebase, large team or project over a longer period) application where stronger tools, more maintainable codebases are of utmost importance. You might have heard of this described as "application scale".

Expand All @@ -23,8 +23,9 @@ The [Script# Wiki](https://github.com/nikhilk/scriptsharp/wiki/Wiki) contains th

* [Repository Contents](https://github.com/nikhilk/scriptsharp/wiki/Repository)
* [Status](https://github.com/nikhilk/scriptsharp/wiki/Status), including roadmap and some thoughts about areas of contribution
* [Building and testing](https://github.com/nikhilk/scriptsharp/wiki/Building-and-Testing) the sources, and information on using private as well as incremental pre-release builds
* [Building, installing and testing](https://github.com/nikhilk/scriptsharp/wiki/Building,-Installing-and-Testing) the sources, and information on using private as well as incremental pre-release builds
* [Coding guidelines](https://github.com/nikhilk/scriptsharp/wiki/Coding-Guidelines)
* [Release notes](https://github.com/nikhilk/scriptsharp/wiki/Release-Notes) for a changelog and any version to version migration details.

### Credits ###

Expand Down
98 changes: 98 additions & 0 deletions fx/Sharpen/Core/Application.Behaviors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Application.Behaviors.cs
// Script#/FX/Sharpen/Core
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Html;
using System.Runtime.CompilerServices;

namespace Sharpen {

public sealed partial class Application {

/// <summary>
/// Creates and attaches behaviors specified on the element declaratively.
/// </summary>
/// <param name="element">The element whose behaviors should be created and attached.</param>
private void AttachBehaviors(Element element) {
string[] behaviorNames = ((string)element.GetAttribute(Application.BehaviorsAttribute)).Split(",");
int behaviorCount = behaviorNames.Length;

for (int i = 0; i < behaviorCount; i++) {
string name = behaviorNames[i].Trim();

BehaviorRegistration registration = _registeredBehaviors[name];
Debug.Assert(registration != null, "Unknown behavior '" + name + "'");

if (registration != null) {
Dictionary<string, object> options = OptionsParser.GetOptions(element, name);

// Use the Application's IoC capabilities to create behaviors.
// This allows satisfying dependencies behaviors have to other services,
// and also allows behaviors to provide or register services into the container.

Behavior behavior = (Behavior)GetObject(registration.BehaviorType);
behavior.Initialize(element, options);

if (registration.ServiceType != null) {
// Special-case the common case where a behavior represents a single
// service type, and auto-register it.
// In the case where a behavior is registering multiple service types
// (not so common), it can do so manually in its Initialize method.

RegisterObject(registration.ServiceType, behavior);
}
}
}
}

/// <summary>
/// Detaches all behaviors associated with the specified element.
/// </summary>
/// <param name="element">The element whose behaviors are to be detached.</param>
private void DetachBehaviors(Element element) {
// Detach all behaviors by enumerating the key/value pair list of
// behaviors being maintained on the element, and disposing them
// individually.

Dictionary<string, Behavior> behaviors = Script.GetField<Dictionary<string, Behavior>>(element, Application.BehaviorsKey);
if (behaviors != null) {
IEnumerable<string> names = behaviors.Keys;
foreach (string name in names) {
Behavior behavior = behaviors[name];
behavior.Dispose();
}
}
}

/// <summary>
/// Registers a behavior so it can be used declaratively in markup.
/// </summary>
/// <param name="name">The unique name of the behavior.</param>
/// <param name="behaviorType">The type of the behavior.</param>
public extern void RegisterBehavior(string name, Type behaviorType);

/// <summary>
/// Registers a behavior so it can be used declaratively in markup.
/// </summary>
/// <param name="name">The unique name of the behavior.</param>
/// <param name="behaviorType">The type of the behavior.</param>
/// <param name="serviceType">An option service type associated with the behavior for auto-registration with the application container.</param>
public void RegisterBehavior(string name, Type behaviorType, Type serviceType) {
Debug.Assert(String.IsNullOrEmpty(name) == false);
Debug.Assert(behaviorType != null);
Debug.Assert(typeof(Behavior).IsAssignableFrom(behaviorType));
Debug.Assert(_registeredBehaviors.ContainsKey(name) == false, "A behavior with name '" + name + "' was already registered.");

BehaviorRegistration registration = new BehaviorRegistration();
registration.BehaviorType = behaviorType;
registration.ServiceType = serviceType;

_registeredBehaviors[name] = registration;
Script.SetField(behaviorType, Application.BehaviorNameKey, name);
}
}
}
Loading