Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Rename project dependencies for web app
  • Loading branch information
mmartell committed May 11, 2020
1 parent 66479de commit 92616e8fd902d3a095b0d8b411b7c3fc03b95183
Showing 2 changed files with 8 additions and 44 deletions.
@@ -7,11 +7,17 @@

<ItemGroup>
<PackageReference Include="Steeltoe.Common.Hosting" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.ConnectorCore" Version="3.0.0-gemfire" />
<PackageReference Include="Steeltoe.ConnectorCore" Version="3.0.0-gemfire">
<IncludeAssets>Yes</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\GemFireCache\Apache.Geode.Session.csproj" />
<ProjectReference Include="..\GemFireCache\Apache.Geode.DotNetCore.Session.csproj" />
<ProjectReference Include="..\GemfireDotNet\Apache.Geode.DotNetCore.csproj">
<Private>true</Private>
</ProjectReference>
</ItemGroup>


</Project>
@@ -17,11 +17,6 @@ namespace SessionSample
#region snippet1
public class Startup
{
CacheFactory cacheFactory;
Cache cache;
PoolFactory poolFactory;
RegionFactory regionFactory;

public Startup(IConfiguration configuration)
{
Configuration = configuration;
@@ -79,43 +74,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
endpoints.MapRazorPages();
});
}

private void InitializeGemFireObjects()
{
Console.WriteLine("Create PoolFactory");
//gemfireCache.TypeRegistry.PdxSerializer = new ReflectionBasedAutoSerializer();

try
{
Console.WriteLine("Create Pool");
// make sure the pool has been created
poolFactory.CreatePool("pool");
}
catch (Exception ex) { };
//catch (IllegalStateException e)
//{
// // we end up here with this message if you've hit the reset link after the pool was created
// if (e.Message != "Pool with the same name already exists")
// {
// throw;
// }
//}

Console.WriteLine("Create Cache RegionFactory");
var regionFactory = cache.CreateRegionFactory(RegionShortcut.Proxy);
try
{
Console.WriteLine("Create CacheRegion");
regionFactory.CreateRegion("SteeltoeDemo");
Console.WriteLine("CacheRegion created");
}
catch (Exception ex) { };
//catch
//{
// Console.WriteLine("Create CacheRegion failed... now trying to get the region");
// cacheRegion = gemfireCache.GetRegion<string, string>(_regionName);
//}
}
}
#endregion
}

0 comments on commit 92616e8

Please sign in to comment.