ElasticSearch is a distributed search engine based on Lucene.
- Data is stored as Json objects
- Data is automatically indexed
- Interact via REST Api
using System; | |
/// <summary> | |
/// A generic factory pattern. | |
/// <para>The Factory pattern is a creational pattern, | |
/// whose purpose is to define an interface for | |
/// creating an object, but let subclasses decide | |
/// which class to instantiate.</para> | |
/// </summary> | |
/// <typeparam name="T">The type created by the factory.</typeparam> |
using System; | |
/// <summary> | |
/// An example Dispose pattern. | |
/// <para>The Dispose pattern is a design pattern, whose | |
/// purpose is to handle resource cleanup in runtime | |
/// environments that use automatic garbage collection.</para> | |
/// </summary> | |
public class YourClass : IDisposable | |
{ |
using System; | |
using System.Collections.Generic; | |
/// <summary> | |
/// An example Observer pattern. | |
/// <para>The Observer pattern is a behavioral | |
/// pattern, whose purpose is to define a one-to-many | |
/// dependency between objects where a state change | |
/// in one object results with all its dependents | |
/// being notified and updated automatically.</para> |
using System; | |
internal class AndSpecification<T> : ISpecification<T> | |
{ | |
private ISpecification<T> Specification1 { get; set; } | |
private ISpecification<T> Specification2 { get; set; } | |
internal AndSpecification(ISpecification<T> s1, ISpecification<T> s2) | |
{ | |
Specification1 = s1; |
using System; | |
/// <summary> | |
/// An example abstract factory interface. | |
/// <para>The Abstract Factory pattern is a creational | |
/// pattern, whose purpose is to provide an interface | |
/// for creating families of related or dependent | |
/// objects, without specifying their concrete | |
/// classes.</para> | |
/// </summary> |
using System; | |
/// <summary> | |
/// An actual to expected adapter. | |
/// <para>The Adapter pattern is a structural pattern, | |
/// whose purpose is to convert the interface of a class | |
/// into another interface clients expect.</para> | |
/// </summary> | |
public class ActualToExpectedAdapter : IExpected | |
{ |
using System; | |
/// <summary> | |
/// The object which adds responsibilities to | |
/// a base instance. | |
/// <para>The Decorator pattern is a structural pattern, whose | |
/// purpose is to attach additional responsibilities to | |
/// an object dynamically keeping the same interface. </para> | |
/// </summary> | |
public class BaseDecorator : IBase |
using System; | |
/// <summary> | |
/// The actual object. | |
/// </summary> | |
public class ConcreteObject : IObject | |
{ | |
public void DoWork() | |
{ | |
} |
using System; | |
/// <summary> | |
/// The object which delegates to the appropriate sub-system. | |
/// <para>The Facade pattern is a structural pattern, whose | |
/// purpose is to provide a unified interface to a set of | |
/// interfaces in a subsystem.</para> | |
/// </summary> | |
public class Facade | |
{ |