Commit e47e568b e47e568b69c5183a73f0cc768974a0848e8f3ff4 by felegy

Initial

0 parents
1 namespace .
2 {
3 public class DefaultCCEBusinessContext : ICCEBusinessContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public interface ICCEBusinessContext : ICCEContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 <Project Sdk="Microsoft.NET.Sdk">
2 <PropertyGroup>
3 <TargetFramework>netstandard1.6</TargetFramework>
4 </PropertyGroup>
5 </Project>
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public class DefaultCCEContext : ICCEContext
4 {
5 private readonly ICCEEnvironment _environment
6
7 public DefaultCCEContext(ICCEEnvironment environment)
8 {
9 _environment = environment;
10 }
11 }
12 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public interface ICCEContext
4 {
5
6
7 ICCEEnvironment Environment {get;}
8 }
9 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 using System;
4 using System.Collections.Generic;
5
6 /// <summary>
7 /// Defines the functionality of a Nancy environment.
8 /// </summary>
9 public interface ICCEEnvironment : IReadOnlyDictionary<string, object>, IHideObjectMembers
10 {
11 /// <summary>
12 /// Adds a <paramref name="value"/>, using a provided <paramref name="key"/>, to the environment.
13 /// </summary>
14 /// <typeparam name="T">The <see cref="Type"/> of the value to add.</typeparam>
15 /// <param name="key">The key to store the value as.</param>
16 /// <param name="value">The value to store in the environment.</param>
17 void AddValue<T>(string key, T value);
18
19 /// <summary>
20 /// Gets the value that is associated with the specified key.
21 /// </summary>
22 /// <typeparam name="T">The <see cref="Type"/> of the value to retrieve.</typeparam>
23 /// <param name="key">The key to get the value for.</param>
24 /// <param name="value">When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.</param>
25 /// <returns><see langword="true" /> if the value could be retrieved, otherwise <see langword="false" />.</returns>
26 bool TryGetValue<T>(string key, out T value);
27 }
28 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public abstract class DefaultCCEDataContextBase : ICCEDataContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public interface ICCEDataContext : ICCEContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public interface ICCESqlDataContext : ICCEDataContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace .
2 {
3 public class MsSqlCCESqlDataContext : DefaultCCEDataContextBase, ICCESqlDataContext
4 {
5
6 }
7 }
...\ No newline at end of file ...\ No newline at end of file
1 namespace CCE
2 {
3 using System;
4 using System.ComponentModel;
5
6 /// <summary>
7 /// Helper interface used to hide the base <see cref="object"/> members from the fluent API to make it much cleaner
8 /// in Visual Studio intellisense.
9 /// </summary>
10 /// <remarks>Created by Daniel Cazzulino http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx</remarks>
11 [EditorBrowsable(EditorBrowsableState.Never)]
12 public interface IHideObjectMembers
13 {
14 /// <summary>
15 /// Hides the <see cref="Equals"/> method.
16 /// </summary>
17 [EditorBrowsable(EditorBrowsableState.Never)]
18 bool Equals(object obj);
19
20 /// <summary>
21 /// Hides the <see cref="GetHashCode"/> method.
22 /// </summary>
23 [EditorBrowsable(EditorBrowsableState.Never)]
24 int GetHashCode();
25
26 /// <summary>
27 /// Hides the <see cref="GetType"/> method.
28 /// </summary>
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 Type GetType();
31
32 /// <summary>
33 /// Hides the <see cref="ToString"/> method.
34 /// </summary>
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 string ToString();
37 }
38 }
...\ No newline at end of file ...\ No newline at end of file
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 # Visual Studio 15
4 VisualStudioVersion = 15.0.26124.0
5 MinimumVisualStudioVersion = 15.0.26124.0
6 Global
7 GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 Debug|Any CPU = Debug|Any CPU
9 Debug|x64 = Debug|x64
10 Debug|x86 = Debug|x86
11 Release|Any CPU = Release|Any CPU
12 Release|x64 = Release|x64
13 Release|x86 = Release|x86
14 EndGlobalSection
15 GlobalSection(SolutionProperties) = preSolution
16 HideSolutionNode = FALSE
17 EndGlobalSection
18 EndGlobal