This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static readonly IList<ViewModel> registeredEntities = new List<ViewModel>(); | |
| protected static IList<ViewModel> RegisteredViewModels | |
| { | |
| get | |
| { | |
| return registeredEntities; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/PluginExample/Program.cs b/PluginExample/Program.cs | |
| index 7d45ae6..1e320f5 100644 | |
| --- a/PluginExample/Program.cs | |
| +++ b/PluginExample/Program.cs | |
| @@ -1,5 +1,6 @@ | |
| using System; | |
| using System.Net; | |
| +using System.IO; | |
| using System.Security; | |
| using System.Security.Permissions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ csharp | |
| using SyMono C# Shell, type "help;" for help | |
| Enter statements below. | |
| csharp> using System.Text.RegularExpressions; | |
| csharp> var r = new Regex (@"^\s*(?<name>[A-Za-z0-9_]+)\s*=\s*(?<value>[^\s]+)\s*;"); | |
| csharp> var m = r.Match ("Foo = Bar;"); | |
| csharp> m.Success; | |
| true | |
| csharp> var name = m.Groups ["name"].Value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Random; | |
| class r { | |
| public static void main(String[] args) { | |
| Random x = new Random (); | |
| for(int i=0; i<1000; i++) System.out.println(x.nextInt(2)); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat ofs.cs | |
| using System; | |
| using System.Runtime.InteropServices; | |
| [StructLayout (LayoutKind.Explicit)] | |
| struct Embedded { | |
| [FieldOffset (0)] IntPtr b; | |
| [FieldOffset (0)] int c; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/mono/io-layer/locking.c b/mono/io-layer/locking.c | |
| index 57b18ca..eec2549 100644 | |
| --- a/mono/io-layer/locking.c | |
| +++ b/mono/io-layer/locking.c | |
| @@ -34,6 +34,11 @@ _wapi_lock_file_region (int fd, off_t offset, off_t length) | |
| struct flock lock_data; | |
| int ret; | |
| + if (offset < 0 || length < 0) { | |
| + SetLastError (ERROR_INVALID_PARAMETER); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // "Port"/rewrite of: http://blog.neteril.org/blog/2012/12/17/memory-efficient-bitmap-caching-with-mono-for-android/ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace Cadenza.IO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class Test { | |
| public static void Main () | |
| { | |
| var v = Environment.OSVersion; | |
| Console.WriteLine (" Platform: {0}", v.Platform); | |
| Console.WriteLine (" Service Pack: {0}", v.ServicePack); | |
| Console.WriteLine (" Version: {0}", v.Version); | |
| Console.WriteLine ("Version String: {0}", v.VersionString); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <ArrayOfItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
| <Item Completed="true"> | |
| <DoItem>fds</DoItem> | |
| </Item> | |
| <Item Completed="false"> | |
| <DoItem>Find</DoItem> | |
| </Item> | |
| </ArrayOfItem> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace Total | |
| { | |
| class Total | |
| { | |
| static void Main() | |
| { | |
| int Total = 0; | |
| for (int counter = 0; counter < 10; ++counter) { |