Skip to content

Instantly share code, notes, and snippets.

View EifelMono's full-sized avatar

Andreas Klapperich EifelMono

View GitHub Profile
@EifelMono
EifelMono / VersionExtention.cs
Last active August 29, 2015 13:56
Compare of version number as Extention
using System;
using System.Collections.Generic;
/* Sample
class MainClass
{
public static void Main(string[] args)
{
@EifelMono
EifelMono / propf
Last active August 29, 2015 13:56
Code Template propf => property with member field
#region Property $name$
private $type$ m_$name$= $value$;
public $type$ $name$
{
get
{
return m_$name$;
}
@EifelMono
EifelMono / propf.snippet
Created March 4, 2014 08:22
propf.snippet
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>propf</Title>
<Shortcut>propf</Shortcut>
<Description>Code snippet for property and backing field with region and init value</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@EifelMono
EifelMono / EnumConverter.cs
Created March 22, 2014 18:20
EnumConverter for differerent enum <-> text handling
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
namespace EifelMono.Core
{
// [Obsolete ("Property is deprecated please use Property instead.")]
@EifelMono
EifelMono / IndexedProperty.cs
Last active August 29, 2015 13:57
IndexedProperty
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
namespace EifelMono.Core
{
// [Obsolete ("Property is deprecated please use Property instead.")]
@EifelMono
EifelMono / FindInitializationAndCall.pas
Last active August 29, 2015 13:58
Call Delphi initialization section
procedure FindInitializationAndCall;
var
nameSpace: string;
foundName: string;
helperType: System.Type;
begin
for helperType in Assembly.GetExecutingAssembly.GetTypes do
begin
nameSpace:= helperType.Namespace;
if Assigned(nameSpace) then
@EifelMono
EifelMono / ClassHelper.cs
Last active August 29, 2015 13:58
ClassHelper for Initialization and Finalization calls of a class
using System;
using System.Reflection;
namespace Utils
{
[AttributeUsage(AttributeTargets.Method)]
public sealed class InitializationAttribute : Attribute
{
public InitializationAttribute()
{
@EifelMono
EifelMono / AutoGenerateBindingRedirects
Created May 13, 2014 05:26
Problems with Assembly Versions
Add this
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
to the frist
<PropertyGroup>
:
:
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
:
@EifelMono
EifelMono / Instance.cs
Created June 16, 2014 05:49
IInstance
using System;
using System.Collections.Generic;
using System.Text;
namespace EifelMono
{
public interface IInstance<T>
{
T Instance { get; }
@EifelMono
EifelMono / Instance.cs
Created June 17, 2014 06:21
Instance, SingleInstance, MultiInstance
using System;
using System.Collections.Generic;
using System.Text;
namespace EifelMono
{
public class Instance<T>
{
public Instance()
{