This file contains 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
cspack ServiceDefinition.csdef | |
/out:Azure.csx /copyOnly | |
/role:MvcTestAzure;MvcTestAzure | |
/sites:MvcTestAzure;Web;MvcTestAzure | |
/generateConfigurationFile:ServiceConfiguration.cscfg | |
/rolePropertiesFile:MvcTestAzure;Props.txt |
This file contains 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"?> | |
<ServiceDefinition name="mySiteInAzure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"> | |
<WebRole name="MvcTestAzure"> | |
<Sites> | |
<Site name="Web"> | |
<Bindings> | |
<Binding name="Endpoint1" endpointName="Endpoint1" /> | |
</Bindings> | |
</Site> | |
</Sites> |
This file contains 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
require "test/unit" | |
require "IronRubyMine/bin/Debug/IronRubyMine.dll" | |
class PersonTest < Test::Unit::TestCase | |
include IronRubyMine | |
def test_create_person_called_dominic | |
dominic = Person.new("Dominic") | |
assert_not_nil(dominic) |
This file contains 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
namespace IronRubyMine | |
{ | |
public class Person | |
{ | |
} | |
} |
This file contains 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
AzureMemcached.Client.Store(StoreMode.Set, key, value); | |
AzureMemcached.Client.Get(key); |
This file contains 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
_endpoints = new Dictionary(); | |
foreach (var endpoint in RoleEnvironment.Roles[_memcachedRoleName].Instances) | |
{ | |
foreach (var epi in endpoint.InstanceEndpoints) | |
{ | |
if (epi.Key == "memcached") | |
{ | |
_endpoints.Add(epi.Value.RoleInstance.Id.ToString(),epi.Value.IPEndpoint); | |
} | |
} |
This file contains 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
string arguments = "-m " + cacheSize + | |
" -l " + endpoint.Address + | |
" -p " + endpoint.Port; | |
ProcessStartInfo startInfo = new ProcessStartInfo(); | |
startInfo.CreateNoWindow = false; | |
startInfo.UseShellExecute = false; | |
startInfo.FileName = "memcached.exe"; | |
startInfo.WindowStyle = ProcessWindowStyle.Hidden; | |
startInfo.Arguments = arguments; |
This file contains 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(new OperationContextScope((IContextChannel)WebRole.serviceManagement)) | |
{ | |
var hostedServices = WebRole.serviceManagement.ListHostedServices(subscriberID); | |
foreach (HostedService service in hostedServices) | |
{ | |
Trace.TraceInformation("Hosted Service: {0}", service.ServiceName); | |
} | |
} |
This file contains 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
bool match = false; | |
var exp = new Regex(@"^[0-9a-z]+-*[0-9a-z]+$"); | |
if (exp.IsMatch(input)) | |
{ | |
if (input.Length >= 3 && input.Length <= 63) | |
{ | |
match = true; | |
Console.ForegroundColor = ConsoleColor.Green; | |
Console.WriteLine("VALID Queue Name: {0}", input); | |
} |
This file contains 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
<configuration> | |
<system .servicemodel=""> | |
<bindings> | |
<webhttpbinding> | |
<binding name="WindowsAzureServiceManagement_WebHttpBinding" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00"> | |
<readerquotas maxstringcontentlength="1048576" maxbytesperread="131072"> | |
<security mode="Transport"> | |
<transport clientcredentialtype="Certificate"> | |
</transport> | |
</security> |