Skip to content

Instantly share code, notes, and snippets.

@rwindegger
Last active October 1, 2016 10:41
Show Gist options
  • Save rwindegger/9e64bf7411664a8431bd4f94e1d771d8 to your computer and use it in GitHub Desktop.
Save rwindegger/9e64bf7411664a8431bd4f94e1d771d8 to your computer and use it in GitHub Desktop.
// <copyright file="Addin.cs" company="Rene Windegger">
// Copyright (c) 2013 Rene Windegger. All rights reserved.
// </copyright>
// <author>Rene Windegger</author>
// <date>23.12.2013</date>
// <summary>Implements the addin class</summary>
namespace wtf.windegger.addinframework
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/// <summary> An addin. </summary>
/// <remarks> Rene Windegger, 23.12.2013. </remarks>
/// <typeparam name="AddinType"> Type of the addin type. </typeparam>
public class Addin<AddinType>
{
/// <summary> Type of the addin. </summary>
private readonly Type m_AddinType;
/// <summary> Initializes a new instance of the Addin class. </summary>
/// <remarks> Rene Windegger, 23.12.2013. </remarks>
/// <param name="addinType"> Type of the addin. </param>
public Addin(Type addinType)
{
m_AddinType = addinType;
}
/// <summary> Prevents a default instance of the Addin class from being created. </summary>
/// <remarks> Rene Windegger, 23.12.2013. </remarks>
private Addin()
{
}
/// <summary> Gets the instance. </summary>
/// <value> The instance. </value>
public AddinType Instance
{
get
{
return (AddinType)Activator.CreateInstance(m_AddinType);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment