Skip to content

Commit b31fccc

Browse files
author
Mason Schneider
committed
Version 1.0 Release
1 parent fe22d75 commit b31fccc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3892
-203
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{1255EBD3-0340-4AF6-A5F2-3D97D8709546}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Amazon.ElastiCacheCluster</RootNamespace>
11+
<AssemblyName>Amazon.ElastiCacheCluster</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>
22+
</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>
32+
</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
36+
<DocumentationFile>bin\Release\Amazon.ElastiCacheCluster.XML</DocumentationFile>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<SignAssembly>true</SignAssembly>
40+
</PropertyGroup>
41+
<PropertyGroup>
42+
<AssemblyOriginatorKeyFile>awskey.snk</AssemblyOriginatorKeyFile>
43+
</PropertyGroup>
44+
<ItemGroup>
45+
<Reference Include="Enyim.Caching">
46+
<HintPath>..\packages\EnyimMemcached.2.12\lib\net35\Enyim.Caching.dll</HintPath>
47+
</Reference>
48+
<Reference Include="System" />
49+
<Reference Include="System.configuration" />
50+
<Reference Include="System.Core" />
51+
<Reference Include="System.Xml.Linq" />
52+
<Reference Include="System.Data.DataSetExtensions" />
53+
<Reference Include="System.Data" />
54+
<Reference Include="System.Xml" />
55+
</ItemGroup>
56+
<ItemGroup>
57+
<Compile Include="ClusterConfigSettings.cs" />
58+
<Compile Include="ClusterClient.cs" />
59+
<Compile Include="Factories\DefaultConfigNodeFactory.cs" />
60+
<Compile Include="Factories\IConfigNodeFactory.cs" />
61+
<Compile Include="Operations\GetHelper.cs" />
62+
<Compile Include="Operations\GetOperation.cs" />
63+
<Compile Include="Helpers\AddrUtil.cs" />
64+
<Compile Include="Operations\IConfigOperation.cs" />
65+
<Compile Include="Pools\AutoBinaryPool.cs" />
66+
<Compile Include="ElastiCacheClusterConfig.cs" />
67+
<Compile Include="Pools\AutoServerPool.cs" />
68+
<Compile Include="Operations\ConfigGetOperation.cs" />
69+
<Compile Include="ConfigurationPoller.cs" />
70+
<Compile Include="DiscoveryNode.cs" />
71+
<Compile Include="Properties\AssemblyInfo.cs" />
72+
<Compile Include="Helpers\TextSocketHelper.cs" />
73+
</ItemGroup>
74+
<ItemGroup>
75+
<None Include="awskey.snk" />
76+
<None Include="packages.config" />
77+
</ItemGroup>
78+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
79+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
80+
Other similar extension points exist, see Microsoft.Common.targets.
81+
<Target Name="BeforeBuild">
82+
</Target>
83+
<Target Name="AfterBuild">
84+
</Target>
85+
-->
86+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>$id$</id>
5+
<version>$version$</version>
6+
<title>$title$</title>
7+
<authors>$author$</authors>
8+
<owners>$author$</owners>
9+
<iconUrl>http://media.amazonwebservices.com/aws_singlebox_01.png</iconUrl>
10+
<licenseUrl>http://aws.amazon.com/apache2.0</licenseUrl>
11+
<projectUrl>https://github.com/awslabs/elasticache-cluster-config-net</projectUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>$description$</description>
14+
<copyright>Copyright 2014</copyright>
15+
<tags>AWS Amazon cloud elasticache clusterclient aws amazon ElastiCacheCluster elasticacheclusterconfig cluster config clusterconfig elasticachenetclusterclient ElastiCache</tags>
16+
<dependencies>
17+
<dependency id="EnyimMemcached" version="2.12" />
18+
</dependencies>
19+
</metadata>
20+
</package>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
using System;
16+
using System.Collections.Generic;
17+
using System.Linq;
18+
using System.Text;
19+
using Enyim.Caching;
20+
21+
namespace Amazon.ElastiCacheCluster
22+
{
23+
/// <summary>
24+
/// Used to instantiate MemcachedClients with auto discovery enabled.
25+
/// Only use these for easy creation because the ability to get information from the config object is lost
26+
/// </summary>
27+
public static class ClusterClient
28+
{
29+
/// <summary>
30+
/// Creates a MemcachedClient using the settings found in the app.config section "clusterclient"
31+
/// </summary>
32+
/// <returns>A new MemcachedClient configured for auto discovery</returns>
33+
public static MemcachedClient CreateClient()
34+
{
35+
return new MemcachedClient(new ElastiCacheClusterConfig());
36+
}
37+
38+
/// <summary>
39+
/// Creates a MemcachedClient using the settings found in the app.config section specified
40+
/// </summary>
41+
/// <param name="section">A section in app.config that has a endpoint field</param>
42+
/// <returns>A new MemcachedClient configured for auto discovery</returns>
43+
public static MemcachedClient CreateClient(string section)
44+
{
45+
return new MemcachedClient(new ElastiCacheClusterConfig(section));
46+
}
47+
48+
/// <summary>
49+
/// Creates a MemcachedClient using the default settings with the endpoint and port specified
50+
/// </summary>
51+
/// <param name="endpoint">The url for the cluster endpoint containing .cfg.</param>
52+
/// <param name="port">The port to access the cluster on</param>
53+
/// <returns>A new MemcachedClient configured for auto discovery</returns>
54+
public static MemcachedClient CreateClient(string endpoint, int port)
55+
{
56+
return new MemcachedClient(new ElastiCacheClusterConfig(endpoint, port));
57+
}
58+
59+
/// <summary>
60+
/// Creates a MemcachedClient using the Client config provided
61+
/// </summary>
62+
/// <param name="config">The config to instantiate the client with</param>
63+
/// <returns>A new MemcachedClient configured for auto discovery</returns>
64+
public static MemcachedClient CreateClient(ElastiCacheClusterConfig config)
65+
{
66+
return new MemcachedClient(config);
67+
}
68+
}
69+
}

0 commit comments

Comments
 (0)